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
This commit is contained in:
Xiaowen Lei
2022-03-15 23:24:51 +00:00
parent b29ab1f7f8
commit 337ec14b4a
2 changed files with 12 additions and 4 deletions

View File

@@ -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) {

View File

@@ -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() {