Loading
Updated UsbDataProtectionHook to account for feature disablement without...
Updated UsbDataProtectionHook to account for feature disablement without immediate reboot as well as adding fallback default for canSetUsbDataSignal. Since the feature is init during boot time. Querying APM immediately after disabling the feature before next reboot would cause feature to query the disabled feature anyways. So we need return false when that occurs. Also there can be APM availability queries by callers that do not have sufficient permission. So instead, we are now caching the value on boot time so no further MANAGE_USB permission is require for future queries. Test: atest Bug: 395965739 Flag: android.security.aapm_feature_usb_data_protection Change-Id: I2f7ec08fb2349d32f185c43efacc8983fbb309f2