Merge pull request #22465 from FeralBytes/patch-1

Add support for onRequestPermissionsResult()
This commit is contained in:
Rémi Verschelde 2018-09-28 09:07:55 +02:00 committed by GitHub
commit e8282f9cce
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -184,6 +184,9 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC
protected void onMainActivityResult(int requestCode, int resultCode, Intent data) {
}
protected void onMainRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
}
protected void onMainPause() {}
protected void onMainResume() {}
protected void onMainDestroy() {}
@ -251,6 +254,13 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC
}
};
@Override
public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
for (int i = 0; i < singleton_count; i++) {
singletons[i].onMainRequestPermissionsResult(requestCode, permissions, grantResults);
}
};
public void onVideoInit() {
boolean use_gl3 = getGLESVersionCode() >= 0x00030000;