Selaa lähdekoodia

Add onRequestPermissionsResult to ActivityCallbacks (#737)

Guy Carmeli 8 vuotta sitten
vanhempi
commit
4a3d57efec

+ 4
- 0
android/app/src/main/java/com/reactnativenavigation/controllers/ActivityCallbacks.java Näytä tiedosto

@@ -32,4 +32,8 @@ public class ActivityCallbacks {
32 32
     public void onActivityDestroyed(Activity activity) {
33 33
 
34 34
     }
35
+
36
+    public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
37
+
38
+    }
35 39
 }

+ 1
- 0
android/app/src/main/java/com/reactnativenavigation/controllers/NavigationActivity.java Näytä tiedosto

@@ -341,6 +341,7 @@ public class NavigationActivity extends AppCompatActivity implements DefaultHard
341 341
     }
342 342
 
343 343
     public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
344
+        NavigationApplication.instance.getActivityCallbacks().onRequestPermissionsResult(requestCode, permissions, grantResults);
344 345
         if (mPermissionListener != null && mPermissionListener.onRequestPermissionsResult(requestCode, permissions, grantResults)) {
345 346
             mPermissionListener = null;
346 347
         }