commit | 12ef632d008b739dd21bf1adc53ec95c931b8bb5 | [log] [tgz] |
---|---|---|
author | Pinyao Ting <pinyaoting@google.com> | Tue Jul 21 19:05:55 2020 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Tue Jul 21 19:05:55 2020 +0000 |
tree | a92957cfd71b84d812ec628c32572f8137745ee9 | |
parent | 725a8368851455a4758802bfa4fc1d11d4ded912 [diff] | |
parent | 8dae83ee9bab0dcd7982c893926c2ab11d54b0cf [diff] |
Fix launcher crash after restore with some specific widgets. am: 8dae83ee9b Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/12196250 Change-Id: Ifa1fca7af87cc2d0169793281c05a96925c48fc5
diff --git a/src/com/android/launcher3/widget/PendingAppWidgetHostView.java b/src/com/android/launcher3/widget/PendingAppWidgetHostView.java index 9021d9e..ca47728 100644 --- a/src/com/android/launcher3/widget/PendingAppWidgetHostView.java +++ b/src/com/android/launcher3/widget/PendingAppWidgetHostView.java
@@ -52,7 +52,6 @@ private static final float MIN_SATUNATION = 0.7f; private final Rect mRect = new Rect(); - private View mDefaultView; private OnClickListener mClickListener; private final LauncherAppWidgetInfo mInfo; private final int mStartState; @@ -111,12 +110,11 @@ @Override protected View getDefaultView() { - if (mDefaultView == null) { - mDefaultView = mInflater.inflate(R.layout.appwidget_not_ready, this, false); - mDefaultView.setOnClickListener(this); - applyState(); - } - return mDefaultView; + View defaultView = mInflater.inflate(R.layout.appwidget_not_ready, this, false); + defaultView.setOnClickListener(this); + applyState(); + invalidate(); + return defaultView; } @Override