diff --git a/packages/SystemUI/res-keyguard/values/styles.xml b/packages/SystemUI/res-keyguard/values/styles.xml index 72b027af1bf68..098b7e8dedbec 100644 --- a/packages/SystemUI/res-keyguard/values/styles.xml +++ b/packages/SystemUI/res-keyguard/values/styles.xml @@ -142,4 +142,8 @@ @color/keyguard_shadow_color ?attr/shadowRadius + + diff --git a/packages/SystemUI/res/drawable/logout_button_background.xml b/packages/SystemUI/res/drawable/logout_button_background.xml index eafd663f19d9e..34434be7aefbf 100644 --- a/packages/SystemUI/res/drawable/logout_button_background.xml +++ b/packages/SystemUI/res/drawable/logout_button_background.xml @@ -17,7 +17,8 @@ --> - + diff --git a/packages/SystemUI/res/values/colors.xml b/packages/SystemUI/res/values/colors.xml index 19633f2492cf2..f539b0cf68a16 100644 --- a/packages/SystemUI/res/values/colors.xml +++ b/packages/SystemUI/res/values/colors.xml @@ -190,9 +190,6 @@ #ff669DF6 #ffEE675C - - #ccffffff - #ffffffff diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml index 15f209e557dd1..f76f7d8de2d1e 100644 --- a/packages/SystemUI/res/values/dimens.xml +++ b/packages/SystemUI/res/values/dimens.xml @@ -1242,10 +1242,7 @@ -30 - 32dp - 16dp - 12dp - 4dp + 50dp 1px diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java b/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java index 445715e138ab8..0bcec0766d9f6 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java @@ -66,6 +66,7 @@ import com.android.internal.widget.LockPatternUtils; import com.android.internal.widget.ViewClippingUtil; import com.android.keyguard.KeyguardUpdateMonitor; import com.android.keyguard.KeyguardUpdateMonitorCallback; +import com.android.settingslib.Utils; import com.android.settingslib.fuelgauge.BatteryStatus; import com.android.systemui.R; import com.android.systemui.animation.Interpolators; @@ -455,7 +456,8 @@ public class KeyguardIndicationController { new KeyguardIndication.Builder() .setMessage(mContext.getResources().getString( com.android.internal.R.string.global_action_logout)) - .setTextColor(mInitialTextColorState) + .setTextColor(Utils.getColorAttr( + mContext, com.android.internal.R.attr.textColorOnAccent)) .setBackground(mContext.getDrawable( com.android.systemui.R.drawable.logout_button_background)) .setClickListener((view) -> { diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardIndicationTextView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardIndicationTextView.java index f1cde8a9be7ae..a5b5f1cbf1e73 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardIndicationTextView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardIndicationTextView.java @@ -28,7 +28,10 @@ import android.util.AttributeSet; import android.view.View; import android.widget.TextView; +import androidx.annotation.StyleRes; + import com.android.internal.annotations.VisibleForTesting; +import com.android.systemui.R; import com.android.systemui.animation.Interpolators; import com.android.systemui.keyguard.KeyguardIndication; @@ -39,6 +42,12 @@ import java.util.LinkedList; */ public class KeyguardIndicationTextView extends TextView { private static final long MSG_MIN_DURATION_MILLIS_DEFAULT = 1500; + + @StyleRes + private static int sStyleId = R.style.TextAppearance_Keyguard_BottomArea; + @StyleRes + private static int sButtonStyleId = R.style.TextAppearance_Keyguard_BottomArea_Button; + private long mNextAnimationTime = 0; private boolean mAnimationsEnabled = true; private LinkedList mMessages = new LinkedList<>(); @@ -136,6 +145,14 @@ public class KeyguardIndicationTextView extends TextView { public void onAnimationEnd(Animator animator) { KeyguardIndication info = mKeyguardIndicationInfo.poll(); if (info != null) { + // First, update the style. + // If a background is set on the text, we don't want shadow on the text + if (info.getBackground() != null) { + setTextAppearance(sButtonStyleId); + } else { + setTextAppearance(sStyleId); + } + setBackground(info.getBackground()); setTextColor(info.getTextColor()); setOnClickListener(info.getClickListener()); setClickable(info.getClickListener() != null);