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

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission
        android:name="android.permission.BATTERY_STATS"
        tools:ignore="ProtectedPermissions" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission
        android:name="android.permission.MANAGE_EXTERNAL_STORAGE"
        tools:ignore="ScopedStorage" />
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE_DATA_SYNC" />
    <uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />
    <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />

    <application
        android:name=".MyApplication"
        android:allowBackup="true"
        android:dataExtractionRules="@xml/data_extraction_rules"
        android:fullBackupContent="@xml/backup_rules"
        android:icon="@mipmap/logo"
        android:label="@string/app_name"
        android:requestLegacyExternalStorage="true"
        android:supportsRtl="true"
        android:theme="@style/Theme.AppTheme"
        tools:targetApi="31">
        <activity
            android:name=".ui.splash.SplashActivity"
            android:exported="true"
            android:screenOrientation="portrait"
            android:theme="@style/splash.theme"
            tools:ignore="DiscouragedApi,LockedOrientationActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name=".ui.main.MainActivity"
            android:exported="false"
            android:screenOrientation="portrait"
            tools:ignore="DiscouragedApi,LockedOrientationActivity" />

        <activity
            android:name=".ui.guide.CleanGuideActivity"
            android:exported="false"
            android:screenOrientation="portrait"
            tools:ignore="DiscouragedApi,LockedOrientationActivity" />
        <activity
            android:name=".ui.guide.GuideActivity"
            android:exported="false"
            android:screenOrientation="portrait"
            tools:ignore="DiscouragedApi,LockedOrientationActivity" />
        <activity
            android:name=".ui.guide.GuideCleanActivity"
            android:exported="false"
            android:screenOrientation="portrait"
            tools:ignore="DiscouragedApi,LockedOrientationActivity" />
        <activity
            android:name=".ui.batteryinfo.BatteryInfoActivity"
            android:screenOrientation="portrait"
            tools:ignore="DiscouragedApi,LockedOrientationActivity" />
        <activity
            android:name=".ui.clean.JunkCleanActivity"
            android:exported="false"
            android:screenOrientation="portrait"
            tools:ignore="DiscouragedApi,LockedOrientationActivity" />
        <activity
            android:name=".ui.cleanresult.CleanResultActivity"
            android:exported="false"
            android:screenOrientation="portrait"
            tools:ignore="DiscouragedApi,LockedOrientationActivity" />
        <activity
            android:name=".ui.largefile.LargeFileCleanActivity"
            android:exported="false"
            android:screenOrientation="portrait"
            tools:ignore="DiscouragedApi,LockedOrientationActivity" />
        <activity
            android:name=".ui.screenshot.ScreenshotCleanActivity"
            android:exported="false"
            android:screenOrientation="portrait"
            tools:ignore="DiscouragedApi,LockedOrientationActivity" />
        <activity
            android:name=".ui.similar.SimilarPhotosActivity"
            android:exported="false"
            android:screenOrientation="portrait"
            tools:ignore="DiscouragedApi,LockedOrientationActivity" />
        <activity
            android:name=".ui.photocompression.PhotoCompressionActivity"
            android:exported="false"
            android:screenOrientation="portrait"
            tools:ignore="DiscouragedApi,LockedOrientationActivity" />
        <activity
            android:name=".ui.recovery.FileScanResultActivity"
            android:screenOrientation="portrait"
            tools:ignore="DiscouragedApi,LockedOrientationActivity" />
        <activity
            android:name=".ui.recovery.FileRecoveredActivity"
            android:screenOrientation="portrait"
            tools:ignore="DiscouragedApi,LockedOrientationActivity" />
        <activity
            android:name=".ui.recovery.FileRecoveryActivity"
            android:screenOrientation="portrait"
            tools:ignore="DiscouragedApi,LockedOrientationActivity" />
        <activity
            android:name=".ui.set.SettingActivity"
            android:exported="false"
            android:screenOrientation="portrait"
            tools:ignore="DiscouragedApi,LockedOrientationActivity" />
        <activity
            android:name=".ui.photocompression.PhotoCompressionDetailActivity"
            android:exported="false"
            android:screenOrientation="portrait"
            tools:ignore="DiscouragedApi,LockedOrientationActivity" />
        <activity
            android:name=".ui.recyclebin.RecycleBinDetailActivity"
            android:exported="false"
            android:screenOrientation="portrait"
            tools:ignore="DiscouragedApi,LockedOrientationActivity" />

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

        <receiver
            android:name=".business.push.receiver.AlarmReceiver"
            android:enabled="true"
            android:exported="true"
            android:permission="android.permission.RECEIVE_BOOT_COMPLETED">
            <intent-filter>
                <action android:name="android.intent.action.USER_PRESENT" />
                <action android:name="android.intent.action.BOOT_COMPLETED" />
                <action android:name="android.intent.action.ACTION_POWER_CONNECTED" />
                <action android:name="android.intent.action.ACTION_POWER_DISCONNECTED" />
            </intent-filter>
            <intent-filter>
                <action android:name="android.intent.action.PACKAGE_ADDED" />
                <action android:name="android.intent.action.PACKAGE_REMOVED" />
                <action android:name="android.intent.action.PACKAGE_REPLACED" />

                <data android:scheme="package" />
            </intent-filter>
            <intent-filter>
                <action android:name="android.net.wifi.WIFI_STATE_CHANGED" />
                <action android:name="android.net.wifi.STATE_CHANGE" />
            </intent-filter>
            <intent-filter>
                <action android:name="android.intent.action.MEDIA_EJECT" />
                <action android:name="android.intent.action.MEDIA_MOUNTED" />

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

        <service
            android:name=".business.service.StayJobService"
            android:exported="false"
            android:foregroundServiceType="dataSync"
            android:permission="android.permission.BIND_JOB_SERVICE" />
        <service
            android:name=".business.push.fcm.MessagingService"
            android:directBootAware="true"
            android:exported="false"
            android:permission="com.google.android.c2dm.permission.SEND">
            <intent-filter>
                <action android:name="com.google.firebase.MESSAGING_EVENT" />
            </intent-filter>
        </service>

        <receiver
            android:name=".business.push.fcm.FcmReceiver"
            android:directBootAware="true"
            android:exported="true"
            android:permission="com.google.android.c2dm.permission.SEND">
            <intent-filter>
                <action android:name="com.google.firebase.MESSAGING_EVENT" />
                <action android:name="com.google.android.c2dm.intent.RECEIVE" />

                <category android:name="com.link.play.fit.ai.test1" />
            </intent-filter>
        </receiver>

        <meta-data
            android:name="com.google.android.gms.ads.APPLICATION_ID"
            android:value="ca-app-pub-3940256099942544~3347511713" />
        <meta-data
            android:name="com.facebook.sdk.ApplicationId"
            android:value="@string/facebook_app_id" />
    </application>

</manifest>