Merge changes I96574a79,I74681222 into main
* changes:
Fix the testcase failed
Add the log for SidecarFragment
diff --git a/src/com/android/settings/network/SwitchSlotSidecar.java b/src/com/android/settings/network/SwitchSlotSidecar.java
index 7005452..72ece04 100644
--- a/src/com/android/settings/network/SwitchSlotSidecar.java
+++ b/src/com/android/settings/network/SwitchSlotSidecar.java
@@ -130,11 +130,13 @@
} catch (UiccSlotsException e) {
result.exception = e;
}
+ Log.i(TAG, "return command.");
return result;
}
@Override
protected void onPostExecute(Result result) {
+ Log.i(TAG, "onPostExecute: get result");
if (result.exception == null) {
setState(State.SUCCESS, Substate.UNUSED);
} else {
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();