summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Adam Bookatz <bookatz@google.com> 2024-11-12 22:20:19 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2024-11-12 22:20:19 +0000
commit381f7a74b058a4b43fd32a209d0fb19df45b21c4 (patch)
tree98a571630f50b033b3e1a78a62add40b025a55d0
parent7f0778993eb5a124d85243f20076818c39c5f63c (diff)
parent84967ebf304c35d02de1eb4b0268a87b3405515e (diff)
Merge "UserProperty cross-binder warning only for SYSTEM" into main
-rw-r--r--core/java/android/os/UserManager.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/java/android/os/UserManager.java b/core/java/android/os/UserManager.java
index 4bc8fe0a974c..9ab92285c167 100644
--- a/core/java/android/os/UserManager.java
+++ b/core/java/android/os/UserManager.java
@@ -3928,9 +3928,9 @@ public class UserManager {
final int callingUid = Binder.getCallingUid();
final int processUid = Process.myUid();
- if (Build.isDebuggable() && callingUid != processUid) {
- Log.w(TAG, "Uid " + processUid + " is fetching a copy of UserProperties on"
- + " behalf of callingUid " + callingUid + ". Possibly"
+ if (processUid == Process.SYSTEM_UID && callingUid != processUid) {
+ Log.w(TAG, "The System (uid " + processUid + ") is fetching a copy of"
+ + " UserProperties on behalf of callingUid " + callingUid + ". Possibly"
+ " it should carefully first clearCallingIdentity or perhaps use"
+ " UserManagerInternal.getUserProperties() instead?",
new Throwable());