Moving widget reinflation to push model

Instead of checking every widget, a widget which needs reinflation
would post a callback on launcher avoiding unnecessary loops in onResume

Bug: 67305604
Change-Id: I53e08d6f4795f7b716a9debca5c0c68dd25a7afe
This commit is contained in:
Sunny Goyal
2017-10-04 16:50:57 -07:00
parent 0474222c25
commit ba47faae6a
5 changed files with 71 additions and 55 deletions

View File

@@ -110,9 +110,7 @@ public class PendingAppWidgetHostView extends LauncherAppWidgetHostView
mClickListener = l;
}
@Override
public boolean isReinflateRequired(int orientation) {
// Re inflate is required any time the widget restore status changes
public boolean isReinflateIfNeeded() {
return mStartState != mInfo.restoreStatus;
}