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

Commit b125060

Browse files
committed
include restart immediate update and pending update changes
1 parent 56fa040 commit b125060

File tree

1 file changed

+7
-8
lines changed
  • android/app/src/main/java/com/microsoft/reactnativecodepush

1 file changed

+7
-8
lines changed

android/app/src/main/java/com/microsoft/reactnativecodepush/CodePush.java

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -275,11 +275,6 @@ public void installUpdate(ReadableMap updatePackage, int rollbackTimeout, int in
275275
}
276276
}
277277

278-
@ReactMethod
279-
public void restartApp(int rollbackTimeout) {
280-
initializeUpdateWithRollbackTimeout(rollbackTimeout, /*needsRestart*/ true);
281-
}
282-
283278
@ReactMethod
284279
public void downloadUpdate(final ReadableMap updatePackage, final Callback resolve, final Callback reject) {
285280
try {
@@ -346,9 +341,13 @@ public void setUsingTestFolder(boolean shouldUseTestFolder) {
346341
}
347342

348343
@ReactMethod
349-
public void setDeploymentKey(String deploymentKey, Callback resolve, Callback reject) {
350-
codePushConfig.setDeploymentKey(deploymentKey);
351-
resolve.invoke("");
344+
public void restartImmediateUpdate(int rollbackTimeout) {
345+
initializeUpdateWithRollbackTimeout(rollbackTimeout, /*needsRestart*/ true);
346+
}
347+
348+
@ReactMethod
349+
public void restartPendingUpdate() {
350+
checkForPendingUpdate(/*needsRestart*/ true);
352351
}
353352

354353
@Override

0 commit comments

Comments
 (0)