1<?xml version="1.0" encoding="utf-8"?>
2<!--
3  ~ Copyright (C) 2015 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:androidprv="http://schemas.android.com/apk/prv/res/android"
20     package="com.android.traceur"
21     android:versionCode="2"
22     android:versionName="1.0">
23    <uses-sdk android:minSdkVersion="26"
24         android:targetSdkVersion="31"/>
25
26    <!--- Used to query for Betterbug. -->
27    <uses-permission android:name="android.permission.QUERY_ALL_PACKAGES"/>
28
29    <!-- Used to trigger the trace start/stop service. -->
30    <uses-permission android:name="android.permission.START_FOREGROUND_SERVICES_FROM_BACKGROUND"/>
31
32    <!-- Used for receiving BUGREPORT_STARTED intents. -->
33    <uses-permission android:name="android.permission.DUMP"/>
34
35    <!-- Used to initialize tracing on boot. -->
36    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
37
38    <!-- Used to prevent non-system windows from displaying over Traceur. -->
39    <uses-permission android:name="android.permission.HIDE_NON_SYSTEM_OVERLAY_WINDOWS"/>
40
41    <!-- Used for adding the Quick Settings tile to the status bar. -->
42    <uses-permission android:name="android.permission.STATUS_BAR"/>
43
44    <!-- Used for brief periods where the trace service is foregrounded. -->
45    <uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
46
47    <!-- Declare Android TV support. -->
48    <uses-feature android:name="android.software.leanback"
49         android:required="false"/>
50
51    <!-- touch screen is not required for TV -->
52    <uses-feature android:name="android.hardware.touchscreen"
53         android:required="false"/>
54
55    <application android:label="@string/system_tracing"
56         android:banner="@drawable/banner"
57         android:icon="@drawable/ic_launcher_settings">
58
59        <activity android:name=".MainActivity"
60             android:description="@string/record_system_activity"
61             android:label="@string/system_tracing"
62             android:theme="@style/Theme.SubSettingsBase"
63             android:launchMode="singleTask"
64             android:exported="true">
65            <intent-filter>
66                <action android:name="android.intent.action.MAIN"/>
67                <category android:name="android.intent.category.INFO"/>
68            </intent-filter>
69            <intent-filter>
70                <action android:name="android.service.quicksettings.action.QS_TILE_PREFERENCES"/>
71            </intent-filter>
72
73            <!-- Mark this activity as a dynamic setting in the development category. -->
74            <intent-filter>
75                <action android:name="com.android.settings.action.IA_SETTINGS"/>
76            </intent-filter>
77            <meta-data android:name="com.android.settings.category"
78                 android:value="com.android.settings.category.ia.development"/>
79            <meta-data android:name="com.android.settings.summary"
80                 android:resource="@string/record_system_activity"/>
81            <meta-data android:name="com.android.settings.order"
82                 android:value="10"/>
83            <meta-data android:name="com.android.settings.profile"
84                 android:value="primary_profile_only"/>
85        </activity>
86
87        <activity android:name=".MainTvActivity"
88             android:description="@string/record_system_activity"
89             android:label="@string/system_tracing"
90             android:theme="@style/TvTheme"
91             android:launchMode="singleTask"
92             android:exported="true">
93            <intent-filter>
94                <action android:name="android.intent.action.MAIN"/>
95                <category android:name="android.intent.category.LEANBACK_LAUNCHER"/>
96                <category android:name="android.intent.category.INFO"/>
97            </intent-filter>
98        </activity>
99
100        <activity android:name=".UserConsentActivityDialog"
101             android:theme="@android:style/Theme.DeviceDefault.Light.Dialog.Alert"
102             android:finishOnCloseSystemDialogs="true"
103             android:excludeFromRecents="true"
104             android:exported="false"/>
105
106        <receiver android:name=".Receiver"
107             android:permission="android.permission.DUMP"
108             androidprv:systemUserOnly="true"
109             android:exported="true">
110            <intent-filter android:priority="2147483647">
111                <action android:name="android.intent.action.BOOT_COMPLETED"/>
112                <action android:name="com.android.internal.intent.action.BUGREPORT_STARTED"/>
113            </intent-filter>
114          </receiver>
115
116        <receiver android:name=".InternalReceiver"
117            androidprv:systemUserOnly="true"
118            android:exported="false">
119        </receiver>
120
121        <service android:name=".StopTraceService"
122             android:exported="true"/>
123
124        <service android:name=".TraceService"
125             android:exported="false"/>
126
127        <service android:name=".QsService"
128             android:enabled="false"
129             android:icon="@drawable/bugfood_icon"
130             android:label="@string/record_trace"
131             android:permission="android.permission.BIND_QUICK_SETTINGS_TILE"
132             android:exported="true">
133            <intent-filter>
134                <action android:name="android.service.quicksettings.action.QS_TILE"/>
135            </intent-filter>
136        </service>
137
138        <provider android:name="androidx.core.content.FileProvider"
139             android:authorities="com.android.traceur.files"
140             android:grantUriPermissions="true"
141             android:exported="false">
142            <meta-data android:name="android.support.FILE_PROVIDER_PATHS"
143                 android:resource="@xml/file_paths"/>
144        </provider>
145
146        <provider android:name=".StorageProvider"
147             android:enabled="false"
148             android:authorities="com.android.traceur.documents"
149             android:grantUriPermissions="true"
150             android:exported="true"
151             android:permission="android.permission.MANAGE_DOCUMENTS">
152            <intent-filter>
153              <action android:name="android.content.action.DOCUMENTS_PROVIDER"/>
154            </intent-filter>
155        </provider>
156
157        <provider android:name=".SearchProvider"
158             android:authorities="com.android.traceur"
159             android:multiprocess="false"
160             android:grantUriPermissions="true"
161             android:permission="android.permission.READ_SEARCH_INDEXABLES"
162             android:exported="true">
163            <intent-filter>
164                <action android:name="android.content.action.SEARCH_INDEXABLES_PROVIDER"/>
165            </intent-filter>
166        </provider>
167    </application>
168</manifest>
169