From 8d662cae2c05b5e256e7bb826abf05fb9ace133d Mon Sep 17 00:00:00 2001 From: wangqi Date: Thu, 26 Oct 2017 11:27:19 -0700 Subject: 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 --- java/com/android/incallui/InCallPresenter.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 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 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); -- cgit v1.2.3