diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2017-10-24 22:41:00 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2017-10-24 22:41:00 +0000 |
commit | daa1c44c00f3c598223639c9b80a52cf41db51ba (patch) | |
tree | e4c88a1862b157dc858abe73e52b077bf7b96948 /java/com/android/dialer/interactions/PhoneNumberInteraction.java | |
parent | ef7338cf787301c573fde8129bf8880d7faba040 (diff) | |
parent | 938468da6f5c225ebb161a68bd949c9cf3261892 (diff) |
Merge "Rename the new bubble package name from "bubble" to "newbubble"."
Diffstat (limited to 'java/com/android/dialer/interactions/PhoneNumberInteraction.java')
-rw-r--r-- | java/com/android/dialer/interactions/PhoneNumberInteraction.java | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/java/com/android/dialer/interactions/PhoneNumberInteraction.java b/java/com/android/dialer/interactions/PhoneNumberInteraction.java index 9692dae0f..ac744cce7 100644 --- a/java/com/android/dialer/interactions/PhoneNumberInteraction.java +++ b/java/com/android/dialer/interactions/PhoneNumberInteraction.java @@ -15,6 +15,7 @@ */ package com.android.dialer.interactions; +import android.Manifest.permission; import android.annotation.SuppressLint; import android.app.Activity; import android.app.AlertDialog; @@ -227,15 +228,10 @@ public class PhoneNumberInteraction implements OnLoadCompleteListener<Cursor> { // It's possible for a shortcut to have been created, and then permissions revoked. To avoid a // crash when the user tries to use such a shortcut, check for this condition and ask the user // for the permission. - String[] deniedPhonePermissions = - PermissionsUtil.getPermissionsCurrentlyDenied( - mContext, PermissionsUtil.allPhoneGroupPermissionsUsedInDialer); - if (deniedPhonePermissions.length > 0) { - LogUtil.i( - "PhoneNumberInteraction.startInteraction", - "Need phone permissions: " + Arrays.toString(deniedPhonePermissions)); + if (!PermissionsUtil.hasPhonePermissions(mContext)) { + LogUtil.i("PhoneNumberInteraction.startInteraction", "Need phone permissions: CALL_PHONE"); ActivityCompat.requestPermissions( - (Activity) mContext, deniedPhonePermissions, REQUEST_CALL_PHONE); + (Activity) mContext, new String[] {permission.CALL_PHONE}, REQUEST_CALL_PHONE); return; } |