<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2018 The Xiaomi-SDM660 Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="org.lineageos.settings.device"
    android:sharedUserId="android.uid.system">

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

    <uses-sdk android:minSdkVersion="27" />

    <application
        android:label="@string/advanced_settings"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
        <receiver
            android:name=".BootReceiver"
            android:defaultToDeviceProtectedStorage="true"
            android:directBootAware="true"
            android:enabled="true"
            android:exported="false">
            <intent-filter>
                <action android:name="android.intent.action.BOOT_COMPLETED" />
                <action android:name="android.intent.action.LOCKED_BOOT_COMPLETED" />

                <category android:name="android.intent.category.DEFAULT" />
                <action android:name="com.android.settings.action.EXTRA_SETTINGS" />
            </intent-filter>
        </receiver>

        <activity
            android:name=".DeviceSettingsActivity"
            android:exported="false"
            android:icon="@drawable/ic_mi"
            android:label="@string/advanced_settings"
            android:launchMode="singleTask">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.DEFAULT" />
                <action android:name="com.android.settings.action.EXTRA_SETTINGS" />
            </intent-filter>

            <meta-data
                android:name="com.android.settings.dismiss"
                android:value="9,13,30" />
            <meta-data
                android:name="com.android.settings.bg.hint"
                android:resource="@color/homepage_parts_background" />
            <meta-data
                android:name="com.android.settings.category"
                android:value="com.android.settings.category.ia.homepage" />
            <meta-data
                android:name="com.android.settings.summary"
                android:resource="@string/advanced_settings_summary" />
        </activity>

        <activity
            android:name=".kcal.KCalSettingsActivity"
            android:exported="false"
            android:label="@string/advanced_settings_kcal">

            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>
        
        <service
            android:name=".FPSInfoService"
            android:exported="false">
        </service>

        <service
            android:name=".FPSTileService"
            android:icon="@drawable/ic_fps_info"
            android:label="@string/fps_info_title"
            android:permission="android.permission.BIND_QUICK_SETTINGS_TILE">
            <intent-filter>
                <action
                    android:name="android.service.quicksettings.action.QS_TILE"/>
            </intent-filter>
        </service>

        <service
            android:name=".DiracService"
            android:enabled="true"
            android:stopWithTask="false" />
    </application>
</manifest>
