1<?xml version="1.0" encoding="utf-8"?>
2<!--
3** Copyright (C) 2018 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
19<manifest xmlns:android="http://schemas.android.com/apk/res/android"
20          package="com.android.car.notification">
21    <!-- Permission to show display overlay window for heads-up notifications -->
22    <uses-permission android:name="android.permission.INTERNAL_SYSTEM_WINDOW"/>
23    <!-- Permission to get the current user id to cancel a notification -->
24    <uses-permission android:name="android.permission.INTERACT_ACROSS_USERS"/>
25    <!-- Permission to get the current user id to cancel all notifications -->
26    <uses-permission android:name="android.permission.MANAGE_USERS"/>
27    <!-- Permission to get status if a user in on call -->
28    <uses-permission android:name="android.permission.READ_PRIVILEGED_PHONE_STATE"/>
29    <uses-permission android:name="android.permission.MODIFY_PHONE_STATE"/>
30
31    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
32    <!-- Permission to talk to the Status bar service which proxies the calls to remove
33                notifications to the notification service -->
34    <uses-permission android:name="android.permission.STATUS_BAR_SERVICE"/>
35    <!-- Permission to start a voice interaction service -->
36    <uses-permission android:name="android.permission.ACCESS_VOICE_INTERACTION_SERVICE"/>
37    <!-- Permission to check the ongoing foreground applications to throttle HeadsUp Notifications
38    when allowlist applications are in foreground -->
39    <uses-permission android:name="android.permission.MANAGE_ACTIVITY_TASKS"/>
40
41    <!-- Permission to query application package info to determine if sender package is a
42            system or privileged app -->
43    <uses-permission android:name="android.permission.QUERY_ALL_PACKAGES"/>
44
45    <!-- Permission to send notification when HUN is suppressed by the system -->
46    <uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
47
48    <!-- Permission needed to collapse panels using StatusBarService -->
49    <uses-permission android:name="android.permission.STATUS_BAR"/>
50
51    <application android:name=".NotificationApplication"
52                 android:label="@string/app_label"
53                 android:icon="@mipmap/ic_launcher">
54        <activity android:name=".CarNotificationCenterActivity"
55                  android:theme="@style/Theme.DeviceDefault.NoActionBar.Notification"
56                  android:launchMode="singleInstance"
57                  android:noHistory="true"
58                  android:exported="true"
59                  android:stateNotNeeded="true"
60                  android:excludeFromRecents="true">
61            <meta-data android:name="distractionOptimized"
62                       android:value="true"/>
63        </activity>
64        <service android:name=".CarNotificationListener"
65                 android:permission="android.permission.BIND_NOTIFICATION_LISTENER_SERVICE"
66                 android:directBootAware="true"
67                 android:exported="true">
68            <intent-filter>
69                <action android:name="android.service.notification.NotificationListenerService"/>
70            </intent-filter>
71        </service>
72    </application>
73</manifest>
74