summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Dave Mankoff <mankoff@google.com> 2023-11-02 21:42:52 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2023-11-02 21:42:52 +0000
commit873ad63aa95b2acc7bcbd2fcaf2ecb59ef0f3af5 (patch)
tree13618778a03f37c51cec8bdb23803ee2b63ddb8a
parent9741e96bdd975215363ea3f6faf10e5e5dd72eb8 (diff)
parent2ea6f6db9540bf35e70275b82c0b7404614ed5e1 (diff)
Merge "Block non-sysui targets from including internal sysui flags." into main
-rw-r--r--packages/SystemUI/Android.bp2
-rw-r--r--packages/SystemUI/aconfig/Android.bp28
-rw-r--r--packages/SystemUI/src/com/android/systemui/flags/FeatureFlagsClassicDebug.java4
3 files changed, 34 insertions, 0 deletions
diff --git a/packages/SystemUI/Android.bp b/packages/SystemUI/Android.bp
index 89c6ecc4630b..88abf694b208 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 dc4208e87207..e842967e6150 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 1c2ff4b1b42c..36d789ec049b 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));