mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2025-01-24 16:47:32 +01:00
Check the mount state of all external storage directories
This commit is contained in:
parent
efdc4c434a
commit
6d947a9008
@ -264,11 +264,10 @@ public class FileUtils {
|
||||
continue;
|
||||
}
|
||||
|
||||
// the first directory is also the primary external storage, i.e. the same as Environment.getExternalFilesDir()
|
||||
// TODO: check the mount state of *all* dirs when switching to later API level
|
||||
if (!GBEnvironment.env().isLocalTest()) { // don't do this with robolectric
|
||||
if (i == 0 && !Environment.MEDIA_MOUNTED.equals(Environment.getExternalStorageState())) {
|
||||
GB.log("ignoring unmounted external storage dir: " + dir, GB.INFO, null);
|
||||
final String storageState = Environment.getExternalStorageState(dir);
|
||||
if (!Environment.MEDIA_MOUNTED.equals(storageState)) {
|
||||
GB.log("ignoring '" + storageState + "' external storage dir: " + dir, GB.INFO, null);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
@ -480,7 +480,7 @@
|
||||
<string name="watch9_pairing_tap_hint">When your watch vibrates, shake the device or press its button.</string>
|
||||
<string name="title_activity_sleepmonitor">Sleep monitor</string>
|
||||
<string name="pref_write_logfiles">Write log files</string>
|
||||
<string name="pref_write_logfiles_not_available">File logging initialization failed, writing log files is not available</string>
|
||||
<string name="pref_write_logfiles_not_available">File logging initialization failed, writing log files is currently not available. Restart the application to attempt to initialize the log files again.</string>
|
||||
<string name="initializing">Initializing</string>
|
||||
<string name="busy_task_fetch_activity_data">Fetching activity data</string>
|
||||
<string name="sleep_activity_date_range">From %1$s to %2$s</string>
|
||||
|
Loading…
x
Reference in New Issue
Block a user