<?xml version="1.0" encoding="utf-8"?>

<!--
  ~ Aurora Store
  ~ Copyright (C) 2019, Rahul Kumar Patel <whyorean@gmail.com>
  ~
  ~ Aurora Store is free software: you can redistribute it and/or modify
  ~ it under the terms of the GNU General Public License as published by
  ~ the Free Software Foundation, either version 2 of the License, or
  ~ (at your option) any later version.
  ~
  ~ Aurora Store is distributed in the hope that it will be useful,
  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  ~ GNU General Public License for more details.
  ~
  ~ You should have received a copy of the GNU General Public License
  ~ along with Aurora Store.  If not, see <http://www.gnu.org/licenses/>.
  ~
  ~
  -->

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="com.aurora.store">

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
    <uses-permission android:name="android.permission.REQUEST_DELETE_PACKAGES" />
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />

    <uses-permission
        android:name="android.permission.INSTALL_PACKAGES"
        tools:ignore="ProtectedPermissions" />

    <uses-permission
        android:name="android.permission.READ_LOGS"
        tools:ignore="ProtectedPermissions" />

    <uses-permission
        android:name="android.permission.ACCESS_MOCK_LOCATION"
        tools:ignore="MockLocation,ProtectedPermissions" />

    <uses-feature
        android:name="android.hardware.location.gps"
        android:required="false" />

    <uses-feature
        android:name="android.software.leanback"
        android:required="false" />

    <uses-feature
        android:name="android.hardware.touchscreen"
        android:required="false" />

    <application
        android:name=".AuroraApplication"
        android:allowBackup="true"
        android:allowClearUserData="true"
        android:banner="@mipmap/ic_launcher"
        android:fullBackupContent="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:requestLegacyExternalStorage="true"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/AppTheme"
        android:usesCleartextTraffic="true"
        tools:ignore="GoogleAppIndexingWarning"
        tools:targetApi="q">

        <activity
            android:name=".ui.main.AuroraActivity"
            android:configChanges="keyboardHidden|locale|orientation|fontScale">

        </activity>
        <activity
            android:name=".ui.details.DetailsActivity"
            android:configChanges="keyboardHidden|locale|orientation|fontScale"
            android:launchMode="singleTask">
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />

                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />

                <data
                    android:host="details"
                    android:scheme="market" />
            </intent-filter>
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />

                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />

                <data android:scheme="http" />
                <data android:scheme="https" />
                <data android:host="play.google.com" />
                <data android:host="market.android.com" />
                <data android:path="/store/apps/details" />
            </intent-filter>
        </activity>

        <activity
            android:name=".ui.single.activity.FullscreenImageActivity"
            android:configChanges="keyboardHidden|locale|orientation|fontScale" />
        <activity
            android:name=".ui.single.activity.DownloadsActivity"
            android:configChanges="keyboardHidden|locale|orientation|fontScale" />
        <activity
            android:name=".ui.accounts.AccountsActivity"
            android:configChanges="keyboardHidden|locale|orientation|fontScale" />
        <activity
            android:name=".ui.preference.SettingsActivity"
            android:configChanges="locale|orientation|fontScale"
            android:theme="@style/AppTheme" />
        <activity
            android:name=".ui.intro.IntroActivity"
            android:configChanges="keyboardHidden|locale|orientation|fontScale" />
        <activity
            android:name=".ui.single.activity.ManualDownloadActivity"
            android:configChanges="keyboardHidden|locale|orientation|fontScale" />
        <activity
            android:name=".ui.single.activity.DeviceInfoActivity"
            android:configChanges="keyboardHidden|locale|orientation|fontScale" />
        <activity
            android:name=".ui.single.activity.GoogleLoginActivity"
            android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode" />
        <activity android:name=".ui.single.activity.SplashActivity">
            <intent-filter>
                <category android:name="android.intent.category.LAUNCHER" />
                <category android:name="android.intent.category.LEANBACK_LAUNCHER" />

                <action android:name="android.intent.action.MAIN" />
            </intent-filter>
        </activity>
        <activity
            android:name=".ui.search.activity.SearchActivity"
            android:launchMode="singleTop">
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />

                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />

                <data
                    android:host="search"
                    android:scheme="market" />
            </intent-filter>
            <intent-filter>
                <action android:name="android.intent.action.SEARCH" />
            </intent-filter>
        </activity>

        <activity android:name=".ui.search.activity.SearchResultActivity" />
        <activity android:name=".ui.category.CategoryAppsActivity" />
        <activity android:name=".ui.installed.InstalledAppActivity" />
        <activity android:name=".ui.single.activity.GenericActivity" />
        <activity android:name=".ui.devapps.DevAppsActivity" />
        <activity android:name=".ui.details.ReviewsActivity" />
        <activity android:name=".ui.details.ReadMoreActivity" />

        <activity
            android:name=".report.AcraErrorActivity"
            android:excludeFromRecents="true"
            android:finishOnTaskLaunch="true"
            android:launchMode="singleInstance" />
        <activity android:name=".ui.spoof.GenericSpoofActivity" />

        <provider
            android:name="androidx.core.content.FileProvider"
            android:authorities="${applicationId}.fileProvider"
            android:exported="false"
            android:grantUriPermissions="true">
            <meta-data
                android:name="android.support.FILE_PROVIDER_PATHS"
                android:resource="@xml/paths" />
        </provider>

        <receiver android:name=".receiver.InstallReceiver" />
        <receiver android:name=".receiver.DownloadCancelReceiver" />
        <receiver android:name=".receiver.DownloadPauseReceiver" />
        <receiver android:name=".receiver.DownloadResumeReceiver" />
        <receiver android:name=".receiver.UpdatesReceiver" />
        <receiver
            android:name=".receiver.BootReceiver"
            android:enabled="true"
            android:exported="true">
            <intent-filter>
                <action android:name="android.intent.action.BOOT_COMPLETED" />
            </intent-filter>
        </receiver>

        <service android:name=".installer.InstallerService" />
        <service android:name=".service.SelfUpdateService" />
        <service android:name=".service.BulkUpdateService" />
        <service android:name=".service.NotificationService" />
    </application>
</manifest>