Skip to content

Commit 3ac6a64

Browse files
6.6.1 - Alpha3 - 修复打包应用可能出现的 DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION 权限冲突
1 parent 559e1cd commit 3ac6a64

File tree

4 files changed

+31
-18
lines changed

4 files changed

+31
-18
lines changed

app/src/main/java/org/autojs/autojs/apkbuilder/ManifestEditor.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,13 @@ private class MutableNodeImpl extends AxmlWriter.NodeImpl {
101101

102102
@Override
103103
protected void onAttr(AxmlWriter.Attr a) {
104+
if ("permission".equals(this.name.data) && "name".equals(a.name.data) && a.value instanceof StringItem) {
105+
if ("org.autojs.autojs6.inrt.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION".equals(((StringItem) a.value).data)) {
106+
((StringItem) a.value).data = mPackageName + ".DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION";
107+
super.onAttr(a);
108+
return;
109+
}
110+
}
104111
if ("uses-permission".equals(this.name.data) && "name".equals(a.name.data) && a.value instanceof StringItem) {
105112
this.ignore = !ManifestEditor.this.isPermissionRequired(((StringItem) a.value).data);
106113
}

libs/utils.build.gradle

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -414,11 +414,12 @@ class Utils {
414414
while ((bytesRead = inputStream.read(buffer)) != -1) {
415415
outputStream.write(buffer, 0, bytesRead)
416416
downloadedSize += bytesRead
417-
418-
double progress = (downloadedSize * 100.0 / fileSize)
419-
String progressBar = generateProgressBar(progress)
420-
print String.format("\rDownloading... [ %s ] %.2f%%", progressBar, progress)
421-
System.out.flush()
417+
if (project.ext["platform"]["shouldPrintProgress"] == true) {
418+
double progress = (downloadedSize * 100.0 / fileSize)
419+
String progressBar = generateProgressBar(progress)
420+
print String.format("\rDownloading... [ %s ] %.2f%%", progressBar, progress)
421+
System.out.flush()
422+
}
422423
}
423424
}
424425
}
@@ -489,11 +490,12 @@ class Utils {
489490
}
490491
}
491492

492-
double progress = (processedEntries * 100.0 / totalEntries)
493-
String progressBar = generateProgressBar(progress)
494-
print String.format("\rExtracting... [ %s ] %.2f%%", progressBar, progress)
495-
System.out.flush()
496-
493+
if (project.ext["platform"]["shouldPrintProgress"] == true) {
494+
double progress = (processedEntries * 100.0 / totalEntries)
495+
String progressBar = generateProgressBar(progress)
496+
print String.format("\rExtracting... [ %s ] %.2f%%", progressBar, progress)
497+
System.out.flush()
498+
}
497499
processedEntries++
498500
}
499501
}
@@ -555,11 +557,12 @@ class Utils {
555557
}
556558
}
557559

558-
double progress = (processedEntries * 100.0 / totalEntries)
559-
String progressBar = generateProgressBar(progress)
560-
print String.format("\rExtracting... [ %s ] %.2f%%", progressBar, progress)
561-
System.out.flush()
562-
560+
if (project.ext["platform"]["shouldPrintProgress"] == true) {
561+
double progress = (processedEntries * 100.0 / totalEntries)
562+
String progressBar = generateProgressBar(progress)
563+
print String.format("\rExtracting... [ %s ] %.2f%%", progressBar, progress)
564+
System.out.flush()
565+
}
563566
processedEntries++
564567
}
565568
}

settings.gradle.kts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,7 @@ pluginManagement {
234234
),
235235
) {
236236
override val weight = 5
237+
override val shouldPrintProgress = false
237238
}
238239

239240
val unknown = object : Platform(
@@ -355,6 +356,7 @@ pluginManagement {
355356
open val gradleSettingsName: String? = null
356357
open val weight: Int = -Int.MAX_VALUE
357358
open var version: String = consts.DEFAULT_VERSION
359+
open val shouldPrintProgress: Boolean = true
358360

359361
open val fullName
360362
get() = uppercaseFirstChar(name)
@@ -626,6 +628,7 @@ pluginManagement {
626628
extensions.extraProperties["kotlinVersion"] = notations.classpath.find {
627629
it.contains("kotlin-gradle-plugin")
628630
}?.substringAfterLast(":") ?: config.fallbackKotlinVersion
631+
extensions.extraProperties["platform"] = platform
629632
}
630633

631634
}

version.properties

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#Wed Jan 01 12:09:07 CST 2025
2-
BUILD_TIME=1735704547526
1+
#Wed Jan 01 13:21:24 CST 2025
2+
BUILD_TIME=1735708884520
33
COMPILE_SDK_VERSION=34
44
JAVA_VERSION=23
55
JAVA_VERSION_MIN_RADICAL=0
@@ -17,6 +17,6 @@ RAPID_OCR_OPENCV_MOBILE_LABEL_VERSION=13
1717
RAPID_OCR_OPENCV_MOBILE_VERSION=4.5.3
1818
TARGET_SDK_VERSION=34
1919
TARGET_SDK_VERSION_INRT=29
20-
VERSION_BUILD=2939
20+
VERSION_BUILD=2940
2121
VERSION_NAME=6.6.1 Alpha3
2222
VSCODE_EXT_REQUIRED_VERSION=1.0.8

0 commit comments

Comments
 (0)