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

Commit 373ece87 authored by Amit Mahajan's avatar Amit Mahajan Committed by Automerger Merge Worker
Browse files

Merge "Fix an assert in TelephonyRegistryTest." into sc-dev am: f683f877

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/opt/telephony/+/14039888

Change-Id: I8457ab1da12a0edc66d2bd37311488b246619d08
parents ff19bea6 f683f877
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -638,7 +638,7 @@ public class TelephonyRegistryTest extends TelephonyTest {
                .queryLocalInterface(anyString());
                .queryLocalInterface(anyString());


        UserInfo userInfo = new UserInfo(UserHandle.myUserId(), "" /* name */, 0 /* flags */);
        UserInfo userInfo = new UserInfo(UserHandle.myUserId(), "" /* name */, 0 /* flags */);
        doReturn(userInfo).when(mIActivityManager).getCurrentUser();
        doReturn(userInfo.id).when(mIActivityManager).getCurrentUserId();


        doReturn(true).when(mLocationManager).isLocationEnabledForUser(any(UserHandle.class));
        doReturn(true).when(mLocationManager).isLocationEnabledForUser(any(UserHandle.class));


@@ -662,6 +662,7 @@ public class TelephonyRegistryTest extends TelephonyTest {
        // Broadcast ACTION_USER_SWITCHED for the current user Id + 1. Callback shouldn't be
        // Broadcast ACTION_USER_SWITCHED for the current user Id + 1. Callback shouldn't be
        // triggered.
        // triggered.
        userInfo.id++;
        userInfo.id++;
        doReturn(userInfo.id).when(mIActivityManager).getCurrentUserId();
        mCellLocation = null;
        mCellLocation = null;
        mContext.sendBroadcast(new Intent(Intent.ACTION_USER_SWITCHED));
        mContext.sendBroadcast(new Intent(Intent.ACTION_USER_SWITCHED));