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
master
Andreas Shimokawa 2015-08-11 14:16:08 +02:00
parent e43fed2e7e
commit 6ed54484a6
1 changed files with 9 additions and 9 deletions

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);