Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 776b1cd5 authored by Grant Menke's avatar Grant Menke
Browse files

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
parent c616d8f4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);