File tree Expand file tree Collapse file tree 1 file changed +4
-9
lines changed
xpatch/src/main/java/com/storm/wind/xpatch Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -240,35 +240,30 @@ protected void doCommandLine() {
240
240
241
241
private void modifyManifestFile (String filePath , String dstFilePath , String originalApplicationName ) {
242
242
ModificationProperty property = new ModificationProperty ();
243
- boolean modifyEnabled = false ;
244
243
if (isNotEmpty (newPackageName )) {
245
- modifyEnabled = true ;
246
244
property .addManifestAttribute (new AttributeItem (NodeValue .Manifest .PACKAGE , newPackageName ).setNamespace (null ));
247
245
}
248
246
249
247
if (versionCode > 0 ) {
250
- modifyEnabled = true ;
251
248
property .addManifestAttribute (new AttributeItem (NodeValue .Manifest .VERSION_CODE , versionCode ));
252
249
}
253
250
254
251
if (isNotEmpty (versionName )) {
255
- modifyEnabled = true ;
256
252
property .addManifestAttribute (new AttributeItem (NodeValue .Manifest .VERSION_NAME , versionName ));
257
253
}
258
254
259
255
if (debuggable >= 0 ) {
260
- modifyEnabled = true ;
261
256
property .addApplicationAttribute (new AttributeItem (NodeValue .Application .DEBUGGABLE , debuggable != 0 ));
262
257
}
263
258
264
259
if (!dexModificationMode || !isNotEmpty (originalApplicationName )) {
265
- modifyEnabled = true ;
266
260
property .addApplicationAttribute (new AttributeItem (NodeValue .Application .NAME , PROXY_APPLICATION_NAME ));
267
261
}
268
262
269
- if (modifyEnabled ) {
270
- FileProcesser .processManifestFile (filePath , dstFilePath , property );
271
- }
263
+ // Android 11, needs this permission
264
+ property .addUsesPermission ("android.permission.QUERY_ALL_PACKAGES" );
265
+
266
+ FileProcesser .processManifestFile (filePath , dstFilePath , property );
272
267
}
273
268
274
269
private int findDexFileCount (String unzipApkFilePath ) {
You can’t perform that action at this time.
0 commit comments