summaryrefslogtreecommitdiff
path: root/java/com/android/incallui/InCallPresenter.java
diff options
context:
space:
mode:
authorwangqi <wangqi@google.com>2017-10-26 11:27:19 -0700
committerEric Erfanian <erfanian@google.com>2017-10-26 15:31:05 -0700
commit8d662cae2c05b5e256e7bb826abf05fb9ace133d (patch)
tree47eefa3a9b9b172df2db32e2f1b6246bad885a57 /java/com/android/incallui/InCallPresenter.java
parent9b99b22391a92fe20a74076bf5e47d36eb9b4ab4 (diff)
Set incall button color to match sim color.
This change also add a handy adb command script run before UI integration test. Bug: 67429956 Test: IncallActivityTest PiperOrigin-RevId: 173565382 Change-Id: I9b8b957f00a0b7d11dbb7f40e8c9f1dbdb8c3928
Diffstat (limited to 'java/com/android/incallui/InCallPresenter.java')
-rw-r--r--java/com/android/incallui/InCallPresenter.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/java/com/android/incallui/InCallPresenter.java b/java/com/android/incallui/InCallPresenter.java
index 8535cbc3e..ed7b2c290 100644
--- a/java/com/android/incallui/InCallPresenter.java
+++ b/java/com/android/incallui/InCallPresenter.java
@@ -357,8 +357,10 @@ public class InCallPresenter implements CallList.Listener {
mProximitySensor = proximitySensor;
addListener(mProximitySensor);
- mThemeColorManager =
- new ThemeColorManager(new InCallUIMaterialColorMapUtils(mContext.getResources()));
+ if (mThemeColorManager == null) {
+ mThemeColorManager =
+ new ThemeColorManager(new InCallUIMaterialColorMapUtils(mContext.getResources()));
+ }
mCallList = callList;
mExternalCallList = externalCallList;
@@ -1651,6 +1653,11 @@ public class InCallPresenter implements CallList.Listener {
return mThemeColorManager;
}
+ @VisibleForTesting
+ public void setThemeColorManager(ThemeColorManager themeColorManager) {
+ mThemeColorManager = themeColorManager;
+ }
+
/** Called when the foreground call changes. */
public void onForegroundCallChanged(DialerCall newForegroundCall) {
mThemeColorManager.onForegroundCallChanged(mContext, newForegroundCall);