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

Commit c9a3eeb7 authored by songferngwang's avatar songferngwang
Browse files

Fix the testcase failed

Add mock for SubscriptionManager.createForAllUserProfiles

Bug: 323652989
Test: atest MobileNetworkPreferenceControllerTest
Change-Id: I96574a79eba581db95d387f0d9c9fde2e004c41c
parent 0d7d1802
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -78,6 +78,7 @@ public class MobileNetworkPreferenceControllerTest {
        mContext = spy(ApplicationProvider.getApplicationContext());
        when(mContext.getSystemService(Context.TELEPHONY_SERVICE)).thenReturn(mTelephonyManager);
        when(mContext.getSystemService(SubscriptionManager.class)).thenReturn(mSubscriptionManager);
        when(mSubscriptionManager.createForAllUserProfiles()).thenReturn(mSubscriptionManager);
        when(mContext.getSystemService(UserManager.class)).thenReturn(mUserManager);
        if (Looper.myLooper() == null) {
            Looper.prepare();