• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="utf-8"?>
2<!--
3  ~ Copyright (C) 2021 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
19    xmlns:android="http://schemas.android.com/apk/res/android"
20    xmlns:tools="http://schemas.android.com/tools"
21    package="com.android.emergency.action">
22
23    <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
24    <uses-permission android:name="android.permission.FOREGROUND_SERVICE_SPECIAL_USE" />
25    <uses-permission android:name="android.permission.CALL_PHONE"/>
26    <uses-permission android:name="android.permission.CALL_PRIVILEGED"/>
27    <uses-permission android:name="android.permission.READ_PHONE_STATE"/>
28    <uses-permission android:name="android.permission.READ_PRIVILEGED_PHONE_STATE"/>
29    <uses-permission android:name="android.permission.START_ACTIVITIES_FROM_BACKGROUND" />
30    <uses-permission android:name="android.permission.VIBRATE" />
31
32    <application
33        android:appComponentFactory="androidx.core.app.CoreComponentFactory"
34        tools:replace="android:appComponentFactory">
35
36        <activity-alias android:name=".action.EmergencyAction"
37                        android:label="@string/emergency_action_title"
38                        android:targetActivity=".action.EmergencyActionActivity"
39                        android:permission="android.permission.MANAGE_SENSOR_PRIVACY"
40                        android:directBootAware="true"
41                        android:enabled="true"
42                        android:exported="true">
43
44            <intent-filter>
45                <action android:name="com.android.systemui.action.LAUNCH_EMERGENCY"/>
46                <category android:name="android.intent.category.DEFAULT" />
47            </intent-filter>
48        </activity-alias>
49
50        <activity
51            android:name=".action.EmergencyActionActivity"
52            android:label="@string/emergency_action_title"
53            android:theme="@style/AppThemeEmergencyAction"
54            android:directBootAware="true"
55            android:showWhenLocked="true"
56            android:turnScreenOn="true"
57            android:noHistory="true"
58            android:excludeFromRecents="true"
59            android:exported="false"/>
60
61        <service
62            android:name=".action.service.EmergencyActionForegroundService"
63            android:directBootAware="true"
64            android:foregroundServiceType="specialUse"
65            android:exported="false">
66            <property android:name="android.app.PROPERTY_SPECIAL_USE_FGS_SUBTYPE" android:value="com.android.emergency" />
67        </service>
68
69        <receiver
70            android:name=".action.broadcast.EmergencyActionBroadcastReceiver"
71            android:exported="false">
72            <intent-filter>
73                <action android:name="com.android.emergency.broadcast.MAKE_EMERGENCY_CALL" />
74                <action android:name="com.android.emergency.broadcast.CANCEL_EMERGENCY_COUNTDOWN" />
75            </intent-filter>
76        </receiver>
77
78    </application>
79</manifest>
80