mirror of
https://github.com/syncthing/syncthing-android.git
synced 2024-11-22 20:31:16 +00:00
Added toast regarding external storage usage on Kitkat and higher (ref #225).
This commit is contained in:
parent
527d40e670
commit
beb9dc54a4
3 changed files with 10 additions and 2 deletions
|
@ -69,7 +69,7 @@ public class SyncthingServiceTest extends ServiceTestCase<SyncthingService> {
|
|||
latch.countDown();
|
||||
}
|
||||
});
|
||||
latch.await(5, TimeUnit.SECONDS);
|
||||
latch.await(1, TimeUnit.SECONDS);
|
||||
assertNotNull(getService().getApi());
|
||||
assertNotNull(getService().getWebGuiUrl());
|
||||
}
|
||||
|
|
|
@ -74,7 +74,7 @@ public class FolderPickerActivity extends SyncthingActivity
|
|||
|
||||
// Populate roots.
|
||||
ArrayList<File> roots = new ArrayList<>();
|
||||
if (android.os.Build.VERSION.SDK_INT >= 19) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
||||
roots.addAll(Arrays.asList(getExternalFilesDirs(null)));
|
||||
}
|
||||
roots.add(Environment.getExternalStorageDirectory());
|
||||
|
@ -96,6 +96,11 @@ public class FolderPickerActivity extends SyncthingActivity
|
|||
} else {
|
||||
displayRoot();
|
||||
}
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
||||
Toast.makeText(this, R.string.kitkat_external_storage_warning, Toast.LENGTH_LONG)
|
||||
.show();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -287,6 +287,9 @@ Please report any problems you encounter via Github.</string>
|
|||
<!-- Activity title -->
|
||||
<string name="folder_picker_title">Folder Picker</string>
|
||||
|
||||
<!-- Toast shown on devices with kitkat or higher -->
|
||||
<string name="kitkat_external_storage_warning">Warning: Your Android version does not allow syncing to external storage devices</string>
|
||||
|
||||
<!-- ListView empty text -->
|
||||
<string name="directory_empty">Directory is Empty</string>
|
||||
|
||||
|
|
Loading…
Reference in a new issue