可以在project.json中使用权限的小写字符串配置打包的启用权限,如"permissions": ["internet"]
This commit is contained in:
@@ -536,7 +536,12 @@ public class BuildActivity extends BaseActivity implements ApkBuilder.ProgressCa
|
|||||||
checkBox.setTextSize(12);
|
checkBox.setTextSize(12);
|
||||||
int marginInPixels = (int) (8 * getResources().getDisplayMetrics().density);
|
int marginInPixels = (int) (8 * getResources().getDisplayMetrics().density);
|
||||||
checkBox.setPadding(marginInPixels, 0, 0, 0);
|
checkBox.setPadding(marginInPixels, 0, 0, 0);
|
||||||
checkBox.setChecked(false);
|
if (mProjectConfig != null) {
|
||||||
|
boolean checked = mProjectConfig.getPermissions().stream().anyMatch(p -> ("android.permission." + p.toUpperCase()).equals(permission));
|
||||||
|
checkBox.setChecked(checked);
|
||||||
|
} else {
|
||||||
|
checkBox.setChecked(false);
|
||||||
|
}
|
||||||
mFlexboxPermissionsView.addView(checkBox);
|
mFlexboxPermissionsView.addView(checkBox);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user