Bladeren bron

Clear intent extras in onPause (#770)

this prevents linking module from handling intents each time app is returned to foreground
Guy Carmeli 8 jaren geleden
bovenliggende
commit
02a432dba4

+ 3
- 0
android/app/src/main/java/com/reactnativenavigation/controllers/IntentDataHandler.java Bestand weergeven

@@ -1,6 +1,7 @@
1 1
 package com.reactnativenavigation.controllers;
2 2
 
3 3
 import android.content.Intent;
4
+import android.os.Bundle;
4 5
 import android.support.annotation.Nullable;
5 6
 
6 7
 import com.reactnativenavigation.NavigationApplication;
@@ -36,6 +37,8 @@ class IntentDataHandler {
36 37
     static void onPause(@Nullable Intent intent) {
37 38
         if (intent != null) {
38 39
             intent.setData(null);
40
+            intent.getExtras().clear();
41
+            intent.replaceExtras(Bundle.EMPTY);
39 42
         }
40 43
         clear();
41 44
     }