diff options
author | 2024-11-11 13:33:48 -0800 | |
---|---|---|
committer | 2024-11-11 13:33:48 -0800 | |
commit | 84967ebf304c35d02de1eb4b0268a87b3405515e (patch) | |
tree | 7270c4f2912d3e5de44387d329bdaed297830e3b | |
parent | c23a55ed105be7863cad1ea72a54a467f009bb50 (diff) |
UserProperty cross-binder warning only for SYSTEM
We currently warn when getUserProperties() is called where the
callingUid differs from the processUid. This is really only an
interesting situation when called from the SYSTEM (uid 1000), since
otherwise the binder call will equate the two anyway.
Since this is now of much lower frequency, we can log this warning for
regular devices too, not just eng builds.
Test: Manual. Just a logging change.
Flag: EXEMPT bugfix
Change-Id: I9be85c825549743ad281eedd6da550548d011642
-rw-r--r-- | core/java/android/os/UserManager.java | 6 |
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()); |