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

    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
    <uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT"/>
    <uses-permission android:name="com.android.launcher.permission.UNINSTALL_SHORTCUT"/>
    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>

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


    <application
        xmlns:tools="http://schemas.android.com/tools"
        android:name=".App"
        android:allowBackup="false"
        android:icon="@drawable/ic_android_eat_js"
        android:label="@string/_app_name"
        android:supportsRtl="true"
        android:theme="@style/AppTheme"
        tools:replace="android:label, android:icon, android:allowBackup">
        <activity
            android:name=".ui.main.MainActivity"
            android:hardwareAccelerated="true"
            android:label="@string/_app_name"
            android:launchMode="singleTask"
            android:theme="@style/AppTheme.FullScreen">

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

        <activity
            android:name=".external.shortcut.ShortcutActivity"
            android:theme="@style/AppTheme.NoActionBar">

            <intent-filter>
                <action android:name="com.example.Project.Action"/>
                <category android:name="android.intent.category.DEFAULT"/>
            </intent-filter>
        </activity>

        <service
            android:name=".service.AccessibilityWatchDogService"
            android:enabled="true"
            android:exported="true"
            android:label="@string/_app_name"
            android:permission="android.permission.BIND_ACCESSIBILITY_SERVICE">
            <intent-filter>
                <action android:name="android.accessibilityservice.AccessibilityService"/>
            </intent-filter>
            <meta-data
                android:name="android.accessibilityservice"
                android:resource="@xml/accessibility_service_config"/>

        </service>

        <provider
            android:name="android.support.v4.content.FileProvider"
            android:authorities="com.stardust.scriptdroid.fileprovider"
            android:exported="false"
            android:grantUriPermissions="true">
            <meta-data
                android:name="android.support.FILE_PROVIDER_PATHS"
                android:resource="@xml/provider_paths"/>
        </provider>

        <activity
            android:name=".ui.edit.EditActivity"
            android:multiprocess="true">

        </activity>
        <activity android:name=".ui.help.DocumentationActivity"/>
        <activity android:name=".ui.help.HelpCatalogueActivity"/>
        <activity android:name=".ui.settings.AboutActivity"/>
        <activity android:name=".ui.settings.SettingsActivity"/>
        <activity android:name=".ui.console.LogActivity"/>
        <activity android:name=".ui.error.ErrorReportActivity"/>
        <activity android:name=".ui.help.LocalWebViewActivity"/>
        <activity android:name=".external.tasker.TaskerScriptEditActivity"/>
        <activity android:name=".ui.edit.ViewSampleActivity"/>

        <activity
            android:name=".ui.error.IssueReporterActivity"
            android:theme="@style/IssueReporterTheme"/>

        <service android:name="com.stardust.view.Floaty$FloatHeadService"/>
        <service android:name="com.stardust.scriptdroid.external.floating_window.menu.HoverMenuService"/>

        <activity android:name=".external.tasker.TaskPrefEditActivity"/>

        <activity-alias
            android:name="com.stardust.scriptdroid.external.tasker.PluginActivity"
            android:exported="true"
            android:icon="@drawable/ic_android_eat_js"
            android:label="@string/_app_name"
            android:targetActivity="com.stardust.scriptdroid.external.tasker.TaskPrefEditActivity"
            tools:ignore="ExportedActivity">
            <intent-filter>
                <action android:name="com.twofortyfouram.locale.intent.action.EDIT_SETTING"/>
            </intent-filter>
        </activity-alias>


        <receiver
            android:name="com.stardust.scriptdroid.external.tasker.FireSettingReceiver"
            android:exported="true"
            android:process=":background"
            tools:ignore="ExportedReceiver">

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


        <activity
            android:name=".external.open.EditIntentActivity"
            android:icon="@drawable/ic_edit_green_48dp"
            android:label="编辑脚本">

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

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

                <data android:scheme="file"/>
                <data android:scheme="content"/>
                <data android:mimeType="application/x-*"/>
                <data android:mimeType="application/postscript"/>
                <data android:mimeType="application/plain"/>
                <data android:mimeType="application/x-javascript"/>
                <data android:mimeType="text/*"/>
            </intent-filter>
            <intent-filter>
                <action android:name="android.intent.action.SEND"/>

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

                <data android:mimeType="text/*"/>
            </intent-filter>
            <intent-filter>
                <action android:name="android.intent.action.SEARCH"/>

                <category android:name="android.intent.category.DEFAULT"/>
            </intent-filter>
            <intent-filter>
                <action android:name="com.googlecode.android_scripting.action.EDIT_SCRIPT"/>

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

        <activity
            android:name=".external.open.RunIntentActivity"
            android:icon="@drawable/ic_ali_run"
            android:label="运行脚本">

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

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

                <data android:scheme="file"/>
                <data android:scheme="content"/>
                <data android:mimeType="application/x-*"/>
                <data android:mimeType="application/postscript"/>
                <data android:mimeType="application/plain"/>
                <data android:mimeType="application/x-javascript"/>
                <data android:mimeType="text/*"/>
            </intent-filter>
            <intent-filter>
                <action android:name="android.intent.action.SEND"/>

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

                <data android:mimeType="text/*"/>
            </intent-filter>
            <intent-filter>
                <action android:name="android.intent.action.SEARCH"/>

                <category android:name="android.intent.category.DEFAULT"/>
            </intent-filter>
            <intent-filter>
                <action android:name="com.googlecode.android_scripting.action.EDIT_SCRIPT"/>

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


        <activity
            android:name=".external.open.ImportIntentActivity"
            android:icon="@drawable/ic_import"
            android:label="导入脚本文件">

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

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

                <data android:scheme="file"/>
                <data android:scheme="content"/>
                <data android:mimeType="application/x-*"/>
                <data android:mimeType="application/postscript"/>
                <data android:mimeType="application/plain"/>
                <data android:mimeType="application/x-javascript"/>
                <data android:mimeType="text/*"/>
            </intent-filter>
            <intent-filter>
                <action android:name="android.intent.action.SEND"/>

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

                <data android:mimeType="text/*"/>
            </intent-filter>
            <intent-filter>
                <action android:name="android.intent.action.SEARCH"/>

                <category android:name="android.intent.category.DEFAULT"/>
            </intent-filter>
            <intent-filter>
                <action android:name="com.googlecode.android_scripting.action.EDIT_SCRIPT"/>

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

</manifest>