mirror of
https://github.com/godotengine/godot.git
synced 2025-11-11 02:51:25 +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:
parent
0f95e9f8e6
commit
7ad9d23a1d
7 changed files with 53 additions and 58 deletions
|
|
@ -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?) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue