<manifest xmlns:android="http://schemas.android.com/apk/res/android"
          xmlns:tools="http://schemas.android.com/tools"
          package="com.github.shadowsocks.core"
          android:installLocation="internalOnly">

    <permission
        android:name="${applicationId}.SERVICE"
        android:protectionLevel="signature" />

    <uses-permission android:name="${applicationId}.SERVICE" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
    <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE"/>
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
    <uses-permission android:name="android.permission.WAKE_LOCK"/>
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

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

    <queries>
        <intent>
            <action android:name="com.github.shadowsocks.plugin.ACTION_NATIVE_PLUGIN" />
        </intent>
    </queries>

    <application
        android:allowBackup="true"
        android:autoRevokePermissions="allowed"
        android:extractNativeLibs="true"
        android:fullBackupContent="@xml/backup_descriptor"
        android:fullBackupOnly="true"
        android:hasFragileUserData="true"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:banner="@mipmap/banner">

        <meta-data android:name="android.webkit.WebView.EnableSafeBrowsing"
                   android:value="true" />
        <meta-data android:name="com.google.android.backup.api_key"
                   android:value="AEdPqrEAAAAI_zVxZthz2HDuz9toTvkYvL0L5GA-OjeUIfBeXg"/>

        <service
            android:name="com.github.shadowsocks.bg.VpnService"
            android:process=":bg"
            android:directBootAware="true"
            android:label="@string/app_name"
            android:permission="android.permission.BIND_VPN_SERVICE"
            android:exported="false">
            <intent-filter>
                <action android:name="android.net.VpnService"/>
            </intent-filter>
        </service>

<!--        <service-->
<!--            android:name="com.github.shadowsocks.bg.TransproxyService"-->
<!--            android:process=":bg"-->
<!--            android:directBootAware="true"-->
<!--            android:exported="false">-->
<!--        </service>-->

<!--        <service-->
<!--            android:name="com.github.shadowsocks.bg.ProxyService"-->
<!--            android:process=":bg"-->
<!--            android:directBootAware="true"-->
<!--            android:exported="false">-->
<!--        </service>-->

        <service
            android:name="com.github.shadowsocks.subscription.SubscriptionService"
            android:exported="false">
        </service>

        <activity
            android:name="com.github.shadowsocks.UrlImportActivity"
            android:theme="@style/Theme.AppCompat.Translucent"
            android:excludeFromRecents="true">
            <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="ss"/>
            </intent-filter>
        </activity>

        <activity
            android:name="com.github.shadowsocks.VpnRequestActivity"
            android:theme="@style/Theme.AppCompat.Translucent"
            android:excludeFromRecents="true"
            android:taskAffinity=""/>

        <receiver android:name="com.github.shadowsocks.BootReceiver"
                  android:process=":bg"
                  android:directBootAware="true"
                  android:enabled="false">
            <intent-filter>
                <action android:name="android.intent.action.BOOT_COMPLETED"/>
                <action android:name="android.intent.action.LOCKED_BOOT_COMPLETED" />
                <action android:name="android.intent.action.MY_PACKAGE_REPLACED" />
            </intent-filter>
        </receiver>

        <activity android:name="com.google.android.gms.oss.licenses.OssLicensesActivity"
                  android:theme="@style/Theme.Shadowsocks.ActionBar"/>
        <activity android:name="com.google.android.gms.oss.licenses.OssLicensesMenuActivity"
                  android:theme="@style/Theme.Shadowsocks.ActionBar"/>
        <service android:name="androidx.room.MultiInstanceInvalidationService"
                 android:process=":bg"/>
    </application>
</manifest>
