mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-02-10 17:22:45 +08:00
revert D2602236
fb-gh-sync-id: 251cc97cea632db68d742d51f9ecd6de335b7a23
This commit is contained in:
committed by
facebook-github-bot-4
parent
010380cca6
commit
c69c862b9e
@@ -14,10 +14,8 @@ import javax.annotation.Nullable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.Application;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
@@ -90,7 +88,6 @@ public class ReactInstanceManager {
|
||||
private final Context mApplicationContext;
|
||||
private @Nullable DefaultHardwareBackBtnHandler mDefaultBackButtonImpl;
|
||||
private String mSourceUrl;
|
||||
private @Nullable Activity mCurrentActivity;
|
||||
|
||||
private final ReactInstanceDevCommandsHandler mDevInterface =
|
||||
new ReactInstanceDevCommandsHandler() {
|
||||
@@ -320,7 +317,6 @@ public class ReactInstanceManager {
|
||||
mDevSupportManager.setDevSupportEnabled(false);
|
||||
}
|
||||
|
||||
mCurrentActivity = null;
|
||||
if (mCurrentReactContext != null) {
|
||||
mCurrentReactContext.onPause();
|
||||
}
|
||||
@@ -337,7 +333,7 @@ public class ReactInstanceManager {
|
||||
* @param defaultBackButtonImpl a {@link DefaultHardwareBackBtnHandler} from an Activity that owns
|
||||
* this instance of {@link ReactInstanceManager}.
|
||||
*/
|
||||
public void onResume(Activity activity, DefaultHardwareBackBtnHandler defaultBackButtonImpl) {
|
||||
public void onResume(DefaultHardwareBackBtnHandler defaultBackButtonImpl) {
|
||||
UiThreadUtil.assertOnUiThread();
|
||||
|
||||
mLifecycleState = LifecycleState.RESUMED;
|
||||
@@ -347,9 +343,8 @@ public class ReactInstanceManager {
|
||||
mDevSupportManager.setDevSupportEnabled(true);
|
||||
}
|
||||
|
||||
mCurrentActivity = activity;
|
||||
if (mCurrentReactContext != null) {
|
||||
mCurrentReactContext.onResume(activity);
|
||||
mCurrentReactContext.onResume();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -365,12 +360,6 @@ public class ReactInstanceManager {
|
||||
}
|
||||
}
|
||||
|
||||
public void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
if (mCurrentReactContext != null) {
|
||||
mCurrentReactContext.onActivityResult(requestCode, resultCode, data);
|
||||
}
|
||||
}
|
||||
|
||||
public void showDevOptionsDialog() {
|
||||
UiThreadUtil.assertOnUiThread();
|
||||
mDevSupportManager.showDevOptionsDialog();
|
||||
@@ -588,7 +577,7 @@ public class ReactInstanceManager {
|
||||
|
||||
private void moveReactContextToCurrentLifecycleState(ReactApplicationContext reactContext) {
|
||||
if (mLifecycleState == LifecycleState.RESUMED) {
|
||||
reactContext.onResume(mCurrentActivity);
|
||||
reactContext.onResume();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user