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

Commit 337ec14b authored by Xiaowen Lei's avatar Xiaowen Lei
Browse files

Update javadoc and log message to avoid confusion.

"visibility" is sometimes used to refer to (showing && !occluded).
Therefore removing the term from the doc and logging.

Bug: 216630470
Test: N/A
Change-Id: I03b36c99f201fbb8be382a81f2046c3fed5fce13
parent b29ab1f7
Loading
Loading
Loading
Loading
+11 −3
Original line number Diff line number Diff line
@@ -1103,9 +1103,12 @@ public class KeyguardManager {
    }

    /**
     * Registers a listener to execute when the keyguard visibility changes.
     * Registers a listener to execute when the keyguard locked state changes.
     *
     * @param listener The listener to add to receive keyguard visibility changes.
     * @param listener The listener to add to receive keyguard locked state changes.
     *
     * @see #isKeyguardLocked()
     * @see #removeKeyguardLockedStateListener(KeyguardLockedStateListener)
     */
    @RequiresPermission(Manifest.permission.SUBSCRIBE_TO_KEYGUARD_LOCKED_STATE)
    public void addKeyguardLockedStateListener(@NonNull @CallbackExecutor Executor executor,
@@ -1124,7 +1127,12 @@ public class KeyguardManager {
    }

    /**
     * Unregisters a listener that executes when the keyguard visibility changes.
     * Unregisters a listener that executes when the keyguard locked state changes.
     *
     * @param listener The listener to remove.
     *
     * @see #isKeyguardLocked()
     * @see #addKeyguardLockedStateListener(Executor, KeyguardLockedStateListener)
     */
    @RequiresPermission(Manifest.permission.SUBSCRIBE_TO_KEYGUARD_LOCKED_STATE)
    public void removeKeyguardLockedStateListener(@NonNull KeyguardLockedStateListener listener) {
+1 −1
Original line number Diff line number Diff line
@@ -3278,7 +3278,7 @@ public class WindowManagerService extends IWindowManager.Stub
        mContext.enforceCallingOrSelfPermission(
                Manifest.permission.SUBSCRIBE_TO_KEYGUARD_LOCKED_STATE,
                Manifest.permission.SUBSCRIBE_TO_KEYGUARD_LOCKED_STATE
                        + " permission required to read keyguard visibility");
                        + " permission required to subscribe to keyguard locked state changes");
    }

    private void dispatchKeyguardLockedState() {