diff options
author | Jay Shrauner <shrauner@google.com> | 2015-04-09 22:39:03 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-04-09 22:39:03 +0000 |
commit | fa8c8d7e488aab402d2e6c1c7f914ef60df5e9b5 (patch) | |
tree | 644c33a4858d17a998d85d92b7cc436c104abc76 /src | |
parent | 69748953bc507fc8c02ad401f51b7df2efd77688 (diff) | |
parent | 384eaad571ec047d14d33761b152625e8a9ee9b0 (diff) |
Merge "Switch to new SelectPhoneAccountDialogFragment API"
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/dialer/SpecialCharSequenceMgr.java | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/src/com/android/dialer/SpecialCharSequenceMgr.java b/src/com/android/dialer/SpecialCharSequenceMgr.java index 46c6de6c9..1e686125f 100644 --- a/src/com/android/dialer/SpecialCharSequenceMgr.java +++ b/src/com/android/dialer/SpecialCharSequenceMgr.java @@ -18,6 +18,7 @@ package com.android.dialer; import android.app.Activity; import android.app.AlertDialog; +import android.app.DialogFragment; import android.app.KeyguardManager; import android.app.ProgressDialog; import android.content.ActivityNotFoundException; @@ -64,6 +65,8 @@ import java.util.List; public class SpecialCharSequenceMgr { private static final String TAG = "SpecialCharSequenceMgr"; + private static final String TAG_SELECT_ACCT_FRAGMENT = "tag_select_acct_fragment"; + private static final String SECRET_CODE_ACTION = "android.provider.Telephony.SECRET_CODE"; private static final String MMI_IMEI_DISPLAY = "*#06#"; private static final String MMI_REGULATORY_INFO_DISPLAY = "*#07#"; @@ -229,9 +232,12 @@ public class SpecialCharSequenceMgr { public void onDialogDismissed() {} }; - SelectPhoneAccountDialogFragment.showAccountDialog( - ((Activity) context).getFragmentManager(), subscriptionAccountHandles, - listener); + // NOTE: If you want to support rotation of this dialog need + // to refactor the listener and set it in DialpadFragment.onCreate() + DialogFragment dialogFragment = SelectPhoneAccountDialogFragment.newInstance( + subscriptionAccountHandles, listener); + dialogFragment.show(((Activity) context).getFragmentManager(), + TAG_SELECT_ACCT_FRAGMENT); } else { return false; } @@ -290,9 +296,12 @@ public class SpecialCharSequenceMgr { public void onDialogDismissed() {} }; - SelectPhoneAccountDialogFragment.showAccountDialog( - ((Activity) context).getFragmentManager(), subscriptionAccountHandles, - listener); + // NOTE: If you want to support rotation of this dialog need + // to refactor the listener and set it in DialpadFragment.onCreate() + DialogFragment dialogFragment = SelectPhoneAccountDialogFragment.newInstance( + subscriptionAccountHandles, listener); + dialogFragment.show(((Activity) context).getFragmentManager(), + TAG_SELECT_ACCT_FRAGMENT); } return true; } |