<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.koushikdutta.superuser"
    android:versionCode="1030"
    android:versionName="1.0.3.0" >

    <uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="19" />

    <permission
        android:name="android.permission.REQUEST_SUPERUSER"
        android:protectionLevel="signature" />
    <permission
        android:name="android.permission.REPORT_SUPERUSER"
        android:protectionLevel="signature" />

    <permission-group
        android:name="android.permission-group.SUPERUSER"
        android:description="@string/superuser_description_more"
        android:icon="@drawable/ic_action_permission"
        android:label="@string/superuser"
        android:priority="10000" />

    <permission
        android:name="android.permission.ACCESS_SUPERUSER"
        android:description="@string/superuser_description_more"
        android:icon="@drawable/ic_action_permission"
        android:label="@string/superuser_description"
        android:logo="@drawable/ic_action_permission"
        android:permissionGroup="android.permission-group.SUPERUSER"
        android:protectionLevel="dangerous" />

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

    <application
        android:name=".SuApplication"
        android:allowBackup="false"
        android:allowClearUserData="false"
        android:icon="@drawable/ic_launcher"
        android:label="@string/superuser"
        android:theme="@style/Superuser" >
        <activity
            android:theme="@style/SuperuserActivity"
            android:name=".MainActivity"
            android:label="@string/superuser" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <!-- Only system/su can open this activity -->
        <!-- This activity will then call the MultitaskSuRequestActivity to create a new task stack -->
        <activity
            android:name=".RequestActivity"
            android:configChanges="keyboardHidden|orientation|screenSize"
            android:excludeFromRecents="true"
            android:label="@string/superuser"
            android:launchMode="singleTask"
            android:permission="android.permission.REQUEST_SUPERUSER"
            android:process=":superuser"
            android:taskAffinity="internal.superuser"
            android:theme="@style/RequestTheme" />
        <!-- Only system/su can open this activity -->
        <!-- This is activity is started in multiuser mode when the user invoking su -->
        <!-- is not the device owner (user id 0). -->
        <activity
            android:name=".NotifyActivity"
            android:configChanges="keyboardHidden|orientation|screenSize"
            android:excludeFromRecents="true"
            android:label="@string/superuser"
            android:launchMode="singleTask"
            android:permission="android.permission.REQUEST_SUPERUSER"
            android:process=":superuser"
            android:taskAffinity="internal.superuser"
            android:theme="@style/RequestTheme" />

        <!-- Multiple instances of this activity can be running for multiple su requests -->
        <activity
            android:name=".MultitaskSuRequestActivity"
            android:configChanges="keyboardHidden|orientation|screenSize"
            android:excludeFromRecents="true"
            android:exported="false"
            android:label="@string/request"
            android:process=":superuser"
            android:taskAffinity="internal.superuser"
            android:theme="@style/RequestTheme" />

        <receiver
            android:name=".SuReceiver"
            android:permission="android.permission.REPORT_SUPERUSER" />
        <receiver android:name=".SuCheckerReceiver" >
            <intent-filter>
                <action android:name="android.intent.action.BOOT_COMPLETED" />
            </intent-filter>
        </receiver>
        
        <receiver android:name=".PackageChangeReceiver" >
            <intent-filter>
                <action android:name="android.intent.action.PACKAGE_ADDED" />
                <data android:scheme="package" />
            </intent-filter>
            <intent-filter>
                <action android:name="android.intent.action.BOOT_COMPLETED" />
                <data android:scheme="package" />
            </intent-filter>
            <intent-filter>
                <action android:name="android.intent.action.PACKAGE_REMOVED" />
                <data android:scheme="package" />
            </intent-filter>
        </receiver>
        
    </application>

</manifest>
