/frameworks/base/core/java/android/appwidget/ |
AppWidgetProvider.java | 61 if (AppWidgetManager.ACTION_APPWIDGET_UPDATE.equals(action)) { 64 int[] appWidgetIds = extras.getIntArray(AppWidgetManager.EXTRA_APPWIDGET_IDS); 66 this.onUpdate(context, AppWidgetManager.getInstance(context), appWidgetIds); 69 } else if (AppWidgetManager.ACTION_APPWIDGET_DELETED.equals(action)) { 71 if (extras != null && extras.containsKey(AppWidgetManager.EXTRA_APPWIDGET_ID)) { 72 final int appWidgetId = extras.getInt(AppWidgetManager.EXTRA_APPWIDGET_ID); 75 } else if (AppWidgetManager.ACTION_APPWIDGET_OPTIONS_CHANGED.equals(action)) { 77 if (extras != null && extras.containsKey(AppWidgetManager.EXTRA_APPWIDGET_ID) 78 && extras.containsKey(AppWidgetManager.EXTRA_APPWIDGET_OPTIONS)) { 79 int appWidgetId = extras.getInt(AppWidgetManager.EXTRA_APPWIDGET_ID) [all...] |
/frameworks/base/tests/appwidgets/AppWidgetHostTest/src/com/android/tests/appwidgethost/ |
TestAppWidgetProvider.java | 24 import android.appwidget.AppWidgetManager; 40 if (AppWidgetManager.ACTION_APPWIDGET_ENABLED.equals(action)) { 43 else if (AppWidgetManager.ACTION_APPWIDGET_DISABLED.equals(action)) { 46 else if (AppWidgetManager.ACTION_APPWIDGET_UPDATE.equals(action)) { 50 int[] appWidgetIds = extras.getIntArray(AppWidgetManager.EXTRA_APPWIDGET_IDS); 57 AppWidgetManager gm = AppWidgetManager.getInstance(context);
|
/frameworks/base/tests/appwidgets/AppWidgetProviderTest/src/com/android/tests/appwidgetprovider/ |
TestAppWidgetProvider.java | 23 import android.appwidget.AppWidgetManager; 37 if (AppWidgetManager.ACTION_APPWIDGET_ENABLED.equals(action)) { 40 else if (AppWidgetManager.ACTION_APPWIDGET_DISABLED.equals(action)) { 43 else if (AppWidgetManager.ACTION_APPWIDGET_UPDATE.equals(action)) { 47 int[] appWidgetIds = extras.getIntArray(AppWidgetManager.EXTRA_APPWIDGET_IDS); 49 AppWidgetManager gm = AppWidgetManager.getInstance(context);
|
/cts/tests/tests/appwidget/src/android/appwidget/cts/provider/ |
AppWidgetProviderCallbacks.java | 19 import android.appwidget.AppWidgetManager; 36 public abstract void onUpdate(Context context, AppWidgetManager appWidgetManager, 40 AppWidgetManager appWidgetManager, int appWidgetId, Bundle newOptions);
|
StubbableAppWidgetProvider.java | 19 import android.appwidget.AppWidgetManager; 26 public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) { 29 callbacks.onUpdate(context, appWidgetManager, appWidgetIds); 34 public void onAppWidgetOptionsChanged(Context context, AppWidgetManager appWidgetManager, 38 callbacks.onAppWidgetOptionsChanged(context, appWidgetManager, appWidgetId, newOptions);
|
/cts/tests/tests/permission/src/android/permission/cts/ |
AppWidgetManagerPermissionTest.java | 19 import android.appwidget.AppWidgetManager; 26 * Test that protected AppWidgetManager APIs cannot be called without permissions 30 private AppWidgetManager mAppWidgetManager = null; 35 mAppWidgetManager = AppWidgetManager.getInstance(getContext()); 40 * {@link AppWidgetManager#bindAppWidgetId(int, android.content.ComponentName)}
|
/packages/apps/DeskClock/src/com/android/alarmclock/ |
WidgetUtils.java | 19 import android.appwidget.AppWidgetManager; 34 AppWidgetManager widgetManager = AppWidgetManager.getInstance(context); 42 int minWidth = options.getInt(AppWidgetManager.OPTION_APPWIDGET_MIN_WIDTH); 72 AppWidgetManager widgetManager = AppWidgetManager.getInstance(context); 80 int minHeight = options.getInt(AppWidgetManager.OPTION_APPWIDGET_MIN_HEIGHT);
|
AnalogAppWidgetProvider.java | 20 import android.appwidget.AppWidgetManager; 41 final AppWidgetManager wm = AppWidgetManager.getInstance(context); 58 public void onUpdate(Context context, AppWidgetManager wm, int[] widgetIds) {
|
/development/samples/ApiDemos/src/com/example/android/apis/appwidget/ |
ExampleAppWidgetConfigure.java | 20 import android.appwidget.AppWidgetManager; 44 int mAppWidgetId = AppWidgetManager.INVALID_APPWIDGET_ID; 73 AppWidgetManager.EXTRA_APPWIDGET_ID, AppWidgetManager.INVALID_APPWIDGET_ID); 77 if (mAppWidgetId == AppWidgetManager.INVALID_APPWIDGET_ID) { 94 AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(context); 95 ExampleAppWidgetProvider.updateAppWidget(context, appWidgetManager, 100 resultValue.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, mAppWidgetId) [all...] |
ExampleBroadcastReceiver.java | 19 import android.appwidget.AppWidgetManager; 43 AppWidgetManager gm = AppWidgetManager.getInstance(context);
|
/development/samples/StackWidget/src/com/example/android/stackwidget/ |
StackWidgetProvider.java | 20 import android.appwidget.AppWidgetManager; 49 AppWidgetManager mgr = AppWidgetManager.getInstance(context); 51 int appWidgetId = intent.getIntExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, 52 AppWidgetManager.INVALID_APPWIDGET_ID); 60 public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) { 67 intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetIds[i]); 84 toastIntent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetIds[i]); 90 appWidgetManager.updateAppWidget(appWidgetIds[i], rv) [all...] |
/packages/apps/Gallery/src/com/android/camera/ |
PhotoAppWidgetBind.java | 22 import android.appwidget.AppWidgetManager; 51 extras.getIntArray(AppWidgetManager.EXTRA_APPWIDGET_IDS); 61 AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(this); 72 appWidgetManager.updateAppWidget(new int[] { appWidgetId }, views);
|
PhotoAppWidgetConfigure.java | 22 import android.appwidget.AppWidgetManager; 45 AppWidgetManager.EXTRA_APPWIDGET_ID, -1); 87 AppWidgetManager appWidgetManager = 88 AppWidgetManager.getInstance(this); 89 appWidgetManager.updateAppWidget(new int[] {mAppWidgetId}, 99 resultValue.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, mAppWidgetId);
|
/packages/apps/Messaging/src/com/android/messaging/ui/ |
WidgetPickConversationActivity.java | 20 import android.appwidget.AppWidgetManager; 34 private int mAppWidgetId = AppWidgetManager.INVALID_APPWIDGET_ID; 50 AppWidgetManager.EXTRA_APPWIDGET_ID, AppWidgetManager.INVALID_APPWIDGET_ID); 54 if (mAppWidgetId == AppWidgetManager.INVALID_APPWIDGET_ID) { 69 if (!AppWidgetManager.ACTION_APPWIDGET_CONFIGURE.equals(action)) { 84 resultValue.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, mAppWidgetId);
|
/developers/samples/android/content/WidgetData/Application/src/main/java/com/example/android/widgetdata/ |
WeatherWidgetProvider.java | 20 import android.appwidget.AppWidgetManager; 43 private AppWidgetManager mAppWidgetManager; 46 WeatherDataProviderObserver(AppWidgetManager mgr, ComponentName cn, Handler h) { 95 final AppWidgetManager mgr = AppWidgetManager.getInstance(context); 132 final AppWidgetManager mgr = AppWidgetManager.getInstance(context); 138 final int appWidgetId = intent.getIntExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, 139 AppWidgetManager.INVALID_APPWIDGET_ID); 142 final int appWidgetId = intent.getIntExtra(AppWidgetManager.EXTRA_APPWIDGET_ID [all...] |
/development/samples/WeatherListWidget/src/com/example/android/weatherlistwidget/ |
WeatherWidgetProvider.java | 20 import android.appwidget.AppWidgetManager; 43 private AppWidgetManager mAppWidgetManager; 46 WeatherDataProviderObserver(AppWidgetManager mgr, ComponentName cn, Handler h) { 95 final AppWidgetManager mgr = AppWidgetManager.getInstance(context); 132 final AppWidgetManager mgr = AppWidgetManager.getInstance(context); 138 final int appWidgetId = intent.getIntExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, 139 AppWidgetManager.INVALID_APPWIDGET_ID); 142 final int appWidgetId = intent.getIntExtra(AppWidgetManager.EXTRA_APPWIDGET_ID [all...] |
/packages/apps/Launcher3/src/com/android/launcher3/ |
AppWidgetsRestoredReceiver.java | 4 import android.appwidget.AppWidgetManager; 23 if (AppWidgetManager.ACTION_APPWIDGET_HOST_RESTORED.equals(intent.getAction())) { 24 final int[] oldIds = intent.getIntArrayExtra(AppWidgetManager.EXTRA_APPWIDGET_OLD_IDS); 25 final int[] newIds = intent.getIntArrayExtra(AppWidgetManager.EXTRA_APPWIDGET_IDS); 47 final AppWidgetManager widgets = AppWidgetManager.getInstance(context);
|
/development/apps/WidgetPreview/src/com/android/widgetpreview/ |
WidgetPreviewActivity.java | 22 import android.appwidget.AppWidgetManager; 58 private int mAppWidgetId = AppWidgetManager.INVALID_APPWIDGET_ID; 82 AppWidgetManager.getInstance(getBaseContext()).bindAppWidgetIdIfAllowed(id, info.provider); 97 AppWidgetProviderInfo info = AppWidgetManager.getInstance( 104 Intent selectIntent = new Intent(AppWidgetManager.ACTION_APPWIDGET_PICK); 105 selectIntent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, id); 113 int appWidgetId = AppWidgetManager.INVALID_APPWIDGET_ID; 114 if (data.hasExtra(AppWidgetManager.EXTRA_APPWIDGET_ID)) { 115 appWidgetId = data.getExtras().getInt(AppWidgetManager.EXTRA_APPWIDGET_ID); 130 AppWidgetManager.EXTRA_APPWIDGET_ID, AppWidgetManager.INVALID_APPWIDGET_ID) [all...] |
/cts/hostsidetests/incident/apps/boundwidgetapp/src/android/appwidget/cts/ |
AppWidgetTest.java | 20 import android.appwidget.AppWidgetManager; 64 options.putInt(AppWidgetManager.OPTION_APPWIDGET_MIN_WIDTH, 1); 65 options.putInt(AppWidgetManager.OPTION_APPWIDGET_MIN_HEIGHT, 2); 66 options.putInt(AppWidgetManager.OPTION_APPWIDGET_MAX_WIDTH, 3); 67 options.putInt(AppWidgetManager.OPTION_APPWIDGET_MAX_HEIGHT, 4); 94 AppWidgetManager mgr = getAppWidgetManager(); 161 private AppWidgetManager getAppWidgetManager() { 162 return (AppWidgetManager) getInstrumentation().getTargetContext()
|
/packages/apps/Messaging/src/com/android/messaging/widget/ |
BaseWidgetProvider.java | 19 import android.appwidget.AppWidgetManager; 44 public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) { 45 super.onUpdate(context, appWidgetManager, appWidgetIds); 64 final AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(context); 65 final int[] appWidgetIds = appWidgetManager.getAppWidgetIds(new ComponentName(context, 74 appWidgetManager.notifyAppWidgetViewDataChanged(appWidgetIds, getListId()); 90 private int getWidgetSize(AppWidgetManager appWidgetManager [all...] |
/packages/apps/Settings/src/com/android/settings/ |
AllowBindAppWidgetActivity.java | 20 import android.appwidget.AppWidgetManager; 49 private AppWidgetManager mAppWidgetManager; 64 result.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, mAppWidgetId); 96 mAppWidgetId = intent.getIntExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, -1); 98 AppWidgetManager.EXTRA_APPWIDGET_PROVIDER_PROFILE); 103 intent.getParcelableExtra(AppWidgetManager.EXTRA_APPWIDGET_PROVIDER); 105 intent.getParcelableExtra(AppWidgetManager.EXTRA_APPWIDGET_OPTIONS); 139 mAppWidgetManager = AppWidgetManager.getInstance(this);
|
AppWidgetPickActivity.java | 19 import android.appwidget.AppWidgetManager; 39 * {@link AppWidgetManager#EXTRA_CUSTOM_INFO} and 40 * {@link AppWidgetManager#EXTRA_CUSTOM_EXTRAS}. 43 * will bind it to the given {@link AppWidgetManager#EXTRA_APPWIDGET_ID}, 54 * The allocated {@link AppWidgetManager#EXTRA_APPWIDGET_ID} that this 59 private AppWidgetManager mAppWidgetManager; 65 mAppWidgetManager = AppWidgetManager.getInstance(this); 76 if (intent.hasExtra(AppWidgetManager.EXTRA_APPWIDGET_ID)) { 77 mAppWidgetId = intent.getIntExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, 78 AppWidgetManager.INVALID_APPWIDGET_ID) [all...] |
/development/apps/BuildWidget/src/com/android/buildwidget/ |
BuildWidget.java | 21 import android.appwidget.AppWidgetManager; 43 public void onUpdate(Context context, AppWidgetManager appWidgetManager, 57 AppWidgetManager manager = AppWidgetManager.getInstance(this);
|
/cts/hostsidetests/devicepolicy/app/ManagedProfile/src/com/android/cts/managedprofile/ |
CrossProfileWidgetTest.java | 19 import android.appwidget.AppWidgetManager; 44 private AppWidgetManager mAppWidgetManager; 48 mAppWidgetManager = (AppWidgetManager) mContext.getSystemService(Context.APPWIDGET_SERVICE);
|
/external/robolectric/v1/src/main/java/com/xtremelabs/robolectric/shadows/ |
ShadowAppWidgetManager.java | 5 import android.appwidget.AppWidgetManager; 25 @Implements(AppWidgetManager.class) 27 private static AppSingletonizer<AppWidgetManager> instances = new AppSingletonizer<AppWidgetManager>(AppWidgetManager.class) { 29 protected AppWidgetManager get(ShadowApplication shadowApplication) { 30 return shadowApplication.appWidgetManager; 34 protected void set(ShadowApplication shadowApplication, AppWidgetManager instance) { 35 shadowApplication.appWidgetManager = instance; 39 protected AppWidgetManager createInstance(Application applicationContext) [all...] |