diff options
| author | Joe Onorato <joeo@android.com> | 2010-06-23 17:50:42 -0700 |
|---|---|---|
| committer | Android Git Automerger <android-git-automerger@android.com> | 2010-06-23 17:50:42 -0700 |
| commit | a18dbdf420fabebb83e7403d000384a8d98daffa (patch) | |
| tree | 7fda3ff2821c00990c0339a15232f8b5e4b05d24 /core/java/android/appwidget/AppWidgetHostView.java | |
| parent | 038ecb097a4ee4997938d5c3a21c1c450c3beedc (diff) | |
| parent | 801b63d3b865054b3015e2cf315ca7c9386d1212 (diff) | |
am 801b63d3: am 51e895f0: Merge "Need to give the AppWidgetHostView the new info about the provider, in case the initialLayout changed." into gingerbread
Merge commit '801b63d3b865054b3015e2cf315ca7c9386d1212'
* commit '801b63d3b865054b3015e2cf315ca7c9386d1212':
Need to give the AppWidgetHostView the new info about the provider, in case the initialLayout
Diffstat (limited to 'core/java/android/appwidget/AppWidgetHostView.java')
| -rw-r--r-- | core/java/android/appwidget/AppWidgetHostView.java | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/core/java/android/appwidget/AppWidgetHostView.java b/core/java/android/appwidget/AppWidgetHostView.java index a1e7e4af2345..3c19ea3d444b 100644 --- a/core/java/android/appwidget/AppWidgetHostView.java +++ b/core/java/android/appwidget/AppWidgetHostView.java @@ -46,8 +46,6 @@ public class AppWidgetHostView extends FrameLayout { static final boolean LOGD = false; static final boolean CROSSFADE = false; - static final int UPDATE_FLAGS_RESET = 0x00000001; - static final int VIEW_MODE_NOINIT = 0; static final int VIEW_MODE_CONTENT = 1; static final int VIEW_MODE_ERROR = 2; @@ -102,7 +100,7 @@ public class AppWidgetHostView extends FrameLayout { mAppWidgetId = appWidgetId; mInfo = info; } - + public int getAppWidgetId() { return mAppWidgetId; } @@ -148,21 +146,22 @@ public class AppWidgetHostView extends FrameLayout { } /** + * Update the AppWidgetProviderInfo for this view, and reset it to the + * initial layout. + */ + void resetAppWidget(AppWidgetProviderInfo info) { + mInfo = info; + mViewMode = VIEW_MODE_NOINIT; + updateAppWidget(null); + } + + /** * Process a set of {@link RemoteViews} coming in as an update from the * AppWidget provider. Will animate into these new views as needed */ public void updateAppWidget(RemoteViews remoteViews) { - updateAppWidget(remoteViews, 0); - } + if (LOGD) Log.d(TAG, "updateAppWidget called mOld=" + mOld); - void updateAppWidget(RemoteViews remoteViews, int flags) { - if (LOGD) Log.d(TAG, "updateAppWidget called mOld=" + mOld + " flags=0x" - + Integer.toHexString(flags)); - - if ((flags & UPDATE_FLAGS_RESET) != 0) { - mViewMode = VIEW_MODE_NOINIT; - } - boolean recycled = false; View content = null; Exception exception = null; |
