Snap for 5999026 from d23fc63744a4a87c5f4248cca06b8cda3bbccc41 to rvc-release
Change-Id: I56c162e1178863f993aeecdceabc97e9fa8bf102
diff --git a/src/com/android/providers/contacts/VoicemailPermissions.java b/src/com/android/providers/contacts/VoicemailPermissions.java
index fc83ebc..58e7a14 100644
--- a/src/com/android/providers/contacts/VoicemailPermissions.java
+++ b/src/com/android/providers/contacts/VoicemailPermissions.java
@@ -20,6 +20,7 @@
import android.os.Binder;
import android.telecom.TelecomManager;
import android.telephony.TelephonyManager;
+import android.text.TextUtils;
import com.android.providers.contacts.util.ContactsPermissions;
@@ -42,6 +43,11 @@
}
private boolean isDefaultOrSystemDialer(String callingPackage) {
+ // Note: Mimics previous dependency on DefaultDialerManager; that code just returns false
+ // here if the calling package is empty.
+ if (TextUtils.isEmpty(callingPackage)) {
+ return false;
+ }
TelecomManager tm = mContext.getSystemService(TelecomManager.class);
return (callingPackage.equals(tm.getDefaultDialerPackage())
|| callingPackage.equals(tm.getSystemDialerPackage()));
diff --git a/tests/src/com/android/providers/contacts/CallLogProviderTest.java b/tests/src/com/android/providers/contacts/CallLogProviderTest.java
index 8ff0c5b..bc609e2 100644
--- a/tests/src/com/android/providers/contacts/CallLogProviderTest.java
+++ b/tests/src/com/android/providers/contacts/CallLogProviderTest.java
@@ -16,7 +16,7 @@
package com.android.providers.contacts;
-import android.telephony.CallerInfo;
+import android.telecom.CallerInfo;
import com.android.internal.telephony.PhoneConstants;
import com.android.providers.contacts.testutil.CommonDatabaseUtils;
diff --git a/tests/src/com/android/providers/contacts/CallerInfoIntegrationTest.java b/tests/src/com/android/providers/contacts/CallerInfoIntegrationTest.java
index 90ed93e..f57c060 100644
--- a/tests/src/com/android/providers/contacts/CallerInfoIntegrationTest.java
+++ b/tests/src/com/android/providers/contacts/CallerInfoIntegrationTest.java
@@ -22,7 +22,7 @@
import android.provider.ContactsContract.RawContacts;
import android.test.suitebuilder.annotation.MediumTest;
-import android.telephony.CallerInfo;
+import android.telecom.CallerInfo;
import com.android.providers.contacts.testutil.DataUtil;
/**