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

Commit 5f13cf05 authored by Siarhei Vishniakou's avatar Siarhei Vishniakou
Browse files

Deprecate inKeyguardRestrictedInputMode

The api inKeyguardRestrictedInputMode is no longer needed,
deprecate it. Redirect output to isKeyguardLocked().
Remove inKeyguardRestrictedKeyInputMode.

Test: make, flash, use system ui
Bug: 65998293
Change-Id: Ie2609758fc013aab10530a1be087c983c51d86b0
parent b1b1141e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -4992,7 +4992,7 @@ package android.app {
  public class KeyguardManager {
    method public android.content.Intent createConfirmDeviceCredentialIntent(java.lang.CharSequence, java.lang.CharSequence);
    method public deprecated void exitKeyguardSecurely(android.app.KeyguardManager.OnKeyguardExitResult);
    method public boolean inKeyguardRestrictedInputMode();
    method public deprecated boolean inKeyguardRestrictedInputMode();
    method public boolean isDeviceLocked();
    method public boolean isDeviceSecure();
    method public boolean isKeyguardLocked();
+3 −5
Original line number Diff line number Diff line
@@ -382,6 +382,8 @@ public class KeyguardManager {
    }

    /**
     * @deprecated Use {@link #isKeyguardLocked()} instead.
     *
     * If keyguard screen is showing or in restricted key input mode (i.e. in
     * keyguard password emergency screen). When in such mode, certain keys,
     * such as the Home key and the right soft keys, don't work.
@@ -389,11 +391,7 @@ public class KeyguardManager {
     * @return true if in keyguard restricted input mode.
     */
    public boolean inKeyguardRestrictedInputMode() {
        try {
            return mWM.inKeyguardRestrictedInputMode();
        } catch (RemoteException ex) {
            return false;
        }
        return isKeyguardLocked();
    }

    /**
+0 −1
Original line number Diff line number Diff line
@@ -147,7 +147,6 @@ interface IWindowManager
    void exitKeyguardSecurely(IOnKeyguardExitResult callback);
    boolean isKeyguardLocked();
    boolean isKeyguardSecure();
    boolean inKeyguardRestrictedInputMode();
    void dismissKeyguard(IKeyguardDismissCallback callback);

    // Requires INTERACT_ACROSS_USERS_FULL permission
+1 −8
Original line number Diff line number Diff line
@@ -3379,7 +3379,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
    }

    boolean keyguardOn() {
        return isKeyguardShowingAndNotOccluded() || inKeyguardRestrictedKeyInputMode();
        return isKeyguardShowingAndNotOccluded();
    }

    private static final int[] WINDOW_TYPES_WHERE_HOME_DOESNT_WORK = {
@@ -6870,13 +6870,6 @@ public class PhoneWindowManager implements WindowManagerPolicy {
        return mKeyguardOccluded;
    }

    /** {@inheritDoc} */
    @Override
    public boolean inKeyguardRestrictedKeyInputMode() {
        if (mKeyguardDelegate == null) return false;
        return mKeyguardDelegate.isInputRestricted();
    }

    @Override
    public void dismissKeyguardLw(IKeyguardDismissCallback callback) {
        if (mKeyguardDelegate != null && mKeyguardDelegate.isShowing()) {
+0 −11
Original line number Diff line number Diff line
@@ -1356,17 +1356,6 @@ public interface WindowManagerPolicy extends WindowManagerPolicyConstants {
     */
    public boolean isKeyguardTrustedLw();

    /**
     * inKeyguardRestrictedKeyInputMode
     *
     * if keyguard screen is showing or in restricted key input mode (i.e. in
     * keyguard password emergency screen). When in such mode, certain keys,
     * such as the Home key and the right soft keys, don't work.
     *
     * @return true if in keyguard restricted input mode.
     */
    public boolean inKeyguardRestrictedKeyInputMode();

    /**
     * Ask the policy to dismiss the keyguard, if it is currently shown.
     *
Loading