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

Commit 547ae2c3 authored by Chris Li's avatar Chris Li
Browse files

Setup flags for windowing sdk

Fix: 291681490
Bug: 260873529
Test: atest FrameworksCoreTests:WindowFlagsTest
Change-Id: I7d978b3d4e258ff54d31f6bb6d2f1279574cb742
parent 8d4213d2
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -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}",
    ],
}

@@ -30,6 +31,7 @@ java_defaults {
    libs: ["fake_device_config"],
}

// Camera
aconfig_declarations {
    name: "com.android.hardware.camera2-aconfig",
    package: "com.android.hardware.camera2",
@@ -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"],
}
+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"
}
+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();
    }
}