From 0ca01853cb89666578261f31b58ce80061029a56 Mon Sep 17 00:00:00 2001 From: maxwelb Date: Tue, 19 Dec 2017 17:47:12 -0800 Subject: Don't use phone number in spam call notifications Bug: 67775111 Test: Tap for regressions, manually verified bugreport didn't include PII PiperOrigin-RevId: 179628074 Change-Id: If9ee7fcfe709e749da33d0bddf2f7847e68cc422 --- java/com/android/incallui/spam/SpamCallListListener.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'java/com/android/incallui') diff --git a/java/com/android/incallui/spam/SpamCallListListener.java b/java/com/android/incallui/spam/SpamCallListListener.java index fa3dd6e01..e7603f041 100644 --- a/java/com/android/incallui/spam/SpamCallListListener.java +++ b/java/com/android/incallui/spam/SpamCallListListener.java @@ -455,6 +455,6 @@ public class SpamCallListListener implements CallList.Listener { } static String getNotificationTagForCall(@NonNull DialerCall call) { - return NOTIFICATION_TAG_PREFIX + call.getNumber(); + return NOTIFICATION_TAG_PREFIX + call.getUniqueCallId(); } } -- cgit v1.2.3 From 043d6715d7b7f5ccc81c416ef80c1fc04ec1445a Mon Sep 17 00:00:00 2001 From: roldenburg Date: Tue, 19 Dec 2017 18:05:16 -0800 Subject: Always have hardware acceration enabled for InCallActivity This is necessary because Go variants have hardware acceleration disabled at the application level for memory usage reasons. Author: srafeeqh@qti.qualcomm.com Bug: 69490087,70200603 Test: test video call PiperOrigin-RevId: 179629786 Change-Id: Idc900200f41bd1ae7920310b900df5b6e64479b9 --- java/com/android/incallui/AndroidManifest.xml | 3 +++ 1 file changed, 3 insertions(+) (limited to 'java/com/android/incallui') diff --git a/java/com/android/incallui/AndroidManifest.xml b/java/com/android/incallui/AndroidManifest.xml index b9d481b31..a98cc91d2 100644 --- a/java/com/android/incallui/AndroidManifest.xml +++ b/java/com/android/incallui/AndroidManifest.xml @@ -47,10 +47,13 @@ android:name="android.telephony.hide_voicemail_settings_menu" android:value="true"/> + Date: Tue, 19 Dec 2017 19:43:53 -0800 Subject: Bubble v2 changes. - Only show bubble for outgoing, active and background call. (Before: show bubble when is in call) - Show "Call ended" and hide bubble only when there is no outgoing, active or background call. (Before: show "Call ended" for all real call disconnection like one call in conference) - Don't show "Call ended" but only hide bubble when Duo upgrade is accepted/declined. We show bubble for Duo upgrade since the call is still connected. The solution doesn't work for fallback upgrade on pre-ODR device (so "Call ended" still shows). Bug: 67605985 Test: NewReturnToCallControllerTest PiperOrigin-RevId: 179636643 Change-Id: I5d1f6e812c94108228757af89e33d4c496beb735 --- .../incallui/NewReturnToCallController.java | 43 ++++++++++------------ 1 file changed, 19 insertions(+), 24 deletions(-) (limited to 'java/com/android/incallui') diff --git a/java/com/android/incallui/NewReturnToCallController.java b/java/com/android/incallui/NewReturnToCallController.java index ad49d6828..ca60a52c1 100644 --- a/java/com/android/incallui/NewReturnToCallController.java +++ b/java/com/android/incallui/NewReturnToCallController.java @@ -101,7 +101,7 @@ public class NewReturnToCallController implements InCallUiListener, Listener, Au if (showing) { hide(); } else { - if (TelecomUtil.isInManagedCall(context)) { + if (getCall() != null) { show(); } } @@ -157,22 +157,15 @@ public class NewReturnToCallController implements InCallUiListener, Listener, Au @Override public void onDisconnect(DialerCall call) { - if (call.wasParentCall()) { - // It's disconnected after the last child call is disconnected, and we already did everything - // for the last child. - LogUtil.i( - "ReturnToCallController.onDisconnect", "being called for a parent call and do nothing"); - return; - } - if (bubble != null - && bubble.isVisible() - && (!TelecomUtil.isInManagedCall(context) - || CallList.getInstance().getActiveOrBackgroundCall() != null)) { - bubble.showText(context.getText(R.string.incall_call_ended)); - } - // For conference call, we should hideAndReset for the last disconnected child call while the - // parent call is still there. - if (!CallList.getInstance().hasNonParentActiveOrBackgroundCall()) { + LogUtil.enterBlock("ReturnToCallController.onDisconnect"); + if (bubble != null && bubble.isVisible() && (getCall() == null)) { + // Show "Call ended" and hide bubble when there is no outgoing, active or background call + LogUtil.i("ReturnToCallController.onDisconnect", "show call ended and hide bubble"); + // Don't show text if it's Duo upgrade + // It doesn't work for Duo fallback upgrade since we're not considered in call + if (!TelecomUtil.isInCall(context) || CallList.getInstance().getIncomingCall() != null) { + bubble.showText(context.getText(R.string.incall_call_ended)); + } hideAndReset(); } else { startContactInfoSearch(); @@ -197,19 +190,21 @@ public class NewReturnToCallController implements InCallUiListener, Listener, Au } private void startContactInfoSearch() { - DialerCall dialerCall = CallList.getInstance().getIncomingCall(); - if (dialerCall == null) { - dialerCall = CallList.getInstance().getOutgoingCall(); - } - if (dialerCall == null) { - dialerCall = CallList.getInstance().getActiveOrBackgroundCall(); - } + DialerCall dialerCall = getCall(); if (dialerCall != null) { contactInfoCache.findInfo( dialerCall, false /* isIncoming */, new ReturnToCallContactInfoCacheCallback(this)); } } + private DialerCall getCall() { + DialerCall dialerCall = CallList.getInstance().getOutgoingCall(); + if (dialerCall == null) { + dialerCall = CallList.getInstance().getActiveOrBackgroundCall(); + } + return dialerCall; + } + private void onPhotoAvatarReceived(@NonNull Drawable photo) { if (bubble != null) { bubble.updatePhotoAvatar(photo); -- cgit v1.2.3 From 2cf2c3484c5f8dd11e6ad32633f7254119525413 Mon Sep 17 00:00:00 2001 From: erfanian Date: Thu, 21 Dec 2017 12:01:33 -0800 Subject: Update assisted dialing extras in preparation for platform implementation. * Use only one extra as if we were going to make a request of the Platform. * Modify the incallui to handle instances where the platform may not supply TransformationInfo. This should accommodate instances where the platform "used" assisted dialing, but did not provide the necessary TransformationInfo. Test: unit tests PiperOrigin-RevId: 179841752 Change-Id: I06411dc00812dba8978a2a090d8769dcce9b2ad6 --- java/com/android/incallui/call/DialerCall.java | 43 ++++++++++++++++++++--- java/com/android/incallui/contactgrid/TopRow.java | 2 +- 2 files changed, 39 insertions(+), 6 deletions(-) (limited to 'java/com/android/incallui') diff --git a/java/com/android/incallui/call/DialerCall.java b/java/com/android/incallui/call/DialerCall.java index 812024904..94c79e904 100644 --- a/java/com/android/incallui/call/DialerCall.java +++ b/java/com/android/incallui/call/DialerCall.java @@ -20,6 +20,7 @@ import android.Manifest.permission; import android.content.Context; import android.hardware.camera2.CameraCharacteristics; import android.net.Uri; +import android.os.Build; import android.os.Build.VERSION; import android.os.Build.VERSION_CODES; import android.os.Bundle; @@ -43,6 +44,7 @@ import android.telecom.VideoProfile; import android.text.TextUtils; import com.android.contacts.common.compat.CallCompat; import com.android.contacts.common.compat.telecom.TelecomManagerCompat; +import com.android.dialer.assisteddialing.ConcreteCreator; import com.android.dialer.assisteddialing.TransformationInfo; import com.android.dialer.callintent.CallInitiationType; import com.android.dialer.callintent.CallIntentParser; @@ -1073,19 +1075,50 @@ public class DialerCall implements VideoTechListener, StateChangedListener, Capa return mLogState.isIncoming; } + /** + * Try and determine if the call used assisted dialing. + * + *

We will not be able to verify a call underwent assisted dialing until the Platform + * implmentation is complete in P+. + * + * @return a boolean indicating assisted dialing may have been performed + */ public boolean isAssistedDialed() { if (getIntentExtras() != null) { - return getIntentExtras().getBoolean(TelephonyManagerCompat.IS_ASSISTED_DIALED, false); + // O_MR1 and below uses the existence of USE_ASSISTED_DIALING to indicate assisted dialing + // was used. The Dialer client is responsible for performing assisted dialing before + // placing the outgoing call. + // + // The existence of the assisted dialing extras indicates that assisted dialing took place. + if (getIntentExtras().getBoolean(TelephonyManagerCompat.USE_ASSISTED_DIALING, false) + && getAssistedDialingExtras() != null + && Build.VERSION.SDK_INT <= ConcreteCreator.BUILD_CODE_CEILING) { + return true; + } + } + + // Starting in P+ USE_ASSISTED_DIALING indicates that the client requested the platform + // perform assisted dialing. PROPERTY_ASSISTED_DIALING_USED indicates assisted dialing took + // place. + if (hasProperty(TelephonyManagerCompat.PROPERTY_ASSISTED_DIALING_USED) + && Build.VERSION.SDK_INT > ConcreteCreator.BUILD_CODE_CEILING) { + return true; } return false; } + @Nullable public TransformationInfo getAssistedDialingExtras() { - if (isAssistedDialed()) { - return TransformationInfo.newInstanceFromBundle( - getIntentExtras().getBundle(TelephonyManagerCompat.ASSISTED_DIALING_EXTRAS)); + if (getIntentExtras() == null) { + return null; } - return null; + + if (getIntentExtras().getBundle(TelephonyManagerCompat.ASSISTED_DIALING_EXTRAS) == null) { + return null; + } + + return TransformationInfo.newInstanceFromBundle( + getIntentExtras().getBundle(TelephonyManagerCompat.ASSISTED_DIALING_EXTRAS)); } public LatencyReport getLatencyReport() { diff --git a/java/com/android/incallui/contactgrid/TopRow.java b/java/com/android/incallui/contactgrid/TopRow.java index f8a485519..556b11ba0 100644 --- a/java/com/android/incallui/contactgrid/TopRow.java +++ b/java/com/android/incallui/contactgrid/TopRow.java @@ -175,7 +175,7 @@ public class TopRow { } } - if (state.isAssistedDialed) { + if (state.isAssistedDialed && state.assistedDialingExtras != null) { LogUtil.i("TopRow.getLabelForDialing", "using assisted dialing label."); String countryCode = String.valueOf(state.assistedDialingExtras.transformedNumberCountryCallingCode()); -- cgit v1.2.3