@Override
 public void onResume() {
   super.onResume();
   mDownloadHelper.onActivityResume();
   mDownloadHelper.startDownloading(null, false);
   mRemoteImageLoader.onActivityResume();
 }
 @Override
 public void onLoaderReset(Loader<Cursor> loader) {
   switch (loader.getId()) {
     case LOADER_APPS:
       mDownloadHelper.updateLocalData(null);
       mAdapter.swapCursor(null);
       return;
     default:
       throw new RuntimeException("Unknown laoder id: " + loader.getId());
   }
 }
 @Override
 public boolean onOptionsItemSelected(MenuItem item) {
   int itemId = item.getItemId();
   switch (itemId) {
     case R.id.menu_refresh:
       mDownloadHelper.startDownloading(null, true);
       return true;
     case R.id.menu_add:
       startActivity(new Intent(Intent.ACTION_INSERT_OR_EDIT, AppContract.Apps.CONTENT_URI));
       return true;
     default:
       return super.onOptionsItemSelected(item);
   }
 }
 @Override
 public void onPause() {
   super.onPause();
   mDownloadHelper.onActivityPause();
   mRemoteImageLoader.onActivityPause();
 }