2023-12-26 15:33:01 -05:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
2023-12-11 19:26:24 -05:00
|
|
|
From: Marzia Favaro <marziana@google.com>
|
|
|
|
Date: Mon, 31 Jul 2023 15:10:34 +0000
|
2023-12-26 09:32:44 -05:00
|
|
|
Subject: [PATCH] BACKPORT: Require permission to unlock keyguard
|
2023-12-11 19:26:24 -05:00
|
|
|
|
|
|
|
Bug: 288896339
|
|
|
|
Test: Manual, verify that the app which can be found on the bug can no longer call
|
|
|
|
keyguardGoingAway successfully
|
|
|
|
|
|
|
|
Require permission to unlock keyguard
|
|
|
|
|
|
|
|
Bug: 288896339
|
|
|
|
Test: Manual, verify that the app which can be found on the bug can no longer call
|
|
|
|
keyguardGoingAway successfully
|
|
|
|
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:bd2aa5d309c5bf8e73161975bd5aba7945b25e84)
|
|
|
|
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:ef1345d278bd2a8944c6362bf65cff7305ca6fc5)
|
|
|
|
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:ad8e7e3b1db22684988a179e23639567a4096ca6)
|
|
|
|
Merged-In: I7ba7e56f954c8e6f1f734311f735215918975bc6
|
|
|
|
Change-Id: I7ba7e56f954c8e6f1f734311f735215918975bc6
|
|
|
|
---
|
2023-12-26 09:32:44 -05:00
|
|
|
.../core/java/com/android/server/am/ActivityManagerService.java | 2 ++
|
2023-12-11 19:26:24 -05:00
|
|
|
1 file changed, 2 insertions(+)
|
|
|
|
|
2023-12-26 09:32:44 -05:00
|
|
|
diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java
|
2023-12-26 15:33:01 -05:00
|
|
|
index c682ba2f7572..406e08009cb7 100644
|
2023-12-26 09:32:44 -05:00
|
|
|
--- a/services/core/java/com/android/server/am/ActivityManagerService.java
|
|
|
|
+++ b/services/core/java/com/android/server/am/ActivityManagerService.java
|
2023-12-26 15:33:01 -05:00
|
|
|
@@ -254,6 +254,7 @@ import cyanogenmod.power.PerformanceManagerInternal;
|
2023-12-26 09:32:44 -05:00
|
|
|
import libcore.io.IoUtils;
|
|
|
|
import libcore.util.EmptyArray;
|
2023-12-11 19:26:24 -05:00
|
|
|
|
|
|
|
+import static android.Manifest.permission.CONTROL_KEYGUARD;
|
|
|
|
import static android.Manifest.permission.INTERACT_ACROSS_USERS;
|
|
|
|
import static android.Manifest.permission.INTERACT_ACROSS_USERS_FULL;
|
2023-12-26 09:32:44 -05:00
|
|
|
import static android.Manifest.permission.MANAGE_ACTIVITY_STACKS;
|
2023-12-26 15:33:01 -05:00
|
|
|
@@ -7026,6 +7027,7 @@ public final class ActivityManagerService extends ActivityManagerNative
|
2023-12-11 19:26:24 -05:00
|
|
|
|
|
|
|
@Override
|
|
|
|
public void keyguardGoingAway(int flags) {
|
2023-12-26 09:32:44 -05:00
|
|
|
+ enforceCallingPermission(CONTROL_KEYGUARD, "keyguardGoingAway()");
|
2023-12-11 19:26:24 -05:00
|
|
|
enforceNotIsolatedCaller("keyguardGoingAway");
|
|
|
|
final long token = Binder.clearCallingIdentity();
|
|
|
|
try {
|