Skip to content

Commit

Permalink
Turning off new added features by default
Browse files Browse the repository at this point in the history
Summary: GK for instrument features will be off at beginning, it makes more sense to turn off these features before GK turned on for 100% public

Reviewed By: tianqibt

Differential Revision: D16853218

fbshipit-source-id: 3b247b32e4fa9ff56830d95e6ed885fbe44c393f
  • Loading branch information
dreamolight authored and facebook-github-bot committed Aug 16, 2019
1 parent 20d3b4b commit 6b4e710
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ private static boolean getGKStatus(Feature feature) {
private static boolean defaultStatus(Feature feature) {
switch (feature) {
case RestrictiveDataFiltering:
case Instrument:
case CrashReport:
case ErrorReport:
return false;
default: return true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@

import android.support.annotation.RestrictTo;

import com.facebook.FacebookSdk;
import com.facebook.appevents.UserDataStore;
import com.facebook.internal.FeatureManager;
import com.facebook.internal.instrument.crashreport.CrashHandler;
import com.facebook.internal.instrument.errorreport.ErrorReportHandler;
Expand All @@ -37,10 +39,13 @@ public class InstrumentManager {
* reports.
*/
public static void start() {
if (!FacebookSdk.getAutoLogAppEventsEnabled()) {
return;
}
if (FeatureManager.isEnabled(FeatureManager.Feature.CrashReport)) {
CrashHandler.enable();
}
if (FeatureManager.isEnabled(FeatureManager.Feature.CrashReport)) {
if (FeatureManager.isEnabled(FeatureManager.Feature.ErrorReport)) {
ErrorReportHandler.enable();
}
}
Expand Down

0 comments on commit 6b4e710

Please sign in to comment.