diff options
author | 2025-01-27 15:07:24 -0800 | |
---|---|---|
committer | 2025-01-27 15:07:24 -0800 | |
commit | 776b1cd5cf93aa0ec4bfad137e846ec0c145c056 (patch) | |
tree | b693970a202fcadedc1afce284350282863a146e | |
parent | c616d8f49e533a71b6e2db4de4c89be3d5d1b3ed (diff) |
Ensure CallerInfoAsyncQuery uses HSUM aware method to check user id of current process.
CallerInfoAsyncQuery#getCurrentProfileContentResolver was using a deprecated non HSUM aware method in order to check the user id of the current process. This was causing some contacts provider UT to fail when the device is HSUM mode. This CL updates CallerInfoAsyncQuery to use the HSUM aware reccomended method UserHandle#myUserId instead.
Test: atest CallerInfoIntegrationTest#testCallerInfo
Bug: 383209047
Flag: EXEMPT bugfix
Change-Id: I9032c2781c2502848d246be3cf83492a5a0d7228
-rw-r--r-- | telecomm/java/android/telecom/CallerInfoAsyncQuery.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/telecomm/java/android/telecom/CallerInfoAsyncQuery.java b/telecomm/java/android/telecom/CallerInfoAsyncQuery.java index a03d7e25d4c5..69dd5562711a 100644 --- a/telecomm/java/android/telecom/CallerInfoAsyncQuery.java +++ b/telecomm/java/android/telecom/CallerInfoAsyncQuery.java @@ -112,7 +112,7 @@ public class CallerInfoAsyncQuery { if (DBG) Log.d(LOG_TAG, "Trying to get current content resolver..."); final int currentUser = ActivityManager.getCurrentUser(); - final int myUser = UserManager.get(context).getProcessUserId(); + final int myUser = UserHandle.myUserId(); if (DBG) Log.d(LOG_TAG, "myUser=" + myUser + "currentUser=" + currentUser); |