<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:installLocation="auto">

    <uses-permission android:name="android.permission.READ_CONTACTS" />
    <uses-permission android:name="android.permission.WRITE_CONTACTS" />
    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
    <uses-permission android:name="android.permission.CALL_PHONE" />
    <uses-permission android:name="android.permission.CALL_PRIVILEGED" />
    <uses-permission android:name="android.permission.READ_CALL_LOG" />
    <uses-permission android:name="android.permission.WRITE_CALL_LOG" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />
    <uses-permission android:name="android.permission.ANSWER_PHONE_CALLS" />
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
    <uses-permission android:name="android.permission.MANAGE_OWN_CALLS" />
    <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
    <uses-permission android:name="android.permission.RECORD_AUDIO" />
    <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
    <uses-permission android:name="android.telecom.action.CONFIGURE_PHONE_ACCOUNT" />
    <uses-permission android:name="android.permission.VIBRATE" />
    <uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
    <uses-permission android:name="android.permission.READ_SYNC_SETTINGS" />

    <uses-permission
        android:name="android.permission.WRITE_EXTERNAL_STORAGE"
        android:maxSdkVersion="28" />

    <uses-permission
        android:name="android.permission.USE_FINGERPRINT"
        tools:node="remove" />

    <queries>
        <package android:name="com.simplemobiletools.contacts.pro.debug" />
        <package android:name="com.simplemobiletools.contacts.pro" />
    </queries>

    <application
        android:name=".App"
        android:allowBackup="true"
        android:appCategory="productivity"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_launcher_name"
        android:localeConfig="@xml/locale_config"
        android:roundIcon="@mipmap/ic_launcher"
        android:theme="@style/AppTheme">

        <activity
            android:name=".activities.SplashActivity"
            android:exported="false"
            android:theme="@style/SplashTheme" />

        <activity
            android:name=".activities.MainActivity"
            android:configChanges="orientation|screenSize"
            android:exported="true">

            <intent-filter>
                <action android:name="android.intent.action.VIEW" />
                <data android:mimeType="vnd.android.cursor.dir/calls" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>

        <activity
            android:name="com.simplemobiletools.commons.activities.AboutActivity"
            android:configChanges="orientation"
            android:exported="false"
            android:label="@string/about"
            android:parentActivityName=".activities.MainActivity" />

        <activity
            android:name="com.simplemobiletools.commons.activities.CustomizationActivity"
            android:configChanges="orientation"
            android:exported="false"
            android:label="@string/customize_colors"
            android:parentActivityName=".activities.SettingsActivity" />

        <activity
            android:name="com.simplemobiletools.commons.activities.ManageBlockedNumbersActivity"
            android:configChanges="orientation"
            android:exported="false"
            android:label="@string/blocked_numbers"
            android:parentActivityName=".activities.SettingsActivity"
            tools:replace="android:label" />

        <activity
            android:name=".activities.ManageSpeedDialActivity"
            android:configChanges="orientation"
            android:exported="false"
            android:label="@string/speed_dial"
            android:parentActivityName=".activities.SettingsActivity" />

        <activity
            android:name=".activities.ConferenceActivity"
            android:configChanges="orientation"
            android:exported="false"
            android:label="@string/conference"
            android:parentActivityName=".activities.CallActivity" />

        <activity
            android:name=".activities.SettingsActivity"
            android:configChanges="orientation"
            android:exported="true"
            android:label="@string/settings"
            android:parentActivityName=".activities.MainActivity">

            <intent-filter>
                <action android:name="android.intent.action.APPLICATION_PREFERENCES" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>

        <activity
            android:name=".activities.CallActivity"
            android:excludeFromRecents="true"
            android:exported="false"
            android:label="@string/ongoing_call"
            android:launchMode="singleTask"
            android:screenOrientation="portrait"
            android:showOnLockScreen="true" />

        <activity
            android:name=".activities.DialpadActivity"
            android:exported="true"
            android:label="@string/dialpad"
            android:parentActivityName=".activities.MainActivity"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="stateHidden">

            <intent-filter>
                <action android:name="android.intent.action.DIAL" />
                <category android:name="android.intent.category.DEFAULT" />

                <data android:scheme="tel" />
            </intent-filter>

            <intent-filter>
                <action android:name="android.intent.action.DIAL" />

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

            <intent-filter>
                <action android:name="android.intent.action.VIEW" />
                <action android:name="android.intent.action.DIAL" />

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

                <data android:scheme="tel" />
            </intent-filter>
        </activity>

        <activity
            android:name=".activities.DialerActivity"
            android:configChanges="orientation"
            android:exported="true"
            android:label="@string/dialer"
            android:theme="@style/Theme.Transparent">

            <intent-filter>
                <action android:name="android.intent.action.CALL" />
                <category android:name="android.intent.category.DEFAULT" />

                <data android:scheme="tel" />
            </intent-filter>
        </activity>

        <service
            android:name=".services.CallService"
            android:enabled="true"
            android:exported="true"
            android:permission="android.permission.BIND_INCALL_SERVICE">
            <meta-data
                android:name="android.telecom.IN_CALL_SERVICE_UI"
                android:value="true" />

            <intent-filter>
                <action android:name="android.telecom.InCallService" />
            </intent-filter>
        </service>

        <service
            android:name=".services.SimpleCallScreeningService"
            android:exported="true"
            android:permission="android.permission.BIND_SCREENING_SERVICE">
            <intent-filter>
                <action android:name="android.telecom.CallScreeningService" />
            </intent-filter>
        </service>

        <receiver
            android:name=".receivers.CallActionReceiver"
            android:enabled="true"
            android:exported="true">
            <intent-filter>
                <action android:name="com.simplemobiletools.dialer.action.ACCEPT_CALL" />
                <action android:name="com.simplemobiletools.dialer.action.DECLINE_CALL" />
            </intent-filter>
        </receiver>

        <activity-alias
            android:name=".activities.SplashActivity.Red"
            android:enabled="false"
            android:exported="true"
            android:icon="@mipmap/ic_launcher_red"
            android:roundIcon="@mipmap/ic_launcher_red"
            android:targetActivity=".activities.SplashActivity">

            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity-alias>

        <activity-alias
            android:name=".activities.SplashActivity.Pink"
            android:enabled="false"
            android:exported="true"
            android:icon="@mipmap/ic_launcher_pink"
            android:roundIcon="@mipmap/ic_launcher_pink"
            android:targetActivity=".activities.SplashActivity">

            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity-alias>

        <activity-alias
            android:name=".activities.SplashActivity.Purple"
            android:enabled="false"
            android:exported="true"
            android:icon="@mipmap/ic_launcher_purple"
            android:roundIcon="@mipmap/ic_launcher_purple"
            android:targetActivity=".activities.SplashActivity">

            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity-alias>

        <activity-alias
            android:name=".activities.SplashActivity.Deep_purple"
            android:enabled="false"
            android:exported="true"
            android:icon="@mipmap/ic_launcher_deep_purple"
            android:roundIcon="@mipmap/ic_launcher_deep_purple"
            android:targetActivity=".activities.SplashActivity">

            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity-alias>

        <activity-alias
            android:name=".activities.SplashActivity.Indigo"
            android:enabled="false"
            android:exported="true"
            android:icon="@mipmap/ic_launcher_indigo"
            android:roundIcon="@mipmap/ic_launcher_indigo"
            android:targetActivity=".activities.SplashActivity">

            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity-alias>

        <activity-alias
            android:name=".activities.SplashActivity.Blue"
            android:enabled="false"
            android:exported="true"
            android:icon="@mipmap/ic_launcher_blue"
            android:roundIcon="@mipmap/ic_launcher_blue"
            android:targetActivity=".activities.SplashActivity">

            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity-alias>

        <activity-alias
            android:name=".activities.SplashActivity.Light_blue"
            android:enabled="false"
            android:exported="true"
            android:icon="@mipmap/ic_launcher_light_blue"
            android:roundIcon="@mipmap/ic_launcher_light_blue"
            android:targetActivity=".activities.SplashActivity">

            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity-alias>

        <activity-alias
            android:name=".activities.SplashActivity.Cyan"
            android:enabled="false"
            android:exported="true"
            android:icon="@mipmap/ic_launcher_cyan"
            android:roundIcon="@mipmap/ic_launcher_cyan"
            android:targetActivity=".activities.SplashActivity">

            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity-alias>

        <activity-alias
            android:name=".activities.SplashActivity.Teal"
            android:enabled="false"
            android:exported="true"
            android:icon="@mipmap/ic_launcher_teal"
            android:roundIcon="@mipmap/ic_launcher_teal"
            android:targetActivity=".activities.SplashActivity">

            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity-alias>

        <activity-alias
            android:name=".activities.SplashActivity.Green"
            android:enabled="false"
            android:exported="true"
            android:icon="@mipmap/ic_launcher_green"
            android:roundIcon="@mipmap/ic_launcher_green"
            android:targetActivity=".activities.SplashActivity">

            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity-alias>

        <activity-alias
            android:name=".activities.SplashActivity.Light_green"
            android:enabled="false"
            android:exported="true"
            android:icon="@mipmap/ic_launcher_light_green"
            android:roundIcon="@mipmap/ic_launcher_light_green"
            android:targetActivity=".activities.SplashActivity">

            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity-alias>

        <activity-alias
            android:name=".activities.SplashActivity.Lime"
            android:enabled="false"
            android:exported="true"
            android:icon="@mipmap/ic_launcher_lime"
            android:roundIcon="@mipmap/ic_launcher_lime"
            android:targetActivity=".activities.SplashActivity">

            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity-alias>

        <activity-alias
            android:name=".activities.SplashActivity.Yellow"
            android:enabled="false"
            android:exported="true"
            android:icon="@mipmap/ic_launcher_yellow"
            android:roundIcon="@mipmap/ic_launcher_yellow"
            android:targetActivity=".activities.SplashActivity">

            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity-alias>

        <activity-alias
            android:name=".activities.SplashActivity.Amber"
            android:enabled="false"
            android:exported="true"
            android:icon="@mipmap/ic_launcher_amber"
            android:roundIcon="@mipmap/ic_launcher_amber"
            android:targetActivity=".activities.SplashActivity">

            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity-alias>

        <activity-alias
            android:name=".activities.SplashActivity.Orange"
            android:enabled="true"
            android:exported="true"
            android:icon="@mipmap/ic_launcher"
            android:roundIcon="@mipmap/ic_launcher"
            android:targetActivity=".activities.SplashActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity-alias>

        <activity-alias
            android:name=".activities.SplashActivity.Deep_orange"
            android:enabled="false"
            android:exported="true"
            android:icon="@mipmap/ic_launcher_deep_orange"
            android:roundIcon="@mipmap/ic_launcher_deep_orange"
            android:targetActivity=".activities.SplashActivity">

            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity-alias>

        <activity-alias
            android:name=".activities.SplashActivity.Brown"
            android:enabled="false"
            android:exported="true"
            android:icon="@mipmap/ic_launcher_brown"
            android:roundIcon="@mipmap/ic_launcher_brown"
            android:targetActivity=".activities.SplashActivity">

            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity-alias>

        <activity-alias
            android:name=".activities.SplashActivity.Blue_grey"
            android:enabled="false"
            android:exported="true"
            android:icon="@mipmap/ic_launcher_blue_grey"
            android:roundIcon="@mipmap/ic_launcher_blue_grey"
            android:targetActivity=".activities.SplashActivity">

            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity-alias>

        <activity-alias
            android:name=".activities.SplashActivity.Grey_black"
            android:enabled="false"
            android:exported="true"
            android:icon="@mipmap/ic_launcher_grey_black"
            android:roundIcon="@mipmap/ic_launcher_grey_black"
            android:targetActivity=".activities.SplashActivity">

            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity-alias>
    </application>
</manifest>
