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

  <uses-sdk tools:overrideLibrary="com.rosan.dhizuku.api" />

  <uses-permission android:name="android.permission.INTERNET" />
  <uses-permission android:name="android.permission.WAKE_LOCK" />
  <uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
  <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
  <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
  <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
  <uses-permission android:name="android.permission.UPDATE_PACKAGES_WITHOUT_USER_ACTION" />
  <uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
  <uses-permission android:name="android.permission.REQUEST_DELETE_PACKAGES" />
  <uses-permission
      android:name="android.permission.REQUEST_INSTALL_PACKAGES"
      tools:ignore="RequestInstallPackagesPolicy" />
  <uses-permission
      android:name="android.permission.MANAGE_EXTERNAL_STORAGE"
      tools:ignore="AllFilesAccessPolicy,ScopedStorage" />
  <uses-permission
      android:name="android.permission.QUERY_ALL_PACKAGES"
      tools:ignore="PackageVisibilityPolicy,QueryAllPackagesPermission" />

  <application
      android:name=".ManagerApplication"
      android:allowBackup="true"
      android:dataExtractionRules="@xml/new_backup_rules"
      android:fullBackupContent="@xml/old_backup_rules"
      android:hasFragileUserData="true"
      android:icon="@mipmap/ic_launcher"
      android:label="@string/app_name"
      android:largeHeap="true"
      android:networkSecurityConfig="@xml/network_security_config"
      android:requestLegacyExternalStorage="true"
      android:roundIcon="@mipmap/ic_launcher_round"
      android:supportsRtl="true"
      android:theme="@style/Theme.AppCompat.NoActionBar"
      tools:targetApi="29">

    <receiver
        android:name=".installers.pm.PMIntentReceiver"
        android:exported="false" />

    <provider
        android:name="androidx.core.content.FileProvider"
        android:authorities="${applicationId}.provider"
        android:exported="false"
        android:grantUriPermissions="true">
      <meta-data
          android:name="android.support.FILE_PROVIDER_PATHS"
          android:resource="@xml/provider_paths" />
    </provider>

    <provider
        android:name="rikka.shizuku.ShizukuProvider"
        android:authorities="${applicationId}.shizuku"
        android:enabled="true"
        android:exported="true"
        android:multiprocess="false"
        android:permission="android.permission.INTERACT_ACROSS_USERS_FULL" />

    <activity
        android:name=".MainActivity"
        android:exported="true"
        android:launchMode="singleTask"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.RadiantLyricsManager.SplashScreen"
        tools:ignore="DiscouragedApi,LockedOrientationActivity">
      <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <action android:name="com.meowarex.rlmobile.REINSTALL" />
        <action android:name="com.meowarex.rlmobile.OPEN_PLUGINS" />
        <action android:name="com.meowarex.rlmobile.IMPORT_COMPONENT" />

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