AndroidManifest.xml revision d791b2ab61b96d0948128730d2fe47054a3c2bdd
1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (C) 2007 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        xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
19        package="com.android.telecomm"
20        coreApp="true"
21        android:sharedUserId="android.uid.phone">
22
23    <!-- Prevents the activity manager from delaying any activity-start
24         requests by this package, including requests immediately after
25         the user presses "home". -->
26    <uses-permission android:name="android.permission.BLUETOOTH" />
27    <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
28    <uses-permission android:name="android.permission.CALL_PRIVILEGED" />
29    <uses-permission android:name="android.permission.INTERACT_ACROSS_USERS_FULL" />
30    <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
31    <uses-permission android:name="android.permission.READ_CALL_LOG" />
32    <uses-permission android:name="android.permission.STOP_APP_SWITCHES" />
33    <uses-permission android:name="android.permission.VIBRATE" />
34    <uses-permission android:name="android.permission.WRITE_CALL_LOG" />
35
36    <!-- Declare which SDK level this application was built against. This is needed so that IDEs
37         can check for incompatible APIs. -->
38    <uses-sdk android:minSdkVersion="19" />
39
40    <application android:name="TelecommApp"
41            android:persistent="true"
42            android:label="@string/telecommAppLabel"
43            android:icon="@mipmap/ic_launcher_phone"
44            android:supportsRtl="true">
45
46        <!-- CALL vs CALL_PRIVILEGED vs CALL_EMERGENCY
47             We have three different intents through which a call can be initiated each with its
48             own behavior.
49             1) CALL - Expected from any third party app with CALL_PHONE permission. Through this
50             intent, an app can call any number except emergency numbers.
51             2) CALL_PRIVILEGED - Expected from the dialer app and requires CALL_PRIVILEGED
52             permission, which is only held by the system dialer and the emergency dialer at the
53             time of this writing. Through this intent, an app can call any number including
54             emergency numbers.
55             3) CALL_EMERGENCY - Expected from the emergency dialer app and requires CALL_PRIVILEGED
56             permission. Through this intent, an app can call *only* emergency numbers. -->
57
58        <!-- Activity that starts the outgoing call process by listening to CALL intent which
59             contain contact information in the intent's data. CallActivity handles any data
60             URL with the schemes "tel", "sip", and "voicemail". It also handles URLs linked to
61             contacts provider entries. Any data not fitting the schema described is ignored. -->
62        <activity android:name="CallActivity"
63                android:theme="@android:style/Theme.NoDisplay"
64                android:permission="android.permission.CALL_PHONE"
65                android:excludeFromRecents="true">
66            <!-- CALL action intent filters for the various ways of initiating an outgoing call. -->
67            <intent-filter>
68                <action android:name="android.intent.action.CALL" />
69                <category android:name="android.intent.category.DEFAULT" />
70                <data android:scheme="tel" />
71            </intent-filter>
72            <!-- Specify an icon for SIP calls so that quick contacts widget shows a special SIP
73                 icon for calls to SIP addresses. -->
74            <intent-filter android:icon="@drawable/ic_launcher_sip_call">
75                <action android:name="android.intent.action.CALL" />
76                <category android:name="android.intent.category.DEFAULT" />
77                <data android:scheme="sip" />
78            </intent-filter>
79            <intent-filter>
80                <action android:name="android.intent.action.CALL" />
81                <category android:name="android.intent.category.DEFAULT" />
82                <data android:scheme="voicemail" />
83            </intent-filter>
84            <!-- Omit default category below so that all Intents sent to this filter must be
85                 explicit. -->
86            <intent-filter>
87                <action android:name="android.intent.action.CALL" />
88                <data android:mimeType="vnd.android.cursor.item/phone" />
89                <data android:mimeType="vnd.android.cursor.item/phone_v2" />
90                <data android:mimeType="vnd.android.cursor.item/person" />
91            </intent-filter>
92        </activity>
93
94        <!-- Works like CallActivity with CALL_PRIVILEGED instead of CALL intent.
95             CALL_PRIVILEGED allows calls to emergency numbers unlike CALL which disallows it.
96             Intent-sender must have the CALL_PRIVILEGED permission or the broadcast will not be
97             processed. High priority of 1000 is used in all intent filters to prevent anything but
98             the system from processing this intent (b/8871505). -->
99        <activity-alias android:name="PrivilegedCallActivity"
100                android:targetActivity="CallActivity"
101                android:permission="android.permission.CALL_PRIVILEGED">
102            <intent-filter android:priority="1000">
103                <action android:name="android.intent.action.CALL_PRIVILEGED" />
104                <category android:name="android.intent.category.DEFAULT" />
105                <data android:scheme="tel" />
106            </intent-filter>
107            <intent-filter android:priority="1000"
108                    android:icon="@drawable/ic_launcher_sip_call">
109                <action android:name="android.intent.action.CALL_PRIVILEGED" />
110                <category android:name="android.intent.category.DEFAULT" />
111                <data android:scheme="sip" />
112            </intent-filter>
113            <intent-filter android:priority="1000">
114                <action android:name="android.intent.action.CALL_PRIVILEGED" />
115                <category android:name="android.intent.category.DEFAULT" />
116                <data android:scheme="voicemail" />
117            </intent-filter>
118            <intent-filter android:priority="1000">
119                <action android:name="android.intent.action.CALL_PRIVILEGED" />
120                <data android:mimeType="vnd.android.cursor.item/phone" />
121                <data android:mimeType="vnd.android.cursor.item/phone_v2" />
122                <data android:mimeType="vnd.android.cursor.item/person" />
123            </intent-filter>
124        </activity-alias>
125
126        <!-- Works like CallActivity with CALL_EMERGENCY instead of CALL intent.
127             CALL_EMERGENCY allows calls *only* to emergency numbers. Intent-sender must have the
128             CALL_PRIVILEGED permission or the broadcast will not be processed. High priority of
129             1000 is used in all intent filters to prevent anything but the system from processing
130             this intent (b/8871505). -->
131        <!-- TODO(santoscordon): Is there really a notion of an emergency SIP number? If not, can
132             that scheme be removed from this activity? -->
133        <activity-alias android:name="EmergencyCallActivity"
134                android:targetActivity="CallActivity"
135                android:permission="android.permission.CALL_PRIVILEGED">
136            <intent-filter android:priority="1000">
137                <action android:name="android.intent.action.CALL_EMERGENCY" />
138                <category android:name="android.intent.category.DEFAULT" />
139                <data android:scheme="tel" />
140            </intent-filter>
141            <intent-filter android:priority="1000"
142                    android:icon="@drawable/ic_launcher_sip_call">
143                <action android:name="android.intent.action.CALL_EMERGENCY" />
144                <category android:name="android.intent.category.DEFAULT" />
145                <data android:scheme="sip" />
146            </intent-filter>
147            <intent-filter android:priority="1000">
148                <action android:name="android.intent.action.CALL_EMERGENCY" />
149                <category android:name="android.intent.category.DEFAULT" />
150                <data android:scheme="voicemail" />
151            </intent-filter>
152            <intent-filter android:priority="1000">
153                <action android:name="android.intent.action.CALL_EMERGENCY" />
154                <data android:mimeType="vnd.android.cursor.item/phone" />
155                <data android:mimeType="vnd.android.cursor.item/phone_v2" />
156                <data android:mimeType="vnd.android.cursor.item/person" />
157            </intent-filter>
158        </activity-alias>
159
160        <activity-alias android:name="IncomingCallActivity"
161                android:targetActivity="CallActivity"
162                android:exported="true">
163            <intent-filter>
164                <action android:name="android.intent.action.INCOMING_CALL" />
165                <category android:name="android.intent.category.DEFAULT" />
166            </intent-filter>
167        </activity-alias>
168
169        <!-- Selects call services to place emergency calls. -->
170        <service android:name="EmergencyCallServiceSelector" android:exported="false" />
171
172        <receiver android:name="TelecommBroadcastReceiver" android:exported="false">
173            <intent-filter>
174                <action android:name="com.android.telecomm.ACTION_CALL_BACK_FROM_NOTIFICATION" />
175                <action android:name="com.android.telecomm.ACTION_CALL_BACK_FROM_NOTIFICATION" />
176                <action android:name="com.android.telecomm.ACTION_SEND_SMS_FROM_NOTIFICATION" />
177            </intent-filter>
178        </receiver>
179
180    </application>
181</manifest>
182