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>
40 lines
1.9 KiB
Diff
40 lines
1.9 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Edgar Wang <edgarwang@google.com>
|
|
Date: Wed, 6 Apr 2022 17:30:27 +0800
|
|
Subject: [PATCH] Fix LaunchAnyWhere in AppRestrictionsFragment
|
|
|
|
If the intent's package equals to the app's package, this intent
|
|
will be allowed to startActivityForResult.
|
|
But this check is unsafe, because if the component of this intent
|
|
is set, the package field will just be ignored. So if we set the
|
|
component to any activity we like and set package to the app's
|
|
package, it will pass the assertSafeToStartCustomActivity check
|
|
and now we can launch anywhere.
|
|
|
|
Bug: 223578534
|
|
Test: robotest and manual verify
|
|
Change-Id: I40496105bae313fe5cff2a36dfe329c1e2b5bbe4
|
|
(cherry picked from commit 90e095dbe372f29823ad4788c0cc2d781ae3bb24)
|
|
(cherry picked from commit b3eecdd13d9f3d9fde99e9881c9e451ff199f7ad)
|
|
Merged-In: I40496105bae313fe5cff2a36dfe329c1e2b5bbe4
|
|
---
|
|
src/com/android/settings/users/AppRestrictionsFragment.java | 5 +----
|
|
1 file changed, 1 insertion(+), 4 deletions(-)
|
|
|
|
diff --git a/src/com/android/settings/users/AppRestrictionsFragment.java b/src/com/android/settings/users/AppRestrictionsFragment.java
|
|
index 10d714401e9..bf0f3da8d00 100644
|
|
--- a/src/com/android/settings/users/AppRestrictionsFragment.java
|
|
+++ b/src/com/android/settings/users/AppRestrictionsFragment.java
|
|
@@ -654,10 +654,7 @@ public class AppRestrictionsFragment extends SettingsPreferenceFragment implemen
|
|
}
|
|
|
|
private void assertSafeToStartCustomActivity(Intent intent) {
|
|
- // Activity can be started if it belongs to the same app
|
|
- if (intent.getPackage() != null && intent.getPackage().equals(packageName)) {
|
|
- return;
|
|
- }
|
|
+ EventLog.writeEvent(0x534e4554, "223578534", -1 /* UID */, "");
|
|
ResolveInfo resolveInfo = mPackageManager.resolveActivity(
|
|
intent, PackageManager.MATCH_DEFAULT_ONLY);
|
|
|