From baddbaeb5becec766fe9ee183a672307b70f3d96 Mon Sep 17 00:00:00 2001
From: iamr0s <271257581@qq.com>
Date: Fri, 5 May 2023 14:26:29 +0800
Subject: [PATCH] remove API permission need in AndroidManifest.xml
---
api | 2 +-
app/build.gradle.kts | 4 ++--
app/src/main/AndroidManifest.xml | 16 +---------------
.../page/settings/config/ConfigViewModel.kt | 19 -------------------
4 files changed, 4 insertions(+), 37 deletions(-)
diff --git a/api b/api
index 39ed607..8998b00 160000
--- a/api
+++ b/api
@@ -1 +1 @@
-Subproject commit 39ed607305ee7cfcff3737b3f26c6c2dad668781
+Subproject commit 8998b00020f8a0e6fb3ddbe75530c7802c9535f9
diff --git a/app/build.gradle.kts b/app/build.gradle.kts
index 8e14621..9a40dcf 100644
--- a/app/build.gradle.kts
+++ b/app/build.gradle.kts
@@ -22,8 +22,8 @@ android {
applicationId = "com.rosan.dhizuku"
minSdk = 21
targetSdk = 33
- versionCode = 4
- versionName = "2.1"
+ versionCode = 5
+ versionName = "2.2"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index a177f8f..fef613e 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -18,18 +18,6 @@
-
-
-
-
@@ -70,8 +57,7 @@
android:directBootAware="true"
android:enabled="true"
android:exported="true"
- android:permission="com.rosan.dhizuku.permission.API"
- tools:ignore="UnusedAttribute" />
+ tools:ignore="ExportedContentProvider,UnusedAttribute" />
- packageInfo.requestedPermissions?.forEach {
- if (it == "com.rosan.dhizuku.permission.API") {
- val applicationInfo = packageInfo.applicationInfo
- val uid = applicationInfo.uid
- val data = map[uid]
- map[uid] = ConfigViewState.Data(
- uid = uid,
- packageName = packageInfo.packageName,
- label = applicationInfo.loadLabel(packageManager).toString(),
- icon = applicationInfo.loadIcon(packageManager),
- allowApi = data?.allowApi ?: false
- )
- }
- }
- }
state = ConfigViewState(data = map.values.sortedBy {
it.uid
})