This is meant to replace Build.IS_DEBUGGABLE and allow compile-time optimizations
Fixes: 214238812
Test: manual builds
Change-Id: Id4b3c48a0c88f1e4cff7752907cf72d19295571d
Rename FeatureFlagManager version to
FeatureFlagsDebug and FeatureFlagsRelease, implementing
the FeatureFlags interface.
Bug: 203548827
Test: manual
Change-Id: I4b78757a5e7ee3d5ee06f9124e2b8f670e611d4f
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
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
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
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
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
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