зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1268647 - Remove obsolete firstrun. r=sebastian
MozReview-Commit-ID: JCXn9wLMhcV --HG-- extra : rebase_source : f0fbdc697e2d6ad893c32bf605aa88b0e4c96e73
This commit is contained in:
Родитель
2614732244
Коммит
6ade2aca8e
|
@ -64,9 +64,9 @@ public class FirstrunAnimationContainer extends LinearLayout {
|
|||
animateHide();
|
||||
|
||||
// Stop all versions of firstrun A/B sessions.
|
||||
Telemetry.stopUISession(TelemetryContract.Session.EXPERIMENT, Experiments.ONBOARDING2_A);
|
||||
Telemetry.stopUISession(TelemetryContract.Session.EXPERIMENT, Experiments.ONBOARDING2_B);
|
||||
Telemetry.stopUISession(TelemetryContract.Session.EXPERIMENT, Experiments.ONBOARDING2_C);
|
||||
Telemetry.stopUISession(TelemetryContract.Session.EXPERIMENT, Experiments.ONBOARDING3_A);
|
||||
Telemetry.stopUISession(TelemetryContract.Session.EXPERIMENT, Experiments.ONBOARDING3_B);
|
||||
Telemetry.stopUISession(TelemetryContract.Session.EXPERIMENT, Experiments.ONBOARDING3_C);
|
||||
}
|
||||
|
||||
private void animateHide() {
|
||||
|
|
|
@ -35,7 +35,6 @@ public class FirstrunPager extends ViewPager {
|
|||
private Context context;
|
||||
protected FirstrunPanel.PagerNavigation pagerNavigation;
|
||||
private Decor mDecor;
|
||||
private View mTabStrip;
|
||||
|
||||
public FirstrunPager(Context context) {
|
||||
this(context, null);
|
||||
|
@ -51,8 +50,6 @@ public class FirstrunPager extends ViewPager {
|
|||
if (child instanceof Decor) {
|
||||
((ViewPager.LayoutParams) params).isDecor = true;
|
||||
mDecor = (Decor) child;
|
||||
mTabStrip = child;
|
||||
|
||||
mDecor.setOnTitleClickListener(new TabMenuStrip.OnTitleClickListener() {
|
||||
@Override
|
||||
public void onTitleClicked(int index) {
|
||||
|
@ -71,9 +68,6 @@ public class FirstrunPager extends ViewPager {
|
|||
panels = FirstrunPagerConfig.getRestricted();
|
||||
} else {
|
||||
panels = FirstrunPagerConfig.getDefault(appContext);
|
||||
if (panels.size() == 1) {
|
||||
mTabStrip.setVisibility(GONE);
|
||||
}
|
||||
}
|
||||
|
||||
setAdapter(new ViewPagerAdapter(fm, panels));
|
||||
|
|
|
@ -27,34 +27,26 @@ public class FirstrunPagerConfig {
|
|||
public static List<FirstrunPanelConfig> getDefault(Context context) {
|
||||
final List<FirstrunPanelConfig> panels = new LinkedList<>();
|
||||
|
||||
if (Experiments.isInExperimentLocal(context, Experiments.ONBOARDING2_A)) {
|
||||
panels.add(new FirstrunPanelConfig(WelcomePanel.class.getName(), WelcomePanel.TITLE_RES));
|
||||
Telemetry.startUISession(TelemetryContract.Session.EXPERIMENT, Experiments.ONBOARDING2_A);
|
||||
GeckoSharedPrefs.forProfile(context).edit().putString(Experiments.PREF_ONBOARDING_VERSION, Experiments.ONBOARDING2_A).apply();
|
||||
} else if (Experiments.isInExperimentLocal(context, Experiments.ONBOARDING2_B)) {
|
||||
panels.add(SimplePanelConfigs.urlbarPanelConfig);
|
||||
panels.add(SimplePanelConfigs.bookmarksPanelConfig);
|
||||
panels.add(SimplePanelConfigs.syncPanelConfig);
|
||||
panels.add(new FirstrunPanelConfig(SyncPanel.class.getName(), SyncPanel.TITLE_RES));
|
||||
Telemetry.startUISession(TelemetryContract.Session.EXPERIMENT, Experiments.ONBOARDING2_B);
|
||||
GeckoSharedPrefs.forProfile(context).edit().putString(Experiments.PREF_ONBOARDING_VERSION, Experiments.ONBOARDING2_B).apply();
|
||||
} else if (Experiments.isInExperimentLocal(context, Experiments.ONBOARDING2_C)) {
|
||||
if (Experiments.isInExperimentLocal(context, Experiments.ONBOARDING3_A)) {
|
||||
Telemetry.startUISession(TelemetryContract.Session.EXPERIMENT, Experiments.ONBOARDING3_A);
|
||||
GeckoSharedPrefs.forProfile(context).edit().putString(Experiments.PREF_ONBOARDING_VERSION, Experiments.ONBOARDING3_A).apply();
|
||||
} else if (Experiments.isInExperimentLocal(context, Experiments.ONBOARDING3_B)) {
|
||||
panels.add(SimplePanelConfigs.urlbarPanelConfig);
|
||||
panels.add(SimplePanelConfigs.bookmarksPanelConfig);
|
||||
panels.add(SimplePanelConfigs.dataPanelConfig);
|
||||
panels.add(SimplePanelConfigs.syncPanelConfig);
|
||||
panels.add(new FirstrunPanelConfig(SyncPanel.class.getName(), SyncPanel.TITLE_RES));
|
||||
Telemetry.startUISession(TelemetryContract.Session.EXPERIMENT, Experiments.ONBOARDING2_C);
|
||||
GeckoSharedPrefs.forProfile(context).edit().putString(Experiments.PREF_ONBOARDING_VERSION, Experiments.ONBOARDING2_C).apply();
|
||||
Telemetry.startUISession(TelemetryContract.Session.EXPERIMENT, Experiments.ONBOARDING3_B);
|
||||
GeckoSharedPrefs.forProfile(context).edit().putString(Experiments.PREF_ONBOARDING_VERSION, Experiments.ONBOARDING3_B).apply();
|
||||
} else if (Experiments.isInExperimentLocal(context, Experiments.ONBOARDING3_C)) {
|
||||
Telemetry.startUISession(TelemetryContract.Session.EXPERIMENT, Experiments.ONBOARDING3_C);
|
||||
GeckoSharedPrefs.forProfile(context).edit().putString(Experiments.PREF_ONBOARDING_VERSION, Experiments.ONBOARDING3_C).apply();
|
||||
} else {
|
||||
Log.d(LOGTAG, "Not in an experiment!");
|
||||
panels.add(new FirstrunPanelConfig(WelcomePanel.class.getName(), WelcomePanel.TITLE_RES));
|
||||
}
|
||||
|
||||
return panels;
|
||||
}
|
||||
|
||||
|
||||
public static List<FirstrunPanelConfig> getRestricted() {
|
||||
final List<FirstrunPanelConfig> panels = new LinkedList<>();
|
||||
panels.add(new FirstrunPanelConfig(RestrictedWelcomePanel.class.getName(), RestrictedWelcomePanel.TITLE_RES));
|
||||
|
|
|
@ -1,51 +0,0 @@
|
|||
/* -*- Mode: Java; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: nil; -*-
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
package org.mozilla.gecko.firstrun;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import org.mozilla.gecko.R;
|
||||
import org.mozilla.gecko.Telemetry;
|
||||
import org.mozilla.gecko.TelemetryContract;
|
||||
import org.mozilla.gecko.fxa.FxAccountConstants;
|
||||
import org.mozilla.gecko.fxa.activities.FxAccountWebFlowActivity;
|
||||
|
||||
public class WelcomePanel extends FirstrunPanel {
|
||||
public static final int TITLE_RES = R.string.firstrun_panel_title_welcome;
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstance) {
|
||||
final ViewGroup root = (ViewGroup) inflater.inflate(R.layout.firstrun_welcome_fragment, container, false);
|
||||
root.findViewById(R.id.welcome_account).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Telemetry.sendUIEvent(TelemetryContract.Event.ACTION, TelemetryContract.Method.BUTTON, "firstrun-sync");
|
||||
showBrowserHint = false;
|
||||
|
||||
final Intent intent = new Intent(FxAccountConstants.ACTION_FXA_GET_STARTED);
|
||||
intent.putExtra(FxAccountWebFlowActivity.EXTRA_ENDPOINT, FxAccountConstants.ENDPOINT_FIRSTRUN);
|
||||
intent.setFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
|
||||
startActivity(intent);
|
||||
|
||||
close();
|
||||
}
|
||||
});
|
||||
|
||||
root.findViewById(R.id.welcome_browse).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Telemetry.sendUIEvent(TelemetryContract.Event.ACTION, TelemetryContract.Method.BUTTON, "firstrun-browser");
|
||||
close();
|
||||
}
|
||||
});
|
||||
|
||||
return root;
|
||||
}
|
||||
}
|
|
@ -37,9 +37,9 @@ public class Experiments {
|
|||
|
||||
// Onboarding: "Features and Story". These experiments are determined
|
||||
// on the client, they are not part of the server config.
|
||||
public static final String ONBOARDING2_A = "onboarding2-a"; // Control: Single (blue) welcome screen
|
||||
public static final String ONBOARDING2_B = "onboarding2-b"; // 4 static Feature slides
|
||||
public static final String ONBOARDING2_C = "onboarding2-c"; // 4 static + 1 clickable (Data saving) Feature slides
|
||||
public static final String ONBOARDING3_A = "onboarding3-a"; // Control: No first run
|
||||
public static final String ONBOARDING3_B = "onboarding3-b"; // 4 static Feature + 1 dynamic slides
|
||||
public static final String ONBOARDING3_C = "onboarding3-c"; // Differentiating features slides
|
||||
|
||||
// Synchronizing the catalog of downloadable content from Kinto
|
||||
public static final String DOWNLOAD_CONTENT_CATALOG_SYNC = "download-content-catalog-sync";
|
||||
|
@ -95,12 +95,12 @@ public class Experiments {
|
|||
* @return returns value for experiment or false if experiment does not exist.
|
||||
*/
|
||||
public static boolean isInExperimentLocal(Context context, String experiment) {
|
||||
if (SwitchBoard.isInBucket(context, 0, 33)) {
|
||||
return Experiments.ONBOARDING2_A.equals(experiment);
|
||||
} else if (SwitchBoard.isInBucket(context, 33, 66)) {
|
||||
return Experiments.ONBOARDING2_B.equals(experiment);
|
||||
} else if (SwitchBoard.isInBucket(context, 66, 100)) {
|
||||
return Experiments.ONBOARDING2_C.equals(experiment);
|
||||
if (SwitchBoard.isInBucket(context, 0, 20)) {
|
||||
return Experiments.ONBOARDING3_A.equals(experiment);
|
||||
} else if (SwitchBoard.isInBucket(context, 20, 60)) {
|
||||
return Experiments.ONBOARDING3_B.equals(experiment);
|
||||
} else if (SwitchBoard.isInBucket(context, 60, 100)) {
|
||||
return Experiments.ONBOARDING3_C.equals(experiment);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -13,6 +13,10 @@ final class UnusedResourcesUtil {
|
|||
R.dimen.wrap_content,
|
||||
};
|
||||
|
||||
public static final int[] USED_IN_BRANDING = {
|
||||
R.drawable.large_icon
|
||||
};
|
||||
|
||||
public static final int[] USED_IN_COLOR_PALETTE = {
|
||||
R.color.private_browsing_purple, // This will be used eventually, then this item removed.
|
||||
};
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
|
||||
<!ENTITY firstrun_panel_title_welcome "Welcome">
|
||||
<!ENTITY onboard_start_message3 "Browse with &brandShortName;">
|
||||
<!ENTITY onboard_start_subtext3 "Make your mobile Web browsing experience truly your own.">
|
||||
|
||||
<!ENTITY firstrun_urlbar_message "Welcome to &brandShortName;">
|
||||
<!ENTITY firstrun_urlbar_subtext "Find things faster with helpful search suggestion shortcuts.">
|
||||
|
|
|
@ -313,7 +313,6 @@ gbjar.sources += ['java/org/mozilla/gecko/' + x for x in [
|
|||
'firstrun/FirstrunPanel.java',
|
||||
'firstrun/RestrictedWelcomePanel.java',
|
||||
'firstrun/SyncPanel.java',
|
||||
'firstrun/WelcomePanel.java',
|
||||
'FormAssistPopup.java',
|
||||
'GeckoAccessibility.java',
|
||||
'GeckoActivity.java',
|
||||
|
|
Двоичный файл не отображается.
До Ширина: | Высота: | Размер: 41 KiB |
Двоичный файл не отображается.
До Ширина: | Высота: | Размер: 48 KiB |
Двоичный файл не отображается.
До Ширина: | Высота: | Размер: 86 KiB |
Двоичный файл не отображается.
До Ширина: | Высота: | Размер: 25 KiB |
|
@ -1,66 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
|
||||
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:fillViewport="true">
|
||||
|
||||
<LinearLayout android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="248dp"
|
||||
android:background="@color/android:white"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical">
|
||||
|
||||
<FrameLayout android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/link_blue">
|
||||
|
||||
<ImageView android:layout_width="wrap_content"
|
||||
android:layout_height="248dp"
|
||||
android:scaleType="fitCenter"
|
||||
android:layout_gravity="center"
|
||||
android:adjustViewBounds="true"
|
||||
android:src="@drawable/firstrun_background_coffee"/>
|
||||
|
||||
<ImageView android:layout_width="@dimen/firstrun_brand_size"
|
||||
android:layout_height="@dimen/firstrun_brand_size"
|
||||
android:src="@drawable/large_icon"
|
||||
android:layout_gravity="center"/>
|
||||
</FrameLayout>
|
||||
|
||||
<TextView android:layout_width="@dimen/firstrun_content_width"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:paddingTop="30dp"
|
||||
android:textAppearance="@style/TextAppearance.FirstrunLight.Main"
|
||||
android:text="@string/firstrun_welcome_message"/>
|
||||
|
||||
<TextView android:layout_width="@dimen/firstrun_content_width"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="20dp"
|
||||
android:paddingBottom="30dp"
|
||||
android:gravity="center"
|
||||
android:textAppearance="@style/TextAppearance.FirstrunRegular.Body"
|
||||
android:text="@string/firstrun_welcome_subtext"/>
|
||||
|
||||
<Button android:id="@+id/welcome_account"
|
||||
style="@style/Widget.Firstrun.Button"
|
||||
android:background="@drawable/button_background_action_orange_round"
|
||||
android:layout_gravity="center"
|
||||
android:text="@string/firstrun_signin_button"/>
|
||||
|
||||
<TextView android:id="@+id/welcome_browse"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="20dp"
|
||||
android:gravity="center"
|
||||
android:textAppearance="@style/TextAppearance.FirstrunRegular.Link"
|
||||
android:text="@string/firstrun_welcome_button_browser"/>
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
|
@ -24,7 +24,6 @@
|
|||
<dimen name="browser_toolbar_site_security_padding_vertical">21dp</dimen>
|
||||
<dimen name="browser_toolbar_site_security_padding_horizontal">8dp</dimen>
|
||||
|
||||
<dimen name="firstrun_brand_size">72dp</dimen>
|
||||
<dimen name="firstrun_background_height">300dp</dimen>
|
||||
|
||||
<dimen name="tabs_panel_indicator_width">72dp</dimen>
|
||||
|
|
|
@ -61,7 +61,6 @@
|
|||
|
||||
<dimen name="firstrun_content_width">300dp</dimen>
|
||||
<dimen name="firstrun_min_height">180dp</dimen>
|
||||
<dimen name="firstrun_brand_size">48dp</dimen>
|
||||
<dimen name="firstrun_background_height">180dp</dimen>
|
||||
|
||||
<dimen name="overlay_prompt_content_width">260dp</dimen>
|
||||
|
|
|
@ -30,8 +30,6 @@
|
|||
#include ../services/strings.xml.in
|
||||
|
||||
<string name="firstrun_panel_title_welcome">&firstrun_panel_title_welcome;</string>
|
||||
<string name="firstrun_welcome_message">&onboard_start_message3;</string>
|
||||
<string name="firstrun_welcome_subtext">&onboard_start_subtext3;</string>
|
||||
|
||||
<string name="firstrun_urlbar_message">&firstrun_urlbar_message;</string>
|
||||
<string name="firstrun_urlbar_subtext">&firstrun_urlbar_subtext;</string>
|
||||
|
|
Загрузка…
Ссылка в новой задаче