Fix some crashes and caching issues

This commit is contained in:
Cameron Gutman
2015-01-31 17:01:46 -05:00
parent baa5199b83
commit 56f438fe47
2 changed files with 16 additions and 4 deletions

View File

@@ -92,9 +92,6 @@ public class AppView extends Activity implements AdapterFragmentCallbacks {
// Get the computer object
computer = managerBinder.getComputer(UUID.fromString(uuidString));
// Start updates
startComputerUpdates();
try {
appGridAdapter = new AppGridAdapter(AppView.this,
PreferenceConfiguration.readPreferences(AppView.this).listMode,
@@ -106,6 +103,9 @@ public class AppView extends Activity implements AdapterFragmentCallbacks {
return;
}
// Start updates
startComputerUpdates();
// Load the app grid with cached data (if possible)
populateAppGridWithCache();
@@ -226,6 +226,10 @@ public class AppView extends Activity implements AdapterFragmentCallbacks {
updateUiWithAppList(applist);
LimeLog.info("Loaded applist from cache");
} catch (Exception e) {
if (lastRawApplist != null) {
LimeLog.warning("Saved applist corrupted: "+lastRawApplist);
e.printStackTrace();
}
LimeLog.info("Loading applist from the network");
// We'll need to load from the network
loadAppsBlocking();