<manifest xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
        package="com.android.systemui"
        coreApp="true">

    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.ACCESS_ALL_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />

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

    <uses-permission android:name="android.permission.STATUS_BAR_SERVICE" />
    <uses-permission android:name="android.permission.STATUS_BAR" />
    <uses-permission android:name="android.permission.EXPAND_STATUS_BAR" />
    <uses-permission android:name="android.permission.REMOTE_AUDIO_PLAYBACK" />

    <uses-permission android:name="android.permission.MANAGE_USERS" />
    <uses-permission android:name="android.permission.READ_PROFILE" />
    <uses-permission android:name="android.permission.READ_CONTACTS" />
    <uses-permission android:name="android.permission.CONFIGURE_WIFI_DISPLAY" />
    <uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS" />

    <!-- Networking and telephony -->
    <uses-permission android:name="android.permission.BLUETOOTH" />
    <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
    <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
    <uses-permission android:name="android.permission.MANAGE_NETWORK_POLICY" />

    <!-- Physical hardware -->
    <uses-permission android:name="android.permission.MANAGE_USB" />
    <uses-permission android:name="android.permission.DEVICE_POWER" />
    <uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" />
    <uses-permission android:name="android.permission.UPDATE_DEVICE_STATS" />
    <uses-permission android:name="android.permission.MASTER_CLEAR" />
    <uses-permission android:name="android.permission.VIBRATE" />

    <!-- ActivityManager -->
    <uses-permission android:name="android.permission.GET_TASKS" />
    <uses-permission android:name="android.permission.GET_DETAILED_TASKS" />
    <uses-permission android:name="android.permission.REORDER_TASKS" />
    <uses-permission android:name="android.permission.REMOVE_TASKS" />
    <uses-permission android:name="android.permission.STOP_APP_SWITCHES" />
    <uses-permission android:name="android.permission.SET_SCREEN_COMPATIBILITY" />
    <uses-permission android:name="android.permission.START_ANY_ACTIVITY" />
    <uses-permission android:name="android.permission.INTERACT_ACROSS_USERS_FULL" />

    <!-- WindowManager -->
    <uses-permission android:name="android.permission.INTERNAL_SYSTEM_WINDOW" />
    <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
    <uses-permission android:name="android.permission.READ_FRAME_BUFFER" />
    <uses-permission android:name="android.permission.MANAGE_APP_TOKENS" />
    <uses-permission android:name="android.permission.SET_ORIENTATION" />
    <uses-permission android:name="android.permission.DISABLE_KEYGUARD" />

    <!-- DreamManager -->
    <uses-permission android:name="android.permission.READ_DREAM_STATE" />
    <uses-permission android:name="android.permission.WRITE_DREAM_STATE" />

    <application
        android:persistent="true"
        android:allowClearUserData="false"
        android:allowBackup="false"
        android:hardwareAccelerated="true"
        android:label="@string/app_label"
        android:icon="@*android:drawable/platlogo">

        <!-- Broadcast receiver that gets the broadcast at boot time and starts
             up everything else.
             TODO: Should have an android:permission attribute
             -->
        <service android:name="SystemUIService"
            android:exported="true"
            />

        <!-- started from PhoneWindowManager
             TODO: Should have an android:permission attribute -->
        <service android:name=".screenshot.TakeScreenshotService"
            android:process=":screenshot"
            android:exported="false" />

        <service android:name=".LoadAverageService"
                android:exported="true" />

        <service android:name=".ImageWallpaper"
                android:permission="android.permission.BIND_WALLPAPER"
                android:exported="true" />

        <receiver android:name=".BootReceiver" androidprv:primaryUserOnly="true">
            <intent-filter>
                <action android:name="android.intent.action.BOOT_COMPLETED" />
            </intent-filter>
        </receiver>

        <activity android:name=".usb.UsbStorageActivity"
                  android:label="@*android:string/usb_storage_activity_title"
                  android:excludeFromRecents="true">
        </activity>
        <activity android:name="com.android.internal.app.ExternalMediaFormatActivity"
                android:theme="@*android:style/Theme.Dialog.Alert"
                android:excludeFromRecents="true">
        </activity>

        <activity android:name=".recent.RecentsActivity"
                android:label="@string/accessibility_desc_recent_apps"
                android:theme="@style/RecentsStyle"
                android:excludeFromRecents="true"
                android:launchMode="singleInstance"
                android:exported="true">
          <intent-filter>
            <action android:name="com.android.systemui.TOGGLE_RECENTS" />
          </intent-filter>
        </activity>

        <receiver
            android:name=".recent.RecentsPreloadReceiver"
            android:exported="false">
            <intent-filter>
                <action android:name="com.android.systemui.recent.action.PRELOAD" />
                <action android:name="com.android.systemui.recent.action.CANCEL_PRELOAD" />
            </intent-filter>
        </receiver>

        <!-- started from UsbDeviceSettingsManager -->
        <activity android:name=".usb.UsbConfirmActivity"
            android:exported="true"
            android:permission="android.permission.MANAGE_USB"
            android:theme="@*android:style/Theme.Holo.Dialog.Alert"
            android:finishOnCloseSystemDialogs="true"
            android:excludeFromRecents="true">
        </activity>

        <!-- started from UsbDeviceSettingsManager -->
        <activity android:name=".usb.UsbPermissionActivity"
            android:exported="true"
            android:permission="android.permission.MANAGE_USB"
            android:theme="@*android:style/Theme.Holo.Dialog.Alert"
            android:finishOnCloseSystemDialogs="true"
            android:excludeFromRecents="true">
        </activity>

        <!-- started from UsbDeviceSettingsManager -->
        <activity android:name=".usb.UsbResolverActivity"
            android:exported="true"
            android:permission="android.permission.MANAGE_USB"
            android:theme="@*android:style/Theme.Holo.Dialog.Alert"
            android:finishOnCloseSystemDialogs="true"
            android:excludeFromRecents="true">
        </activity>

        <!-- started from UsbDeviceSettingsManager -->
        <activity android:name=".usb.UsbAccessoryUriActivity"
            android:exported="true"
            android:permission="android.permission.MANAGE_USB"
            android:theme="@*android:style/Theme.Holo.Dialog.Alert"
            android:finishOnCloseSystemDialogs="true"
            android:excludeFromRecents="true">
        </activity>

        <!-- started from UsbDebuggingManager -->
        <activity android:name=".usb.UsbDebuggingActivity"
            android:permission="android.permission.MANAGE_USB"
            android:theme="@*android:style/Theme.Holo.Dialog.Alert"
            android:finishOnCloseSystemDialogs="true"
            android:excludeFromRecents="true">
        </activity>

        <!-- started from NetworkPolicyManagerService -->
        <activity
            android:name=".net.NetworkOverLimitActivity"
            android:exported="true"
            android:permission="android.permission.MANAGE_NETWORK_POLICY"
            android:theme="@android:style/Theme.Holo.Panel"
            android:finishOnCloseSystemDialogs="true"
            android:launchMode="singleTop"
            android:taskAffinity="com.android.systemui.net"
            android:excludeFromRecents="true" />

        <!-- started from ... somewhere -->
        <activity
            android:name=".BeanBag"
            android:exported="true"
            android:label="BeanBag"
            android:icon="@drawable/redbean2"
            android:theme="@android:style/Theme.Wallpaper.NoTitleBar.Fullscreen"
            android:hardwareAccelerated="true"
            android:launchMode="singleInstance"
            android:excludeFromRecents="true">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="com.android.internal.category.PLATLOGO" />
<!--            <category android:name="android.intent.category.LAUNCHER" />-->
            </intent-filter>
        </activity>

        <!-- Beans in space -->
        <service
            android:name=".BeanBagDream"
            android:exported="true"
            android:label="@string/jelly_bean_dream_name"
            android:enabled="false"
            >
            <intent-filter>
                <action android:name="android.service.dreams.DreamService" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </service>

        <activity android:name=".Somnambulator"
            android:label="@string/start_dreams"
            android:icon="@mipmap/ic_launcher_dreams"
            android:theme="@android:style/Theme.Wallpaper.NoTitleBar"
            android:exported="true"
            android:excludeFromRecents="true"
            >
            <!--
            <intent-filter>
                <action android:name="android.intent.action.CREATE_SHORTCUT" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
            -->
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.DESK_DOCK" />
            </intent-filter>
        </activity>
    </application>
</manifest>
