summaryrefslogtreecommitdiff
path: root/core/java/android/widget
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2021-08-11 01:07:40 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2021-08-11 01:07:40 +0000
commit1cb4fdb115b920ff5df88c33047243bef48224a6 (patch)
treece8e6b59e7d8cf09befc39cca71bcb3a9c6610e8 /core/java/android/widget
parent0064adf9f128374d9c8ec6cfe22845c46bedd072 (diff)
parent71f64ff1ac28bb6aecbf4f28f0e2c46fb7c73a2d (diff)
Snap for 7629706 from 71f64ff1ac28bb6aecbf4f28f0e2c46fb7c73a2d to sc-release
Change-Id: Ibf43c76de3c16d0d171216ca1c605d3d6631d15e
Diffstat (limited to 'core/java/android/widget')
-rw-r--r--core/java/android/widget/RemoteViews.java19
1 files changed, 19 insertions, 0 deletions
diff --git a/core/java/android/widget/RemoteViews.java b/core/java/android/widget/RemoteViews.java
index e827f0a31bfd..91fc5a56d979 100644
--- a/core/java/android/widget/RemoteViews.java
+++ b/core/java/android/widget/RemoteViews.java
@@ -5824,6 +5824,25 @@ public class RemoteViews implements Parcelable, Filter {
return false;
}
+ /** @hide */
+ public void updateAppInfo(@NonNull ApplicationInfo info) {
+ if (mApplication != null && mApplication.sourceDir.equals(info.sourceDir)) {
+ // Overlay paths are generated against a particular version of an application.
+ // The overlays paths of a newly upgraded application are incompatible with the
+ // old version of the application.
+ mApplication = info;
+ }
+ if (hasSizedRemoteViews()) {
+ for (RemoteViews layout : mSizedRemoteViews) {
+ layout.updateAppInfo(info);
+ }
+ }
+ if (hasLandscapeAndPortraitLayouts()) {
+ mLandscape.updateAppInfo(info);
+ mPortrait.updateAppInfo(info);
+ }
+ }
+
private Context getContextForResources(Context context) {
if (mApplication != null) {
if (context.getUserId() == UserHandle.getUserId(mApplication.uid)