Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 873ad63a authored by Dave Mankoff's avatar Dave Mankoff Committed by Android (Google) Code Review
Browse files

Merge "Block non-sysui targets from including internal sysui flags." into main

parents 9741e96b 2ea6f6db
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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",
+28 −0
Original line number Diff line number Diff line
//
// 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",
+4 −0
Original line number Diff line number Diff line
@@ -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));