Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
From a63e90f99986ee2ef4921691338c26402a65ea3c Mon Sep 17 00:00:00 2001
From: lgundapx <lakshmanx.gundapu@intel.com>
Date: Wed, 20 Aug 2025 03:53:20 +0000
Subject: [PATCH] Update RELEASE_PLATFORM_SECURITY_PATCH string

Tracked-On: OAM-133801
Signed-off-by: lgundapx <lakshmanx.gundapu@intel.com>
---
flag_values/bp1a/RELEASE_PLATFORM_SECURITY_PATCH.textproto | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/flag_values/bp1a/RELEASE_PLATFORM_SECURITY_PATCH.textproto b/flag_values/bp1a/RELEASE_PLATFORM_SECURITY_PATCH.textproto
index cc86162e..063e19fd 100644
--- a/flag_values/bp1a/RELEASE_PLATFORM_SECURITY_PATCH.textproto
+++ b/flag_values/bp1a/RELEASE_PLATFORM_SECURITY_PATCH.textproto
@@ -1,4 +1,4 @@
name: "RELEASE_PLATFORM_SECURITY_PATCH"
value: {
- string_value: "2025-06-01"
+ string_value: "2025-08-01"
}
--
2.34.1

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
From 15ca07485abcf9235be0dba3d787b1f5f6ccdda5 Mon Sep 17 00:00:00 2001
From: Zak Cohen <zakcohen@google.com>
Date: Fri, 17 Jan 2025 15:16:13 -0800
Subject: [PATCH 1/3] RemoteViews - Always load new ApplicationInfo from
PackageManager.

Always load ApplicationInfo object needed for RemoteViews Contexts directly
from PackageManager. The key used is the package name.

Previously this object was read from the RemoteViews bundle, which was
provided by the Widget providing app, and this object could not be relied
on to have accurate data fields.

Bug: 376028556
Flag: EXEMPT Security Fix
Test: atest CtsWidgetTestCases:RemoteViewsActivityTest#testApplicationInfo
Change-Id: Ie263b51fd2c2bdbf9d622533bb3f77d9f3f7181e
(cherry picked from commit 352fb4821076f0209ab2092d53444503dcec8992)
Merged-In: Ie263b51fd2c2bdbf9d622533bb3f77d9f3f7181e
---
core/java/android/appwidget/AppWidgetHostView.java | 4 ----
core/java/android/widget/RemoteViews.java | 11 ++++++++---
2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/core/java/android/appwidget/AppWidgetHostView.java b/core/java/android/appwidget/AppWidgetHostView.java
index df1028e9e04c..b9b5c6a8bbc3 100644
--- a/core/java/android/appwidget/AppWidgetHostView.java
+++ b/core/java/android/appwidget/AppWidgetHostView.java
@@ -20,7 +20,6 @@ import android.annotation.NonNull;
import android.annotation.Nullable;
import android.app.Activity;
import android.app.ActivityOptions;
-import android.app.LoadedApk;
import android.compat.annotation.UnsupportedAppUsage;
import android.content.ComponentName;
import android.content.Context;
@@ -753,9 +752,6 @@ public class AppWidgetHostView extends FrameLayout implements AppWidgetHost.AppW
*/
protected Context getRemoteContextEnsuringCorrectCachedApkPath() {
try {
- ApplicationInfo expectedAppInfo = mInfo.providerInfo.applicationInfo;
- LoadedApk.checkAndUpdateApkPaths(expectedAppInfo);
- // Return if cloned successfully, otherwise default
Context newContext = mContext.createApplicationContext(
mInfo.providerInfo.applicationInfo,
Context.CONTEXT_RESTRICTED);
diff --git a/core/java/android/widget/RemoteViews.java b/core/java/android/widget/RemoteViews.java
index 9fe3fd6ddc1a..e7fa80f3e11d 100644
--- a/core/java/android/widget/RemoteViews.java
+++ b/core/java/android/widget/RemoteViews.java
@@ -44,7 +44,6 @@ import android.app.Activity;
import android.app.ActivityOptions;
import android.app.ActivityThread;
import android.app.Application;
-import android.app.LoadedApk;
import android.app.PendingIntent;
import android.app.RemoteInput;
import android.appwidget.AppWidgetHostView;
@@ -8479,8 +8478,14 @@ public class RemoteViews implements Parcelable, Filter {
return context;
}
try {
- LoadedApk.checkAndUpdateApkPaths(mApplication);
- Context applicationContext = context.createApplicationContext(mApplication,
+ // Use PackageManager as the source of truth for application information, rather
+ // than the parceled ApplicationInfo provided by the app.
+ ApplicationInfo sanitizedApplication =
+ context.getPackageManager().getApplicationInfoAsUser(
+ mApplication.packageName, 0,
+ UserHandle.getUserId(mApplication.uid));
+ Context applicationContext = context.createApplicationContext(
+ sanitizedApplication,
Context.CONTEXT_RESTRICTED);
// Get the correct apk paths while maintaining the current context's configuration.
return applicationContext.createConfigurationContext(
--
2.34.1

Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
From 2ab952bd47b09b2a43eec309dcab785819ffeec3 Mon Sep 17 00:00:00 2001
From: Sunny Goyal <sunnygoyal@google.com>
Date: Thu, 13 Feb 2025 09:49:26 -0800
Subject: [PATCH 2/3] Handle exceptions from querying appinfo in
RemoteViews#addAppWidget.

Host process may not have access to the ApplicationInfo directly in some cases

Bug: 395168279
Change-Id: Ic26d63acea5f227b56d44bc2e417f7b189f0d2f2
Test: Manual
Flag: EXEMPT bugfix
(cherry picked from commit 37bf5823504f2a256f128123393cd149721b87fc)
---
core/java/android/widget/RemoteViews.java | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/core/java/android/widget/RemoteViews.java b/core/java/android/widget/RemoteViews.java
index e7fa80f3e11d..52fa550824e2 100644
--- a/core/java/android/widget/RemoteViews.java
+++ b/core/java/android/widget/RemoteViews.java
@@ -8478,12 +8478,16 @@ public class RemoteViews implements Parcelable, Filter {
return context;
}
try {
- // Use PackageManager as the source of truth for application information, rather
- // than the parceled ApplicationInfo provided by the app.
- ApplicationInfo sanitizedApplication =
- context.getPackageManager().getApplicationInfoAsUser(
- mApplication.packageName, 0,
- UserHandle.getUserId(mApplication.uid));
+ ApplicationInfo sanitizedApplication = mApplication;
+ try {
+ // Use PackageManager as the source of truth for application information, rather
+ // than the parceled ApplicationInfo provided by the app.
+ sanitizedApplication = context.getPackageManager().getApplicationInfoAsUser(
+ mApplication.packageName, 0, UserHandle.getUserId(mApplication.uid));
+ } catch(SecurityException se) {
+ Log.d(LOG_TAG, "Unable to fetch appInfo for " + mApplication.packageName);
+ }
+
Context applicationContext = context.createApplicationContext(
sanitizedApplication,
Context.CONTEXT_RESTRICTED);
--
2.34.1

Loading