<?xml version="1.0" encoding="utf-8"?>
<!--
    Copyright 2019 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"
          android:versionCode="290000000"
          android:versionName="2019-09"
          package="com.google.android.angle">

    <uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS" />
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />

    <uses-sdk android:minSdkVersion="29"
              android:targetSdkVersion="29">
    </uses-sdk>

    <application android:label="Android System Angle"
                 android:icon="@drawable/icon"
                 android:extractNativeLibs="false"
                 android:multiArch="true">

        <activity android:name=".MainActivity"
                  android:label="@string/angle_preferences"
                  android:description="@string/angle_preferences_summary"
                  android:theme="@style/Theme.Settings"
                  android:launchMode="singleTask">
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.INFO"/>
            </intent-filter>

            <!-- Indicate that this PKG is ANGLE. -->
            <intent-filter android:priority="1">
                <action android:name="android.app.action.ANGLE_FOR_ANDROID" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>

            <intent-filter>
                <action android:name="android.service.quicksettings.action.QS_TILE_PREFERENCES" />
            </intent-filter>

            <!-- Mark this fragment as a dynamic setting in the development category. -->
            <intent-filter>
                <action android:name="com.android.settings.action.IA_SETTINGS" />
            </intent-filter>
            <meta-data android:name="com.android.settings.category"
                       android:value="com.android.settings.category.ia.development" />
            <meta-data android:name="com.android.settings.summary" android:resource="@string/angle_preferences_summary" />
            <meta-data android:name="com.android.settings.order" android:value="20" />
            <meta-data android:name="com.android.settings.profile" android:value="primary_profile_only" />
        </activity>

        <receiver android:name="com.android.angle.common.Receiver"
                  android:directBootAware="true">
            <intent-filter>
                <action android:name="android.intent.action.BOOT_COMPLETED" />
                <action android:name="android.intent.action.MY_PACKAGE_REPLACED" />
                <action android:name="android.app.action.ANGLE_FOR_ANDROID_TOAST_MESSAGE" />
            </intent-filter>
        </receiver>

        <provider
            android:name="com.android.angle.common.SearchProvider"
            android:authorities="com.google.android.angle"
            android:multiprocess="false"
            android:grantUriPermissions="true"
            android:permission="android.permission.READ_SEARCH_INDEXABLES"
            android:exported="true">
            <intent-filter>
                <action android:name="android.content.action.SEARCH_INDEXABLES_PROVIDER" />
            </intent-filter>
        </provider>
    </application>
</manifest>
