am a58800d1: am 4cce397c: Merge "Letting partial update fall through if the widget has not received a full update yet. (Bug 7214731)" into jb-mr1-dev
* commit 'a58800d153f2a3db963ccbf9347eeccf855ed421': Letting partial update fall through if the widget has not received a full update yet. (Bug 7214731)
This commit is contained in:
@@ -448,6 +448,10 @@ public class AppWidgetManager {
|
|||||||
* and outside of the handler.
|
* and outside of the handler.
|
||||||
* This method will only work when called from the uid that owns the AppWidget provider.
|
* This method will only work when called from the uid that owns the AppWidget provider.
|
||||||
*
|
*
|
||||||
|
* <p>
|
||||||
|
* This method will be ignored if a widget has not received a full update via
|
||||||
|
* {@link #updateAppWidget(int[], RemoteViews)}.
|
||||||
|
*
|
||||||
* @param appWidgetIds The AppWidget instances for which to set the RemoteViews.
|
* @param appWidgetIds The AppWidget instances for which to set the RemoteViews.
|
||||||
* @param views The RemoteViews object containing the incremental update / command.
|
* @param views The RemoteViews object containing the incremental update / command.
|
||||||
*/
|
*/
|
||||||
@@ -476,6 +480,10 @@ public class AppWidgetManager {
|
|||||||
* and outside of the handler.
|
* and outside of the handler.
|
||||||
* This method will only work when called from the uid that owns the AppWidget provider.
|
* This method will only work when called from the uid that owns the AppWidget provider.
|
||||||
*
|
*
|
||||||
|
* <p>
|
||||||
|
* This method will be ignored if a widget has not received a full update via
|
||||||
|
* {@link #updateAppWidget(int[], RemoteViews)}.
|
||||||
|
*
|
||||||
* @param appWidgetId The AppWidget instance for which to set the RemoteViews.
|
* @param appWidgetId The AppWidget instance for which to set the RemoteViews.
|
||||||
* @param views The RemoteViews object containing the incremental update / command.
|
* @param views The RemoteViews object containing the incremental update / command.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -943,7 +943,10 @@ class AppWidgetServiceImpl {
|
|||||||
ensureStateLoadedLocked();
|
ensureStateLoadedLocked();
|
||||||
for (int i = 0; i < N; i++) {
|
for (int i = 0; i < N; i++) {
|
||||||
AppWidgetId id = lookupAppWidgetIdLocked(appWidgetIds[i]);
|
AppWidgetId id = lookupAppWidgetIdLocked(appWidgetIds[i]);
|
||||||
updateAppWidgetInstanceLocked(id, views, true);
|
if (id.views != null) {
|
||||||
|
// Only trigger a partial update for a widget if it has received a full update
|
||||||
|
updateAppWidgetInstanceLocked(id, views, true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -996,7 +999,7 @@ class AppWidgetServiceImpl {
|
|||||||
// drop unbound appWidgetIds (shouldn't be possible under normal circumstances)
|
// drop unbound appWidgetIds (shouldn't be possible under normal circumstances)
|
||||||
if (id != null && id.provider != null && !id.provider.zombie && !id.host.zombie) {
|
if (id != null && id.provider != null && !id.provider.zombie && !id.host.zombie) {
|
||||||
|
|
||||||
if (!isPartialUpdate || id.views == null) {
|
if (!isPartialUpdate) {
|
||||||
// For a full update we replace the RemoteViews completely.
|
// For a full update we replace the RemoteViews completely.
|
||||||
id.views = views;
|
id.views = views;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user