summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Erfanian <erfanian@google.com>2018-07-10 18:37:03 +0000
committerEric Erfanian <erfanian@google.com>2018-07-10 18:57:16 +0000
commit4ca9e8da3d5c1469e9b203874c9c4e7d4db3eb92 (patch)
tree60e6eaeb91e67bc404a39b8353538347efc72a3e
parent3fb83d37061d26cf48ca41d83f889e4afb7c9699 (diff)
Revert "UI refresh for ringing screen."
This reverts commit 36d5b93da4f93e50deb496daa5ad820c48aa7b01. Change-Id: I533bc3f7d592a6e257d184f0d3730b4be95f2af2
-rw-r--r--java/com/android/dialer/theme/base/res/values/theme_dialer_dark.xml2
-rw-r--r--java/com/android/dialer/theme/common/res/values/colors.xml2
-rw-r--r--java/com/android/incallui/AnswerScreenPresenter.java9
-rw-r--r--java/com/android/incallui/AnswerScreenPresenterStub.java4
-rw-r--r--java/com/android/incallui/InCallActivity.java64
-rw-r--r--java/com/android/incallui/ThemeColorManager.java52
-rw-r--r--java/com/android/incallui/answer/impl/AnswerFragment.java13
-rw-r--r--java/com/android/incallui/answer/impl/answermethod/res/values/styles.xml7
-rw-r--r--java/com/android/incallui/answer/impl/res/layout/fragment_avatar.xml3
-rw-r--r--java/com/android/incallui/answer/protocol/AnswerScreenDelegate.java11
-rw-r--r--java/com/android/incallui/commontheme/res/values/styles.xml15
-rw-r--r--java/com/android/incallui/contactgrid/res/layout/incall_contactgrid_top_row.xml49
-rw-r--r--java/com/android/incallui/theme/res/drawable/incall_background_gradient.xml23
-rw-r--r--java/com/android/incallui/theme/res/values/colors.xml12
-rw-r--r--java/com/android/incallui/theme/res/values/styles.xml26
15 files changed, 251 insertions, 41 deletions
diff --git a/java/com/android/dialer/theme/base/res/values/theme_dialer_dark.xml b/java/com/android/dialer/theme/base/res/values/theme_dialer_dark.xml
index 4b5034023..142bb897b 100644
--- a/java/com/android/dialer/theme/base/res/values/theme_dialer_dark.xml
+++ b/java/com/android/dialer/theme/base/res/values/theme_dialer_dark.xml
@@ -56,7 +56,7 @@
<item name="colorControlActivated">?android:attr/colorPrimary</item>
<!-- Dialer specific attributes. -->
- <item name="colorIcon">@color/google_grey_400</item>
+ <item name="colorIcon">?android:attr/textColorSecondary</item>
<item name="colorIconSecondary">?android:attr/textColorSecondary</item>
<item name="colorTextOnUnthemedDarkBackground">@android:color/white</item>
<item name="colorIconOnUnthemedDarkBackground">@android:color/white</item>
diff --git a/java/com/android/dialer/theme/common/res/values/colors.xml b/java/com/android/dialer/theme/common/res/values/colors.xml
index 6fea43665..1831862b1 100644
--- a/java/com/android/dialer/theme/common/res/values/colors.xml
+++ b/java/com/android/dialer/theme/common/res/values/colors.xml
@@ -16,7 +16,7 @@
-->
<!-- The colors in this file aren't configured at the theme level. -->
<resources>
- <color name="dialer_call_green">#34A853</color>
+ <color name="dialer_call_green">#00C853</color>
<color name="dialer_end_call_button_color">#BD2A2A</color>
<color name="dialer_divider_line_color">#D8D8D8</color>
<color name="dialer_link_color">#2A56C6</color>
diff --git a/java/com/android/incallui/AnswerScreenPresenter.java b/java/com/android/incallui/AnswerScreenPresenter.java
index 35290dee9..8b789f317 100644
--- a/java/com/android/incallui/AnswerScreenPresenter.java
+++ b/java/com/android/incallui/AnswerScreenPresenter.java
@@ -18,6 +18,7 @@ package com.android.incallui;
import android.content.Context;
import android.os.SystemClock;
+import android.support.annotation.FloatRange;
import android.support.annotation.NonNull;
import android.support.v4.os.UserManagerCompat;
import android.telecom.VideoProfile;
@@ -215,6 +216,14 @@ public class AnswerScreenPresenter
}
}
+ @Override
+ public void updateWindowBackgroundColor(@FloatRange(from = -1f, to = 1.0f) float progress) {
+ InCallActivity activity = (InCallActivity) answerScreen.getAnswerScreenFragment().getActivity();
+ if (activity != null) {
+ activity.updateWindowBackgroundColor(progress);
+ }
+ }
+
private class AnswerOnDisconnected implements DialerCallListener {
private final DialerCall disconnectingCall;
diff --git a/java/com/android/incallui/AnswerScreenPresenterStub.java b/java/com/android/incallui/AnswerScreenPresenterStub.java
index a96fee392..e85fdaa37 100644
--- a/java/com/android/incallui/AnswerScreenPresenterStub.java
+++ b/java/com/android/incallui/AnswerScreenPresenterStub.java
@@ -16,6 +16,7 @@
package com.android.incallui;
+import android.support.annotation.FloatRange;
import com.android.incallui.answer.protocol.AnswerScreenDelegate;
import com.android.incallui.incalluilock.InCallUiLock;
@@ -49,6 +50,9 @@ public class AnswerScreenPresenterStub implements AnswerScreenDelegate {
public void onAnswerAndReleaseButtonDisabled() {}
@Override
+ public void updateWindowBackgroundColor(@FloatRange(from = -1f, to = 1.0f) float progress) {}
+
+ @Override
public boolean isActionTimeout() {
return false;
}
diff --git a/java/com/android/incallui/InCallActivity.java b/java/com/android/incallui/InCallActivity.java
index fa4a06ecf..3ff1d269d 100644
--- a/java/com/android/incallui/InCallActivity.java
+++ b/java/com/android/incallui/InCallActivity.java
@@ -25,8 +25,12 @@ import android.app.KeyguardManager;
import android.content.Context;
import android.content.Intent;
import android.content.res.Configuration;
+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.IntDef;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
@@ -36,6 +40,7 @@ import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
import android.support.v4.content.res.ResourcesCompat;
+import android.support.v4.graphics.ColorUtils;
import android.telecom.Call;
import android.telecom.CallAudioState;
import android.telecom.PhoneAccountHandle;
@@ -132,6 +137,7 @@ public class InCallActivity extends TransactionSafeFragmentActivity
private Animation dialpadSlideInAnimation;
private Animation dialpadSlideOutAnimation;
private Dialog errorDialog;
+ private GradientDrawable backgroundDrawable;
private InCallOrientationEventListener inCallOrientationEventListener;
private View pseudoBlackScreenOverlay;
private SelectPhoneAccountDialogFragment selectPhoneAccountDialogFragment;
@@ -150,6 +156,7 @@ public class InCallActivity extends TransactionSafeFragmentActivity
private boolean isVisible;
private boolean needDismissPendingDialogs;
private boolean touchDownWhenPseudoScreenOff;
+ private int[] backgroundDrawableColors;
@DialpadRequestType private int showDialpadRequest = DIALPAD_REQUEST_NONE;
private SpeakEasyCallManager speakEasyCallManager;
private DialogFragment rttRequestDialogFragment;
@@ -867,6 +874,11 @@ public class InCallActivity extends TransactionSafeFragmentActivity
public void onForegroundCallChanged(DialerCall newForegroundCall) {
updateTaskDescription();
+
+ if (newForegroundCall == null || !didShowAnswerScreen) {
+ LogUtil.v("InCallActivity.onForegroundCallChanged", "resetting background color");
+ updateWindowBackgroundColor(0 /* progress */);
+ }
}
private void updateTaskDescription() {
@@ -880,6 +892,58 @@ public class InCallActivity extends TransactionSafeFragmentActivity
getResources().getString(R.string.notification_ongoing_call), null /* icon */, color));
}
+ public void updateWindowBackgroundColor(@FloatRange(from = -1f, to = 1.0f) float progress) {
+ ThemeColorManager themeColorManager = InCallPresenter.getInstance().getThemeColorManager();
+ @ColorInt int top;
+ @ColorInt int middle;
+ @ColorInt int bottom;
+ @ColorInt int gray = 0x66000000;
+
+ if (isInMultiWindowMode()) {
+ top = themeColorManager.getBackgroundColorSolid();
+ middle = themeColorManager.getBackgroundColorSolid();
+ bottom = themeColorManager.getBackgroundColorSolid();
+ } else {
+ top = themeColorManager.getBackgroundColorTop();
+ middle = themeColorManager.getBackgroundColorMiddle();
+ bottom = themeColorManager.getBackgroundColorBottom();
+ }
+
+ if (progress < 0) {
+ float correctedProgress = Math.abs(progress);
+ top = ColorUtils.blendARGB(top, gray, correctedProgress);
+ middle = ColorUtils.blendARGB(middle, gray, correctedProgress);
+ bottom = ColorUtils.blendARGB(bottom, gray, correctedProgress);
+ }
+
+ boolean backgroundDirty = false;
+ if (backgroundDrawable == null) {
+ backgroundDrawableColors = new int[] {top, middle, bottom};
+ backgroundDrawable = new GradientDrawable(Orientation.TOP_BOTTOM, backgroundDrawableColors);
+ backgroundDirty = true;
+ } else {
+ if (backgroundDrawableColors[0] != top) {
+ backgroundDrawableColors[0] = top;
+ backgroundDirty = true;
+ }
+ if (backgroundDrawableColors[1] != middle) {
+ backgroundDrawableColors[1] = middle;
+ backgroundDirty = true;
+ }
+ if (backgroundDrawableColors[2] != bottom) {
+ backgroundDrawableColors[2] = bottom;
+ backgroundDirty = true;
+ }
+ if (backgroundDirty) {
+ backgroundDrawable.setColors(backgroundDrawableColors);
+ }
+ }
+
+ if (backgroundDirty) {
+ getWindow().setBackgroundDrawable(backgroundDrawable);
+ }
+ }
+
public boolean isVisible() {
return isVisible;
}
diff --git a/java/com/android/incallui/ThemeColorManager.java b/java/com/android/incallui/ThemeColorManager.java
index 967fae9ff..1d4c287be 100644
--- a/java/com/android/incallui/ThemeColorManager.java
+++ b/java/com/android/incallui/ThemeColorManager.java
@@ -17,8 +17,10 @@
package com.android.incallui;
import android.content.Context;
+import android.graphics.Color;
import android.support.annotation.ColorInt;
import android.support.annotation.Nullable;
+import android.support.v4.graphics.ColorUtils;
import android.telecom.PhoneAccount;
import android.telecom.PhoneAccountHandle;
import android.telecom.TelecomManager;
@@ -34,6 +36,10 @@ public class ThemeColorManager {
private final MaterialColorMapUtils colorMap;
@ColorInt private int primaryColor;
@ColorInt private int secondaryColor;
+ @ColorInt private int backgroundColorTop;
+ @ColorInt private int backgroundColorMiddle;
+ @ColorInt private int backgroundColorBottom;
+ @ColorInt private int backgroundColorSolid;
/**
* If there is no actual call currently in the call list, this will be used as a fallback to
@@ -51,21 +57,38 @@ public class ThemeColorManager {
public void onForegroundCallChanged(Context context, @Nullable DialerCall newForegroundCall) {
if (newForegroundCall == null) {
- updateThemeColors(getHighlightColor(context, pendingPhoneAccountHandle), false);
+ updateThemeColors(context, getHighlightColor(context, pendingPhoneAccountHandle), false);
} else {
updateThemeColors(
+ context,
getHighlightColor(context, newForegroundCall.getAccountHandle()),
newForegroundCall.isSpam());
}
}
- private void updateThemeColors(@ColorInt int highlightColor, boolean isSpam) {
+ private void updateThemeColors(Context context, @ColorInt int highlightColor, boolean isSpam) {
MaterialPalette palette;
if (isSpam) {
palette =
colorMap.calculatePrimaryAndSecondaryColor(R.color.incall_call_spam_background_color);
+ backgroundColorTop = context.getColor(R.color.incall_background_gradient_spam_top);
+ backgroundColorMiddle = context.getColor(R.color.incall_background_gradient_spam_middle);
+ backgroundColorBottom = context.getColor(R.color.incall_background_gradient_spam_bottom);
+ backgroundColorSolid = context.getColor(R.color.incall_background_multiwindow_spam);
} else {
palette = colorMap.calculatePrimaryAndSecondaryColor(highlightColor);
+ backgroundColorTop = context.getColor(R.color.incall_background_gradient_top);
+ backgroundColorMiddle = context.getColor(R.color.incall_background_gradient_middle);
+ backgroundColorBottom = context.getColor(R.color.incall_background_gradient_bottom);
+ backgroundColorSolid = context.getColor(R.color.incall_background_multiwindow);
+ if (highlightColor != PhoneAccount.NO_HIGHLIGHT_COLOR) {
+ // The default background gradient has a subtle alpha. We grab that alpha and apply it to
+ // the phone account color.
+ backgroundColorTop = applyAlpha(palette.mPrimaryColor, backgroundColorTop);
+ backgroundColorMiddle = applyAlpha(palette.mPrimaryColor, backgroundColorMiddle);
+ backgroundColorBottom = applyAlpha(palette.mPrimaryColor, backgroundColorBottom);
+ backgroundColorSolid = applyAlpha(palette.mPrimaryColor, backgroundColorSolid);
+ }
}
primaryColor = palette.mPrimaryColor;
@@ -92,4 +115,29 @@ public class ThemeColorManager {
public int getSecondaryColor() {
return secondaryColor;
}
+
+ @ColorInt
+ public int getBackgroundColorTop() {
+ return backgroundColorTop;
+ }
+
+ @ColorInt
+ public int getBackgroundColorMiddle() {
+ return backgroundColorMiddle;
+ }
+
+ @ColorInt
+ public int getBackgroundColorBottom() {
+ return backgroundColorBottom;
+ }
+
+ @ColorInt
+ public int getBackgroundColorSolid() {
+ return backgroundColorSolid;
+ }
+
+ @ColorInt
+ private static int applyAlpha(@ColorInt int color, @ColorInt int sourceColorWithAlpha) {
+ return ColorUtils.setAlphaComponent(color, Color.alpha(sourceColorWithAlpha));
+ }
}
diff --git a/java/com/android/incallui/answer/impl/AnswerFragment.java b/java/com/android/incallui/answer/impl/AnswerFragment.java
index f5da3effd..8d8b08791 100644
--- a/java/com/android/incallui/answer/impl/AnswerFragment.java
+++ b/java/com/android/incallui/answer/impl/AnswerFragment.java
@@ -880,6 +880,8 @@ public class AnswerFragment extends Fragment
if (primaryCallState != null) {
contactGridManager.setCallState(primaryCallState);
}
+
+ restoreBackgroundMaskColor();
}
@Override
@@ -898,6 +900,12 @@ public class AnswerFragment extends Fragment
@Override
public void onAnswerProgressUpdate(@FloatRange(from = -1f, to = 1f) float answerProgress) {
+ // Don't fade the window background for call waiting or video upgrades. Fading the background
+ // shows the system wallpaper which looks bad because on reject we switch to another call.
+ if (primaryCallState.state() == DialerCallState.INCOMING && !isVideoCall()) {
+ answerScreenDelegate.updateWindowBackgroundColor(answerProgress);
+ }
+
// Fade and scale contact name and video call text
float startDelay = .25f;
// Header progress is zero over positiveAdjustedProgress = [0, startDelay],
@@ -926,6 +934,7 @@ public class AnswerFragment extends Fragment
@Override
public void resetAnswerProgress() {
affordanceHolderLayout.reset(true);
+ restoreBackgroundMaskColor();
}
private void animateEntry(@NonNull View rootView) {
@@ -994,6 +1003,10 @@ public class AnswerFragment extends Fragment
}
}
+ private void restoreBackgroundMaskColor() {
+ answerScreenDelegate.updateWindowBackgroundColor(0);
+ }
+
private void restoreSwipeHintTexts() {
if (getAnswerMethod() != null) {
if (allowAnswerAndRelease()) {
diff --git a/java/com/android/incallui/answer/impl/answermethod/res/values/styles.xml b/java/com/android/incallui/answer/impl/answermethod/res/values/styles.xml
new file mode 100644
index 000000000..fd3ca7ca0
--- /dev/null
+++ b/java/com/android/incallui/answer/impl/answermethod/res/values/styles.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <style name="Dialer.Incall.TextAppearance.Hint">
+ <item name="android:textSize">14sp</item>
+ <item name="android:textStyle">italic</item>
+ </style>
+</resources>
diff --git a/java/com/android/incallui/answer/impl/res/layout/fragment_avatar.xml b/java/com/android/incallui/answer/impl/res/layout/fragment_avatar.xml
index 246abc577..f8e48942c 100644
--- a/java/com/android/incallui/answer/impl/res/layout/fragment_avatar.xml
+++ b/java/com/android/incallui/answer/impl/res/layout/fragment_avatar.xml
@@ -21,4 +21,5 @@
android:id="@id/contactgrid_avatar"
android:layout_width="@dimen/answer_avatar_size"
android:layout_height="@dimen/answer_avatar_size"
- android:layout_gravity="center"/>
+ android:layout_gravity="center"
+ android:elevation="@dimen/answer_data_elevation"/>
diff --git a/java/com/android/incallui/answer/protocol/AnswerScreenDelegate.java b/java/com/android/incallui/answer/protocol/AnswerScreenDelegate.java
index db2af9bbb..172d9646a 100644
--- a/java/com/android/incallui/answer/protocol/AnswerScreenDelegate.java
+++ b/java/com/android/incallui/answer/protocol/AnswerScreenDelegate.java
@@ -16,6 +16,7 @@
package com.android.incallui.answer.protocol;
+import android.support.annotation.FloatRange;
import com.android.incallui.incalluilock.InCallUiLock;
/** Callbacks implemented by the container app for this module. */
@@ -36,6 +37,16 @@ public interface AnswerScreenDelegate {
void onAnswerAndReleaseButtonEnabled();
void onAnswerAndReleaseButtonDisabled();
+ /**
+ * Sets the window background color based on foreground call's theme and the given progress. This
+ * is called from the answer UI to animate the accept and reject action.
+ *
+ * <p>When the user is rejecting we animate the background color to a mostly transparent gray. The
+ * end effect is that the home screen shows through.
+ *
+ * @param progress float from -1 to 1. -1 is fully rejected, 1 is fully accepted, and 0 is neutral
+ */
+ void updateWindowBackgroundColor(@FloatRange(from = -1f, to = 1.0f) float progress);
/** Returns true if any answer/reject action timed out. */
boolean isActionTimeout();
diff --git a/java/com/android/incallui/commontheme/res/values/styles.xml b/java/com/android/incallui/commontheme/res/values/styles.xml
index f2ec2ccc3..464eda5bb 100644
--- a/java/com/android/incallui/commontheme/res/values/styles.xml
+++ b/java/com/android/incallui/commontheme/res/values/styles.xml
@@ -17,12 +17,15 @@
<resources>
- <style name="Dialer.Incall.TextAppearance" parent="Dialer.TextAppearance.Header1">
+ <style name="Dialer.Incall.TextAppearance" parent="android:TextAppearance.Material">
<item name="android:textColor">?android:attr/textColorSecondary</item>
+ <item name="android:textSize">18sp</item>
</style>
- <style name="Dialer.Incall.TextAppearance.Large" parent="Dialer.TextAppearance.Header1">
+ <style name="Dialer.Incall.TextAppearance.Large">
+ <item name="android:textColor">?android:attr/textColorPrimary</item>
<item name="android:textSize">36sp</item>
+ <item name="android:fontFamily">sans-serif-light</item>
</style>
<style name="Dialer.Incall.TextAppearance.Label">
@@ -30,18 +33,12 @@
<item name="android:textSize">12sp</item>
</style>
- <style name="Dialer.Incall.TextAppearance.Hint">
- <item name="android:textColor">?android:attr/textColorHint</item>
- <item name="android:textSize">14sp</item>
- <item name="android:textStyle">italic</item>
- </style>
-
<style name="BottomRowIcon">
<item name="android:layout_height">24dp</item>
<item name="android:layout_width">24dp</item>
<item name="android:layout_marginEnd">8dp</item>
<item name="android:scaleType">fitCenter</item>
- <item name="colorControlNormal">?colorIcon</item>
+ <item name="colorControlNormal">?android:attr/textColorSecondary</item>
</style>
<style name="Incall.Button.End" parent="android:Widget.Material.Button">
diff --git a/java/com/android/incallui/contactgrid/res/layout/incall_contactgrid_top_row.xml b/java/com/android/incallui/contactgrid/res/layout/incall_contactgrid_top_row.xml
index bc8759ed0..2f9ca3ea8 100644
--- a/java/com/android/incallui/contactgrid/res/layout/incall_contactgrid_top_row.xml
+++ b/java/com/android/incallui/contactgrid/res/layout/incall_contactgrid_top_row.xml
@@ -15,34 +15,33 @@
~ limitations under the License
-->
<LinearLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:gravity="center"
- android:orientation="horizontal"
- tools:showIn="@layout/incall_contact_grid">
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:gravity="center"
+ android:orientation="horizontal"
+ tools:showIn="@layout/incall_contact_grid">
<ImageView
- android:id="@id/contactgrid_connection_icon"
- android:layout_width="24dp"
- android:layout_height="24dp"
- android:scaleType="fitCenter"
- android:tint="?colorIcon"
- tools:src="@android:drawable/sym_def_app_icon"
- tools:visibility="visible"
- />
+ android:id="@id/contactgrid_connection_icon"
+ android:layout_width="24dp"
+ android:layout_height="24dp"
+ android:scaleType="fitCenter"
+ tools:src="@android:drawable/sym_def_app_icon"
+ tools:visibility="visible"
+ />
<Space
android:id="@id/contactgrid_top_row_space"
- android:layout_width="@dimen/contactgrid_connection_icon_margin_end"
android:layout_height="match_parent"
- />
+ android:layout_width="@dimen/contactgrid_connection_icon_margin_end"
+ />
<TextView
- android:id="@id/contactgrid_status_text"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:ellipsize="marquee"
- android:scrollHorizontally="true"
- android:singleLine="true"
- android:textAppearance="@style/Dialer.Incall.TextAppearance"
- tools:text="Captain Holt"/>
+ android:id="@id/contactgrid_status_text"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:singleLine="true"
+ android:ellipsize="marquee"
+ android:scrollHorizontally="true"
+ android:textAppearance="@style/Dialer.Incall.TextAppearance"
+ tools:text="Captain Holt"/>
</LinearLayout>
diff --git a/java/com/android/incallui/theme/res/drawable/incall_background_gradient.xml b/java/com/android/incallui/theme/res/drawable/incall_background_gradient.xml
new file mode 100644
index 000000000..996f17245
--- /dev/null
+++ b/java/com/android/incallui/theme/res/drawable/incall_background_gradient.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (C) 2018 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License
+ -->
+<shape xmlns:android="http://schemas.android.com/apk/res/android">
+ <gradient
+ android:angle="270"
+ android:startColor="@color/incall_background_gradient_top"
+ android:centerColor="@color/incall_background_gradient_middle"
+ android:endColor="@color/incall_background_gradient_bottom"/>
+</shape>
diff --git a/java/com/android/incallui/theme/res/values/colors.xml b/java/com/android/incallui/theme/res/values/colors.xml
index 10a19ef50..059fe59a9 100644
--- a/java/com/android/incallui/theme/res/values/colors.xml
+++ b/java/com/android/incallui/theme/res/values/colors.xml
@@ -52,4 +52,16 @@
<item>#B93221</item>
<item>#841F10</item>
</array>
+
+ <color name="incall_background_gradient_top">#E91141BB</color>
+ <color name="incall_background_gradient_middle">#E91141BB</color>
+ <color name="incall_background_gradient_bottom">#CC229FEB</color>
+
+ <color name="incall_background_multiwindow">#E91141BB</color>
+
+ <color name="incall_background_gradient_spam_top">#E5A30B0B</color>
+ <color name="incall_background_gradient_spam_middle">#D6C01111</color>
+ <color name="incall_background_gradient_spam_bottom">#B8E55135</color>
+
+ <color name="incall_background_multiwindow_spam">#E9C22E2E</color>
</resources>
diff --git a/java/com/android/incallui/theme/res/values/styles.xml b/java/com/android/incallui/theme/res/values/styles.xml
index ac66ffd37..3266c7da3 100644
--- a/java/com/android/incallui/theme/res/values/styles.xml
+++ b/java/com/android/incallui/theme/res/values/styles.xml
@@ -16,7 +16,11 @@
-->
<resources>
- <style name="Theme.InCallScreen" parent="@style/Dialer.ThemeBase.NoActionBar">
+ <!-- Theme for the InCallActivity activity. Should have a transparent background for the
+ circular reveal animation for a new outgoing call to work correctly. We don't just use
+ Theme.Black.NoTitleBar directly, since we want any popups or dialogs from the
+ InCallActivity to have the correct Material style. -->
+ <style name="Theme.InCallScreen.Light" parent="@style/Dialer.ThemeBase.NoActionBar">
<item name="android:statusBarColor">@android:color/transparent</item>
<item name="android:navigationBarColor">@android:color/transparent</item>
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
@@ -25,7 +29,25 @@
<item name="dialpad_style">@style/InCallDialpad</item>
<item name="android:windowAnimationStyle">@null</item>
- <item name="android:windowBackground">?android:attr/colorBackground</item>
+ <item name="android:windowBackground">@drawable/incall_background_gradient</item>
+ <item name="android:windowShowWallpaper">true</item>
+ </style>
+
+ <style name="Theme.InCallScreen" parent="@style/Dialer.Dark.ThemeBase.NoActionBar">
+ <item name="android:textColorPrimary">@android:color/white</item>
+ <item name="android:textColorSecondary">#DDFFFFFF</item>
+ <item name="android:statusBarColor">@android:color/transparent</item>
+ <item name="android:navigationBarColor">@android:color/transparent</item>
+ <item name="android:windowDrawsSystemBarBackgrounds">true</item>
+ <item name="android:colorPrimaryDark">@color/dialer_theme_color_dark</item>
+ <item name="colorPrimaryDark">@color/dialer_theme_color_dark</item>
+
+ <item name="dialpad_key_button_touch_tint">?attr/colorPrimary20pct</item>
+ <item name="dialpad_style">@style/InCallDialpad</item>
+ <item name="android:windowAnimationStyle">@null</item>
+
+ <item name="android:windowBackground">@drawable/incall_background_gradient</item>
+ <item name="android:windowShowWallpaper">true</item>
<item name="android:windowLayoutInDisplayCutoutMode">never</item>
</style>