From b7330e3802e8f9182ae1f5e54857a713b2f13547 Mon Sep 17 00:00:00 2001 From: Yorke Lee Date: Fri, 22 May 2015 15:55:22 -0700 Subject: Handle runtime phone permission We don't have access to the call log without the phone permission, so disable the following functionality: 1) Call log display 2) Show call history overflow menu option 3) Last number dialed functionality Bug: 20266292 Change-Id: I2f1d4b8b5f747d2fa04c3a9c291f9cf5147646b7 --- src/com/android/dialer/DialtactsActivity.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/com/android/dialer/DialtactsActivity.java') diff --git a/src/com/android/dialer/DialtactsActivity.java b/src/com/android/dialer/DialtactsActivity.java index e240cf0aa..96dc415da 100644 --- a/src/com/android/dialer/DialtactsActivity.java +++ b/src/com/android/dialer/DialtactsActivity.java @@ -257,6 +257,9 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O menu.findItem(R.id.menu_import_export).setVisible(hasContactsPermission); menu.findItem(R.id.menu_add_contact).setVisible(hasContactsPermission); + + menu.findItem(R.id.menu_history).setVisible( + PermissionsUtil.hasPhonePermissions(DialtactsActivity.this)); super.show(); } } -- cgit v1.2.3