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

Commit 951d6ca

Browse files
committed
nextFrameBusy -> hasScheduledNextFrame
1 parent 6a8ce4d commit 951d6ca

File tree

1 file changed

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

1 file changed

+6
-6
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ private void initializeUpdateAfterRestart() {
238238
// Reset the state which indicates that
239239
// the app was just freshly updated.
240240
didUpdate = false;
241-
241+
242242
JSONObject pendingUpdate = getPendingUpdate();
243243
if (pendingUpdate != null) {
244244
try {
@@ -253,7 +253,7 @@ private void initializeUpdateAfterRestart() {
253253
// There is in fact a new update running for the first
254254
// time, so update the local state to ensure the client knows.
255255
didUpdate = true;
256-
256+
257257
// Mark that we tried to initialize the new update, so that if it crashes,
258258
// we will know that we need to rollback when the app next starts.
259259
savePendingUpdate(pendingUpdate.getString(PENDING_UPDATE_HASH_KEY),
@@ -449,7 +449,7 @@ protected Void doInBackground(Void... params) {
449449
WritableMap mutableUpdatePackage = CodePushUtils.convertReadableMapToWritableMap(updatePackage);
450450
mutableUpdatePackage.putString(BINARY_MODIFIED_TIME_KEY, "" + getBinaryResourcesModifiedTime());
451451
codePushPackage.downloadPackage(mutableUpdatePackage, CodePush.this.assetsBundleFileName, new DownloadProgressCallback() {
452-
private boolean nextFrameBusy = false;
452+
private boolean hasScheduledNextFrame = false;
453453
private DownloadProgress latestDownloadProgress = null;
454454

455455
@Override
@@ -459,11 +459,11 @@ public void call(DownloadProgress downloadProgress) {
459459
}
460460

461461
this.latestDownloadProgress = downloadProgress;
462-
if (nextFrameBusy) {
462+
if (hasScheduledNextFrame) {
463463
return;
464464
}
465465

466-
nextFrameBusy = true;
466+
hasScheduledNextFrame = true;
467467
mainActivity.runOnUiThread(new Runnable() {
468468
@Override
469469
public void run() {
@@ -473,7 +473,7 @@ public void doFrame(long frameTimeNanos) {
473473
getReactApplicationContext()
474474
.getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class)
475475
.emit(DOWNLOAD_PROGRESS_EVENT_NAME, latestDownloadProgress.createWritableMap());
476-
nextFrameBusy = false;
476+
hasScheduledNextFrame = false;
477477
}
478478
});
479479
}

0 commit comments

Comments
 (0)