Merge changes I96574a79,I74681222 into main

* changes:
  Fix the testcase failed
  Add the log for SidecarFragment
This commit is contained in:
SongFerng Wang
2024-03-04 12:27:37 +00:00
committed by Android (Google) Code Review
2 changed files with 3 additions and 0 deletions

View File

@@ -130,11 +130,13 @@ public class SwitchSlotSidecar
} 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 {

View File

@@ -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();