//
// Copyright (C) 2020 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 {
    default_team: "trendy_team_multitasking_windowing",
    // See: http://go/android-license-faq
    // A large-scale-change added 'default_applicable_licenses' to import
    // all of the 'license_kinds' from "frameworks_base_license"
    // to get the below license kinds:
    //   SPDX-license-identifier-Apache-2.0
    default_applicable_licenses: ["frameworks_base_license"],
}

filegroup {
    name: "WMShellFlickerTestsSplitScreenBase-src",
    srcs: [
        "src/**/benchmark/*.kt",
    ],
}

java_library {
    name: "WMShellFlickerTestsSplitScreenBase",
    srcs: [
        ":WMShellFlickerTestsSplitScreenBase-src",
    ],
    static_libs: [
        "WMShellFlickerTestsBase",
        "wm-shell-flicker-utils",
        "androidx.test.ext.junit",
        "flickertestapplib",
        "flickerlib",
        "flickerlib-helpers",
        "flickerlib-trace_processor_shell",
        "platform-test-annotations",
        "wm-flicker-common-app-helpers",
        "wm-flicker-common-assertions",
        "launcher-helper-lib",
        "launcher-aosp-tapl",
        "com_android_wm_shell_flags_lib",
    ],
}

android_test {
    name: "WMShellFlickerTestsSplitScreen",
    defaults: ["WMShellFlickerTestsDefault"],
    manifest: "AndroidManifest.xml",
    package_name: "com.android.wm.shell.flicker.splitscreen",
    instrumentation_target_package: "com.android.wm.shell.flicker.splitscreen",
    test_config_template: "AndroidTestTemplate.xml",
    srcs: ["src/**/*.kt"],
    exclude_srcs: ["src/**/benchmark/*.kt"],
    static_libs: [
        "WMShellFlickerTestsBase",
        "WMShellFlickerTestsSplitScreenBase",
    ],
    data: ["trace_config/*"],
}

////////////////////////////////////////////////////////////////////////////////
// Begin breakdowns for FlickerTestsRotation module

test_module_config {
    name: "WMShellFlickerTestsSplitScreen-CatchAll",
    base: "WMShellFlickerTestsSplitScreen",
    exclude_filters: [
        "com.android.wm.shell.flicker.splitscreen.CopyContentInSplit",
        "com.android.wm.shell.flicker.splitscreen.DismissSplitScreenByDivider",
        "com.android.wm.shell.flicker.splitscreen.DismissSplitScreenByGoHome",
        "com.android.wm.shell.flicker.splitscreen.DragDividerToResize",
        "com.android.wm.shell.flicker.splitscreen.EnterSplitScreenByDragFromAllApps",
        "com.android.wm.shell.flicker.splitscreen.EnterSplitScreenByDragFromNotification",
        "com.android.wm.shell.flicker.splitscreen.EnterSplitScreenByDragFromShortcut",
        "com.android.wm.shell.flicker.splitscreen.EnterSplitScreenByDragFromTaskbar",
        "com.android.wm.shell.flicker.splitscreen.EnterSplitScreenFromOverview",
        "com.android.wm.shell.flicker.splitscreen.MultipleShowImeRequestsInSplitScreen",
        "com.android.wm.shell.flicker.splitscreen.SwitchAppByDoubleTapDivider",
        "com.android.wm.shell.flicker.splitscreen.SwitchBackToSplitFromAnotherApp",
        "com.android.wm.shell.flicker.splitscreen.SwitchBackToSplitFromHome",
        "com.android.wm.shell.flicker.splitscreen.SwitchBackToSplitFromRecent",
        "com.android.wm.shell.flicker.splitscreen.SwitchBetweenSplitPairs",
        "com.android.wm.shell.flicker.splitscreen.SwitchBetweenSplitPairsNoPip",
        "com.android.wm.shell.flicker.splitscreen.",
    ],
    test_suites: ["device-tests"],
}

test_module_config {
    name: "WMShellFlickerTestsSplitScreen-CopyContentInSplit",
    base: "WMShellFlickerTestsSplitScreen",
    include_filters: ["com.android.wm.shell.flicker.splitscreen.CopyContentInSplit"],
    test_suites: ["device-tests"],
}

test_module_config {
    name: "WMShellFlickerTestsSplitScreen-DismissSplitScreenByDivider",
    base: "WMShellFlickerTestsSplitScreen",
    include_filters: ["com.android.wm.shell.flicker.splitscreen.DismissSplitScreenByDivider"],
    test_suites: ["device-tests"],
}

test_module_config {
    name: "WMShellFlickerTestsSplitScreen-DismissSplitScreenByGoHome",
    base: "WMShellFlickerTestsSplitScreen",
    include_filters: ["com.android.wm.shell.flicker.splitscreen.DismissSplitScreenByGoHome"],
    test_suites: ["device-tests"],
}

test_module_config {
    name: "WMShellFlickerTestsSplitScreen-DragDividerToResize",
    base: "WMShellFlickerTestsSplitScreen",
    include_filters: ["com.android.wm.shell.flicker.splitscreen.DragDividerToResize"],
    test_suites: ["device-tests"],
}

test_module_config {
    name: "WMShellFlickerTestsSplitScreen-EnterSplitScreenByDragFromAllApps",
    base: "WMShellFlickerTestsSplitScreen",
    include_filters: ["com.android.wm.shell.flicker.splitscreen.EnterSplitScreenByDragFromAllApps"],
    test_suites: ["device-tests"],
}

test_module_config {
    name: "WMShellFlickerTestsSplitScreen-EnterSplitScreenByDragFromNotification",
    base: "WMShellFlickerTestsSplitScreen",
    include_filters: ["com.android.wm.shell.flicker.splitscreen.EnterSplitScreenByDragFromNotification"],
    test_suites: ["device-tests"],
}

test_module_config {
    name: "WMShellFlickerTestsSplitScreen-EnterSplitScreenByDragFromShortcut",
    base: "WMShellFlickerTestsSplitScreen",
    include_filters: ["com.android.wm.shell.flicker.splitscreen.EnterSplitScreenByDragFromShortcut"],
    test_suites: ["device-tests"],
}

test_module_config {
    name: "WMShellFlickerTestsSplitScreen-EnterSplitScreenByDragFromTaskbar",
    base: "WMShellFlickerTestsSplitScreen",
    include_filters: ["com.android.wm.shell.flicker.splitscreen.EnterSplitScreenByDragFromTaskbar"],
    test_suites: ["device-tests"],
}

test_module_config {
    name: "WMShellFlickerTestsSplitScreen-EnterSplitScreenFromOverview",
    base: "WMShellFlickerTestsSplitScreen",
    include_filters: ["com.android.wm.shell.flicker.splitscreen.EnterSplitScreenFromOverview"],
    test_suites: ["device-tests"],
}

test_module_config {
    name: "WMShellFlickerTestsSplitScreen-MultipleShowImeRequestsInSplitScreen",
    base: "WMShellFlickerTestsSplitScreen",
    include_filters: ["com.android.wm.shell.flicker.splitscreen.MultipleShowImeRequestsInSplitScreen"],
    test_suites: ["device-tests"],
}

test_module_config {
    name: "WMShellFlickerTestsSplitScreen-SwitchAppByDoubleTapDivider",
    base: "WMShellFlickerTestsSplitScreen",
    include_filters: ["com.android.wm.shell.flicker.splitscreen.SwitchAppByDoubleTapDivider"],
    test_suites: ["device-tests"],
}

test_module_config {
    name: "WMShellFlickerTestsSplitScreen-SwitchBackToSplitFromAnotherApp",
    base: "WMShellFlickerTestsSplitScreen",
    include_filters: ["com.android.wm.shell.flicker.splitscreen.SwitchBackToSplitFromAnotherApp"],
    test_suites: ["device-tests"],
}

test_module_config {
    name: "WMShellFlickerTestsSplitScreen-SwitchBackToSplitFromHome",
    base: "WMShellFlickerTestsSplitScreen",
    include_filters: ["com.android.wm.shell.flicker.splitscreen.SwitchBackToSplitFromHome"],
    test_suites: ["device-tests"],
}

test_module_config {
    name: "WMShellFlickerTestsSplitScreen-SwitchBackToSplitFromRecent",
    base: "WMShellFlickerTestsSplitScreen",
    include_filters: ["com.android.wm.shell.flicker.splitscreen.SwitchBackToSplitFromRecent"],
    test_suites: ["device-tests"],
}

test_module_config {
    name: "WMShellFlickerTestsSplitScreen-SwitchBetweenSplitPairs",
    base: "WMShellFlickerTestsSplitScreen",
    include_filters: ["com.android.wm.shell.flicker.splitscreen.SwitchBetweenSplitPairs"],
    test_suites: ["device-tests"],
}

test_module_config {
    name: "WMShellFlickerTestsSplitScreen-SwitchBetweenSplitPairsNoPip",
    base: "WMShellFlickerTestsSplitScreen",
    include_filters: ["com.android.wm.shell.flicker.splitscreen.SwitchBetweenSplitPairsNoPip"],
    test_suites: ["device-tests"],
}

test_module_config {
    name: "WMShellFlickerTestsSplitScreen-UnlockKeyguardToSplitScreen",
    base: "WMShellFlickerTestsSplitScreen",
    include_filters: ["com.android.wm.shell.flicker.splitscreen.UnlockKeyguardToSplitScreen"],
    test_suites: ["device-tests"],
}

// End breakdowns for FlickerTestsRotation module
////////////////////////////////////////////////////////////////////////////////
