mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2025-02-18 05:17:08 +01:00
Pebble: fix crash with emply pbw cache
This commit is contained in:
parent
6ed54484a6
commit
749fbe5ecc
@ -68,12 +68,14 @@ public class AppManagerActivity extends Activity {
|
||||
try {
|
||||
File cachePath = new File(FileUtils.getExternalFilesDir().getPath() + "/pbw-cache");
|
||||
File files[] = cachePath.listFiles();
|
||||
if (files != null) {
|
||||
for (File file : files) {
|
||||
if (file.getName().endsWith(".pbw")) {
|
||||
UUID uuid = UUID.fromString(file.getName().substring(0, file.getName().length() - 4));
|
||||
cachedAppList.add(new GBDeviceApp(uuid, uuid.toString(), "N/A", "", GBDeviceApp.Type.UNKNOWN));
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user