Query the uid process state in opChanged instead of relying on callbacks.
Occasionally, Android may enter a state where onUidStateChanged arrives late or not at all until another process state change occurs. In some situations that may mean isUidVisible is (incorrectly) false when the app is in the foreground. Instead of relying on the onUidStateChanged callback, query the state directly through activity manager. The flag protecting this is only needed while data_delivery_permission_checks is not flipped, and can be removed if that advances first. Test: CameraPermissionTest Bug: 378016494 Flag: com.android.internal.camera.flags.query_process_state Change-Id: Ie609c87f27dc0610f5fe9c735e68b4e9366c510f
Loading
Please register or sign in to comment