Replace ACTION_SCREEN_OFF broadcast with KeyguardLockedStateListener.
This change improves the reliability of disabling USB data when the device is locked by using the new `KeyguardLockedStateListener`. This listener provides a direct callback when the keyguard state changes, eliminating the need for complex retry logic previously used to handle race conditions with `ACTION_SCREEN_OFF`. The delay for disabling USB data has also been reduced to 5 seconds to aid connection recovery. Bug: 34948618 Test: atest, manual testing Flag: android.security.aapm_feature_usb_data_protection Change-Id: Ia14a36fea0266e373efb531d401c6533ea1d57b4
Loading
Please register or sign in to comment