mirror of
https://github.com/syncthing/syncthing-android.git
synced 2024-12-23 11:21:29 +00:00
Preferences code cleanup.
This commit is contained in:
parent
0278210471
commit
7e69c3a354
2 changed files with 6 additions and 18 deletions
|
@ -26,8 +26,6 @@ import com.nutomic.syncthingandroid.syncthing.SyncthingServiceBinder;
|
||||||
public class SettingsActivity extends PreferenceActivity
|
public class SettingsActivity extends PreferenceActivity
|
||||||
implements Preference.OnPreferenceChangeListener {
|
implements Preference.OnPreferenceChangeListener {
|
||||||
|
|
||||||
private static final String REPORT_ISSUE_KEY = "report_issue";
|
|
||||||
|
|
||||||
private static final String SYNCTHING_OPTIONS_KEY = "syncthing_options";
|
private static final String SYNCTHING_OPTIONS_KEY = "syncthing_options";
|
||||||
|
|
||||||
private static final String SYNCTHING_GUI_KEY = "syncthing_gui";
|
private static final String SYNCTHING_GUI_KEY = "syncthing_gui";
|
||||||
|
@ -122,19 +120,6 @@ public class SettingsActivity extends PreferenceActivity
|
||||||
unbindService(mSyncthingServiceConnection);
|
unbindService(mSyncthingServiceConnection);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Opens issue tracker when that preference is clicked.
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen,
|
|
||||||
Preference preference) {
|
|
||||||
if (REPORT_ISSUE_KEY.equals(preference.getKey())) {
|
|
||||||
startActivity(new Intent(Intent.ACTION_VIEW,
|
|
||||||
Uri.parse(getString(R.string.issue_tracker_url))));
|
|
||||||
}
|
|
||||||
return super.onPreferenceTreeClick(preferenceScreen, preference);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handles ActionBar back selected.
|
* Handles ActionBar back selected.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -79,9 +79,12 @@
|
||||||
</PreferenceScreen>
|
</PreferenceScreen>
|
||||||
|
|
||||||
<Preference
|
<Preference
|
||||||
android:key="report_issue"
|
android:title="@string/report_issue_title"
|
||||||
android:title="@string/report_issue_title"
|
android:summary="@string/report_issue_summary" >
|
||||||
android:summary="@string/report_issue_summary"/>
|
<intent
|
||||||
|
android:action="android.intent.action.VIEW"
|
||||||
|
android:data="@string/issue_tracker_url" />
|
||||||
|
</Preference>
|
||||||
|
|
||||||
<Preference
|
<Preference
|
||||||
android:key="syncthing_version"
|
android:key="syncthing_version"
|
||||||
|
|
Loading…
Reference in a new issue