summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author heyoukang <heyoukang00@gmail.com> 2024-10-24 00:17:21 +0800
committer Youkang He <heyoukang00@gmail.com> 2024-10-23 16:19:19 +0000
commitce9d5f919a7b509a089ff278ed9f57dca540aa9e (patch)
tree813574fb266bb5492d1d5e36e1b5931cee155c25
parent426b2104049c7f2d3d28726948d941ca1eeb42dc (diff)
fix RemoteView's content loss in some case
in some case, constantly calling AppWidgetHostView.updateAppWidget(remoteView), it will create uncancellable AsyncApplyTask when prev AsyncApplyTask goes wrong which will cause RemoteView's content loss after next AsyncApplyTask finish. so make sure every AsyncApplyTask is cancellable Bug:375093288 Test: constantly refresh AppWidgetHostView, make sure RemoteView's content is visible Change-Id: I52e0d84b8a23c7383eee7163d814cfd8d885010a Signed-off-by: heyoukang <heyoukang00@gmail.com>
-rw-r--r--core/java/android/appwidget/AppWidgetHostView.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/java/android/appwidget/AppWidgetHostView.java b/core/java/android/appwidget/AppWidgetHostView.java
index 1f19f817a0b3..5f61a9195209 100644
--- a/core/java/android/appwidget/AppWidgetHostView.java
+++ b/core/java/android/appwidget/AppWidgetHostView.java
@@ -713,8 +713,8 @@ public class AppWidgetHostView extends FrameLayout implements AppWidgetHost.AppW
mCurrentSize);
} else {
applyContent(null, false, e);
+ mLastExecutionSignal = null;
}
- mLastExecutionSignal = null;
}
}