From 0a41f3c3f1cefcd71cbdd79299fba3482e23a5e2 Mon Sep 17 00:00:00 2001 From: zachh Date: Mon, 21 May 2018 15:18:41 -0700 Subject: Check for WRITE_CALL_LOG permission in CallLogNotificationsQueryHelper. TEST=unit Bug: 79667976,79925108 Test: unit PiperOrigin-RevId: 197468611 Change-Id: Ifedddd2bccd76b1fc2c9d3ea4e9854bfe6a218e5 --- .../dialer/app/calllog/CallLogNotificationsQueryHelper.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'java') diff --git a/java/com/android/dialer/app/calllog/CallLogNotificationsQueryHelper.java b/java/com/android/dialer/app/calllog/CallLogNotificationsQueryHelper.java index ce6e5baf4..d13702931 100644 --- a/java/com/android/dialer/app/calllog/CallLogNotificationsQueryHelper.java +++ b/java/com/android/dialer/app/calllog/CallLogNotificationsQueryHelper.java @@ -111,7 +111,14 @@ public class CallLogNotificationsQueryHelper { return; } if (!PermissionsUtil.hasPhonePermissions(context)) { - LogUtil.e("CallLogNotificationsQueryHelper.markMissedCallsInCallLogAsRead", "no permission"); + LogUtil.e( + "CallLogNotificationsQueryHelper.markMissedCallsInCallLogAsRead", "no phone permission"); + return; + } + if (!PermissionsUtil.hasCallLogWritePermissions(context)) { + LogUtil.e( + "CallLogNotificationsQueryHelper.markMissedCallsInCallLogAsRead", + "no call log write permission"); return; } -- cgit v1.2.3