mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2024-12-15 02:44:23 -05:00
082bc48c32
https://review.lineageos.org/q/topic:P_asb_2022-05 https://review.lineageos.org/q/topic:P_asb_2022-06 https://review.lineageos.org/q/topic:P_asb_2022-07 https://review.lineageos.org/q/topic:P_asb_2022-08 https://review.lineageos.org/q/topic:P_asb_2022-09 https://review.lineageos.org/q/topic:P_asb_2022-10 https://review.lineageos.org/q/topic:P_asb_2022-11 https://review.lineageos.org/q/topic:P_asb_2022-12 https://review.lineageos.org/q/topic:P_asb_2023-01 https://review.lineageos.org/q/topic:P_asb_2023-02 https://review.lineageos.org/q/topic:P_asb_2023-03 https://review.lineageos.org/q/topic:P_asb_2023-04 https://review.lineageos.org/q/topic:P_asb_2023-05 https://review.lineageos.org/q/topic:P_asb_2023-06 https://review.lineageos.org/q/topic:P_asb_2023-07 accounted for via manifest change: https://review.lineageos.org/c/LineageOS/android_external_freetype/+/361250 https://review.lineageos.org/q/topic:P_asb_2023-08 accounted for via manifest change: https://review.lineageos.org/c/LineageOS/android_external_freetype/+/364606 accounted for via patches: https://review.lineageos.org/c/LineageOS/android_system_ca-certificates/+/365328 https://review.lineageos.org/q/topic:P_asb_2023-09 https://review.lineageos.org/q/topic:P_asb_2023-10 https://review.lineageos.org/q/topic:P_asb_2023-11 accounted for via patches: https://review.lineageos.org/c/LineageOS/android_system_ca-certificates/+/374916 https://review.lineageos.org/q/topic:P_asb_2023-12 https://review.lineageos.org/q/topic:P_asb_2024-01 https://review.lineageos.org/q/topic:P_asb_2024-02 https://review.lineageos.org/q/topic:P_asb_2024-03 https://review.lineageos.org/q/topic:P_asb_2024-04 Signed-off-by: Tavi <tavi@divested.dev>
46 lines
2.4 KiB
Diff
46 lines
2.4 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Yanting Yang <yantingyang@google.com>
|
|
Date: Wed, 4 Jan 2023 09:40:38 +0000
|
|
Subject: [PATCH] Add DISALLOW_APPS_CONTROL check into uninstall app for all
|
|
users
|
|
|
|
Settings App info page supports a "Uninstall for all users" function
|
|
when multiple users are enabled. It bypasses the restriction of
|
|
DISALLOW_APPS_CONTROL which breaks the user isolation guideline.
|
|
|
|
To fix this vulnerability, we should check the DISALLOW_APPS_CONTROL
|
|
restriction to provide the "Uninstall for all users" function.
|
|
|
|
Bug: 258653813
|
|
Test: manual & robotests
|
|
Change-Id: I5d3bbcbaac439c4f7a1e6a9ade7775ff4f2f2ec6
|
|
Merged-In: I5d3bbcbaac439c4f7a1e6a9ade7775ff4f2f2ec6
|
|
(cherry picked from commit 86914bedc84474c152e4536fb3cfa2fb488030b8)
|
|
Merged-In: I5d3bbcbaac439c4f7a1e6a9ade7775ff4f2f2ec6
|
|
---
|
|
.../applications/appinfo/AppInfoDashboardFragment.java | 8 +++++++-
|
|
1 file changed, 7 insertions(+), 1 deletion(-)
|
|
mode change 100755 => 100644 src/com/android/settings/applications/appinfo/AppInfoDashboardFragment.java
|
|
|
|
diff --git a/src/com/android/settings/applications/appinfo/AppInfoDashboardFragment.java b/src/com/android/settings/applications/appinfo/AppInfoDashboardFragment.java
|
|
old mode 100755
|
|
new mode 100644
|
|
index b37f94d18c2..6f8072eea03
|
|
--- a/src/com/android/settings/applications/appinfo/AppInfoDashboardFragment.java
|
|
+++ b/src/com/android/settings/applications/appinfo/AppInfoDashboardFragment.java
|
|
@@ -346,7 +346,13 @@ public class AppInfoDashboardFragment extends DashboardFragment
|
|
return;
|
|
}
|
|
super.onPrepareOptionsMenu(menu);
|
|
- menu.findItem(UNINSTALL_ALL_USERS_MENU).setVisible(shouldShowUninstallForAll(mAppEntry));
|
|
+ final MenuItem uninstallAllUsersItem = menu.findItem(UNINSTALL_ALL_USERS_MENU);
|
|
+ uninstallAllUsersItem.setVisible(
|
|
+ shouldShowUninstallForAll(mAppEntry) && !mAppsControlDisallowedBySystem);
|
|
+ if (uninstallAllUsersItem.isVisible()) {
|
|
+ RestrictedLockUtils.setMenuItemAsDisabledByAdmin(getActivity(),
|
|
+ uninstallAllUsersItem, mAppsControlDisallowedAdmin);
|
|
+ }
|
|
mUpdatedSysApp = (mAppEntry.info.flags & ApplicationInfo.FLAG_UPDATED_SYSTEM_APP) != 0;
|
|
final MenuItem uninstallUpdatesItem = menu.findItem(UNINSTALL_UPDATES);
|
|
final boolean uninstallUpdateDisabled = getContext().getResources().getBoolean(
|