SystemUI: React to PrivacyConfig changes properly
Store normal callback references in PrivacyConfig, rather than WeakReference. This prevents the callbacks from becoming phantom reachable (finalized) shortly after SystemUI starts. Prior to this change, devices with an overlay config to enable location indicators may not properly utilize the indicator until the device is rebooted at least once after first install, if the garbage collector wins the race and finalizes the necessary PrivacyConfig callback. Test: Manual: Boot and unlock a device and wait about a minute for it to settle. Run `adb shell "dumpsys activity service \ com.android.systemui | grep locationAvailable"`. It will return two results with matching values. Then, run `adb shell cmd device_config \ put privacy location_indicators_enabled false` (or `true`; whichever does not match the value seen earlier) to change the values. Finally, run the first adb command again to verify that both of the values for locationAvailable match and reflect the newly-specified value. Issue: calyxos#1648 Change-Id: I4ee1d5054a8bb294cea267034169c6615490a735
Loading
Please register or sign in to comment