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

Commit e8cf63dd authored by Zoey Chen's avatar Zoey Chen Committed by Gerrit Code Review
Browse files

Merge "[Settings] Replace #getServiceStateForSubscriber with #getServiceState"

parents 47634431 fc3ddb2f
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -149,7 +149,8 @@ public class RenameMobileNetworkDialogFragment extends InstrumentedDialogFragmen
        }

        final TextView operatorName = view.findViewById(R.id.operator_name_value);
        final ServiceState serviceState = mTelephonyManager.getServiceStateForSubscriber(mSubId);
        mTelephonyManager = mTelephonyManager.createForSubscriptionId(mSubId);
        final ServiceState serviceState = mTelephonyManager.getServiceState();
        operatorName.setText(serviceState.getOperatorAlphaLong());

        final TextView phoneTitle = view.findViewById(R.id.number_label);
+2 −1
Original line number Diff line number Diff line
@@ -86,7 +86,8 @@ public class RenameMobileNetworkDialogFragmentTest {

        final ServiceState serviceState = mock(ServiceState.class);
        when(serviceState.getOperatorAlphaLong()).thenReturn("fake carrier name");
        when(mTelephonyMgr.getServiceStateForSubscriber(mSubscriptionId)).thenReturn(serviceState);
        when(mTelephonyMgr.createForSubscriptionId(anyInt())).thenReturn(mTelephonyMgr);
        when(mTelephonyMgr.getServiceState()).thenReturn(serviceState);
    }

    @Test