mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2024-12-14 10:24:32 -05:00
59bf3b75c7
https://review.lineageos.org/c/LineageOS/android_frameworks_base/+/353117 https://review.lineageos.org/q/topic:Q_asb_2023-03 https://review.lineageos.org/q/topic:Q_asb_2023-04 https://review.lineageos.org/q/topic:Q_asb_2023-05 https://review.lineageos.org/q/topic:Q_asb_2023-06 https://review.lineageos.org/q/topic:Q_asb_2023-07 https://review.lineageos.org/q/topic:Q_asb_2023-08 accounted for via patches: https://review.lineageos.org/c/LineageOS/android_system_ca-certificates/+/376560 https://review.lineageos.org/c/LineageOS/android_system_ca-certificates/+/376561 https://review.lineageos.org/c/LineageOS/android_system_ca-certificates/+/376562 https://review.lineageos.org/q/topic:Q_asb_2023-09 https://review.lineageos.org/q/topic:Q_asb_2023-10 https://review.lineageos.org/q/topic:Q_asb_2023-11 accounted for via patches: https://review.lineageos.org/c/LineageOS/android_system_ca-certificates/+/376563 accounted for via manifest change: https://review.lineageos.org/c/LineageOS/android_external_webp/+/376568 https://review.lineageos.org/q/topic:Q_asb_2023-12 https://review.lineageos.org/q/topic:Q_asb_2024-01 https://review.lineageos.org/q/topic:Q_asb_2024-02 https://review.lineageos.org/q/topic:Q_asb_2024-03 Signed-off-by: Tavi <tavi@divested.dev>
30 lines
1.7 KiB
Diff
30 lines
1.7 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Alex Buynytskyy <alexbuy@google.com>
|
|
Date: Wed, 20 Dec 2023 01:50:36 +0000
|
|
Subject: [PATCH] Disallow system apps to be installed/updated as instant.
|
|
|
|
Bug: 299441833
|
|
Test: atest android.content.pm.cts.PackageManagerTest
|
|
(cherry picked from commit 496e78a1951f2ed69290f03c5625c0f8382f4d31)
|
|
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:0d0f185c0d526c1dac0a8894b2c2f2e378328d73)
|
|
Merged-In: Idd89a6dd72f0e68259095f677185f0494391025c
|
|
Change-Id: Idd89a6dd72f0e68259095f677185f0494391025c
|
|
---
|
|
.../core/java/com/android/server/pm/PackageManagerService.java | 3 +++
|
|
1 file changed, 3 insertions(+)
|
|
|
|
diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java
|
|
index 5bd1b4ac0195..d27b5ad0d646 100644
|
|
--- a/services/core/java/com/android/server/pm/PackageManagerService.java
|
|
+++ b/services/core/java/com/android/server/pm/PackageManagerService.java
|
|
@@ -13673,6 +13673,9 @@ public class PackageManagerService extends IPackageManager.Stub
|
|
if (pkgSetting == null) {
|
|
return PackageManager.INSTALL_FAILED_INVALID_URI;
|
|
}
|
|
+ if (instantApp && (pkgSetting.isSystem() || isUpdatedSystemApp(pkgSetting))) {
|
|
+ return PackageManager.INSTALL_FAILED_INVALID_URI;
|
|
+ }
|
|
if (!canViewInstantApps(callingUid, UserHandle.getUserId(callingUid))) {
|
|
// only allow the existing package to be used if it's installed as a full
|
|
// application for at least one user
|