Lines Matching refs:context

39     public void onReceive(Context context, Intent intent) {
44 AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(context);
45 performUpdate(context, appWidgetManager,
46 appWidgetManager.getAppWidgetIds(getComponentName(context)));
48 super.onReceive(context, intent);
53 public void onUpdate(Context context, AppWidgetManager mngr, int[] ids) {
54 performUpdate(context, mngr, ids);
58 public void onDeleted(Context context, int[] appWidgetIds) {
59 super.onDeleted(context, appWidgetIds);
61 BookmarkThumbnailWidgetService.deleteWidgetState(context, widgetId);
63 removeOrphanedFiles(context);
67 public void onDisabled(Context context) {
68 super.onDisabled(context);
69 removeOrphanedFiles(context);
75 void removeOrphanedFiles(Context context) {
76 AppWidgetManager wm = AppWidgetManager.getInstance(context);
77 int[] ids = wm.getAppWidgetIds(getComponentName(context));
78 BookmarkThumbnailWidgetService.removeOrphanedStates(context, ids);
81 private void performUpdate(Context context,
83 PendingIntent launchBrowser = PendingIntent.getActivity(context, 0,
84 new Intent(BrowserActivity.ACTION_SHOW_BROWSER, null, context,
88 Intent updateIntent = new Intent(context, BookmarkThumbnailWidgetService.class);
91 RemoteViews views = new RemoteViews(context.getPackageName(),
96 Intent ic = new Intent(context, BookmarkWidgetProxy.class);
98 PendingIntent.getBroadcast(context, 0, ic,
108 static ComponentName getComponentName(Context context) {
109 return new ComponentName(context, BookmarkThumbnailWidgetProvider.class);
112 public static void refreshWidgets(Context context) {
113 context.sendBroadcast(new Intent(
115 null, context, BookmarkThumbnailWidgetProvider.class));