summaryrefslogtreecommitdiff
path: root/java/com/android/incallui/InCallPresenter.java
diff options
context:
space:
mode:
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);