mirror of
https://github.com/syncthing/syncthing-android.git
synced 2024-12-27 13:21:30 +00:00
Moved root to experimental settings, removed confirm dialog.
This commit is contained in:
parent
273d24bc15
commit
9636c2ae91
3 changed files with 10 additions and 25 deletions
|
@ -343,20 +343,9 @@ public class SettingsFragment extends PreferenceFragment
|
|||
switch (preference.getKey()) {
|
||||
case SyncthingService.PREF_USE_ROOT:
|
||||
if (mUseRoot.isChecked()) {
|
||||
// Only check preference after dialog was confirmed and root was granted.
|
||||
// Only check preference after root was granted.
|
||||
mUseRoot.setChecked(false);
|
||||
new AlertDialog.Builder(getActivity())
|
||||
.setTitle(R.string.root_dialog_title)
|
||||
.setMessage(R.string.root_dialog_message)
|
||||
.setPositiveButton(android.R.string.yes,
|
||||
new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
new TestRootTask().execute();
|
||||
}
|
||||
})
|
||||
.setNegativeButton(android.R.string.no, null)
|
||||
.show();
|
||||
new TestRootTask().execute();
|
||||
} else {
|
||||
new Thread(new ChownFilesRunnable()).start();
|
||||
mSyncthingService.getApi().requireRestart(getActivity());
|
||||
|
|
|
@ -246,13 +246,9 @@ Please report any problems you encounter via Github.</string>
|
|||
|
||||
<string name="advanced_folder_picker_summary">Select any folder on the device for syncing</string>
|
||||
|
||||
<string name="use_root_title">Sync as Root</string>
|
||||
<string name="use_root_title">Run Syncthing as Superuser</string>
|
||||
|
||||
<string name="use_root_summary">Run Syncthing as Superuser</string>
|
||||
|
||||
<string name="root_dialog_title">Are you sure you want to enable root?</string>
|
||||
|
||||
<string name="root_dialog_message">This may cause various problems with Syncthing and with your device. Use at your own risk.</string>
|
||||
<string name="use_root_summary">This may cause various problems with Syncthing and with your device. Use at your own risk.</string>
|
||||
|
||||
<string name="notification_type_title">Notification</string>
|
||||
|
||||
|
|
|
@ -29,12 +29,6 @@
|
|||
android:summary="@string/advanced_folder_picker_summary"
|
||||
android:defaultValue="false" />
|
||||
|
||||
<CheckBoxPreference
|
||||
android:key="use_root"
|
||||
android:title="@string/use_root_title"
|
||||
android:summary="@string/use_root_summary"
|
||||
android:defaultValue="false" />
|
||||
|
||||
<ListPreference
|
||||
android:key="notification_type"
|
||||
android:title="@string/notification_type_title"
|
||||
|
@ -151,6 +145,12 @@
|
|||
android:key="syncthing_experimental"
|
||||
android:title="@string/experimental_settings">
|
||||
|
||||
<CheckBoxPreference
|
||||
android:key="use_root"
|
||||
android:title="@string/use_root_title"
|
||||
android:summary="@string/use_root_summary"
|
||||
android:defaultValue="false" />
|
||||
|
||||
<CheckBoxPreference
|
||||
android:key="wakelock_while_binary_running"
|
||||
android:title="@string/keep_wakelock_while_binary_running"
|
||||
|
|
Loading…
Reference in a new issue