summaryrefslogtreecommitdiff
path: root/packages/SystemUI/src/com/android/keyguard/KeyguardInputViewController.java
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2023-04-14 00:27:23 -0700
committerLinux Build Service Account <lnxbuild@localhost>2023-04-14 00:27:23 -0700
commit308c98f901f540b2a61bde5363434d613b27fd0b (patch)
treea009a2d5eb74f021d5f20fbb36c221a124def03d /packages/SystemUI/src/com/android/keyguard/KeyguardInputViewController.java
parentb77f39e30b9df5c24ec1d8428bf1b5f2946560b5 (diff)
parent5a47c505d9dd08c276dad9d6fbd157f7207fbb56 (diff)
Merge 5a47c505d9dd08c276dad9d6fbd157f7207fbb56 on remote branch
Change-Id: Ic8a4252f1c0cdf4a82e9dadcce37606fdcaa68cd
Diffstat (limited to 'packages/SystemUI/src/com/android/keyguard/KeyguardInputViewController.java')
-rw-r--r--packages/SystemUI/src/com/android/keyguard/KeyguardInputViewController.java21
1 files changed, 10 insertions, 11 deletions
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardInputViewController.java b/packages/SystemUI/src/com/android/keyguard/KeyguardInputViewController.java
index f26b9057dc7c..d1c9a3090860 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardInputViewController.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardInputViewController.java
@@ -16,11 +16,11 @@
package com.android.keyguard;
-import android.annotation.CallSuper;
import android.annotation.Nullable;
import android.content.res.ColorStateList;
import android.content.res.Resources;
import android.telephony.TelephonyManager;
+import android.text.TextUtils;
import android.util.Log;
import android.view.inputmethod.InputMethodManager;
@@ -141,17 +141,13 @@ 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() {
+ if (TextUtils.isEmpty(mMessageAreaController.getMessage())
+ && getInitialMessageResId() != 0) {
+ mMessageAreaController.setMessage(
+ mView.getResources().getString(getInitialMessageResId()),
+ /* animate= */ false);
+ }
mView.startAppearAnimation();
}
@@ -169,6 +165,9 @@ public abstract class KeyguardInputViewController<T extends KeyguardInputView>
return view.indexOfChild(mView);
}
+ /** Determines the message to show in the bouncer when it first appears. */
+ protected abstract int getInitialMessageResId();
+
/** Factory for a {@link KeyguardInputViewController}. */
public static class Factory {
private final KeyguardUpdateMonitor mKeyguardUpdateMonitor;