diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2018-05-21 21:45:31 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2018-05-21 21:45:31 +0000 |
commit | 599705c26c7632eb222ed244343eeac280287f7f (patch) | |
tree | 90263793ac167c4588f8d462d431d2a8bcfc1392 /java/com | |
parent | 4791039e1e62ff6fc22f063dbf363fb6864c87ad (diff) | |
parent | 857de2fe89bd9daa3fa836998568208d7c8ce575 (diff) |
Merge "Check READ_PHONE_STATE for isVoicemailAvailable()"
Diffstat (limited to 'java/com')
-rw-r--r-- | java/com/android/dialer/main/impl/OldMainActivityPeer.java | 2 | ||||
-rw-r--r-- | java/com/android/dialer/telecom/TelecomUtil.java | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/java/com/android/dialer/main/impl/OldMainActivityPeer.java b/java/com/android/dialer/main/impl/OldMainActivityPeer.java index 402edb3d5..a0e92a8cb 100644 --- a/java/com/android/dialer/main/impl/OldMainActivityPeer.java +++ b/java/com/android/dialer/main/impl/OldMainActivityPeer.java @@ -372,7 +372,7 @@ public class OldMainActivityPeer implements MainActivityPeer, FragmentUtilListen private static boolean isVoicemailAvailable( Context context, PhoneAccountHandle defaultUserSelectedAccount) { - if (!TelecomUtil.hasReadPhoneStatePermission(context)) { + if (!PermissionsUtil.hasReadPhoneStatePermissions(context)) { LogUtil.i( "OldMainActivityPeer.isVoicemailAvailable", "No read phone permisison or not the default dialer."); diff --git a/java/com/android/dialer/telecom/TelecomUtil.java b/java/com/android/dialer/telecom/TelecomUtil.java index 8c0090928..c08814688 100644 --- a/java/com/android/dialer/telecom/TelecomUtil.java +++ b/java/com/android/dialer/telecom/TelecomUtil.java @@ -275,15 +275,21 @@ public abstract class TelecomUtil { && hasPermission(context, Manifest.permission.WRITE_VOICEMAIL)); } + /** @deprecated use {@link com.android.dialer.util.PermissionsUtil} */ + @Deprecated public static boolean hasModifyPhoneStatePermission(Context context) { return isDefaultDialer(context) || hasPermission(context, Manifest.permission.MODIFY_PHONE_STATE); } + /** @deprecated use {@link com.android.dialer.util.PermissionsUtil} */ + @Deprecated public static boolean hasReadPhoneStatePermission(Context context) { return isDefaultDialer(context) || hasPermission(context, Manifest.permission.READ_PHONE_STATE); } + /** @deprecated use {@link com.android.dialer.util.PermissionsUtil} */ + @Deprecated public static boolean hasCallPhonePermission(Context context) { return isDefaultDialer(context) || hasPermission(context, Manifest.permission.CALL_PHONE); } |