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 committed 2017-10-05 09:58:13 -07:00
1 parent 0474222c25
commit ba47faae6a
5 files changed
+71 -55

No files matched your search

@@ -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;
}