Bug 1229350 - Disable Import first run slide on Android M+. r=liuche
--- a/mobile/android/base/java/org/mozilla/gecko/firstrun/FirstrunPagerConfig.java
+++ b/mobile/android/base/java/org/mozilla/gecko/firstrun/FirstrunPagerConfig.java
@@ -17,20 +17,23 @@ import java.util.List;
public class FirstrunPagerConfig {
public static final String LOGTAG = "FirstrunPagerConfig";
public static final String ONBOARDING_A = "onboarding-a";
public static final String ONBOARDING_B = "onboarding-b";
public static List<FirstrunPanelConfig> getDefault(Context context) {
final List<FirstrunPanelConfig> panels = new LinkedList<>();
- if (isInExperimentLocal(context, ONBOARDING_A)) {
+
+ // The "Import" feature is disabled on devices running Android M+ (Bug 1183559).
+ // Exclude these users from the experiment to add an "Import" panel.
+ if (isInExperimentLocal(context, ONBOARDING_A) && AppConstants.Versions.preM) {
panels.add(new FirstrunPanelConfig(WelcomePanel.class.getName(), WelcomePanel.TITLE_RES));
Telemetry.startUISession(TelemetryContract.Session.EXPERIMENT, ONBOARDING_A);
- } else if (isInExperimentLocal(context, ONBOARDING_B)) {
+ } else if (isInExperimentLocal(context, ONBOARDING_B) && AppConstants.Versions.preM) {
// Strings used for first run, pulled from existing strings.
panels.add(new FirstrunPanelConfig(ImportPanel.class.getName(), ImportPanel.TITLE_RES));
panels.add(new FirstrunPanelConfig(SyncPanel.class.getName(), SyncPanel.TITLE_RES));
Telemetry.startUISession(TelemetryContract.Session.EXPERIMENT, ONBOARDING_B);
} else {
Log.d(LOGTAG, "Not in an experiment!");
panels.add(new FirstrunPanelConfig(WelcomePanel.class.getName(), WelcomePanel.TITLE_RES));
}