summaryrefslogtreecommitdiff
path: root/packages/SystemUI/src-debug/com/android/systemui
Commit message (Collapse)AuthorAgeFilesLines
* Delay restarting SystemUI on debug builds.Dave Mankoff2023-03-031-1/+9
| | | | | | | | | | | | | | | When a flag changes, delay restarting systemui by 1 second after the screen goes idle. This prevents a race condition with entering dream/doze/aod. Also, refactor `FeatureFlagsReleaseRestarter` and `FeatureFlagsDebugRestarter` into `ConditionalRestarter`, since they share a great deal of the same functionality. This also has the nice effect of making the tests smaller and more focused. Fixes: 268060399 Test: atest SystemUITest && manual testing Change-Id: Iae7ddc5965a95c72d35caafc2c90b267be7c3a6d
* Step 1 of Removing Ids from Flags.Dave Mankoff2023-01-261-10/+5
| | | | | | | | | | | | With this change, we start relying more directly on the string names that are now associated with flags. The ids persist so that we can look up existing overrides and push them into the new system. After a couple of weeks, the plan will be to remove the ids entirely. Bug: 265188950 Test: manually built before and after cl to ensure overrides persist. Change-Id: I0faac671b43a0d24262e78ccdb4e23e44f73eeea
* Fix flag app being empty.Dave Mankoff2022-11-151-1/+5
| | | | | | | | | | | Kotlin evaluates `object` declarations lazily. We have to access `Flags` before it will populate the list, and we were asking for the list during construction of our dagger graph. Bug: 257302229 Test: manual Change-Id: Iadfbbbc50ee2fb09260f5d119898fb50b3cc90f9
* Restart after flag changes on screen off.Dave Mankoff2022-11-151-0/+3
| | | | | | | | | | | | | | On debug builds, restart as soon as the screen goes off. On release builds, restart after the device is plugged in, the screen is off, and the device has been idle for a few seconds. The flag app does not yet reflect this change, but it will allow multiple flags to be flipped. Bug: 257302229 Test: manual Change-Id: I9da58f9881973d69fc0e35b394ca42a4166ceb08
* Define server flag names for all existing flags.Dave Mankoff2022-11-091-0/+91
| | | | | | | | | Removes reflection from our flag infrastructure. Bug: 249121873 Fixes: 258235428 Test: manual Change-Id: I29bf2065ba5885789e3fe94c0d6cdbae5e42a4d0
* Restart SystemUI on DeviceConfig changes.Dave Mankoff2022-10-261-18/+1
| | | | | | Bug: 253062545 Test: atest SystemUITests Change-Id: I905b17a6b4ba639749d6d82d08cecc55bda422a7
* Use less SysUI specific code in Flags.Dave Mankoff2022-10-031-0/+12
| | | | | | | | A step along they way to sharing the flagging code as a library. Bug: 249121873 Test: atest SystemUITests Change-Id: Id48d33a6ce0d058c4b2d3c282865297841753bb7
* Add ability for flags to be server-overridden.Dave Mankoff2022-08-061-2/+3
| | | | | | | | | | | | | | | | | This works in both debug and release builds. In debug builds, all flags can be overridden via the same mechanisms as before, but can also be overridden by flags defined on the server. On release builds, only `ReleasedFlag`s can be overridden. `UnreleasedFlag`s remain set in their default state. With this cl, server side flags do not get their new value until SystemUI is restarted (via a reboot or a crash). Bug: 239863271 Test: atest SystemUITests Change-Id: I08166cb90675dea06b2671669cecfc16ac58ab61 Merged-In: I08166cb90675dea06b2671669cecfc16ac58ab61
* Add support for TEAMFOOD flag.Dave Mankoff2022-03-181-2/+4
| | | | | | | | | | | | | | | | | A list of boolean teamfood flags is now available. Adding a flag to the list means that the flag is tied to the value of the teamfood flag. If the flag is manually set, that manually set value will take precedence. If the flag is true by default, the true value will take precedence. Otherwise, the flag will fallback to the value of the teamfood flag. Bug: 223379190 Test: atest SystemUITests Change-Id: Id4739679e633c25abccd9093d15eb5e016cd5ac2
* Add Compile.IS_DEBUG to systemuiJeff DeCew2022-01-121-0/+23
| | | | | | | | This is meant to replace Build.IS_DEBUGGABLE and allow compile-time optimizations Fixes: 214238812 Test: manual builds Change-Id: Id4b3c48a0c88f1e4cff7752907cf72d19295571d
* Generalize some flag manager methods by flag type.Jeff DeCew2021-12-081-0/+5
| | | | | | Bug: 209081785 Test: atest FeatureFlagsDebugTest FlagManagerTest Change-Id: Ie92667e33e7c086258cdd03e7b9ebccdefef5938
* Convert FeatureFlags to interface.Dave Mankoff2021-11-172-238/+12
| | | | | | | | | | Rename FeatureFlagManager version to FeatureFlagsDebug and FeatureFlagsRelease, implementing the FeatureFlags interface. Bug: 203548827 Test: manual Change-Id: I4b78757a5e7ee3d5ee06f9124e2b8f670e611d4f
* Move contents of FeatureFlags into FeatureFlagManager.Dave Mankoff2021-11-101-6/+33
| | | | | | | | | | The meaningful contents of FeatureFlags only relates to debug builds and has been moved into the debug version of FeatureFlagManager. Bug: 203548872 Test: atest SystemUITests && manual Change-Id: Ifcef0cfe4e2d07daec34dfc7a6cbe2d305b312b5
* Communicate flags from systemui asyncDave Mankoff2021-11-051-4/+13
| | | | | | | | | | | | | | | | | | | | | Flags are no longer statically compiled into the shared library. A "GET_FLAGS" api has been added to SystemUI that returns a list of Flag objects, as defined in SystemUI. Communication happens via a simple "ordered" broadcast. FlagManager#getFlagsFuture() returns a ListenableFuture pointing at the list of flags. Be sure not to call Future#get on the main thread - the call will block indefinitely as the broadcast receiver is handled on the main thread. Instead, add a listener to the future or call #get on a separate thread. Bug: 203548827 Test: manual Change-Id: I8720e0905662a6371e7aabf04341df46b8943a9c
* Add support for flag change listeners library.Dave Mankoff2021-11-032-5/+14
| | | | | | Bug: 203548827 Test: manual Change-Id: I6f989e89a98c7c6643af762eb0263f81ce584dfa
* Add ability to read flag values to Flag Library.Dave Mankoff2021-11-032-36/+43
| | | | | | | | | | | | The FlagManager now partially implements the FlagReader interface. The FeatureFlagManager, part of SystemUI proper, now uses the FlagManager to read flag values, helping to ensure consistency between the two separate systems. Bug: 203548827 Test: manual Change-Id: Ia3b103f783a846cfe9437cd8e6b987962cebabde
* Add a shared library for setting flags in SysUI.Dave Mankoff2021-11-021-4/+5
| | | | | | | | | | | | | | | | | | | | | | This adds the FlagManager class which currently has 3 methods: - #getFlagsFuture - #setFlagValue - #eraseFlag The first makes an async call to SystemUI to retrieve the flags it knows about. It returns a collection of Flag objects from which one can get the id, type, and default values. The other two are fairly self-explanatory, sending intents to SystemUI telling to set or erase flags. Any app calling these methods must have the FLAGS_PERMISSION defined in the FlagManager library. Only boolean flags are supported at the moment. Bug: 203548827 Test: manual Change-Id: Id15ff481edcb83c67ce4cdad6cdda27d28a40652
* Make gradle build use debuggable FeatureFlagManagerJeff DeCew2021-10-301-0/+5
| | | | | | Fixes: 204129347 Test: gradle build & dump Change-Id: I06ba95f4cc21b06519e676afee4bb6ae9c44c03e
* Make FeatureFlagManager DumpableJeff DeCew2021-10-291-2/+23
| | | | | | | | | | | Also direct developers who find FeatureFlagManager in the src/ tree to the src-debug/ version Fixes: 204127880 Bug: 203904245 Test: adb shell dumpsys activity service com.android.systemui Test: FeatureFlagManagerTest Merged-In: I6a42a697120179048e848f7f432fd753db514b9c Change-Id: I5bec46e60befaa1890b9ff4d4bb5e89b0ebba256
* Cache flag values when they are read.Dave Mankoff2021-10-151-2/+8
| | | | | | Bug: 202860494 Test: manual Change-Id: Icde45251feb344b36bddf5717b9b21c28cb85eb0
* Restart SystemUI when a flag changes.Dave Mankoff2021-10-151-5/+31
| | | | | | Bug: 202860494 Test: manual Change-Id: Ic5356aa093db8afc9f57e724603472efa5473a2f
* Add ability to set/erase flags via intents.Dave Mankoff2021-10-141-6/+75
| | | | | | | | | | | | | A flag can be set with a command like the following: adb shell am broadcast -a com.android.systemui.action.SET_FLAG \ --ei id 1 --ez value 1 A flag can be "erased" with the same command, but leaving the value unset. Bug: 202860494 Test: manual Change-Id: If1097e230692df49a6de7cbbb71ed37b0499c663
* Add ability to read and write flags to sysprops.Dave Mankoff2021-10-141-12/+48
| | | | | | Bug: 202860494 Test: manual Change-Id: I660931492e8a2ffd1373162aab60e4abd4566db6
* Remove flag plugin with flag manager with DIJay Aliomer2021-10-141-3/+12
| | | | | | | Test: FeatureFlagsTest Bug: 196602427 Change-Id: I43961a091f0f10ebd1a168f40703f0067d9f8a18 Merged-In: I43961a091f0f10ebd1a168f40703f0067d9f8a18
* Added a debug and release version of flag readerJay Aliomer2021-10-121-0/+43
Bug: 196602427 Test: manually tested with log statements Change-Id: Ie01af22ef51504db5aadc0da1d367961b6aa42d4 Merged-In: Ie01af22ef51504db5aadc0da1d367961b6aa42d4 (cherry picked from commit 97d4fc7d158bb31ae30b63027f7ec483cd4b0a58)