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

Commit 106b9f35 authored by Chris Li's avatar Chris Li Committed by Automerger Merge Worker
Browse files

Merge "Setup flags for windowing sdk" into main am: 03c5f64e am: a6d1600b...

Merge "Setup flags for windowing sdk" into main am: 03c5f64e am: a6d1600b am: b632cc84 am: 4fa7abbb

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2720893



Change-Id: I0106e5d18b9e0cae566689cf95933aaba2463c9d
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 12f2b570 4fa7abbb
Loading
Loading
Loading
Loading
+15 −0
Original line number Original line Diff line number Diff line
@@ -19,6 +19,7 @@ java_defaults {
    // Add java_aconfig_libraries to here to add them to the core framework
    // Add java_aconfig_libraries to here to add them to the core framework
    srcs: [
    srcs: [
        ":com.android.hardware.camera2-aconfig-java{.generated_srcjars}",
        ":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"],
    libs: ["fake_device_config"],
}
}


// Camera
aconfig_declarations {
aconfig_declarations {
    name: "com.android.hardware.camera2-aconfig",
    name: "com.android.hardware.camera2-aconfig",
    package: "com.android.hardware.camera2",
    package: "com.android.hardware.camera2",
@@ -41,3 +43,16 @@ java_aconfig_library {
    aconfig_declarations: "com.android.hardware.camera2-aconfig",
    aconfig_declarations: "com.android.hardware.camera2-aconfig",
    defaults: ["framework-minus-apex-aconfig-java-defaults"],
    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 Original line 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 Original line 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();
    }
}