<?xml version="1.0" encoding="utf-8"?>
<!--
 * 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.
 -->

<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="android.input.cts">
    <uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS"/>
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
    <uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE"/>
    <uses-permission android:name="android.permission.INTERACT_ACROSS_USERS"/>
    <uses-permission android:name="android.permission.CREATE_VIRTUAL_DEVICE" />
    <uses-permission android:name="android.permission.ADD_TRUSTED_DISPLAY" />
    <application android:label="InputTest"
                 android:requestLegacyExternalStorage="true">
        <activity android:name=".OverlayActivity"
                  android:label="Overlay activity"
                  android:process=":externalProcess"
                  android:theme="@android:style/Theme.Dialog"
                  android:exported="true">
            <layout android:defaultHeight="100dp"
                    android:defaultWidth="100dp"
                    android:gravity="bottom"
                    android:minHeight="100dp"
                    android:minWidth="100dp" />
        </activity>
        <receiver android:name=".OverlayFocusedBroadcastReceiver" android:exported="true">
            <intent-filter>
                <action android:name="android.input.cts.action.OVERLAY_ACTIVITY_FOCUSED"/>
            </intent-filter>
        </receiver>

        <activity android:name="android.input.cts.IncompleteMotionActivity"
                  android:label="IncompleteMotion activity"
                  android:turnScreenOn="true"
                  android:exported="true">
        </activity>
        <!-- Disable onBackInvokedCallback to allow us to make assertions about
          the app receiving KEYCODE_BACK. -->
        <activity android:name="android.input.cts.CaptureEventActivity"
                  android:label="Capture events"
                  android:configChanges="touchscreen|uiMode|orientation|screenSize|screenLayout|keyboardHidden|uiMode|navigation|keyboard|density|fontScale|layoutDirection|locale|mcc|mnc|smallestScreenSize"
                  android:enableOnBackInvokedCallback="false"
                  android:turnScreenOn="true"
                  android:exported="true">
        </activity>
        <activity android:name="android.input.cts.TwoWindowsActivity"
                  android:label="Capture events with two windows"
                  android:configChanges="touchscreen|uiMode|orientation|screenSize|screenLayout|keyboardHidden|uiMode|navigation|keyboard|density|fontScale|layoutDirection|locale|mcc|mnc|smallestScreenSize"
                  android:turnScreenOn="true"
                  android:exported="true">
        </activity>
        <activity android:name="android.app.Activity"
                  android:label="Empty activity for simple tests"
                  android:turnScreenOn="true"
                  android:exported="true">
        </activity>

        <receiver android:name="android.input.cts.KeyboardLayoutTest.CtsKeyboardLayoutProvider"
                  android:label="CTS keyboard layout provider"
                  android:exported="true">
            <intent-filter>
                <action android:name="android.hardware.input.action.QUERY_KEYBOARD_LAYOUTS" />
            </intent-filter>
            <meta-data android:name="android.hardware.input.metadata.KEYBOARD_LAYOUTS"
                       android:resource="@xml/keyboard_layouts" />
        </receiver>
    </application>

    <instrumentation android:name="androidx.test.runner.AndroidJUnitRunner"
         android:targetPackage="android.input.cts"
         android:label="Tests for input APIs and behaviours.">
    </instrumentation>
</manifest>
