From 0104d9bbcb1c4294bbd10b595f5f78ddcdcc7e7e Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Mon, 27 Oct 2014 17:09:55 -0700 Subject: Create call settings intent in DialerSettingsActivity. - Remove helper method in DialtactsActivity. + Create intent in DialerSettingsActivity. This is the only place the method is called; it seems that this code to create the intent should live in DialerSettingsActivity instead of DialtactsActivity. Bug: 18114923 Change-Id: I129b716c2a247994647c123f1cbd945b7ef36778 --- src/com/android/dialer/settings/DialerSettingsActivity.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/com/android/dialer/settings/DialerSettingsActivity.java') diff --git a/src/com/android/dialer/settings/DialerSettingsActivity.java b/src/com/android/dialer/settings/DialerSettingsActivity.java index 43186664e..53c23c4b3 100644 --- a/src/com/android/dialer/settings/DialerSettingsActivity.java +++ b/src/com/android/dialer/settings/DialerSettingsActivity.java @@ -52,17 +52,20 @@ public class DialerSettingsActivity extends AnalyticsPreferenceActivity { // Only show call setting menus if the current user is the primary/owner user. if (isPrimaryUser()) { final TelephonyManager telephonyManager = - (TelephonyManager) this.getSystemService(Context.TELEPHONY_SERVICE); + (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE); // Show "Call Settings" if there is one SIM and "Phone Accounts" if there are more. if (telephonyManager.getPhoneCount() <= 1) { final Header callSettingsHeader = new Header(); + Intent callSettingsIntent = new Intent(TelecomManager.ACTION_SHOW_CALL_SETTINGS); + callSettingsIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); + callSettingsHeader.titleRes = R.string.call_settings_label; callSettingsHeader.summaryRes = R.string.call_settings_description; - callSettingsHeader.intent = DialtactsActivity.getCallSettingsIntent(); + callSettingsHeader.intent = callSettingsIntent; target.add(callSettingsHeader); } else { final Header phoneAccountSettingsHeader = new Header(); - final Intent phoneAccountSettingsIntent = + Intent phoneAccountSettingsIntent = new Intent(TelecomManager.ACTION_CHANGE_PHONE_ACCOUNTS); phoneAccountSettingsIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); -- cgit v1.2.3