For #13926 - MP migration

pull/58/head
ekager 4 years ago committed by Emily Kager
parent 0c748c0500
commit 83ffcac57e

@ -3946,3 +3946,31 @@ progressive_web_app:
- fenix-core@mozilla.com
- erichards@mozilla.com
expires: "2021-03-01"
master_password:
displayed:
type: event
description: |
The master password migration dialog was displayed
bugs:
- https://github.com/mozilla-mobile/fenix/pull/14468#issuecomment-684114534
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/14468#issuecomment-684114534
data_sensitivity:
- interaction
notification_emails:
- fenix-core@mozilla.com
expires: "2021-03-01"
migration:
type: event
description: |
Logins were successfully migrated using a master password.
bugs:
- https://github.com/mozilla-mobile/fenix/pull/14468#issuecomment-684114534
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/14468#issuecomment-684114534
data_sensitivity:
- interaction
notification_emails:
- fenix-core@mozilla.com
expires: "2021-03-01"

@ -186,6 +186,9 @@ sealed class Event {
object ProgressiveWebAppOpenFromHomescreenTap : Event()
object ProgressiveWebAppInstallAsShortcut : Event()
object MasterPasswordMigrationSuccess : Event()
object MasterPasswordMigrationDisplayed : Event()
// Interaction events with extras
data class ProgressiveWebAppForeground(val timeForegrounded: Long) : Event() {

@ -27,6 +27,7 @@ import org.mozilla.fenix.GleanMetrics.FindInPage
import org.mozilla.fenix.GleanMetrics.History
import org.mozilla.fenix.GleanMetrics.LoginDialog
import org.mozilla.fenix.GleanMetrics.Logins
import org.mozilla.fenix.GleanMetrics.MasterPassword
import org.mozilla.fenix.GleanMetrics.MediaNotification
import org.mozilla.fenix.GleanMetrics.MediaState
import org.mozilla.fenix.GleanMetrics.Metrics
@ -684,6 +685,13 @@ private val Event.wrapper: EventWrapper<*>?
{ ProgressiveWebApp.backgroundKeys.valueOf(it) }
)
Event.MasterPasswordMigrationDisplayed -> EventWrapper<NoExtraKeys>(
{ MasterPassword.displayed.record(it) }
)
Event.MasterPasswordMigrationSuccess -> EventWrapper<NoExtraKeys>(
{ MasterPassword.migration.record(it) }
)
// Don't record other events in Glean:
is Event.AddBookmark -> null
is Event.OpenedBookmark -> null

@ -4,6 +4,8 @@
package org.mozilla.fenix.components.tips
import android.graphics.drawable.Drawable
sealed class TipType {
data class Button(val text: String, val action: () -> Unit) : TipType()
}
@ -13,7 +15,8 @@ open class Tip(
val identifier: String,
val title: String,
val description: String,
val learnMoreURL: String?
val learnMoreURL: String?,
val titleDrawable: Drawable? = null
)
interface TipProvider {

@ -0,0 +1,265 @@
/* 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.fenix.components.tips.providers
import android.content.Context
import android.text.Editable
import android.text.TextWatcher
import android.view.LayoutInflater
import androidx.appcompat.app.AlertDialog
import androidx.core.content.ContextCompat
import androidx.core.view.isVisible
import com.google.android.material.button.MaterialButton
import com.google.android.material.textfield.TextInputEditText
import com.google.android.material.textfield.TextInputLayout
import io.sentry.Sentry
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.Dispatchers.IO
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
import mozilla.appservices.logins.IdCollisionException
import mozilla.appservices.logins.InvalidRecordException
import mozilla.appservices.logins.LoginsStorageException
import mozilla.appservices.logins.ServerPassword
import mozilla.components.concept.storage.Login
import mozilla.components.support.migration.FennecLoginsMPImporter
import mozilla.components.support.migration.FennecProfile
import org.mozilla.fenix.R
import org.mozilla.fenix.components.metrics.Event
import org.mozilla.fenix.components.tips.Tip
import org.mozilla.fenix.components.tips.TipProvider
import org.mozilla.fenix.components.tips.TipType
import org.mozilla.fenix.ext.components
import org.mozilla.fenix.ext.metrics
import org.mozilla.fenix.ext.settings
/**
* Tip explaining to master password users how to migrate their logins.
*/
class MasterPasswordTipProvider(
private val context: Context,
private val navigateToLogins: () -> Unit,
private val dismissTip: (Tip) -> Unit
) : TipProvider {
private val fennecLoginsMPImporter: FennecLoginsMPImporter? by lazy {
FennecProfile.findDefault(
context,
context.components.analytics.crashReporter
)?.let {
FennecLoginsMPImporter(
it
)
}
}
override val tip: Tip? by lazy { masterPasswordMigrationTip() }
override val shouldDisplay: Boolean by lazy {
context.settings().shouldDisplayMasterPasswordMigrationTip &&
fennecLoginsMPImporter?.hasMasterPassword() == true
}
private fun masterPasswordMigrationTip(): Tip =
Tip(
type = TipType.Button(
text = context.getString(R.string.mp_homescreen_button),
action = ::showMasterPasswordMigration
),
identifier = context.getString(R.string.pref_key_master_password_tip),
title = context.getString(R.string.mp_homescreen_tip_title),
description = context.getString(R.string.mp_homescreen_tip_message),
learnMoreURL = null,
titleDrawable = ContextCompat.getDrawable(context, R.drawable.ic_login)
)
private fun showMasterPasswordMigration() {
val dialogView = LayoutInflater.from(context).inflate(R.layout.mp_migration_dialog, null)
val dialogBuilder = AlertDialog.Builder(context).apply {
setTitle(context.getString(R.string.mp_dialog_title_recovery_transfer_saved_logins))
setMessage(context.getString(R.string.mp_dialog_message_recovery_transfer_saved_logins))
setView(dialogView)
create()
}
val dialog = dialogBuilder.show()
context.metrics.track(Event.MasterPasswordMigrationDisplayed)
val passwordErrorText = context.getString(R.string.mp_dialog_error_transfer_saved_logins)
val migrationContinueButton =
dialogView.findViewById<MaterialButton>(R.id.migration_continue)
val passwordView = dialogView.findViewById<TextInputEditText>(R.id.password_field)
val passwordLayout =
dialogView.findViewById<TextInputLayout>(R.id.password_text_input_layout)
passwordView.addTextChangedListener(
object : TextWatcher {
var isValid = false
override fun afterTextChanged(p: Editable?) {
when {
p.toString().isEmpty() -> {
isValid = false
passwordLayout.error = passwordErrorText
}
else -> {
val possiblePassword = passwordView.text.toString()
isValid =
fennecLoginsMPImporter?.checkPassword(possiblePassword) == true
passwordLayout.error = if (isValid) null else passwordErrorText
}
}
migrationContinueButton.alpha = if (isValid) 1F else HALF_OPACITY
migrationContinueButton.isEnabled = isValid
}
override fun beforeTextChanged(
p: CharSequence?,
start: Int,
count: Int,
after: Int
) {
// NOOP
}
override fun onTextChanged(p: CharSequence?, start: Int, before: Int, count: Int) {
// NOOP
}
})
migrationContinueButton.apply {
setOnClickListener {
// Step 1: Verify the password again before trying to use it
val possiblePassword = passwordView.text.toString()
val isValid = fennecLoginsMPImporter?.checkPassword(possiblePassword) == true
// Step 2: With valid MP, get logins and complete the migration
if (isValid) {
val logins = fennecLoginsMPImporter?.getLoginRecords(
possiblePassword,
context.components.analytics.crashReporter
)
if (logins.isNullOrEmpty()) {
showFailureDialog()
dialog.dismiss()
} else {
saveLogins(logins, dialog)
}
} else {
passwordView.error =
context?.getString(R.string.mp_dialog_error_transfer_saved_logins)
}
}
}
dialogView.findViewById<MaterialButton>(R.id.migration_cancel).apply {
setOnClickListener {
dialog.dismiss()
}
}
}
private fun showFailureDialog() {
val dialogView =
LayoutInflater.from(context).inflate(R.layout.mp_migration_done_dialog, null)
val dialogBuilder = AlertDialog.Builder(context).apply {
setTitle(context.getString(R.string.mp_dialog_title_transfer_failure))
setMessage(context.getString(R.string.mp_dialog_message_transfer_failure))
setView(dialogView)
create()
}
val dialog = dialogBuilder.show()
dialogView.findViewById<MaterialButton>(R.id.positive_button).apply {
text = context.getString(R.string.mp_dialog_close_transfer)
setOnClickListener {
tip?.let { dismissTip(it) }
dialog.dismiss()
}
}
dialogView.findViewById<MaterialButton>(R.id.negative_button).apply {
isVisible = false
}
}
private fun saveLogins(logins: List<ServerPassword>, dialog: AlertDialog) {
CoroutineScope(IO).launch {
logins.map { it.toLogin() }.forEach {
try {
context.components.core.passwordsStorage.add(it)
} catch (e: InvalidRecordException) {
// This record was invalid and we couldn't save this login
Sentry.capture("Master Password migration add login error $e for reason ${e.reason}")
} catch (e: IdCollisionException) {
// Nonempty ID was provided
Sentry.capture("Master Password migration add login error $e")
} catch (e: LoginsStorageException) {
// Some other error occurred
Sentry.capture("Master Password migration add login error $e")
}
}
withContext(Dispatchers.Main) {
// Step 3: Dismiss this dialog and show the success dialog
showSuccessDialog()
dialog.dismiss()
}
}
}
private fun showSuccessDialog() {
tip?.let { dismissTip(it) }
context.metrics.track(Event.MasterPasswordMigrationSuccess)
val dialogView =
LayoutInflater.from(context).inflate(R.layout.mp_migration_done_dialog, null)
val dialogBuilder = AlertDialog.Builder(context).apply {
setTitle(context.getString(R.string.mp_dialog_title_transfer_success))
setMessage(context.getString(R.string.mp_dialog_message_transfer_success))
setView(dialogView)
create()
}
val dialog = dialogBuilder.show()
dialogView.findViewById<MaterialButton>(R.id.positive_button).apply {
setOnClickListener {
navigateToLogins()
dialog.dismiss()
}
}
dialogView.findViewById<MaterialButton>(R.id.negative_button).apply {
setOnClickListener {
dialog.dismiss()
}
}
}
/**
* Converts an Application Services [ServerPassword] to an Android Components [Login]
*/
fun ServerPassword.toLogin() = Login(
origin = hostname,
formActionOrigin = formSubmitURL,
httpRealm = httpRealm,
username = username,
password = password,
timesUsed = timesUsed,
timeCreated = timeCreated,
timeLastUsed = timeLastUsed,
timePasswordChanged = timePasswordChanged,
usernameField = usernameField,
passwordField = passwordField
)
companion object {
private const val HALF_OPACITY = .5F
}
}

@ -82,6 +82,8 @@ import org.mozilla.fenix.components.StoreProvider
import org.mozilla.fenix.components.TabCollectionStorage
import org.mozilla.fenix.components.metrics.Event
import org.mozilla.fenix.components.tips.FenixTipManager
import org.mozilla.fenix.components.tips.Tip
import org.mozilla.fenix.components.tips.providers.MasterPasswordTipProvider
import org.mozilla.fenix.components.tips.providers.MigrationTipProvider
import org.mozilla.fenix.components.toolbar.TabCounterMenu
import org.mozilla.fenix.components.toolbar.ToolbarPosition
@ -174,6 +176,7 @@ class HomeFragment : Fragment() {
}
}
@Suppress("LongMethod")
override fun onCreateView(
inflater: LayoutInflater,
container: ViewGroup?,
@ -197,7 +200,18 @@ class HomeFragment : Fragment() {
expandedCollections = emptySet(),
mode = currentMode.getCurrentMode(),
topSites = components.core.topSiteStorage.cachedTopSites,
tip = FenixTipManager(listOf(MigrationTipProvider(requireContext()))).getTip(),
tip = StrictMode.allowThreadDiskReads().resetPoliciesAfter {
FenixTipManager(
listOf(
MasterPasswordTipProvider(
requireContext(),
::navToSavedLogins,
::dismissTip
),
MigrationTipProvider(requireContext())
)
).getTip()
},
showCollectionPlaceholder = components.settings.showCollectionsPlaceholderOnHome
)
)
@ -232,6 +246,7 @@ class HomeFragment : Fragment() {
handleSwipedItemDeletionCancel = ::handleSwipedItemDeletionCancel
)
)
updateLayout(view)
sessionControlView = SessionControlView(
view.sessionControlRecyclerView,
@ -246,6 +261,10 @@ class HomeFragment : Fragment() {
return view
}
private fun dismissTip(tip: Tip) {
sessionControlInteractor.onCloseTip(tip)
}
/**
* Returns a [TopSitesConfig] which specifies how many top sites to display and whether or
* not frequently visited sites should be displayed.
@ -411,7 +430,8 @@ class HomeFragment : Fragment() {
// We call this onLayout so that the bottom bar width is correctly set for us to center
// the CFR in.
view.toolbar_wrapper.doOnLayout {
val willNavigateToSearch = !bundleArgs.getBoolean(FOCUS_ON_ADDRESS_BAR) && FeatureFlags.newSearchExperience
val willNavigateToSearch =
!bundleArgs.getBoolean(FOCUS_ON_ADDRESS_BAR) && FeatureFlags.newSearchExperience
if (!browsingModeManager.mode.isPrivate && !willNavigateToSearch) {
SearchWidgetCFR(
context = view.context,
@ -540,7 +560,18 @@ class HomeFragment : Fragment() {
collections = components.core.tabCollectionStorage.cachedTabCollections,
mode = currentMode.getCurrentMode(),
topSites = components.core.topSiteStorage.cachedTopSites,
tip = FenixTipManager(listOf(MigrationTipProvider(requireContext()))).getTip(),
tip = StrictMode.allowThreadDiskReads().resetPoliciesAfter {
FenixTipManager(
listOf(
MasterPasswordTipProvider(
requireContext(),
::navToSavedLogins,
::dismissTip
),
MigrationTipProvider(requireContext())
)
).getTip()
},
showCollectionPlaceholder = components.settings.showCollectionsPlaceholderOnHome
)
)
@ -587,6 +618,10 @@ class HomeFragment : Fragment() {
}
}
private fun navToSavedLogins() {
findNavController().navigate(HomeFragmentDirections.actionGlobalSavedLoginsAuthFragment())
}
private fun dispatchModeChanges(mode: Mode) {
if (mode != Mode.fromBrowsingMode(browsingModeManager.mode)) {
homeFragmentStore.dispatch(HomeFragmentAction.ModeChange(mode))

@ -37,6 +37,9 @@ class ButtonTipViewHolder(
metrics.track(Event.TipDisplayed(tip.identifier))
tip_header_text.text = tip.title
tip.titleDrawable?.let {
tip_header_text.setCompoundDrawablesWithIntrinsicBounds(it, null, null, null)
}
tip_description_text.text = tip.description
tip_button.text = tip.type.text

@ -124,7 +124,6 @@ open class SavedLoginsStorageController(
fun findPotentialDuplicates(loginId: String) {
var deferredLogin: Deferred<List<Login>>? = null
// What scope should be used here?
val fetchLoginJob = viewLifecycleScope.launch(ioDispatcher) {
deferredLogin = async {
val login = getLogin(loginId)

@ -163,6 +163,11 @@ class Settings(private val appContext: Context) : PreferencesHolder {
default = false
)
var shouldDisplayMasterPasswordMigrationTip by booleanPreference(
appContext.getString(R.string.pref_key_master_password_tip),
true
)
// If any of the prefs have been modified, quit displaying the fenix moved tip
fun shouldDisplayFenixMovingTip(): Boolean =
preferences.getBoolean(

@ -2,56 +2,57 @@
<!-- 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/. -->
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/tip_card"
android:background="@drawable/cfr_background_gradient"
style="@style/OnboardingCardLight"
android:padding="0dp"
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="wrap_content"
android:background="@drawable/cfr_background_gradient"
android:padding="0dp">
<TextView
android:id="@+id/tip_header_text"
android:layout_width="0dp"
android:maxLines="2"
android:lineSpacingExtra="2dp"
android:layout_height="wrap_content"
android:textColor="@color/primary_text_dark_theme"
android:textAppearance="@style/HeaderTextStyle"
android:gravity="center_vertical"
tools:text="Header text"
android:layout_margin="16dp"
android:drawablePadding="12dp"
android:gravity="center_vertical"
android:lineSpacingExtra="2dp"
android:maxLines="2"
android:textAppearance="@style/HeaderTextStyle"
android:textColor="@color/primary_text_dark_theme"
app:drawableTint="@color/primary_text_dark_theme"
app:layout_constraintEnd_toStartOf="@id/tip_close"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintEnd_toStartOf="@id/tip_close" />
tools:text="Header text" />
<ImageButton
android:id="@+id/tip_close"
android:tint="@color/primary_text_dark_theme"
app:srcCompat="@drawable/ic_close"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:layout_width="48dp"
android:layout_height="48dp"
android:background="?selectableItemBackgroundBorderless"
android:contentDescription="@string/create_collection_close"
android:layout_width="48dp"
android:layout_height="48dp" />
android:tint="@color/primary_text_dark_theme"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_close" />
<TextView
android:id="@+id/tip_description_text"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginHorizontal="16dp"
android:layout_marginTop="8dp"
android:lineSpacingExtra="2dp"
android:textAppearance="@style/Body14TextStyle"
android:textColor="@color/primary_text_dark_theme"
tools:text="Tip description"
android:layout_marginTop="8dp"
android:layout_marginHorizontal="16dp"
app:layout_constraintTop_toBottomOf="@id/tip_header_text"
app:layout_constraintEnd_toStartOf="@id/tip_close"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toStartOf="@id/tip_close"/>
app:layout_constraintTop_toBottomOf="@id/tip_header_text"
tools:text="Tip description" />
<TextView
android:id="@+id/tip_learn_more"
@ -63,19 +64,20 @@
app:layout_constraintEnd_toEndOf="@id/tip_description_text"
app:layout_constraintStart_toStartOf="@id/tip_description_text"
app:layout_constraintTop_toBottomOf="@id/tip_description_text"
tools:textColor="@color/accent_high_contrast_private_theme"/>
tools:textColor="@color/accent_high_contrast_private_theme" />
<Button
style="@style/NeutralButton"
android:id="@+id/tip_button"
android:layout_marginTop="16dp"
tools:text="Call to action"
style="@style/NeutralButton"
android:layout_height="36dp"
android:layout_marginHorizontal="16dp"
android:layout_marginTop="16dp"
android:layout_marginBottom="16dp"
app:layout_constraintTop_toBottomOf="@id/tip_learn_more"
app:layout_constraintStart_toStartOf="parent"
app:backgroundTint="@color/foundation_light_theme"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent"/>
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tip_learn_more"
tools:text="Call to action" />
</androidx.constraintlayout.widget.ConstraintLayout>

@ -0,0 +1,71 @@
<?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/. -->
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<mozilla.components.feature.prompts.widget.LoginPanelTextInputLayout
android:id="@+id/password_text_input_layout"
style="@style/MozTextInputLayout"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:paddingStart="24dp"
android:paddingEnd="24dp"
app:errorEnabled="true"
app:errorIconDrawable="@null"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:passwordToggleDrawable="@drawable/mozac_ic_password_reveal_two_state"
app:passwordToggleEnabled="true"
app:passwordToggleTint="?primaryText">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/password_field"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/mozac_feature_prompt_password_hint"
android:imeOptions="actionDone"
android:inputType="textPassword"
android:singleLine="true"
android:textColor="?primaryText"
android:textSize="16sp" />
</mozilla.components.feature.prompts.widget.LoginPanelTextInputLayout>
<com.google.android.material.button.MaterialButton
android:id="@+id/migration_continue"
style="@style/PositiveButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
android:layout_marginTop="12dp"
android:layout_marginEnd="24dp"
android:text="@string/mp_dialog_positive_transfer_saved_logins"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/password_text_input_layout" />
<com.google.android.material.button.MaterialButton
android:id="@+id/migration_cancel"
style="@style/Widget.MaterialComponents.Button.TextButton"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:letterSpacing="0"
android:padding="10dp"
android:text="@string/mp_dialog_negative_transfer_saved_logins"
android:textAllCaps="false"
android:textColor="?primaryText"
android:textStyle="bold"
app:fontFamily="@font/metropolis_semibold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/migration_continue" />
<View
android:layout_width="match_parent"
android:layout_height="24dp"
app:layout_constraintTop_toBottomOf="@id/migration_cancel" />
</androidx.constraintlayout.widget.ConstraintLayout>

@ -0,0 +1,42 @@
<?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/. -->
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.google.android.material.button.MaterialButton
android:id="@+id/positive_button"
style="@style/PositiveButton"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
android:layout_marginEnd="24dp"
android:text="@string/mp_dialog_positive_transfer_success"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<com.google.android.material.button.MaterialButton
android:id="@+id/negative_button"
style="@style/Widget.MaterialComponents.Button.TextButton"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:letterSpacing="0"
android:padding="10dp"
android:text="@string/mp_dialog_close_transfer"
android:textAllCaps="false"
android:textColor="?primaryText"
android:textStyle="bold"
app:fontFamily="@font/metropolis_semibold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/positive_button" />
<View
android:layout_width="match_parent"
android:layout_height="24dp"
app:layout_constraintTop_toBottomOf="@id/negative_button" />
</androidx.constraintlayout.widget.ConstraintLayout>

@ -185,6 +185,7 @@
<string name="pref_key_migrating_from_fenix_nightly_tip" translatable="false">pref_key_migrating_from_fenix_nightly_tip</string>
<string name="pref_key_migrating_from_firefox_nightly_tip" translatable="false">pref_key_migrating_from_firefox_nightly_tip</string>
<string name="pref_key_migrating_from_fenix_tip" translatable="false">pref_key_migrating_from_fenix_tip</string>
<string name="pref_key_master_password_tip" translatable="false">pref_key_master_password_tip</string>
<string name="pref_key_wait_first_paint" translatable="false">pref_key_wait_first_paint</string>

@ -44,4 +44,20 @@
<!-- Name of the application for about page -->
<string name="daylight_app_name" translatable="false">Firefox Daylight</string>
<!-- MP Migration -->
<string name="mp_homescreen_tip_title">Looking for your logins?</string>
<string name="mp_homescreen_tip_message">If you had a master password before Firefox updated, youll need to enter it to transfer your saved logins.</string>
<string name="mp_homescreen_button">Enter master password</string>
<string name="mp_dialog_title_recovery_transfer_saved_logins">Transfer saved logins</string>
<string name="mp_dialog_message_recovery_transfer_saved_logins">Enter your previous master password.</string>
<string name="mp_dialog_positive_transfer_saved_logins">Continue and transfer</string>
<string name="mp_dialog_negative_transfer_saved_logins">Cancel</string>
<string name="mp_dialog_error_transfer_saved_logins">Invalid password</string>
<string name="mp_dialog_title_transfer_success">Transfer successful</string>
<string name="mp_dialog_message_transfer_success">Your saved logins have been transferred to Firefox.</string>
<string name="mp_dialog_positive_transfer_success">View saved logins</string>
<string name="mp_dialog_close_transfer">Close</string>
<string name="mp_dialog_title_transfer_failure">Transfer failed</string>
<string name="mp_dialog_message_transfer_failure">An unknown error occurred and logins could not be transferred.</string>
</resources>

@ -1497,7 +1497,7 @@
<string name="saved_login_duplicate">A login with that username already exists</string>
<!-- Synced Tabs -->
<!-- Text displayed to ask user to connect another device as no devices found with account -->
<!-- Text displayed to ask user to connect another device as no devices found with account -->
<string name="synced_tabs_connect_another_device">Connect another device.</string>
<!-- Text displayed asking user to re-authenticate -->
<string name="synced_tabs_reauth">Please re-authenticate.</string>

@ -52,7 +52,7 @@ The following metrics are added to the ping:
| about_page.support_tapped |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user tapped on "Support" item from About page |[1](https://github.com/mozilla-mobile/fenix/pull/8047), [2](https://github.com/mozilla-mobile/fenix/pull/13958#issuecomment-676857877)||2021-04-01 |2 |
| addons.open_addon_in_toolbar_menu |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user interacted with an installed add-on in the toolbar menu |[1](https://github.com/mozilla-mobile/fenix/pull/8318), [2](https://github.com/mozilla-mobile/fenix/pull/13958#issuecomment-676857877)|<ul><li>addon_id: The id of the add-on that was interacted with in the toolbar menu </li></ul>|2021-04-01 |2 |
| addons.open_addons_in_settings |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user accessed "Add-ons" from the Settings |[1](https://github.com/mozilla-mobile/fenix/pull/8318), [2](https://github.com/mozilla-mobile/fenix/pull/13958#issuecomment-676857877)||2021-04-01 |2 |
| app_theme.dark_theme_selected |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user selected Dark Theme |[1](https://github.com/mozilla-mobile/fenix/pull/7968), [2](https://github.com/mozilla-mobile/fenix/pull/13958#issuecomment-676857877)|<ul><li>source: The source from where dark theme was selected. The source can be 'SETTINGS' or 'ONBOARDING' </li></ul>|2020-04-01 |2 |
| app_theme.dark_theme_selected |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user selected Dark Theme |[1](https://github.com/mozilla-mobile/fenix/pull/7968), [2](https://github.com/mozilla-mobile/fenix/pull/13958#issuecomment-676857877)|<ul><li>source: The source from where dark theme was selected. The source can be 'SETTINGS' or 'ONBOARDING' </li></ul>|2021-04-01 |2 |
| autoplay.setting_changed |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user changed their autoplay setting to either block_cellular, block_audio, or block_all. |[1](https://github.com/mozilla-mobile/fenix/pull/13041#issuecomment-665777411)|<ul><li>autoplay_setting: The new setting for autoplay: block_cellular, block_audio, or block_all. </li></ul>|2021-02-01 |2 |
| autoplay.visited_setting |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user visited the autoplay settings screen |[1](https://github.com/mozilla-mobile/fenix/pull/13041#issuecomment-665777411)||2021-02-01 |2 |
| bookmarks_management.copied |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user copied a bookmark. |[1](https://github.com/mozilla-mobile/fenix/pull/1708), [2](https://github.com/mozilla-mobile/fenix/pull/13958#issuecomment-676857877)||2021-04-01 |2 |
@ -129,6 +129,8 @@ The following metrics are added to the ping:
| logins.save_edited_login |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user saves changes made to an individual login |[1](https://github.com/mozilla-mobile/fenix/issues/11208)||2020-11-15 |2 |
| logins.save_logins_setting_changed |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user changed their setting for asking to save logins |[1](https://github.com/mozilla-mobile/fenix/pull/7767)|<ul><li>setting: The new setting for saving logins the user selected. Either `ask_to_save` or `never_save` </li></ul>|2020-11-15 |2 |
| logins.view_password_login |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user viewed a password in an individual saved login |[1](https://github.com/mozilla-mobile/fenix/pull/6352)||2020-11-15 |2 |
| master_password.displayed |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |The master password migration dialog was displayed |[1](https://github.com/mozilla-mobile/fenix/pull/14468#issuecomment-684114534)||2021-03-01 |2 |
| master_password.migration |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |Logins were successfully migrated using a master password. |[1](https://github.com/mozilla-mobile/fenix/pull/14468#issuecomment-684114534)||2021-03-01 |2 |
| media_notification.pause |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user pressed the pause icon on the media notification |[1](https://github.com/mozilla-mobile/fenix/pull/5520)||2020-11-15 |2 |
| media_notification.play |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user pressed the play icon on the media notification |[1](https://github.com/mozilla-mobile/fenix/pull/5520)||2020-11-15 |2 |
| media_state.pause |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |Media playback was paused. |[1](https://github.com/mozilla-mobile/fenix/pull/6463)||2020-11-15 |2 |

Loading…
Cancel
Save