summaryrefslogtreecommitdiff
path: root/packages/SystemUI/src/com/android/systemui/flags/FeatureFlagsDebug.java
Commit message (Collapse)AuthorAgeFilesLines
* Only restart SystemUI when Server Flags actually change.Dave Mankoff2023-03-131-3/+28
| | | | | | | | | | | | DeviceConfig is alerting us to all server pushes (pulls?). Even if the flags is checking on aren't actually changing. This CL ensures we only restart if the flag value has actually changed. Fixes: 272780732 Test: atest SystemUITests Change-Id: I3571d210885472dc69f50c76922a89733f1a5d83
* Don't restart SystemUI in TestHarness mode.Dave Mankoff2023-02-091-21/+42
| | | | | | | | | | | Log the name of the flag that is causing restarts. Also, we weren't copying old overrriden-id's into the new overridden-names. Fix that. Fixes: 267753212 Test: atest SystemUITests and some manual flag flipping. Change-Id: I7df265a54e657453c664c3d77987ee498c1c97cd
* Step 1 of Removing Ids from Flags.Dave Mankoff2023-01-261-82/+131
| | | | | | | | | | | | 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
* Revert "Revert "Ensure SystemUI gets restarted lazily.""Dave Mankoff2022-12-061-5/+3
| | | | | | | | | | This reverts commit d4c3da1be348b14b355df23c156f4a5d47262fff. Reason for revert: Need to restore this functionality. Problem fixed. Bug: 257302229 Test: manual via the flag app Change-Id: Ieefc76bda09431ed2f7a0fe28d91a59ef02184b8
* Revert "Ensure SystemUI gets restarted lazily."Taran Singh2022-11-171-3/+5
| | | | | | | | | This reverts commit e0d2a5117d20b04cacf673cb72f34ab681679927. Reason for revert: LockscreenShiftSecurity#testSecurityShiftsWhenTappingOnTheOtherSide test is broken Bug: 259595527 Change-Id: I16bca337d77a9fa88a2d90881d7b6a34fca33b08
* Ensure SystemUI gets restarted lazily.Dave Mankoff2022-11-161-5/+3
| | | | | | | | | | A prior change broke restarting Android by replacing it with restarting SystemUI. Meanwhile, restarting SystemUI remained unchanged - restarting immediately. Bug: 257302229 Test: manual via the flag app. Change-Id: I4674cfd7c136b15a41ee36caea5b853e801d52fe
* Restart after flag changes on screen off.Dave Mankoff2022-11-151-1/+0
| | | | | | | | | | | | | | 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
* Add server flag support to flags.Dave Mankoff2022-11-091-40/+27
| | | | | | Bug: 249121873 Test: atest SystemUITests Change-Id: I7fe0bd122cbcc3365abe7f4071a76a04783ff3d0
* Enable Int and String flags.Dave Mankoff2022-11-031-0/+36
| | | | | | | | | | | | | Puts mechanics in to support IntFlag and ResourceIntFlag. Also adds support for both IntFlag and StringFlag via the command line. Support in the app will come later. Bug: 257066497 Test: manual via the command line. Change-Id: I378f0f1e0db028cee33f729c47a63262124389d7
* Restart SystemUI on DeviceConfig changes.Dave Mankoff2022-10-261-11/+26
| | | | | | Bug: 253062545 Test: atest SystemUITests Change-Id: I905b17a6b4ba639749d6d82d08cecc55bda422a7
* Use less SysUI specific code in Flags.Dave Mankoff2022-10-031-175/+9
| | | | | | | | 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-33/+54
| | | | | | | | | | | | | | | | | 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
* Allow flags to be marked as overriden.Dave Mankoff2022-07-181-5/+18
| | | | | | | Bug: 233906828 Test: manual Change-Id: If8d8cf39683db32295c73946c37b4a6d33bf63a0 Merged-In: If8d8cf39683db32295c73946c37b4a6d33bf63a0
* Add DeviceConfig feature flag type to SystemUINick Chameyev2022-06-101-0/+23
| | | | | | | | | | | | | Adds support of DeviceConfig feature flags. DeviceConfig flags are used by Phenotype A/B testing framework. Bug: 218314434 Test: change phenotype flag => check that FeatureFlags returns correct value Test: atest com.android.systemui.flags.FeatureFlagsDebugTest Test: atest com.android.systemui.flags.FeatureFlagsReleaseTest Change-Id: I7dd9e47280ba56b7f9ea552c0d44d3e36fc6b041
* Merge "Add adb shell command to set flags." into tm-devDave Mankoff2022-04-141-18/+199
|\
| * Add adb shell command to set flags.Dave Mankoff2022-04-131-18/+199
| | | | | | | | | | | | | | | | | | | | The command looks like following: adb shell cmd statusbar flag <id> <on|off|toggle|erase> Fixes: 228443401 Test: manual && atest FeatureFlagsDebugTest Change-Id: Ie78855292e7aa181fbd70e48e50ead6da0dc7679
* | Merge "Remove FileDescriptor from systemui.Dumpable." into tm-devDave Mankoff2022-04-071-2/+1
|\ \ | |/ |/|
| * Remove FileDescriptor from systemui.Dumpable.Dave Mankoff2022-04-051-2/+1
| | | | | | | | | | | | | | | | | | | | This is the first step in moving over to the new public android.util.Dumpable api. Bug: 217567642 Test: m SystemUI Merged-In: Ibaebcfb2c6c5326d0c45b8c72d868c76655d89a0 Change-Id: Ibaebcfb2c6c5326d0c45b8c72d868c76655d89a0
* | [Fix settings] Multi user for settings wrapperAaron Liu2022-04-061-2/+5
|/ | | | | | | | | | | | | Audit and fix SettingsProxy usages to account for multiple users. Note that this does not fix any Settings usages that does not use SettingsProxy. There maybe be outstanding files to change, but from a glance, most of the usages seem to be user aware. Bug: 226391543 Test: Manual and fixed unit tests Change-Id: Ia8ff59fe55049cc79ac73237087d3aaca2cbb3b3
* Add support for TEAMFOOD flag.Dave Mankoff2022-03-181-16/+35
| | | | | | | | | | | | | | | | | 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
* Ensure that android is restarted when setting sysprop flag.Dave Mankoff2022-02-241-0/+2
| | | | | | Bug: 219067621 Test: manual Change-Id: I81cf7d0b7ae99a38b202156ce61eb94584d0d749
* Add support for SystemProperty flags to SysUI.Dave Mankoff2022-02-221-6/+44
| | | | | | | | | | | This will allow the flag flippin' app to change boolean system properties that launcher, settings, and system server can read. Some of these flags are already being read between the various systems and this gives a unified ux for changing the flags. Bug: 219067621 Test: manual Change-Id: I7d1a1e758915f43cac114054a2c2e055706ef3f3
* Add ability for sysui/featureflags to restart androidEvan Rosky2022-02-111-1/+14
| | | | | | | | | When setting flags/sysprops, full reboot is overkill. This adds a way to just restart system_server. Bug: 219067621 Test: Call API and verify that it restarts Change-Id: I67aecbc6ec0570fbaf36165034648ab39da57940
* Add unaudited exported flag to exposed runtime receiversMichael Groover2022-01-151-1/+2
| | | | | | | | | | | | | | | | | | | Android T allows apps to declare a runtime receiver as not exported by invoking registerReceiver with a new RECEIVER_NOT_EXPORTED flag; receivers registered with this flag will only receive broadcasts from the platform and the app itself. However to ensure developers can properly protect their receivers, all apps targeting T or later registering a receiver for non-system broadcasts must specify either the exported or not exported flag when invoking #registerReceiver; if one of these flags is not provided, the platform will throw a SecurityException. This commit updates all the exposed receivers with a new RECEIVER_EXPORTED_UNAUDITED flag to maintain the existing behavior of exporting the receiver while also flagging the receiver for audit before the T release. Bug: 161145287 Test: Build Change-Id: I5faa64ae0d2b22b62390bf13cb2b87fd6926e0c7
* Generalize some flag manager methods by flag type.Jeff DeCew2021-12-081-48/+89
| | | | | | Bug: 209081785 Test: atest FeatureFlagsDebugTest FlagManagerTest Change-Id: Ie92667e33e7c086258cdd03e7b9ebccdefef5938
* FeatureFlags Listeners:Jeff DeCew2021-12-081-13/+28
| | | | | | | | | | * Convert FlagReader interface to FlagListenable. * Move Flag reading to FeatureFlags interface. * Remove isEnabled(id, boolean) from all interfaces; make private in implementations where used. Bug: 209081785 Test: atest FlagManagerTest Change-Id: I8c90a67def242b5d2fa55d5effab8270ecafabb4
* Better support for Resource based flags.Dave Mankoff2021-12-021-15/+43
| | | | | | | | | | | | | | | | | | | | | | | | | Introduce ResourceFlag class and ParcelableFlag classes, from which other flag types are based. ResourceFlags always pull there default values out of context.getResources. They can not, however, be directly serialized and sent to the flag app. For that, we now have ParcelableFlag. Prior to this change, we were not properly alerting the Flag app about the current value of flags when it asked. This change now also fixes that. All flags are coerced into ParcelableFlag before being sent to the app. Note that ResourceFlags perform runtime logic, even in release builds, meaing that the opportunity for optimizing them at compile time is much smaller. Tools such as proguard will not have the opportunity to strip them out entirely. Bug: 203548827 Test: atest SystemUITests Change-Id: I3c37ccae16c00237f9cffffc9c22580454ecb8cc
* Remove FlagWriter class.Dave Mankoff2021-11-171-2/+1
| | | | | | Bug: 203548827 Test: manual Change-Id: I651cb9a42e8ebb6ea11599cde97a5d8eaeb5d1b2
* Convert FeatureFlags to interface.Dave Mankoff2021-11-171-0/+233
Rename FeatureFlagManager version to FeatureFlagsDebug and FeatureFlagsRelease, implementing the FeatureFlags interface. Bug: 203548827 Test: manual Change-Id: I4b78757a5e7ee3d5ee06f9124e2b8f670e611d4f