summaryrefslogtreecommitdiff
path: root/java/com/android/dialer/interactions
diff options
context:
space:
mode:
authorEric Erfanian <erfanian@google.com>2017-04-06 09:41:50 -0700
committerEric Erfanian <erfanian@google.com>2017-04-06 09:41:50 -0700
commitd8046e520a866b9948ee9ba47cf642b441ca8e23 (patch)
tree8d08d4f2292aa84dc435d455891e7ab633d95a25 /java/com/android/dialer/interactions
parentcdb1edf966a892abebcba425a85b7d4e47758302 (diff)
Update AOSP Dialer source from internal google3 repository at
cl/152373142. Test: make, treehugger This CL updates the AOSP Dialer source with all the changes that have gone into the private google3 repository. This includes all the changes from cl/151342913 (3/27/2017) to cl/152373142 (4/06/2017). This goal of these drops is to keep the AOSP source in sync with the internal google3 repository. Currently these sync are done by hand with very minor modifications to the internal source code. See the Android.mk file for list of modifications. Our current goal is to do frequent drops (daily if possible) and eventually switched to an automated process. Change-Id: I2fbc88cf6867b90ac8b65f75e5e34468988c7217
Diffstat (limited to 'java/com/android/dialer/interactions')
-rw-r--r--java/com/android/dialer/interactions/PhoneNumberInteraction.java15
1 files changed, 7 insertions, 8 deletions
diff --git a/java/com/android/dialer/interactions/PhoneNumberInteraction.java b/java/com/android/dialer/interactions/PhoneNumberInteraction.java
index b797629dc..f333419ba 100644
--- a/java/com/android/dialer/interactions/PhoneNumberInteraction.java
+++ b/java/com/android/dialer/interactions/PhoneNumberInteraction.java
@@ -193,14 +193,13 @@ public class PhoneNumberInteraction implements OnLoadCompleteListener<Cursor> {
* numbers have been queried for. The activity must implement {@link InteractionErrorListener}
* and {@link DisambigDialogDismissedListener}.
* @param isVideoCall {@code true} if the call is a video call, {@code false} otherwise.
- * @return true if the necessary permissions were found to start the interaction, false otherwise
*/
- public static boolean startInteractionForPhoneCall(
+ public static void startInteractionForPhoneCall(
TransactionSafeActivity activity,
Uri uri,
boolean isVideoCall,
CallSpecificAppData callSpecificAppData) {
- return new PhoneNumberInteraction(
+ new PhoneNumberInteraction(
activity, ContactDisplayUtils.INTERACTION_CALL, isVideoCall, callSpecificAppData)
.startInteraction(uri);
}
@@ -214,9 +213,8 @@ public class PhoneNumberInteraction implements OnLoadCompleteListener<Cursor> {
* Initiates the interaction to result in either a phone call or sms message for a contact.
*
* @param uri Contact Uri
- * @return true if the necessary permissions were found to start the interaction, false otherwise
*/
- private boolean startInteraction(Uri uri) {
+ private void startInteraction(Uri uri) {
// It's possible for a shortcut to have been created, and then permissions revoked. To avoid a
// crash when the user tries to use such a shortcut, check for this condition and ask the user
// for the permission.
@@ -225,7 +223,7 @@ public class PhoneNumberInteraction implements OnLoadCompleteListener<Cursor> {
LogUtil.i("PhoneNumberInteraction.startInteraction", "No phone permissions");
ActivityCompat.requestPermissions(
(Activity) mContext, new String[] {Manifest.permission.CALL_PHONE}, REQUEST_CALL_PHONE);
- return false;
+ return;
}
if (ContextCompat.checkSelfPermission(mContext, Manifest.permission.READ_CONTACTS)
!= PackageManager.PERMISSION_GRANTED) {
@@ -234,7 +232,7 @@ public class PhoneNumberInteraction implements OnLoadCompleteListener<Cursor> {
(Activity) mContext,
new String[] {Manifest.permission.READ_CONTACTS},
REQUEST_READ_CONTACTS);
- return false;
+ return;
}
if (mLoader != null) {
@@ -260,7 +258,6 @@ public class PhoneNumberInteraction implements OnLoadCompleteListener<Cursor> {
mContext, queryUri, PHONE_NUMBER_PROJECTION, PHONE_NUMBER_SELECTION, null, null);
mLoader.registerListener(0, this);
mLoader.startLoading();
- return true;
}
@Override
@@ -353,6 +350,7 @@ public class PhoneNumberInteraction implements OnLoadCompleteListener<Cursor> {
final Activity activity = (Activity) mContext;
if (activity.isDestroyed()) {
// Check whether the activity is still running
+ LogUtil.i("PhoneNumberInteraction.showDisambiguationDialog", "activity destroyed");
return;
}
try {
@@ -365,6 +363,7 @@ public class PhoneNumberInteraction implements OnLoadCompleteListener<Cursor> {
} catch (IllegalStateException e) {
// ignore to be safe. Shouldn't happen because we checked the
// activity wasn't destroyed, but to be safe.
+ LogUtil.e("PhoneNumberInteraction.showDisambiguationDialog", "caught exception", e);
}
}