1
0
mirror of https://gitcode.com/gh_mirrors/re/react-native-pushy.git synced 2025-09-18 18:30:39 +08:00
Code Issues Packages Projects Releases Wiki Activity GitHub Gitee

Compare commits

..

2 Commits

Author SHA1 Message Date
sunnylqm
00c1eac457 v5.2.8 2019-09-17 12:06:08 +08:00
sunnylqm
84ffaa7f5a 解决某些情况下android不能重启的问题 2019-09-17 11:52:22 +08:00
2 changed files with 6 additions and 7 deletions

View File

@@ -135,13 +135,12 @@ public class UpdateModule extends ReactContextBaseJavaModule{
loadField.set(instanceManager, loader);
}
final Method recreateMethod = instanceManager.getClass().getMethod("recreateReactContextInBackground");
try {
instanceManager.recreateReactContextInBackground();
} catch(Throwable err) {
activity.recreate();
}
final ReactInstanceManager finalizedInstanceManager = instanceManager;
recreateMethod.invoke(finalizedInstanceManager);
activity.recreate();
} catch (Throwable err) {
Log.e("pushy", "Failed to restart application", err);
}

View File

@@ -1,6 +1,6 @@
{
"name": "react-native-update",
"version": "5.2.7",
"version": "5.2.8",
"description": "react-native hot update",
"main": "lib/index.js",
"scripts": {