summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Oscar Shu <xshu@google.com> 2024-03-07 02:09:05 +0000
committer Oscar Shu <xshu@google.com> 2024-03-19 21:30:41 +0000
commit2ca78ee13cde235d6a23e3b5ea347446a03efe8c (patch)
tree3457a93fe89c28688ded17f63f75b5861dd2031e
parent37916a0e9cd0753f383efb05febb6d41f661e359 (diff)
Exclude SYSTEM_UID from car mode check
The use-case is only meant for privileged car mode app and should be avoided on SYSTEM_UID since it could accidentally incorrectly identify other privileged callers. Bug: 291528470 Test: atest com.android.server.wifi Change-Id: Ic8e32dab26619b04bd15288f777647f042280894
-rw-r--r--service/java/com/android/server/wifi/ActiveModeWarden.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/service/java/com/android/server/wifi/ActiveModeWarden.java b/service/java/com/android/server/wifi/ActiveModeWarden.java
index e60b27c302..d7065398dd 100644
--- a/service/java/com/android/server/wifi/ActiveModeWarden.java
+++ b/service/java/com/android/server/wifi/ActiveModeWarden.java
@@ -2419,7 +2419,8 @@ public class ActiveModeWarden {
if (mAllowRootToGetLocalOnlyCmm && curUid == 0) { // 0 is root UID.
continue;
}
- if (mWifiPermissionsUtil.checkEnterCarModePrioritized(curUid)) {
+ if (curUid != Process.SYSTEM_UID
+ && mWifiPermissionsUtil.checkEnterCarModePrioritized(curUid)) {
requestInfo.listener.onAnswer(primaryManager);
if (mVerboseLoggingEnabled) {
Log.w(TAG, "Uid " + curUid