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

Commit 79cfaf0f authored by linyuh's avatar linyuh Committed by Copybara-Service
Browse files

Show "Calling accounts" for all users in DialerSettingsActivity

Bug: 110083450
Test: Manual
PiperOrigin-RevId: 200774928
Change-Id: I4bb036ab5b2e7dc252ad32d49d2370cd17f8e3f8
parent 988a7e99
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -116,9 +116,7 @@ public class DialerSettingsActivity extends AppCompatPreferenceActivity {
        (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);

    // "Call Settings" (full settings) is shown if the current user is primary user and there
    // is only one SIM. Before N, "Calling accounts" setting is shown if the current user is
    // primary user and there are multiple SIMs. In N+, "Calling accounts" is shown whenever
    // "Call Settings" is not shown.
    // is only one SIM. Otherwise, "Calling accounts" is shown.
    boolean isPrimaryUser = isPrimaryUser();
    if (isPrimaryUser && TelephonyManagerCompat.getPhoneCount(telephonyManager) <= 1) {
      Header callSettingsHeader = new Header();
@@ -128,7 +126,7 @@ public class DialerSettingsActivity extends AppCompatPreferenceActivity {
      callSettingsHeader.titleRes = R.string.call_settings_label;
      callSettingsHeader.intent = callSettingsIntent;
      target.add(callSettingsHeader);
    } else if (isPrimaryUser) {
    } else {
      Header phoneAccountSettingsHeader = new Header();
      Intent phoneAccountSettingsIntent = new Intent(TelecomManager.ACTION_CHANGE_PHONE_ACCOUNTS);
      phoneAccountSettingsIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);