diff --git a/packages/SystemUI/Android.bp b/packages/SystemUI/Android.bp index 89c6ecc4630be7cd5322d158e037d46b4a3caabe..88abf694b2089c89ccfb6d624995e67d48f2e81c 100644 --- a/packages/SystemUI/Android.bp +++ b/packages/SystemUI/Android.bp @@ -165,6 +165,7 @@ android_library { "SystemUI-statsd", "SettingsLib", "com_android_systemui_flags_lib", + "com_android_systemui_shared_flags_lib", "androidx.core_core-ktx", "androidx.viewpager2_viewpager2", "androidx.legacy_legacy-support-v4", @@ -443,6 +444,7 @@ android_library { "SystemUI-statsd", "SettingsLib", "com_android_systemui_flags_lib", + "com_android_systemui_shared_flags_lib", "flag-junit-base", "androidx.viewpager2_viewpager2", "androidx.legacy_legacy-support-v4", diff --git a/packages/SystemUI/aconfig/Android.bp b/packages/SystemUI/aconfig/Android.bp index dc4208e8720741d17b48a54139cc456c8617a800..e842967e61501ec77336e475d15b7103f9a6c544 100644 --- a/packages/SystemUI/aconfig/Android.bp +++ b/packages/SystemUI/aconfig/Android.bp @@ -1,3 +1,31 @@ +// +// Copyright (C) 2023 The Android Open Source Project +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * These flags are meant only for internal use in SystemUI and its variants. + * For shared, cross-process flags, see //frameworks/libs/systemui/aconfig + */ + +package { + default_visibility: [ + "//visibility:override", + "//frameworks/base/packages/SystemUI:__subpackages__", + ], +} + aconfig_declarations { name: "com_android_systemui_flags", package: "com.android.systemui", diff --git a/packages/SystemUI/src/com/android/systemui/flags/FeatureFlagsClassicDebug.java b/packages/SystemUI/src/com/android/systemui/flags/FeatureFlagsClassicDebug.java index 1c2ff4b1b42c9ca0ede5255c58617b3505189df6..36d789ec049bf635ed7a0c43b6c10c29891c29f1 100644 --- a/packages/SystemUI/src/com/android/systemui/flags/FeatureFlagsClassicDebug.java +++ b/packages/SystemUI/src/com/android/systemui/flags/FeatureFlagsClassicDebug.java @@ -16,12 +16,14 @@ package com.android.systemui.flags; +import static com.android.systemui.Flags.exampleFlag; import static com.android.systemui.flags.FlagManager.ACTION_GET_FLAGS; import static com.android.systemui.flags.FlagManager.ACTION_SET_FLAG; import static com.android.systemui.flags.FlagManager.EXTRA_FLAGS; import static com.android.systemui.flags.FlagManager.EXTRA_NAME; import static com.android.systemui.flags.FlagManager.EXTRA_VALUE; import static com.android.systemui.flags.FlagsCommonModule.ALL_FLAGS; +import static com.android.systemui.shared.Flags.exampleSharedFlag; import static java.util.Objects.requireNonNull; @@ -539,6 +541,8 @@ public class FeatureFlagsClassicDebug implements FeatureFlagsClassic { pw.println("can override: true"); pw.println("teamfood: " + mGantryFlags.sysuiTeamfood()); pw.println("booleans: " + mBooleanFlagCache.size()); + pw.println("example_flag: " + exampleFlag()); + pw.println("example_shared_flag: " + exampleSharedFlag()); // Sort our flags for dumping TreeMap<String, Boolean> dumpBooleanMap = new TreeMap<>(mBooleanFlagCache); dumpBooleanMap.forEach((key, value) -> pw.println(" sysui_flag_" + key + ": " + value));