1
0
Fork 0
mirror of https://github.com/syncthing/syncthing-android.git synced 2024-11-26 06:11:19 +00:00

Fix warning about missing write perm in root mode (fixes #1165) (#1166)

This commit is contained in:
Catfriend1 2018-06-24 12:37:06 +02:00 committed by Audrius Butkevicius
parent 1442eb9fce
commit d83060975c

View file

@ -31,6 +31,7 @@ import android.widget.Toast;
import com.google.common.collect.Sets;
import com.nutomic.syncthingandroid.R;
import com.nutomic.syncthingandroid.SyncthingApp;
import com.nutomic.syncthingandroid.service.Constants;
import com.nutomic.syncthingandroid.service.SyncthingService;
import com.nutomic.syncthingandroid.service.SyncthingServiceBinder;
import com.nutomic.syncthingandroid.util.Util;
@ -102,7 +103,8 @@ public class FolderPickerActivity extends SyncthingActivity
displayRoot();
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
Boolean prefUseRoot = PreferenceManager.getDefaultSharedPreferences(this).getBoolean(Constants.PREF_USE_ROOT, false);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT && !prefUseRoot) {
Toast.makeText(this, R.string.kitkat_external_storage_warning, Toast.LENGTH_LONG)
.show();
}