2013-01-23 12:39:24 +01:00
|
|
|
package com.android.launcher2;
|
|
|
|
|
|
|
|
|
|
import android.content.BroadcastReceiver;
|
|
|
|
|
import android.content.Context;
|
|
|
|
|
import android.content.Intent;
|
|
|
|
|
|
|
|
|
|
public class PackageChangedReceiver extends BroadcastReceiver {
|
|
|
|
|
@Override
|
|
|
|
|
public void onReceive(final Context context, Intent intent) {
|
|
|
|
|
final String packageName = intent.getData().getSchemeSpecificPart();
|
|
|
|
|
|
|
|
|
|
if (packageName == null || packageName.length() == 0) {
|
|
|
|
|
// they sent us a bad intent
|
|
|
|
|
return;
|
|
|
|
|
}
|
2013-03-19 12:01:06 +01:00
|
|
|
LauncherApplication app = (LauncherApplication) context.getApplicationContext();
|
|
|
|
|
WidgetPreviewLoader.removeFromDb(app.getWidgetPreviewCacheDb(), packageName);
|
2013-01-23 12:39:24 +01:00
|
|
|
}
|
|
|
|
|
}
|