This repository was archived by the owner on May 20, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +5
-19
lines changed
src/main/java/com/microsoft/codepush/react Expand file tree Collapse file tree 3 files changed +5
-19
lines changed Original file line number Diff line number Diff line change @@ -512,15 +512,6 @@ - (void)savePendingUpdate:(NSString *)packageHash
512512RCT_EXPORT_METHOD (getNewStatusReport:(RCTPromiseResolveBlock)resolve
513513 rejecter:(RCTPromiseRejectBlock)reject)
514514{
515- #ifdef DEBUG
516- // Do not report metrics if running in debug mode.
517- resolve (nil );
518- #else
519- if ([_bridge.bundleURL.scheme hasPrefix: @" http" ]) {
520- // Do not report metrics if running bundle from packager.
521- resolve (nil );
522- return ;
523- }
524515
525516 dispatch_async (dispatch_get_global_queue (DISPATCH_QUEUE_PRIORITY_DEFAULT, 0 ), ^{
526517 if (needToReportRollback) {
@@ -541,15 +532,15 @@ - (void)savePendingUpdate:(NSString *)packageHash
541532 resolve ([CodePushTelemetryManager getUpdateReport: currentPackage]);
542533 return ;
543534 }
544- } else if (isRunningBinaryVersion) {
535+ } else if (isRunningBinaryVersion || [_bridge.bundleURL.scheme hasPrefix: @" http" ]) {
536+ // Check if the current appVersion has been reported.
545537 NSString *appVersion = [[CodePushConfig current ] appVersion ];
546538 resolve ([CodePushTelemetryManager getBinaryUpdateReport: appVersion]);
547539 return ;
548540 }
549541
550542 resolve (nil );
551543 });
552- #endif
553544}
554545
555546/*
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ android {
2222}
2323
2424dependencies {
25- compile fileTree(dir : " libs" , include : [" *.jar" ])
26- compile " com.android.support:appcompat-v7:23.0.1 "
27- compile " com.facebook.react:react-native:0.19.+ "
25+ compile fileTree(dir : ' libs' , include : [' *.jar' ])
26+ compile ' com.android.support:appcompat-v7:23.0.0 '
27+ compile ' com.facebook.react:react-native:0.15.1 '
2828}
Original file line number Diff line number Diff line change @@ -426,11 +426,6 @@ protected Void doInBackground(Object... params) {
426426
427427 @ ReactMethod
428428 public void getNewStatusReport (final Promise promise ) {
429- if (isDebugMode ) {
430- // Do not report metrics if running in debug mode.
431- promise .resolve ("" );
432- return ;
433- }
434429
435430 AsyncTask asyncTask = new AsyncTask () {
436431 @ Override
You can’t perform that action at this time.
0 commit comments