1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-07-03 11:33:19 +02:00

Pebble: only fill app list in AppManager with cached apps once in onCreate()

This is important for FW 3.x testing, since the REFRESH intent
will never arrive and we want to see cached watchapps
This commit is contained in:
Andreas Shimokawa 2015-08-11 14:16:08 +02:00
parent e43fed2e7e
commit 6ed54484a6

View File

@ -55,15 +55,6 @@ public class AppManagerActivity extends Activity {
appList.add(new GBDeviceApp(uuid, appName, appCreator, "", appType));
}
SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(GBApplication.getContext());
if (sharedPrefs.getBoolean("pebble_force_untested", false)) {
List<GBDeviceApp> cachedApps = getCachedApps();
for (GBDeviceApp app : cachedApps) {
appList.add(app);
}
}
mGBDeviceAppAdapter.notifyDataSetChanged();
}
}
@ -111,6 +102,15 @@ public class AppManagerActivity extends Activity {
});
registerForContextMenu(appListView);
SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(GBApplication.getContext());
if (sharedPrefs.getBoolean("pebble_force_untested", false)) {
List<GBDeviceApp> cachedApps = getCachedApps();
for (GBDeviceApp app : cachedApps) {
appList.add(app);
}
}
IntentFilter filter = new IntentFilter();
filter.addAction(ControlCenter.ACTION_QUIT);