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

Commit 61f83fd

Browse files
committed
change log message
1 parent 9350fbe commit 61f83fd

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,19 +125,19 @@ public String getBundleUrl(String assetsBundleFileName) {
125125
String packageFilePath = codePushPackage.getCurrentPackageBundlePath();
126126
if (packageFilePath == null) {
127127
// There has not been any downloaded updates.
128+
CodePushUtils.logBundleUrl(binaryJsBundleUrl);
128129
return binaryJsBundleUrl;
129130
}
130131

131132
ReadableMap packageMetadata = codePushPackage.getCurrentPackage();
132133
// May throw NumberFormatException.
133134
Long binaryModifiedDateDuringPackageInstall = Long.parseLong(CodePushUtils.tryGetString(packageMetadata, BINARY_MODIFIED_TIME_KEY));
134135
if (binaryModifiedDateDuringPackageInstall == binaryResourcesModifiedTime) {
136+
CodePushUtils.logBundleUrl(packageFilePath);
135137
return packageFilePath;
136138
} else {
137139
// The binary version is newer.
138-
CodePushUtils.log("Found a package installed via CodePush that was installed " +
139-
"under a different binary version, so the JS bundle packaged in the " +
140-
"binary will be used as the most current package.");
140+
CodePushUtils.logBundleUrl(binaryJsBundleUrl);
141141
return binaryJsBundleUrl;
142142
}
143143
} catch (IOException e) {
@@ -255,7 +255,6 @@ private void initializeUpdateAfterRestart() {
255255
rollbackPackage();
256256
} else {
257257
// Clear the React dev bundle cache so that new updates can be loaded.
258-
if (com.facebook.react.BuildConfig.DEBUG)
259258
clearReactDevBundleCache();
260259
// Mark that we tried to initialize the new update, so that if it crashes,
261260
// we will know that we need to rollback when the app next starts.

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,4 +268,8 @@ public static String tryGetString(ReadableMap map, String key) {
268268
public static void log(String message) {
269269
Log.d(REACT_NATIVE_LOG_TAG, "[CodePush] " + message);
270270
}
271+
272+
public static void logBundleUrl(String path) {
273+
log("Loading JS bundle from \"" + path + "\"");
274+
}
271275
}

0 commit comments

Comments
 (0)