commit | c9a3eeb7928ed5b80c8ceb68ec7f0f3c79d662cc | [log] [tgz] |
---|---|---|
author | songferngwang <songferngwang@google.com> | Mon Mar 04 10:58:22 2024 +0000 |
committer | songferngwang <songferngwang@google.com> | Mon Mar 04 10:58:22 2024 +0000 |
tree | f2efbfeee365320496ad81a0cb5475fd58700295 | |
parent | 0d7d180246d4a963f1f7a75aa8aba4b288df77e7 [diff] |
Fix the testcase failed Add mock for SubscriptionManager.createForAllUserProfiles Bug: 323652989 Test: atest MobileNetworkPreferenceControllerTest Change-Id: I96574a79eba581db95d387f0d9c9fde2e004c41c
diff --git a/tests/unit/src/com/android/settings/network/MobileNetworkPreferenceControllerTest.java b/tests/unit/src/com/android/settings/network/MobileNetworkPreferenceControllerTest.java index be3815d..1231c01 100644 --- a/tests/unit/src/com/android/settings/network/MobileNetworkPreferenceControllerTest.java +++ b/tests/unit/src/com/android/settings/network/MobileNetworkPreferenceControllerTest.java
@@ -78,6 +78,7 @@ 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();