Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 5df3442b authored by Tommy Webb's avatar Tommy Webb Committed by Michael Bestas
Browse files

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
parent f726f1cc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment