<?xml version="1.0" encoding="utf-8"?><!--
 * Android Manifest
 * Copyright (C) 2007-2008 The Android Open Source Project
 * Copyright (C) 2009-2011 Rodrigo Zechin Rosauro
 * Copyright (C) 2011-2014 Umakanthan Chandran
 *
 * This program 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 3 of the License, or
 * (at your option) any later version.
 *
 * This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
 *
 * @author Rodrigo Zechin Rosauro, Umakanthan Chandran
 * @version 1.2
 */
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools">

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

    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
    <!-- Allows ufwall to access information about networks -->
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

    <!-- Allows ufwall to write to external storage -->
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"
        android:maxSdkVersion="28" />

    <!-- Allows access to IP configuration and tethering state -->
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />

    <uses-permission android:name="android.permission.FOREGROUND_SERVICE_SPECIAL_USE"></uses-permission>
    <!-- Allows access to bluetooth tethering state -->
    <uses-permission android:name="android.permission.BLUETOOTH" />
    <uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>

    <!-- Allows ufwall to access information about Fingerprint -->
    <uses-permission android:name="android.permission.USE_FINGERPRINT" />
    <uses-permission android:name="android.permission.USE_BIOMETRIC" />

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


    <uses-permission android:name="android.permission.QUERY_ALL_PACKAGES" tools:ignore="QueryAllPackagesPermission"/>

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

    <!-- Screen support -->
    <supports-screens
        android:anyDensity="true"
        android:largeScreens="true"
        android:normalScreens="true"
        android:smallScreens="true"
        android:xlargeScreens="true" />

    <!-- donate
    android:icon="@mipmap/ic_launcher_donate"
    android:label="@string/app_name_donate" -->
    <application
        android:name=".util.G"
        android:allowBackup="false"
        android:hardwareAccelerated="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:largeHeap="true"
        android:launchMode="singleTop"
        android:resizeableActivity="true"
        android:supportsRtl="true"
        android:theme="@style/AppDarkTheme"
        android:requestLegacyExternalStorage="true"
        tools:ignore="ManifestResource">

        <!--<meta-data
            android:name="xposedmodule"
            android:value="true" />
        <meta-data
            android:name="xposeddescription"
            android:value="Xposed related fixes for AFWall+" />
        <meta-data
            android:name="xposedminversion"
            android:value="53" />-->


        <!-- donate  android:label="@string/app_name_donate" -->
        <activity
            android:name=".MainActivity"
            android:configChanges="orientation|keyboardHidden|screenSize|keyboard|locale|screenLayout"
            android:hardwareAccelerated="true"
            android:exported="true"
            android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.LAUNCHER" />
                <category android:name="android.intent.category.MULTIWINDOW_LAUNCHER" />
            </intent-filter>
            <meta-data
                android:name="android.app.shortcuts"
                android:resource="@xml/shortcuts" />
        </activity>
        <activity
            android:name=".preferences.PreferencesActivity"
            android:theme="@style/AppDarkTheme"
            android:exported="true"
            android:configChanges="orientation|keyboardHidden|screenSize|keyboard|locale|screenLayout"
            android:hardwareAccelerated="true">
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="dev.ukanth.ufirewall.MainActivity" />
        </activity>
        <activity
            android:name=".activity.HelpActivity"
            android:configChanges="orientation|keyboardHidden|screenSize|locale"
            android:hardwareAccelerated="true"></activity>
        <activity
            android:name=".activity.RulesActivity"
            android:configChanges="orientation|keyboardHidden|screenSize|keyboard|locale|screenLayout"></activity>
        <activity
            android:name=".activity.ProfileActivity"
            android:configChanges="orientation|keyboardHidden|screenSize|keyboard|locale|screenLayout"></activity>
        <activity
            android:name=".activity.AppDetailActivity"
            android:configChanges="orientation|keyboardHidden|screenSize|keyboard|locale|screenLayout">
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="dev.ukanth.ufirewall.MainActivity" />
        </activity>
        <activity
            android:name=".activity.LogActivity"
            android:configChanges="orientation|keyboardHidden|screenSize|keyboard|locale|screenLayout"></activity>
        <activity
            android:name=".activity.OldLogActivity"
            android:configChanges="orientation|keyboardHidden|screenSize|keyboard|locale|screenLayout"></activity>
        <activity
            android:name=".activity.LogDetailActivity"
            android:configChanges="orientation|keyboardHidden|screenSize|keyboard|locale|screenLayout"></activity>
        <activity
            android:name=".activity.DataDumpActivity"
            android:configChanges="orientation|keyboardHidden|screenSize|keyboard|locale|screenLayout">
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="dev.ukanth.ufirewall.MainActivity" />
        </activity>

        <!-- <activity android:name="dev.ukanth.ufirewall.AlertDialogActivity"/> -->

        <activity
            android:name=".widget.ToggleWidgetActivity"
            android:launchMode="singleInstance"
            android:exported="true"
            android:theme="@style/Theme.Transparent">
            <intent-filter>
                <action android:name="android.appwidget.action.APPWIDGET_CONFIGURE" />
            </intent-filter>
        </activity>
        <activity
            android:name=".widget.ToggleWidgetOldActivity"
            android:launchMode="singleInstance"
            android:exported="true"
            android:theme="@style/Theme.Transparent">
            <intent-filter>
                <action android:name="android.appwidget.action.APPWIDGET_CONFIGURE" />
            </intent-filter>
        </activity>
        <activity
            android:name=".activity.CustomScriptActivity"
            android:configChanges="orientation|keyboardHidden|screenSize|keyboard|locale|screenLayout">
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="dev.ukanth.ufirewall.MainActivity" />
        </activity>

        <!-- still will work in android 7 above -->
        <receiver android:name=".broadcast.OnBootReceiver"
            android:exported="true">
            <intent-filter android:priority="500">
                <action android:name="android.intent.action.BOOT_COMPLETED" />
                <action android:name="android.intent.action.QUICKBOOT_POWERON" />
                <action android:name="android.intent.action.MEDIA_MOUNTED" />

                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </receiver>
        <!--<service android:name=".service.ApplyOnBootService" />-->

        <service
            android:name=".service.FirewallService"
            android:foregroundServiceType="specialUse"
            android:exported="true"
            android:launchMode="singleTop" >

            <property android:name="android.app.PROPERTY_SPECIAL_USE_FGS_SUBTYPE"
                android:value="Firewall service"/>

        </service>

        <service
            android:name=".service.ToggleTileService"
            android:icon="@drawable/notification_quest"
            android:exported="true"
            android:label="@string/widget_label_status"
            android:permission="android.permission.BIND_QUICK_SETTINGS_TILE">
            <intent-filter>
                <action android:name="android.service.quicksettings.action.QS_TILE" />
            </intent-filter>
        </service>

        <receiver
            android:name=".widget.StatusWidget"
            android:enabled="true"
            android:exported="true"
            android:icon="@drawable/preview_toggle"
            android:label="@string/widget_label_status">
            <meta-data
                android:name="android.appwidget.provider"
                android:resource="@xml/onoff_widget" />

            <intent-filter>
                <action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
                <action android:name="dev.ukanth.ufirewall.intent.action.STATUS_CHANGED" />
                <action android:name="dev.ukanth.ufirewall.intent.action.TOGGLE_REQUEST" />
            </intent-filter>
        </receiver>
        <receiver
            android:name=".widget.ToggleWidget"
            android:exported="true"
            android:icon="@drawable/preview_new"
            android:label="@string/widget_label_settings">
            <meta-data
                android:name="android.appwidget.provider"
                android:resource="@xml/toggle_widget" />

            <intent-filter>
                <action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
                <action android:name="dev.ukanth.ufirewall.intent.action.STATUS_CHANGED" />
                <action android:name="dev.ukanth.ufirewall.intent.action.TOGGLE_REQUEST" />
            </intent-filter>
        </receiver>
        <receiver
            android:name=".widget.ToggleWidgetOld"
            android:exported="true"
            android:label="@string/widget_label_settings_old">
            <meta-data
                android:name="android.appwidget.provider"
                android:icon="@drawable/preview_old"
                android:resource="@xml/toggle_widget_old" />

            <intent-filter>
                <action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
                <action android:name="dev.ukanth.ufirewall.intent.action.STATUS_CHANGED" />
                <action android:name="dev.ukanth.ufirewall.intent.action.TOGGLE_REQUEST" />
            </intent-filter>
        </receiver>

        <activity
            android:name="haibison.android.lockpattern.LockPatternActivity"
            android:theme="@style/Alp_42447968.Theme.Dark"
            tools:replace="android:theme" />

        <!-- device admin -->
        <!-- This is required this receiver to become device admin component. -->

         <receiver
             android:name=".admin.AdminDeviceReceiver"
             android:exported="true"
             android:description="@string/device_admin_desc"
             android:label="@string/enable_device_admin"
            android:permission="android.permission.BIND_DEVICE_ADMIN">
            <meta-data
                android:name="android.app.device_admin"
                android:resource="@xml/device_admin" />

            <intent-filter>
                <action android:name="android.app.action.DEVICE_ADMIN_ENABLED" />
            </intent-filter>
        </receiver>



        <!-- Tasker/Locale Plugin -->

        <activity
            android:name=".plugin.LocaleEdit"
            android:exported="true"
            android:icon="@drawable/ic_launcher_free"
            android:label="@string/tasker_lable"
            android:uiOptions="splitActionBarWhenNarrow"
            android:windowSoftInputMode="adjustResize"
            tools:ignore="ExportedActivity">

            <!-- this Intent filter allows the plug-in to be discovered by Locale -->
            <intent-filter>
                <action android:name="com.twofortyfouram.locale.intent.action.EDIT_SETTING" />
            </intent-filter>
        </activity>

        <receiver
            android:name=".plugin.FireReceiver"
            android:exported="true"
            tools:ignore="ExportedReceiver">

            <!-- this Intent filter allows the plug-in to discovered by Locale -->
            <intent-filter>
                <action android:name="com.twofortyfouram.locale.intent.action.FIRE_SETTING" />
            </intent-filter>
        </receiver>

        <service
            android:name=".service.RootShellService"
            android:exported="false" />
        <service
            android:name=".service.RootShellService2"
            android:exported="false" />
        <service
            android:name=".service.LogService"
            android:permission="android.permission.BIND_JOB_SERVICE"
            android:enabled="true"
            android:label="AFWallLogService" />

        <!-- Samsung MultiWindow Support -->
        <uses-library
            android:name="com.sec.android.app.multiwindow"
            android:required="false" />

        <meta-data
            android:name="com.sec.android.multiwindow.DEFAULT_SIZE_W"
            android:resource="@dimen/app_defaultsize_w" />
        <meta-data
            android:name="com.sec.android.multiwindow.DEFAULT_SIZE_H"
            android:resource="@dimen/app_defaultsize_h" />
        <meta-data
            android:name="com.sec.android.multiwindow.MINIMUM_SIZE_W"
            android:resource="@dimen/app_minimumsize_w" />
        <meta-data
            android:name="com.sec.android.multiwindow.MINIMUM_SIZE_H"
            android:resource="@dimen/app_minimumsize_h" />

        <provider
            android:name=".preferences.ShareProfilePreference"
            android:authorities="${applicationId}"
            android:exported="true"></provider>

        <service
            android:name=".service.RulesApplyService"
            android:exported="false" />

       <!-- <provider
            android:name=".util.XPreferenceProvider"
            android:authorities="${applicationId}"
            android:exported="true" />-->

        <activity android:name=".activity.CustomRulesActivity"></activity>
    </application>

</manifest>