Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit a8b90d9

Browse files
committed
undo rollback change
1 parent 84af139 commit a8b90d9

File tree

1 file changed

+4
-8
lines changed
  • android/app/src/main/java/com/microsoft/codepush/react

1 file changed

+4
-8
lines changed

android/app/src/main/java/com/microsoft/codepush/react/CodePush.java

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141

4242
public class CodePush {
4343

44-
private static int rollbackTimeout = 0;
4544
private boolean resumablePendingUpdateAvailable = false;
4645
private boolean didUpdate = false;
4746
private Timer timer;
@@ -89,11 +88,6 @@ public CodePush(String deploymentKey, Activity mainActivity) {
8988
}
9089

9190
checkForPendingUpdate(/*needsRestart*/ false);
92-
93-
if (0 != rollbackTimeout) {
94-
startRollbackTimer(rollbackTimeout);
95-
rollbackTimeout = 0;
96-
}
9791
}
9892

9993
public ReactPackage getReactPackage() {
@@ -191,7 +185,9 @@ private void initializeUpdateWithRollbackTimeout(int rollbackTimeout, boolean ne
191185
codePushNativeModule.loadBundle();
192186
}
193187

194-
CodePush.rollbackTimeout = rollbackTimeout;
188+
if (0 != rollbackTimeout) {
189+
startRollbackTimer(rollbackTimeout);
190+
}
195191
}
196192

197193
private boolean isFailedHash(String packageHash) {
@@ -286,7 +282,7 @@ private class CodePushNativeModule extends ReactContextBaseJavaModule {
286282
private void loadBundle() {
287283
Intent intent = mainActivity.getIntent();
288284
mainActivity.finish();
289-
applicationContext.startActivity(intent);
285+
mainActivity.startActivity(intent);
290286
}
291287

292288
@ReactMethod

0 commit comments

Comments
 (0)