Loading AconfigFlags.bp +15 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ java_defaults { // Add java_aconfig_libraries to here to add them to the core framework srcs: [ ":com.android.hardware.camera2-aconfig-java{.generated_srcjars}", ":com.android.window.flags.window-aconfig-java{.generated_srcjars}", ], } Loading @@ -30,6 +31,7 @@ java_defaults { libs: ["fake_device_config"], } // Camera aconfig_declarations { name: "com.android.hardware.camera2-aconfig", package: "com.android.hardware.camera2", Loading @@ -41,3 +43,16 @@ java_aconfig_library { aconfig_declarations: "com.android.hardware.camera2-aconfig", defaults: ["framework-minus-apex-aconfig-java-defaults"], } // Window aconfig_declarations { name: "com.android.window.flags.window-aconfig", package: "com.android.window.flags", srcs: ["core/java/android/window/flags/*.aconfig"], } java_aconfig_library { name: "com.android.window.flags.window-aconfig-java", aconfig_declarations: "com.android.window.flags.window-aconfig", defaults: ["framework-minus-apex-aconfig-java-defaults"], } core/java/android/window/flags/windowing_sdk.aconfig 0 → 100644 +10 −0 Original line number Diff line number Diff line package: "com.android.window.flags" # Project link: https://gantry.corp.google.com/projects/android_platform_windowing_sdk/changes flag { namespace: "windowing_sdk" name: "sync_window_config_update_flag" description: "Whether the feature to sync different window-related config updates is enabled" bug: "260873529" } core/tests/coretests/src/android/window/flags/WindowFlagsTest.java 0 → 100644 +45 −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. */ package android.window.flags; import static com.android.window.flags.Flags.syncWindowConfigUpdateFlag; import android.platform.test.annotations.Presubmit; import androidx.test.filters.SmallTest; import androidx.test.runner.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; /** * Tests for {@link com.android.window.flags.Flags} * * Build/Install/Run: * atest FrameworksCoreTests:WindowFlagsTest */ @RunWith(AndroidJUnit4.class) @SmallTest @Presubmit public class WindowFlagsTest { @Test public void testSyncWindowConfigUpdateFlag() { // No crash when accessing the flag. syncWindowConfigUpdateFlag(); } } Loading
AconfigFlags.bp +15 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ java_defaults { // Add java_aconfig_libraries to here to add them to the core framework srcs: [ ":com.android.hardware.camera2-aconfig-java{.generated_srcjars}", ":com.android.window.flags.window-aconfig-java{.generated_srcjars}", ], } Loading @@ -30,6 +31,7 @@ java_defaults { libs: ["fake_device_config"], } // Camera aconfig_declarations { name: "com.android.hardware.camera2-aconfig", package: "com.android.hardware.camera2", Loading @@ -41,3 +43,16 @@ java_aconfig_library { aconfig_declarations: "com.android.hardware.camera2-aconfig", defaults: ["framework-minus-apex-aconfig-java-defaults"], } // Window aconfig_declarations { name: "com.android.window.flags.window-aconfig", package: "com.android.window.flags", srcs: ["core/java/android/window/flags/*.aconfig"], } java_aconfig_library { name: "com.android.window.flags.window-aconfig-java", aconfig_declarations: "com.android.window.flags.window-aconfig", defaults: ["framework-minus-apex-aconfig-java-defaults"], }
core/java/android/window/flags/windowing_sdk.aconfig 0 → 100644 +10 −0 Original line number Diff line number Diff line package: "com.android.window.flags" # Project link: https://gantry.corp.google.com/projects/android_platform_windowing_sdk/changes flag { namespace: "windowing_sdk" name: "sync_window_config_update_flag" description: "Whether the feature to sync different window-related config updates is enabled" bug: "260873529" }
core/tests/coretests/src/android/window/flags/WindowFlagsTest.java 0 → 100644 +45 −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. */ package android.window.flags; import static com.android.window.flags.Flags.syncWindowConfigUpdateFlag; import android.platform.test.annotations.Presubmit; import androidx.test.filters.SmallTest; import androidx.test.runner.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; /** * Tests for {@link com.android.window.flags.Flags} * * Build/Install/Run: * atest FrameworksCoreTests:WindowFlagsTest */ @RunWith(AndroidJUnit4.class) @SmallTest @Presubmit public class WindowFlagsTest { @Test public void testSyncWindowConfigUpdateFlag() { // No crash when accessing the flag. syncWindowConfigUpdateFlag(); } }