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 watchappsmaster
parent
e43fed2e7e
commit
6ed54484a6
|
@ -55,15 +55,6 @@ public class AppManagerActivity extends Activity {
|
||||||
|
|
||||||
appList.add(new GBDeviceApp(uuid, appName, appCreator, "", appType));
|
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();
|
mGBDeviceAppAdapter.notifyDataSetChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -112,6 +103,15 @@ public class AppManagerActivity extends Activity {
|
||||||
|
|
||||||
registerForContextMenu(appListView);
|
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();
|
IntentFilter filter = new IntentFilter();
|
||||||
filter.addAction(ControlCenter.ACTION_QUIT);
|
filter.addAction(ControlCenter.ACTION_QUIT);
|
||||||
filter.addAction(ACTION_REFRESH_APPLIST);
|
filter.addAction(ACTION_REFRESH_APPLIST);
|
||||||
|
|
Loading…
Reference in New Issue