Update Dialer source to latest internal Google revision.
Previously, Android's Dialer app was developed in an internal Google
source control system and only exported to public during AOSP drops.
The Dialer team is now switching to a public development model similar
to the telephony team.
This CL represents all internal Google changes that were committed to
Dialer between the public O release and today's tip of tree on internal
master. This CL squashes those changes into a single commit.
In subsequent changes, changes will be exported on a per-commit basis.
(cherry picked from commit 2ca4318cc1ee57dda907ba2069bd61d162b1baef
and amended to match paths of dependencies under
prebuilts/maven_repo/bumptech/com/github/bumptech/glide/.)
This CL was generated using these commands from a repository at
stage-stage-master at revision ea7b4dc89590ffa3332766a531e0eab6ffb9aebd
("Merge "Update Dialer source to latest internal Google revision." am: c39ea3c55f -s ours"):
git diff --binary 2ca4318cc1ee57dda907ba2069bd61d162b1baef | git apply -R --index
git commit -c 2ca4318cc1ee57dda907ba2069bd61d162b1baef
Test: make, flash install, run
Change-Id: I529aaeb88535b9533c0ae4ef4e6c1222d4e0f1c8
PiperOrigin-RevId: 167068436
diff --git a/java/com/android/incallui/InCallActivity.java b/java/com/android/incallui/InCallActivity.java
index c95086c..178a404 100644
--- a/java/com/android/incallui/InCallActivity.java
+++ b/java/com/android/incallui/InCallActivity.java
@@ -21,6 +21,7 @@
import android.graphics.drawable.GradientDrawable;
import android.graphics.drawable.GradientDrawable.Orientation;
import android.os.Bundle;
+import android.os.Trace;
import android.support.annotation.ColorInt;
import android.support.annotation.FloatRange;
import android.support.annotation.NonNull;
@@ -37,6 +38,7 @@
import com.android.dialer.common.LogUtil;
import com.android.dialer.compat.ActivityCompat;
import com.android.dialer.configprovider.ConfigProviderBindings;
+import com.android.dialer.logging.DialerImpression;
import com.android.dialer.logging.Logger;
import com.android.dialer.logging.ScreenEvent;
import com.android.incallui.answer.bindings.AnswerBindings;
@@ -47,6 +49,7 @@
import com.android.incallui.call.CallList;
import com.android.incallui.call.DialerCall;
import com.android.incallui.call.DialerCall.State;
+import com.android.incallui.callpending.CallPendingActivity;
import com.android.incallui.disconnectdialog.DisconnectMessage;
import com.android.incallui.incall.bindings.InCallBindings;
import com.android.incallui.incall.protocol.InCallButtonUiDelegate;
@@ -67,6 +70,10 @@
VideoCallScreenDelegateFactory,
PseudoScreenState.StateChangedListener {
+ public static final int PENDING_INTENT_REQUEST_CODE_NON_FULL_SCREEN = 0;
+ public static final int PENDING_INTENT_REQUEST_CODE_FULL_SCREEN = 1;
+ public static final int PENDING_INTENT_REQUEST_CODE_BUBBLE = 2;
+
private static final String TAG_IN_CALL_SCREEN = "tag_in_call_screen";
private static final String TAG_ANSWER_SCREEN = "tag_answer_screen";
private static final String TAG_VIDEO_CALL_SCREEN = "tag_video_call_screen";
@@ -112,9 +119,15 @@
@Override
protected void onCreate(Bundle icicle) {
+ Trace.beginSection("InCallActivity.onCreate");
LogUtil.i("InCallActivity.onCreate", "");
super.onCreate(icicle);
+ if (getIntent().getBooleanExtra(ReturnToCallController.RETURN_TO_CALL_EXTRA_KEY, false)) {
+ Logger.get(this).logImpression(DialerImpression.Type.BUBBLE_PRIMARY_BUTTON_RETURN_TO_CALL);
+ getIntent().removeExtra(ReturnToCallController.RETURN_TO_CALL_EXTRA_KEY);
+ }
+
if (icicle != null) {
didShowAnswerScreen = icicle.getBoolean(DID_SHOW_ANSWER_SCREEN_KEY);
didShowInCallScreen = icicle.getBoolean(DID_SHOW_IN_CALL_SCREEN_KEY);
@@ -129,6 +142,8 @@
View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);
pseudoBlackScreenOverlay = findViewById(R.id.psuedo_black_screen_overlay);
+ sendBroadcast(CallPendingActivity.getFinishBroadcast());
+ Trace.endSection();
}
@Override
@@ -144,6 +159,7 @@
@Override
protected void onStart() {
+ Trace.beginSection("InCallActivity.onStart");
LogUtil.i("InCallActivity.onStart", "");
super.onStart();
isVisible = true;
@@ -154,40 +170,49 @@
// Hide the dialpad because there may not be enough room
showDialpadFragment(false, false);
}
+ Trace.endSection();
}
@Override
protected void onResume() {
+ Trace.beginSection("InCallActivity.onResume");
LogUtil.i("InCallActivity.onResume", "");
super.onResume();
common.onResume();
PseudoScreenState pseudoScreenState = InCallPresenter.getInstance().getPseudoScreenState();
pseudoScreenState.addListener(this);
onPseudoScreenStateChanged(pseudoScreenState.isOn());
+ Trace.endSection();
}
/** onPause is guaranteed to be called when the InCallActivity goes in the background. */
@Override
protected void onPause() {
+ Trace.beginSection("InCallActivity.onPause");
LogUtil.i("InCallActivity.onPause", "");
super.onPause();
common.onPause();
InCallPresenter.getInstance().getPseudoScreenState().removeListener(this);
+ Trace.endSection();
}
@Override
protected void onStop() {
+ Trace.beginSection("InCallActivity.onStop");
LogUtil.i("InCallActivity.onStop", "");
super.onStop();
common.onStop();
isVisible = false;
+ Trace.endSection();
}
@Override
protected void onDestroy() {
+ Trace.beginSection("InCallActivity.onDestroy");
LogUtil.i("InCallActivity.onDestroy", "");
super.onDestroy();
common.onDestroy();
+ Trace.endSection();
}
@Override
@@ -476,8 +501,10 @@
}
public void onPrimaryCallStateChanged() {
+ Trace.beginSection("InCallActivity.onPrimaryCallStateChanged");
LogUtil.i("InCallActivity.onPrimaryCallStateChanged", "");
showMainInCallFragment();
+ Trace.endSection();
}
public void onWiFiToLteHandover(DialerCall call) {
@@ -514,15 +541,18 @@
}
private void showMainInCallFragment() {
+ Trace.beginSection("InCallActivity.showMainInCallFragment");
// If the activity's onStart method hasn't been called yet then defer doing any work.
if (!isVisible) {
LogUtil.i("InCallActivity.showMainInCallFragment", "not visible yet/anymore");
+ Trace.endSection();
return;
}
// Don't let this be reentrant.
if (isInShowMainInCallFragment) {
LogUtil.i("InCallActivity.showMainInCallFragment", "already in method, bailing");
+ Trace.endSection();
return;
}
@@ -560,10 +590,13 @@
}
if (didChangeInCall || didChangeVideo || didChangeAnswer) {
+ Trace.beginSection("InCallActivity.commitTransaction");
transaction.commitNow();
+ Trace.endSection();
Logger.get(this).logScreenView(ScreenEvent.Type.INCALL, this);
}
isInShowMainInCallFragment = false;
+ Trace.endSection();
}
private ShouldShowUiResult getShouldShowAnswerUi() {