Commit Graph

11 Commits

Author SHA1 Message Date
Dave Mankoff
aea66f750b Fix flag app being empty.
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
2022-11-15 22:01:07 +00:00
Dave Mankoff
c38ec1a51e Restart after flag changes on screen off.
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
2022-11-15 15:19:47 +00:00
Dave Mankoff
57d1b2afa2 Define server flag names for all existing flags.
Removes reflection from our flag infrastructure.

Bug: 249121873
Fixes: 258235428
Test: manual
Change-Id: I29bf2065ba5885789e3fe94c0d6cdbae5e42a4d0
2022-11-09 17:10:09 +00:00
Dave Mankoff
99fedc19bb Restart SystemUI on DeviceConfig changes.
Bug: 253062545
Test: atest SystemUITests
Change-Id: I905b17a6b4ba639749d6d82d08cecc55bda422a7
2022-10-26 20:05:48 +00:00
Dave Mankoff
f1a5f74f40 Use less SysUI specific code in Flags.
A step along they way to sharing the flagging code as a library.

Bug: 249121873
Test: atest SystemUITests
Change-Id: Id48d33a6ce0d058c4b2d3c282865297841753bb7
2022-10-03 13:57:23 +00:00
Dave Mankoff
2719567655 Add ability for flags to be server-overridden.
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
2022-08-06 23:25:13 +00:00
Jeff DeCew
c7be05d8ed Add Compile.IS_DEBUG to systemui
This is meant to replace Build.IS_DEBUGGABLE and allow compile-time optimizations

Fixes: 214238812
Test: manual builds
Change-Id: Id4b3c48a0c88f1e4cff7752907cf72d19295571d
2022-01-12 16:20:02 +00:00
Dave Mankoff
02e42be6ec Convert FeatureFlags to interface.
Rename FeatureFlagManager version to
FeatureFlagsDebug and FeatureFlagsRelease, implementing
the FeatureFlags interface.

Bug: 203548827
Test: manual
Change-Id: I4b78757a5e7ee3d5ee06f9124e2b8f670e611d4f
2021-11-17 17:13:25 -05:00
Dave Mankoff
5346e090f5 Move contents of FeatureFlags into FeatureFlagManager.
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
2021-11-10 09:46:04 -05:00
Dave Mankoff
1a934e9aee Add ability to read flag values to Flag Library.
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
2021-11-03 10:28:22 -04:00
Jeff DeCew
86b8e77bbf Make gradle build use debuggable FeatureFlagManager
Fixes: 204129347
Test: gradle build & dump
Change-Id: I06ba95f4cc21b06519e676afee4bb6ae9c44c03e
2021-10-30 14:08:45 -04:00