Merge "Send notification when permission granted in search" into ub-contactsdialer-a-dev
diff --git a/src/com/android/dialer/list/RegularSearchFragment.java b/src/com/android/dialer/list/RegularSearchFragment.java
index b7e26d6..c715de8 100644
--- a/src/com/android/dialer/list/RegularSearchFragment.java
+++ b/src/com/android/dialer/list/RegularSearchFragment.java
@@ -113,6 +113,10 @@
int[] grantResults) {
if (requestCode == READ_CONTACTS_PERMISSION_REQUEST_CODE) {
setupEmptyView();
+ if (grantResults != null && grantResults.length == 1
+ && PackageManager.PERMISSION_GRANTED == grantResults[0]) {
+ PermissionsUtil.notifyPermissionGranted(getActivity(), READ_CONTACTS);
+ }
}
}
}