Skip to content
Snippets Groups Projects
AndroidManifest.xml 3.09 KiB
Newer Older
kr328's avatar
kr328 committed
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="com.github.kr328.clash.service">

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

    <application>
        <service
            android:name="ClashService"
            android:exported="false"
            android:process=":background" />
        <service
            android:name="TunService"
            android:exported="false"
            android:permission="android.permission.BIND_VPN_SERVICE"
            android:process=":background">
            <intent-filter>
                <action android:name="android.net.VpnService" />
            </intent-filter>
        </service>
        <service
            android:name=".RemoteService"
kr328's avatar
kr328 committed
            android:exported="false"
            android:process=":background" />
        <service
            android:name=".ProfileWorker"
            android:exported="false"
            android:process=":background" />

        <provider
            android:name=".FilesProvider"
            android:authorities="${applicationId}.files"
            android:exported="true"
            android:grantUriPermissions="true"
            android:permission="android.permission.MANAGE_DOCUMENTS"
            android:process=":background">
            <intent-filter>
                <action android:name="android.content.action.DOCUMENTS_PROVIDER" />
            </intent-filter>
        </provider>
        <provider
            android:name=".StatusProvider"
            android:authorities="${applicationId}.status"
            android:exported="false"
            android:process=":background" />
        <provider
            android:name=".PreferenceProvider"
            android:authorities="${applicationId}.settings"
            android:exported="false"
            android:process=":background" />

        <receiver
            android:name=".ProfileReceiver"
            android:enabled="true"
            android:exported="true"
            android:permission="${applicationId}.permission.RECEIVE_BROADCASTS"
            android:process=":background">
            <intent-filter>
                <action android:name="android.intent.action.BOOT_COMPLETED" />
                <action android:name="android.intent.action.MY_PACKAGE_REPLACED" />
                <action android:name="android.intent.action.TIME_SET" />
                <action android:name="android.intent.action.TIMEZONE_CHANGED" />
            </intent-filter>
            <intent-filter>
                <action android:name="{applicationId}.intent.action.PROFILE_REQUEST_UPDATE" />
                <data android:scheme="uuid" />
            </intent-filter>
        </receiver>
    </application>
</manifest>