1<?xml version="1.0" encoding="utf-8"?>
2<!--
3  ~ Copyright (C) 2023 The Android Open Source Project
4  ~
5  ~ Licensed under the Apache License, Version 2.0 (the "License");
6  ~ you may not use this file except in compliance with the License.
7  ~ You may obtain a copy of the License at
8  ~
9  ~      http://www.apache.org/licenses/LICENSE-2.0
10  ~
11  ~ Unless required by applicable law or agreed to in writing, software
12  ~ distributed under the License is distributed on an "AS IS" BASIS,
13  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  ~ See the License for the specific language governing permissions and
15  ~ limitations under the License.
16  -->
17
18<manifest xmlns:android="http://schemas.android.com/apk/res/android"
19          xmlns:tools="http://schemas.android.com/tools"
20          package="com.android.server.wm.flicker">
21
22    <uses-sdk android:minSdkVersion="29" android:targetSdkVersion="35"/>
23    <!-- Read and write traces from external storage -->
24    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
25    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
26    <!-- Allow the test to write directly to /sdcard/ -->
27    <uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />
28    <!-- Write secure settings -->
29    <uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS" />
30    <!-- Capture screen contents -->
31    <uses-permission android:name="android.permission.ACCESS_SURFACE_FLINGER" />
32    <!-- Enable / Disable tracing !-->
33    <uses-permission android:name="android.permission.DUMP" />
34    <!-- Force-stop test apps -->
35    <uses-permission android:name="android.permission.FORCE_STOP_PACKAGES"/>
36    <!-- Run layers trace -->
37    <uses-permission android:name="android.permission.HARDWARE_TEST"/>
38    <!-- Capture screen recording -->
39    <uses-permission android:name="android.permission.CAPTURE_VIDEO_OUTPUT"/>
40    <!-- Workaround grant runtime permission exception from b/152733071 -->
41    <uses-permission android:name="android.permission.PACKAGE_USAGE_STATS"/>
42    <uses-permission android:name="android.permission.READ_LOGS"/>
43    <!-- ATM.removeRootTasksWithActivityTypes() -->
44    <uses-permission android:name="android.permission.MANAGE_ACTIVITY_TASKS" />
45    <!-- ActivityOptions.makeCustomTaskAnimation() -->
46    <uses-permission android:name="android.permission.START_TASKS_FROM_RECENTS" />
47    <!-- Allow the test to connect to perfetto trace processor -->
48    <uses-permission android:name="android.permission.INTERNET"/>
49    <!-- Allow to query for the Launcher TestInfo on SDK 30+ -->
50    <uses-permission android:name="android.permission.QUERY_ALL_PACKAGES" />
51    <!-- Allow the test to write directly to /sdcard/ and connect to trace processor -->
52    <application android:requestLegacyExternalStorage="true"
53                 android:networkSecurityConfig="@xml/network_security_config"
54                 android:largeHeap="true">
55        <uses-library android:name="android.test.runner"/>
56        <uses-library android:name="androidx.window.extensions" android:required="false"/>
57
58        <!-- (b/197936012) Remove startup provider due to test timeout issue -->
59        <provider
60            android:name="androidx.startup.InitializationProvider"
61            android:authorities="${applicationId}.androidx-startup"
62            tools:node="remove" />
63    </application>
64
65    <instrumentation android:name="androidx.test.runner.AndroidJUnitRunner"
66                     android:targetPackage="com.android.server.wm.flicker"
67                     android:label="WindowManager Flicker Tests">
68    </instrumentation>
69</manifest>
70