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
512
512
RCT_EXPORT_METHOD (getNewStatusReport:(RCTPromiseResolveBlock)resolve
513
513
rejecter:(RCTPromiseRejectBlock)reject)
514
514
{
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
- }
524
515
525
516
dispatch_async (dispatch_get_global_queue (DISPATCH_QUEUE_PRIORITY_DEFAULT, 0 ), ^{
526
517
if (needToReportRollback) {
@@ -541,15 +532,15 @@ - (void)savePendingUpdate:(NSString *)packageHash
541
532
resolve ([CodePushTelemetryManager getUpdateReport: currentPackage]);
542
533
return ;
543
534
}
544
- } else if (isRunningBinaryVersion) {
535
+ } else if (isRunningBinaryVersion || [_bridge.bundleURL.scheme hasPrefix: @" http" ]) {
536
+ // Check if the current appVersion has been reported.
545
537
NSString *appVersion = [[CodePushConfig current ] appVersion ];
546
538
resolve ([CodePushTelemetryManager getBinaryUpdateReport: appVersion]);
547
539
return ;
548
540
}
549
541
550
542
resolve (nil );
551
543
});
552
- #endif
553
544
}
554
545
555
546
/*
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ android {
22
22
}
23
23
24
24
dependencies {
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 '
28
28
}
Original file line number Diff line number Diff line change @@ -426,11 +426,6 @@ protected Void doInBackground(Object... params) {
426
426
427
427
@ ReactMethod
428
428
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
- }
434
429
435
430
AsyncTask asyncTask = new AsyncTask () {
436
431
@ Override
You can’t perform that action at this time.
0 commit comments