summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNancy Chen <nancychen@google.com>2015-12-11 00:10:40 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-12-11 00:10:40 +0000
commit614302070ca30dd132975d4a79680a00cb62a8cc (patch)
treeaeae466ce0913424b1b895a9d3280d500b3de5fd
parent24c462296cc468e9620b59b0d5165286dcdbbff9 (diff)
parente71f36902c12551a8d6df98c6075b5f9d4d0851f (diff)
Merge "[DO NOT MERGE] Fixing crash related to typing ADN numbers in Dialpad" into ub-contactsdialer-a-dev
-rw-r--r--src/com/android/dialer/SpecialCharSequenceMgr.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/com/android/dialer/SpecialCharSequenceMgr.java b/src/com/android/dialer/SpecialCharSequenceMgr.java
index 6ca5ef58e..d9e293888 100644
--- a/src/com/android/dialer/SpecialCharSequenceMgr.java
+++ b/src/com/android/dialer/SpecialCharSequenceMgr.java
@@ -192,7 +192,6 @@ public class SpecialCharSequenceMgr {
* and query cancel handler implemented in {@link SimContactQueryCookie}.
*/
static boolean handleAdnEntry(Context context, String input, EditText textField) {
- context = context.getApplicationContext();
/* ADN entries are of the form "N(N)(N)#" */
TelephonyManager telephonyManager =
(TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
@@ -225,7 +224,7 @@ public class SpecialCharSequenceMgr {
// the dialer text field.
// create the async query handler
- final QueryHandler handler = new QueryHandler (context.getContentResolver());
+ final QueryHandler handler = new QueryHandler(context.getContentResolver());
// create the cookie object
final SimContactQueryCookie sc = new SimContactQueryCookie(index - 1, handler,
@@ -248,16 +247,17 @@ public class SpecialCharSequenceMgr {
List<PhoneAccountHandle> subscriptionAccountHandles =
PhoneAccountUtils.getSubscriptionPhoneAccounts(context);
+ Context applicationContext = context.getApplicationContext();
boolean hasUserSelectedDefault = subscriptionAccountHandles.contains(
- TelecomUtil.getDefaultOutgoingPhoneAccount(context,
+ TelecomUtil.getDefaultOutgoingPhoneAccount(applicationContext,
PhoneAccount.SCHEME_TEL));
if (subscriptionAccountHandles.size() == 1 || hasUserSelectedDefault) {
- Uri uri = TelecomUtil.getAdnUriForPhoneAccount(context, null);
+ Uri uri = TelecomUtil.getAdnUriForPhoneAccount(applicationContext, null);
handleAdnQuery(handler, sc, uri);
} else if (subscriptionAccountHandles.size() > 1){
- SelectPhoneAccountListener callback =
- new HandleAdnEntryAccountSelectedCallback(context, handler, sc);
+ SelectPhoneAccountListener callback = new HandleAdnEntryAccountSelectedCallback(
+ applicationContext, handler, sc);
DialogFragment dialogFragment = SelectPhoneAccountDialogFragment.newInstance(
subscriptionAccountHandles, callback);