Browse Source

removed unused life cycle related field from BaseReactActivity

Guy Carmeli 8 years ago
parent
commit
3d738fae8a

+ 0
- 7
android/app/src/main/java/com/reactnativenavigation/activities/BaseReactActivity.java View File

15
 import android.widget.Toast;
15
 import android.widget.Toast;
16
 
16
 
17
 import com.facebook.common.logging.FLog;
17
 import com.facebook.common.logging.FLog;
18
-import com.facebook.react.LifecycleState;
19
 import com.facebook.react.ReactInstanceManager;
18
 import com.facebook.react.ReactInstanceManager;
20
 import com.facebook.react.ReactPackage;
19
 import com.facebook.react.ReactPackage;
21
 import com.facebook.react.ReactRootView;
20
 import com.facebook.react.ReactRootView;
45
     private static final String TAG = "BaseReactActivity";
44
     private static final String TAG = "BaseReactActivity";
46
     private static final String REDBOX_PERMISSION_MESSAGE =
45
     private static final String REDBOX_PERMISSION_MESSAGE =
47
             "Overlay permissions needs to be granted in order for react native apps to run in dev mode";
46
             "Overlay permissions needs to be granted in order for react native apps to run in dev mode";
48
-    private static final String EVENT_TOOLBAR_BUTTON_CLICKED = "OnToolbarButtonClicked";
49
 
47
 
50
     @Nullable
48
     @Nullable
51
     protected ReactInstanceManager mReactInstanceManager;
49
     protected ReactInstanceManager mReactInstanceManager;
52
-    private LifecycleState mLifecycleState = LifecycleState.BEFORE_RESUME;
53
     private boolean mDoRefresh = false;
50
     private boolean mDoRefresh = false;
54
     private Menu mMenu;
51
     private Menu mMenu;
55
     protected RnnToolBar mToolbar;
52
     protected RnnToolBar mToolbar;
177
         super.onResume();
174
         super.onResume();
178
         ContextProvider.setActivityContext(this);
175
         ContextProvider.setActivityContext(this);
179
 
176
 
180
-        mLifecycleState = LifecycleState.RESUMED;
181
-
182
         if (mReactInstanceManager != null) {
177
         if (mReactInstanceManager != null) {
183
             mReactInstanceManager.onResume(this, this);
178
             mReactInstanceManager.onResume(this, this);
184
         }
179
         }
188
     protected void onPause() {
183
     protected void onPause() {
189
         super.onPause();
184
         super.onPause();
190
 
185
 
191
-        mLifecycleState = LifecycleState.BEFORE_RESUME;
192
-
193
         if (mReactInstanceManager != null) {
186
         if (mReactInstanceManager != null) {
194
             mReactInstanceManager.onPause();
187
             mReactInstanceManager.onPause();
195
         }
188
         }