Home | History | Annotate | Download | only in launcher2
      1 package com.android.launcher2;
      2 
      3 import android.content.BroadcastReceiver;
      4 import android.content.Context;
      5 import android.content.Intent;
      6 
      7 public class PackageChangedReceiver extends BroadcastReceiver {
      8     @Override
      9     public void onReceive(final Context context, Intent intent) {
     10         final String packageName = intent.getData().getSchemeSpecificPart();
     11 
     12         if (packageName == null || packageName.length() == 0) {
     13             // they sent us a bad intent
     14             return;
     15         }
     16         LauncherApplication app = (LauncherApplication) context.getApplicationContext();
     17         WidgetPreviewLoader.removeFromDb(app.getWidgetPreviewCacheDb(), packageName);
     18     }
     19 }
     20