diff options
author | Lucas Dupin <dupin@google.com> | 2020-11-19 03:18:10 +0000 |
---|---|---|
committer | Lucas Dupin <dupin@google.com> | 2020-12-01 14:23:16 -0800 |
commit | 7b8636fdb0dfc5ef727365cdf42a2fb56bdffeb2 (patch) | |
tree | 35429253346bc7c59558a354d760026f13869499 /packages/SystemUI/src/com/android/keyguard/KeyguardInputViewController.java | |
parent | 60797526531ad856bc3428ebc1af14a472c998ed (diff) |
1/N The road to Material NEXT (bouncer and shade)
Styling bouncer and shade so they have solid backgrounds and read colors
from themes instead of named resources.
Scrim now fetches colorBackgroundFloating, and views get their background
from colorBackground.
Switching from light to dark theme will make bouncer colors update without
re-inflating any views.
Bug: 173561906
Bug: 173561901
Test: atest ScrimControllerTest
Test: atest KeyguardSecurityContainerControllerTest
Test: manual, switching to dark theme annd showing notif guts
Change-Id: I372e8b688d7bbddd698381accd074b7655788cd0
Diffstat (limited to 'packages/SystemUI/src/com/android/keyguard/KeyguardInputViewController.java')
-rw-r--r-- | packages/SystemUI/src/com/android/keyguard/KeyguardInputViewController.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardInputViewController.java b/packages/SystemUI/src/com/android/keyguard/KeyguardInputViewController.java index fbda818740e8..6aa5e0df3653 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardInputViewController.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardInputViewController.java @@ -16,6 +16,7 @@ package com.android.keyguard; +import android.annotation.CallSuper; import android.content.res.ColorStateList; import android.content.res.Resources; import android.telephony.TelephonyManager; @@ -24,6 +25,7 @@ import android.view.inputmethod.InputMethodManager; import com.android.internal.util.LatencyTracker; import com.android.internal.widget.LockPatternUtils; import com.android.keyguard.KeyguardSecurityModel.SecurityMode; +import com.android.systemui.R; import com.android.systemui.dagger.qualifiers.Main; import com.android.systemui.util.ViewController; import com.android.systemui.util.concurrency.DelayableExecutor; @@ -37,6 +39,7 @@ public abstract class KeyguardInputViewController<T extends KeyguardInputView> private final SecurityMode mSecurityMode; private final KeyguardSecurityCallback mKeyguardSecurityCallback; + private final EmergencyButton mEmergencyButton; private boolean mPaused; @@ -68,6 +71,7 @@ public abstract class KeyguardInputViewController<T extends KeyguardInputView> super(view); mSecurityMode = securityMode; mKeyguardSecurityCallback = keyguardSecurityCallback; + mEmergencyButton = view == null ? null : view.findViewById(R.id.emergency_call_button); } @Override @@ -112,6 +116,16 @@ public abstract class KeyguardInputViewController<T extends KeyguardInputView> public void showMessage(CharSequence message, ColorStateList colorState) { } + /** + * Reload colors from resources. + **/ + @CallSuper + public void reloadColors() { + if (mEmergencyButton != null) { + mEmergencyButton.reloadColors(); + } + } + public void startAppearAnimation() { mView.startAppearAnimation(); } |