You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
Updates how the REQUEST_INSTALL_PACKAGES permission is handled
- Only request the permission the first time the editor tries to open an apk - Disable the permission for the HorizonOS build as the HorizonOS store doesn't support it yet
This commit is contained in:
@@ -34,6 +34,9 @@
|
||||
<!-- Scene api -->
|
||||
<uses-permission android:name="com.oculus.permission.USE_SCENE" />
|
||||
|
||||
<!-- Temp removal of the 'REQUEST_INSTALL_PACKAGES' permission as it's currently forbidden by the Horizon OS store -->
|
||||
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" tools:node="remove" />
|
||||
|
||||
<application>
|
||||
|
||||
<activity
|
||||
|
||||
@@ -130,11 +130,20 @@ abstract class BaseGodotEditor : GodotActivity() {
|
||||
*/
|
||||
@CallSuper
|
||||
protected open fun getExcludedPermissions(): MutableSet<String> {
|
||||
return mutableSetOf(
|
||||
val excludedPermissions = mutableSetOf(
|
||||
// The RECORD_AUDIO permission is requested when the "audio/driver/enable_input" project
|
||||
// setting is enabled.
|
||||
Manifest.permission.RECORD_AUDIO
|
||||
Manifest.permission.RECORD_AUDIO,
|
||||
)
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
excludedPermissions.add(
|
||||
// The REQUEST_INSTALL_PACKAGES permission is requested the first time we attempt to
|
||||
// open an apk file.
|
||||
Manifest.permission.REQUEST_INSTALL_PACKAGES,
|
||||
)
|
||||
}
|
||||
return excludedPermissions
|
||||
}
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
|
||||
Reference in New Issue
Block a user