<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2023 The Android Open Source Project
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~      http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.android.car.carlauncher">

    <!-- System permission to query all installed packages -->
    <uses-permission android:name="android.permission.QUERY_ALL_PACKAGES"/>

    <!-- Permission to allow drag surface control to be transferred from DragEvent. -->
    <uses-permission android:name="android.permission.START_TASKS_FROM_RECENTS"/>
    <uses-permission android:name="android.permission.MEDIA_CONTENT_CONTROL"/>
    <!-- System permission to query users on device -->
    <uses-permission android:name="android.permission.MANAGE_USERS"/>
    <uses-permission android:name="android.permission.MEDIA_CONTENT_CONTROL"/>
    <uses-permission android:name="android.permission.INTERACT_ACROSS_USERS_FULL"/>

    <!-- Permission to allow broadcasting events to the dock -->
    <uses-permission android:name="com.android.car.docklib.permission.BROADCAST_SENDER" />

    <application>

        <!--TODO (b/301667893): Remove the Activities and its CarLauncher specific code, once we are
           able to provide a Fragment for AppGrid-->
        <activity
            android:name="com.android.car.carlauncher.AppGridActivity"
            android:launchMode="singleInstance"
            android:windowSoftInputMode="adjustPan"
            android:exported="true"
            android:theme="@style/Theme.Launcher.AppGridActivity"
            android:excludeFromRecents="true">
            <meta-data android:name="distractionOptimized" android:value="true"/>
            <intent-filter>
                <action android:name="com.android.car.carlauncher.ACTION_APP_GRID"/>
                <category android:name="android.intent.category.DEFAULT"/>
            </intent-filter>
        </activity>

        <activity android:name="com.android.car.carlauncher.ResetLauncherActivity"
            android:theme="@style/ActionDialogTheme"
            android:excludeFromRecents="true"
            android:exported="true"
            android:launchMode="singleInstance">
            <intent-filter>
                <action android:name="com.android.settings.action.EXTRA_SETTINGS"/>
                <category android:name="android.intent.category.DEFAULT"/>
            </intent-filter>
            <meta-data
                android:name="com.android.settings.title"
                android:resource="@string/reset_appgrid_title"/>
            <meta-data
                android:name="com.android.settings.category"
                android:value="com.android.settings.category.ia.apps"/>
        </activity>

    </application>

</manifest>
