Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8dd16441 authored by Aaron Liu's avatar Aaron Liu
Browse files

Add custom message to bouncer

Add a message to bouncer when we are showing to show the reason we are
authing bouncer. This is set in dismiss with action as we intend to
authenticate to perform some action.

Fixes: 277278610
Test: longpress lockscreen and open lockscreen settings. Open bouncer
with udfps enabled and not enabled.

Change-Id: I82a5aea6779a60e200921f0743882cd03305185c
parent 5a162ba7
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -79,6 +79,11 @@ public interface ActivityStarter {
    void postStartActivityDismissingKeyguard(Intent intent, int delay);
    void postStartActivityDismissingKeyguard(Intent intent, int delay,
            @Nullable ActivityLaunchAnimator.Controller animationController);

    /** Posts a start activity intent that dismisses keyguard. */
    void postStartActivityDismissingKeyguard(Intent intent, int delay,
            @Nullable ActivityLaunchAnimator.Controller animationController,
            @Nullable String customMessage);
    void postStartActivityDismissingKeyguard(PendingIntent intent);

    /**
@@ -93,6 +98,10 @@ public interface ActivityStarter {
    void dismissKeyguardThenExecute(OnDismissAction action, @Nullable Runnable cancel,
            boolean afterKeyguardGone);

    /** Authenticates if needed and dismisses keyguard to execute an action. */
    void dismissKeyguardThenExecute(OnDismissAction action, @Nullable Runnable cancel,
            boolean afterKeyguardGone, @Nullable String customMessage);

    interface Callback {
        void onActivityStarted(int resultCode);
    }
+3 −0
Original line number Diff line number Diff line
@@ -3069,6 +3069,9 @@
    -->
    <string name="lock_screen_settings">Customize lock screen</string>

    <!-- Title of security view when we want to authenticate before customizing the lockscreen. [CHAR LIMIT=NONE] -->
    <string name="keyguard_unlock_to_customize_ls">Unlock to customize lock screen</string>

    <!-- Content description for Wi-Fi not available icon on dream [CHAR LIMIT=NONE]-->
    <string name="wifi_unavailable_dream_overlay_content_description">Wi-Fi not available</string>

+2 −2
Original line number Diff line number Diff line
@@ -116,7 +116,7 @@ public abstract class KeyguardAbsKeyInputViewController<T extends KeyguardAbsKey
    }

    @Override
    public void showMessage(CharSequence message, ColorStateList colorState) {
    public void showMessage(CharSequence message, ColorStateList colorState, boolean animated) {
        if (mMessageAreaController == null) {
            return;
        }
@@ -124,7 +124,7 @@ public abstract class KeyguardAbsKeyInputViewController<T extends KeyguardAbsKey
        if (colorState != null) {
            mMessageAreaController.setNextMessageColor(colorState);
        }
        mMessageAreaController.setMessage(message);
        mMessageAreaController.setMessage(message, animated);
    }

    // Allow subclasses to override this behavior
+1 −1
Original line number Diff line number Diff line
@@ -121,7 +121,7 @@ public abstract class KeyguardInputViewController<T extends KeyguardInputView>
    }

    @Override
    public void showMessage(CharSequence message, ColorStateList colorState) {
    public void showMessage(CharSequence message, ColorStateList colorState, boolean animated) {
    }

    public void startAppearAnimation() {
+2 −2
Original line number Diff line number Diff line
@@ -333,14 +333,14 @@ public class KeyguardPatternViewController
    }

    @Override
    public void showMessage(CharSequence message, ColorStateList colorState) {
    public void showMessage(CharSequence message, ColorStateList colorState, boolean animated) {
        if (mMessageAreaController == null) {
            return;
        }
        if (colorState != null) {
            mMessageAreaController.setNextMessageColor(colorState);
        }
        mMessageAreaController.setMessage(message);
        mMessageAreaController.setMessage(message, animated);
    }

    @Override
Loading