From 10b34a5ebf12e97ecba0caf3c8e30b476b038a96 Mon Sep 17 00:00:00 2001 From: Eric Erfanian Date: Thu, 4 May 2017 08:23:17 -0700 Subject: Update Dialer to V10 RC16 This release was created following the instructions at: go/dialer-aosp-release Subsequent dialer releases will follow as O bugs are fixed, until we reach our final RC. Version: 10 Candidate: RC16 Branch: dialer-android_release_branch/153304843.1 dialer-android/dialer-android_20170416.00/dialer-android_20170416.00_RC16 This release contains the following bug fixes since RC00: Bug: 37324705 35304403 36067503 35304446 33203808 37280992 37346084 35766990 37481880 37424493 36470282 37347691 37519015 37168472 35805360 37545472 27704934 36515614 35766990 37577470 34739750 35801628 36788693 35264204 36708536 37628370 36904650 37314436 37642171 37530847 37637799 37666625 37548549 37648036 37636412 37323529 37630507 35919141 37198343 37548572 36178218 37640315 37663896 37720467 37275944 37710497 31634477 37744796 37348506 37744796 37568534 37672424 34872683 34873026 37681461 34873295 37748373 37526812 37618638 37663896 37536088 37727455 37165687 36651204 36900708 37323529 36902926 37256480 37328353 37432034 37436952 34093562 37720889 37321935 37780300 37781115 37755902 36588206 34258266 37290464 37698062 37618638 37473004 37432034 37918676 37870494 37722091 Test: make, on device Change-Id: I99e1a484ccd578c1f8a13e7a6a4b4952f0791297 --- java/com/android/incallui/InCallPresenter.java | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'java/com/android/incallui/InCallPresenter.java') diff --git a/java/com/android/incallui/InCallPresenter.java b/java/com/android/incallui/InCallPresenter.java index a1643d67c..a5ba31c50 100644 --- a/java/com/android/incallui/InCallPresenter.java +++ b/java/com/android/incallui/InCallPresenter.java @@ -34,13 +34,13 @@ import android.telephony.PhoneStateListener; import android.telephony.TelephonyManager; import android.view.Window; import android.view.WindowManager; -import com.android.contacts.common.GeoUtil; import com.android.contacts.common.compat.CallCompat; import com.android.dialer.blocking.FilteredNumberAsyncQueryHandler; import com.android.dialer.blocking.FilteredNumberAsyncQueryHandler.OnCheckBlockedListener; import com.android.dialer.blocking.FilteredNumbersUtil; import com.android.dialer.common.LogUtil; import com.android.dialer.enrichedcall.EnrichedCallComponent; +import com.android.dialer.location.GeoUtil; import com.android.dialer.logging.InteractionEvent; import com.android.dialer.logging.Logger; import com.android.dialer.postcall.PostCall; @@ -249,7 +249,7 @@ public class InCallPresenter implements CallList.Listener { private VideoSurfaceTexture mLocalVideoSurfaceTexture; private VideoSurfaceTexture mRemoteVideoSurfaceTexture; - /** Inaccessible constructor. Must use getInstance() to get this singleton. */ + /** Inaccessible constructor. Must use getRunningInstance() to get this singleton. */ @VisibleForTesting InCallPresenter() {} @@ -260,6 +260,11 @@ public class InCallPresenter implements CallList.Listener { return sInCallPresenter; } + @VisibleForTesting + public static synchronized void setInstanceForTesting(InCallPresenter inCallPresenter) { + sInCallPresenter = inCallPresenter; + } + /** * Determines whether or not a call has no valid phone accounts that can be used to make the call * with. Emergency calls do not require a phone account. @@ -762,11 +767,17 @@ public class InCallPresenter implements CallList.Listener { if (!mCallList.hasLiveCall() && !call.getLogState().isIncoming + && !isSecretCode(call.getNumber()) && !CallerInfoUtils.isVoiceMailNumber(mContext, call)) { - PostCall.onCallDisconnected(mContext, call.getNumber(), call.getTimeAddedMs()); + PostCall.onCallDisconnected(mContext, call.getNumber(), call.getConnectTimeMillis()); } } + private boolean isSecretCode(@Nullable String number) { + return number != null + && (number.length() <= 8 || number.startsWith("*#*#") || number.endsWith("#*#*")); + } + /** Given the call list, return the state in which the in-call screen should be. */ public InCallState getPotentialStateFromCallList(CallList callList) { -- cgit v1.2.3