diff options
author | Yorke Lee <yorkelee@google.com> | 2015-05-22 15:55:22 -0700 |
---|---|---|
committer | Yorke Lee <yorkelee@google.com> | 2015-05-22 15:55:22 -0700 |
commit | b7330e3802e8f9182ae1f5e54857a713b2f13547 (patch) | |
tree | 77f353086dd79cf6a40e096dc60a1fc9bf8bec51 /src/com/android/dialer/DialtactsActivity.java | |
parent | c16ea5ad67bf454158b364dec2f26c95a879c350 (diff) |
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
Diffstat (limited to 'src/com/android/dialer/DialtactsActivity.java')
-rw-r--r-- | src/com/android/dialer/DialtactsActivity.java | 3 |
1 files changed, 3 insertions, 0 deletions
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(); } } |