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

Commit 4e8d18bd authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Fix issue where keyboard would not be dismissed" into rvc-dev am:...

Merge "Fix issue where keyboard would not be dismissed" into rvc-dev am: 4601299d am: 0f36bc41 am: 2d922f73 am: 4db6d35f

Change-Id: Ibacbdcaf77f6ae34f8861f073db0c526daf81e44
parents 6050ff51 4db6d35f
Loading
Loading
Loading
Loading
+11 −2
Original line number Diff line number Diff line
@@ -16,7 +16,6 @@

package com.android.keyguard;

import android.app.Activity;
import android.app.ActivityManager;
import android.content.Context;
import android.content.res.ColorStateList;
@@ -31,6 +30,8 @@ import android.util.Log;
import android.view.KeyEvent;
import android.widget.FrameLayout;

import androidx.annotation.VisibleForTesting;

import com.android.internal.widget.LockPatternUtils;
import com.android.keyguard.KeyguardSecurityContainer.SecurityCallback;
import com.android.keyguard.KeyguardSecurityModel.SecurityMode;
@@ -101,7 +102,8 @@ public class KeyguardHostView extends FrameLayout implements SecurityCallback {
    public static final boolean DEBUG = KeyguardConstants.DEBUG;
    private static final String TAG = "KeyguardViewBase";

    private KeyguardSecurityContainer mSecurityContainer;
    @VisibleForTesting
    protected KeyguardSecurityContainer mSecurityContainer;

    public KeyguardHostView(Context context) {
        this(context, null);
@@ -446,4 +448,11 @@ public class KeyguardHostView extends FrameLayout implements SecurityCallback {
    public SecurityMode getCurrentSecurityMode() {
        return mSecurityContainer.getCurrentSecurityMode();
    }

    /**
     * When bouncer was visible and is starting to become hidden.
     */
    public void onStartingToHide() {
        mSecurityContainer.onStartingToHide();
    }
}
+5 −0
Original line number Diff line number Diff line
@@ -152,6 +152,11 @@ public class KeyguardPasswordView extends KeyguardAbsKeyInputView
        mImm.hideSoftInputFromWindow(getWindowToken(), 0);
    }

    @Override
    public void onStartingToHide() {
        mImm.hideSoftInputFromWindow(getWindowToken(), 0);
    }

    private void updateSwitchImeButton() {
        // If there's more than one IME, enable the IME switcher button
        final boolean wasVisible = mSwitchImeButton.getVisibility() == View.VISIBLE;
+7 −0
Original line number Diff line number Diff line
@@ -226,6 +226,13 @@ public class KeyguardSecurityContainer extends FrameLayout implements KeyguardSe
        mSecurityViewFlipper.setWindowInsetsAnimationCallback(null);
    }

    @Override
    public void onStartingToHide() {
        if (mCurrentSecuritySelection != SecurityMode.None) {
            getSecurityView(mCurrentSecuritySelection).onStartingToHide();
        }
    }

    @Override
    public boolean shouldDelayChildPressedState() {
        return true;
+5 −0
Original line number Diff line number Diff line
@@ -159,4 +159,9 @@ public interface KeyguardSecurityView {
    default boolean disallowInterceptTouch(MotionEvent event) {
        return false;
    }

    /**
     * When bouncer was visible but is being dragged down or dismissed.
     */
    default void onStartingToHide() {};
}
+3 −0
Original line number Diff line number Diff line
@@ -400,6 +400,9 @@ public class KeyguardBouncer {
            mExpansionCallback.onFullyHidden();
        } else if (fraction != EXPANSION_VISIBLE && oldExpansion == EXPANSION_VISIBLE) {
            mExpansionCallback.onStartingToHide();
            if (mKeyguardView != null) {
                mKeyguardView.onStartingToHide();
            }
        }
    }

Loading