1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (C) 2016 The Android Open Source Project
3
4     Licensed under the Apache License, Version 2.0 (the "License");
5     you may not use this file except in compliance with the License.
6     You may obtain a copy of the License at
7
8          http://www.apache.org/licenses/LICENSE-2.0
9
10     Unless required by applicable law or agreed to in writing, software
11     distributed under the License is distributed on an "AS IS" BASIS,
12     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13     See the License for the specific language governing permissions and
14     limitations under the License.
15-->
16
17<manifest xmlns:android="http://schemas.android.com/apk/res/android"
18     package="com.android.cts.ephemeralapp1">
19    <uses-sdk android:minSdkVersion="24"
20         android:targetSdkVersion="26"/>
21
22    <uses-permission android:name="com.android.alarm.permission.SET_ALARM"/>
23    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
24    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
25    <uses-permission android:name="android.permission.CAMERA"/>
26    <uses-permission android:name="android.permission.INSTANT_APP_FOREGROUND_SERVICE"/>
27    <uses-permission android:name="android.permission.INTERNET"/>
28    <uses-permission android:name="android.permission.RECORD_AUDIO"/>
29    <uses-permission android:name="android.permission.READ_PHONE_NUMBERS"/>
30    <uses-permission android:name="android.permission.VIBRATE"/>
31    <uses-permission android:name="android.permission.WAKE_LOCK"/>
32
33    <application android:label="@string/app_name">
34        <uses-library android:name="android.test.runner"/>
35        <activity android:name=".EphemeralActivity"
36             android:theme="@android:style/Theme.NoDisplay"
37             android:exported="true">
38            <!-- TEST: normal app can start w/o knowing about this activity -->
39            <intent-filter android:autoVerify="true">
40                <action android:name="android.intent.action.VIEW"/>
41                <category android:name="android.intent.category.DEFAULT"/>
42                <category android:name="android.intent.category.BROWSABLE"/>
43                <data android:scheme="https"/>
44                <data android:host="cts.google.com"/>
45                <data android:path="/ephemeral"/>
46            </intent-filter>
47            <!-- TEST: ephemeral apps can see this activity using query methods -->
48            <!-- TEST: normal apps can't see this activity using query methods -->
49            <intent-filter android:priority="0">
50                <action android:name="com.android.cts.ephemeraltest.QUERY"/>
51                <category android:name="android.intent.category.DEFAULT"/>
52            </intent-filter>
53            <!-- TEST: ephemeral apps can start this activity using directed intent -->
54            <!-- TEST: normal apps can't start this activity using directed intent -->
55            <intent-filter android:priority="0">
56                <action android:name="com.android.cts.ephemeraltest.START_EPHEMERAL"/>
57                <category android:name="android.intent.category.DEFAULT"/>
58            </intent-filter>
59            <intent-filter>
60                <action android:name="android.intent.action.SEARCH"/>
61            </intent-filter>
62            <meta-data android:name="default-url"
63                 android:value="https://ephemeralapp1.cts.android.com/search"/>
64            <meta-data android:name="android.app.searchable"
65                 android:resource="@xml/searchable"/>
66        </activity>
67        <activity android:name=".EphemeralResult"
68             android:theme="@android:style/Theme.NoDisplay"
69             android:exported="true">
70            <!-- TEST: allow sending results from other instant apps -->
71            <intent-filter android:autoVerify="true">
72                <action android:name="android.intent.action.VIEW"/>
73                <category android:name="android.intent.category.DEFAULT"/>
74                <category android:name="android.intent.category.BROWSABLE"/>
75                <data android:scheme="https"/>
76                <data android:host="cts.google.com"/>
77                <data android:path="/result"/>
78            </intent-filter>
79        </activity>
80        <provider android:name=".SearchSuggestionProvider"
81             android:authorities="com.android.cts.ephemeralapp1.Search"/>
82
83        <activity android:name=".EphemeralActivity2"
84             android:theme="@android:style/Theme.NoDisplay"
85             android:exported="true">
86            <!-- TEST: ephemeral apps can start this activity using directed intent -->
87            <!-- TEST: normal apps can't start this activity using directed intent -->
88            <intent-filter android:priority="0">
89                <action android:name="com.android.cts.ephemeraltest.START_EPHEMERAL_PRIVATE"/>
90                <category android:name="android.intent.category.DEFAULT"/>
91            </intent-filter>
92        </activity>
93        <activity android:name=".EphemeralActivity3"
94             android:theme="@android:style/Theme.NoDisplay">
95            <!-- TEST: ephemeral apps can start this activity using directed intent -->
96        </activity>
97        <activity android:name=".WebViewTestActivity"/>
98        <service android:name=".EphemeralService"
99             android:exported="true">
100            <!-- TEST: ephemeral apps can see this service using query methods -->
101            <intent-filter android:priority="0">
102                <action android:name="com.android.cts.ephemeraltest.QUERY"/>
103                <category android:name="android.intent.category.DEFAULT"/>
104            </intent-filter>
105            <!-- TEST: ephemeral apps can start this service using directed intent -->
106            <intent-filter android:priority="-10">
107                <action android:name="com.android.cts.ephemeraltest.START_EPHEMERAL"/>
108                <category android:name="android.intent.category.DEFAULT"/>
109            </intent-filter>
110        </service>
111
112        <provider android:name=".EphemeralProvider"
113             android:authorities="com.android.cts.ephemeralapp1.provider"
114             android:exported="true">
115            <intent-filter android:priority="0">
116                <action android:name="com.android.cts.ephemeraltest.QUERY"/>
117            </intent-filter>
118        </provider>
119        <service android:name=".SomeService"/>
120
121        <activity android:name=".StartForResultActivity"
122             android:exported="false"/>
123
124    </application>
125
126    <instrumentation android:name="androidx.test.runner.AndroidJUnitRunner"
127         android:targetPackage="com.android.cts.ephemeralapp1"/>
128</manifest>
129