1
0
Fork 0

Copione merged onto master
continuous-integration/drone/push Build is failing Details

master
blallo 2020-07-11 00:00:45 +02:00
commit d02531cd8d
18 changed files with 1763 additions and 81 deletions

View File

@ -123,28 +123,11 @@ If you want to run **performance tests/benchmarks** in automation or locally:
For additional context on these recommendations, see [the perf build variant analysis](https://docs.google.com/document/d/1aW-m0HYncTDDiRz_2x6EjcYkjBpL9SHhhYix13Vil30/edit#).
You will **need to sign `forPerformanceTest` variants.** For local development, our recommendation is to add the following configuration to `app/build.gradle`:
```groovy
android { // this line already exists
// ...
buildTypes { // this line already exists
// ...
forPerformanceTest releaseTemplate >> { // this line already exists.
// ...
signingConfig signingConfigs.debug
}
}
}
Before you can install any release variants including `forPerformanceTest`, **you will need to sign them.** To do this automatically in local development, you can add the following to `<proj-root>/local.properties`:
```sh
autosignReleaseWithDebugKey
```
This recommendation will let you use AS just like you do with debug builds but **please do not check in these changes.**
See [perf-frontend-issues#44](https://github.com/mozilla-mobile/perf-frontend-issues/issues/44) for efforts to make performance signing easier.
## Pre-push hooks
To reduce review turn-around time, we'd like all pushes to run tests locally. We'd
recommend you use our provided pre-push hook in `config/pre-push-recommended.sh`.

View File

@ -46,6 +46,10 @@ android {
minifyEnabled true
proguardFiles 'proguard-android-optimize-3.5.0-modified.txt', 'proguard-rules.pro'
matchingFallbacks = ['release'] // Use on the "release" build type in dependencies (AARs)
if (gradle.hasProperty("localProperties.autosignReleaseWithDebugKey")) {
signingConfig signingConfigs.debug
}
}
buildTypes {

View File

@ -28,5 +28,6 @@ enum class BrowserDirection(@IdRes val fragmentId: Int) {
FromAddNewDeviceFragment(R.id.addNewDeviceFragment),
FromAddSearchEngineFragment(R.id.addSearchEngineFragment),
FromEditCustomSearchEngineFragment(R.id.editCustomSearchEngineFragment),
FromAddonDetailsFragment(R.id.addonDetailsFragment)
FromAddonDetailsFragment(R.id.addonDetailsFragment),
FromLoginDetailFragment(R.id.loginDetailFragment)
}

View File

@ -53,6 +53,7 @@ import mozilla.components.support.utils.SafeIntent
import mozilla.components.support.utils.toSafeIntent
import mozilla.components.support.webextensions.WebExtensionPopupFeature
import org.mozilla.fenix.GleanMetrics.Metrics
import org.mozilla.fenix.addons.AddonDetailsFragmentDirections
import org.mozilla.fenix.browser.UriOpenedObserver
import org.mozilla.fenix.browser.browsingmode.BrowsingMode
import org.mozilla.fenix.browser.browsingmode.BrowsingModeManager
@ -81,6 +82,7 @@ import org.mozilla.fenix.session.NotificationSessionObserver
import org.mozilla.fenix.settings.SettingsFragmentDirections
import org.mozilla.fenix.settings.TrackingProtectionFragmentDirections
import org.mozilla.fenix.settings.about.AboutFragmentDirections
import org.mozilla.fenix.settings.logins.LoginDetailFragmentDirections
import org.mozilla.fenix.settings.logins.SavedLoginsAuthFragmentDirections
import org.mozilla.fenix.settings.search.AddSearchEngineFragmentDirections
import org.mozilla.fenix.settings.search.EditCustomSearchEngineFragmentDirections
@ -165,14 +167,24 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity {
}
if (isActivityColdStarted(intent, savedInstanceState)) {
externalSourceIntentProcessors.any { it.process(intent, navHost.navController, this.intent) }
externalSourceIntentProcessors.any {
it.process(
intent,
navHost.navController,
this.intent
)
}
}
Performance.processIntentIfPerformanceTest(intent, this)
if (settings().isTelemetryEnabled) {
lifecycle.addObserver(BreadcrumbsRecorder(components.analytics.crashReporter,
navHost.navController, ::getBreadcrumbMessage))
lifecycle.addObserver(
BreadcrumbsRecorder(
components.analytics.crashReporter,
navHost.navController, ::getBreadcrumbMessage
)
)
val safeIntent = intent?.toSafeIntent()
safeIntent
@ -209,7 +221,10 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity {
components.backgroundServices.accountManager.initAsync().await()
// If we're authenticated, kick-off a sync and a device state refresh.
components.backgroundServices.accountManager.authenticatedAccount()?.let {
components.backgroundServices.accountManager.syncNowAsync(SyncReason.Startup, debounce = true)
components.backgroundServices.accountManager.syncNowAsync(
SyncReason.Startup,
debounce = true
)
}
}
}
@ -241,8 +256,10 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity {
super.onNewIntent(intent)
intent ?: return
val intentProcessors = listOf(CrashReporterIntentProcessor()) + externalSourceIntentProcessors
val intentHandled = intentProcessors.any { it.process(intent, navHost.navController, this.intent) }
val intentProcessors =
listOf(CrashReporterIntentProcessor()) + externalSourceIntentProcessors
val intentHandled =
intentProcessors.any { it.process(intent, navHost.navController, this.intent) }
browsingModeManager.mode = getModeFromIntentOrLastKnown(intent)
if (intentHandled) {
@ -474,7 +491,9 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity {
BrowserDirection.FromEditCustomSearchEngineFragment ->
EditCustomSearchEngineFragmentDirections.actionGlobalBrowser(customTabSessionId)
BrowserDirection.FromAddonDetailsFragment ->
EditCustomSearchEngineFragmentDirections.actionGlobalBrowser(customTabSessionId)
AddonDetailsFragmentDirections.actionGlobalBrowser(customTabSessionId)
BrowserDirection.FromLoginDetailFragment ->
LoginDetailFragmentDirections.actionGlobalBrowser(customTabSessionId)
}
private fun load(
@ -563,13 +582,14 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity {
}
@VisibleForTesting
internal fun isActivityColdStarted(startingIntent: Intent, activityIcicle: Bundle?): Boolean =
internal fun isActivityColdStarted(startingIntent: Intent, activityIcicle: Bundle?): Boolean {
// First time opening this activity in the task.
// Cold start / start from Recents after back press.
activityIcicle == null &&
// Activity was restarted from Recents after it was destroyed by Android while in background
// in cases of memory pressure / "Don't keep activities".
startingIntent.flags and Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY == 0
return activityIcicle == null &&
// Activity was restarted from Recents after it was destroyed by Android while in background
// in cases of memory pressure / "Don't keep activities".
startingIntent.flags and Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY == 0
}
companion object {
const val OPEN_TO_BROWSER = "open_to_browser"

View File

@ -7,12 +7,12 @@ package org.mozilla.fenix.settings.logins
import android.content.DialogInterface
import android.os.Bundle
import android.text.InputType
import android.view.MenuItem
import android.view.MenuInflater
import android.view.LayoutInflater
import android.view.Menu
import android.view.MenuInflater
import android.view.MenuItem
import android.view.View
import android.view.ViewGroup
import android.view.LayoutInflater
import androidx.annotation.StringRes
import androidx.appcompat.app.AlertDialog
import androidx.fragment.app.Fragment
@ -21,23 +21,26 @@ import androidx.navigation.fragment.findNavController
import androidx.navigation.fragment.navArgs
import com.google.android.material.snackbar.Snackbar
import kotlinx.android.synthetic.main.fragment_login_detail.*
import kotlinx.coroutines.CancellationException
import kotlinx.coroutines.Deferred
import kotlinx.coroutines.Dispatchers.IO
import kotlinx.coroutines.Dispatchers.Main
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.ObsoleteCoroutinesApi
import kotlinx.coroutines.Deferred
import kotlinx.coroutines.CancellationException
import kotlinx.coroutines.launch
import kotlinx.coroutines.async
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
import mozilla.components.concept.storage.Login
import mozilla.components.lib.state.ext.consumeFrom
import org.mozilla.fenix.BrowserDirection
import org.mozilla.fenix.FeatureFlags
import org.mozilla.fenix.HomeActivity
import org.mozilla.fenix.R
import org.mozilla.fenix.components.FenixSnackbar
import org.mozilla.fenix.components.StoreProvider
import org.mozilla.fenix.components.metrics.Event
import org.mozilla.fenix.ext.components
import org.mozilla.fenix.ext.increaseTapArea
import org.mozilla.fenix.ext.redirectToReAuth
import org.mozilla.fenix.ext.settings
import org.mozilla.fenix.ext.showToolbar
@ -119,6 +122,7 @@ class LoginDetailFragment : Fragment(R.layout.fragment_login_detail) {
private fun setUpPasswordReveal() {
passwordText.inputType =
InputType.TYPE_CLASS_TEXT or InputType.TYPE_TEXT_VARIATION_PASSWORD
revealPasswordButton.increaseTapArea(BUTTON_INCREASE_DPS)
revealPasswordButton.setOnClickListener {
togglePasswordReveal()
}
@ -126,9 +130,13 @@ class LoginDetailFragment : Fragment(R.layout.fragment_login_detail) {
private fun setUpCopyButtons() {
webAddressText.text = login?.origin
copyWebAddress.setOnClickListener(
CopyButtonListener(login?.origin, R.string.logins_site_copied)
)
openWebAddress.increaseTapArea(BUTTON_INCREASE_DPS)
copyUsername.increaseTapArea(BUTTON_INCREASE_DPS)
copyPassword.increaseTapArea(BUTTON_INCREASE_DPS)
openWebAddress.setOnClickListener {
navigateToBrowser(requireNotNull(login?.origin))
}
usernameText.text = login?.username
copyUsername.setOnClickListener(
@ -189,6 +197,14 @@ class LoginDetailFragment : Fragment(R.layout.fragment_login_detail) {
else -> false
}
private fun navigateToBrowser(address: String) {
(activity as HomeActivity).openToBrowserAndLoad(
address,
newTab = true,
from = BrowserDirection.FromLoginDetailFragment
)
}
private fun editLogin() {
val directions =
LoginDetailFragmentDirections
@ -281,4 +297,8 @@ class LoginDetailFragment : Fragment(R.layout.fragment_login_detail) {
}
}
}
private companion object {
private const val BUTTON_INCREASE_DPS = 24
}
}

View File

@ -46,7 +46,8 @@ class SyncedTabsLayout @JvmOverloads constructor(
synced_tabs_list.visibility = View.GONE
sync_tabs_status.visibility = View.VISIBLE
synced_tabs_pull_to_refresh.isEnabled = false
synced_tabs_pull_to_refresh.isEnabled = pullToRefreshEnableState(error)
}
override fun displaySyncedTabs(syncedTabs: List<SyncedDeviceTabs>) {
@ -78,4 +79,19 @@ class SyncedTabsLayout @JvmOverloads constructor(
override fun stopLoading() {
synced_tabs_pull_to_refresh.isRefreshing = false
}
companion object {
internal fun pullToRefreshEnableState(error: SyncedTabsView.ErrorType) = when (error) {
// Disable "pull-to-refresh" when we clearly can't sync tabs, and user needs to take an
// action within the app.
SyncedTabsView.ErrorType.SYNC_UNAVAILABLE,
SyncedTabsView.ErrorType.SYNC_NEEDS_REAUTHENTICATION -> false
// Enable "pull-to-refresh" when an external event (e.g. connecting a desktop client,
// or enabling tabs sync, or connecting to a network) may resolve our problem.
SyncedTabsView.ErrorType.SYNC_ENGINE_UNAVAILABLE,
SyncedTabsView.ErrorType.MULTIPLE_DEVICES_UNAVAILABLE,
SyncedTabsView.ErrorType.NO_TABS_AVAILABLE -> true
}
}
}

View File

@ -3,12 +3,12 @@
- 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/. -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:viewportWidth="14"
android:viewportHeight="17"
android:width="14dp"
android:height="17dp">
android:width="17dp"
android:height="20dp"
android:viewportWidth="17"
android:viewportHeight="20">
<path
android:pathData="M13.707 9.143l-3-3C10.52 5.955 10.265 5.85 10 5.85H9v-1c0-0.265-0.105-0.52-0.293-0.707l-3-3C5.52 0.955 5.265 0.85 5 0.85H2c-1.105 0-2 0.895-2 2v7c0 1.105 0.895 2 2 2h3v3c0 1.105 0.895 2 2 2h5c1.105 0 2-0.895 2-2v-5c0-0.265-0.105-0.52-0.293-0.707zM11.586 9.85H10V8.264l1.586 1.586zm-5-5H5V3.264L6.586 4.85zM5 7.85v2H2v-7h2v2.5c0 0.276 0.224 0.5 0.5 0.5H7c-1.105 0-2 0.895-2 2zm2 7v-7h2v2.5c0 0.276 0.224 0.5 0.5 0.5H12v4H7z"
android:fillColor="?primaryText"
android:fillAlpha="0.8" />
android:fillType="nonZero"
android:pathData="M10.69,3A3.313,3.313 0,0 1,14 6.31v10.38A3.313,3.313 0,0 1,10.69 20L3.31,20A3.313,3.313 0,0 1,0 16.69L0,6.31A3.313,3.313 0,0 1,3.31 3h7.38zM10.69,5L3.31,5C2.587,5 2,5.587 2,6.31v10.38c0,0.723 0.587,1.31 1.31,1.31h7.38c0.723,0 1.31,-0.587 1.31,-1.31L12,6.31C12,5.587 11.413,5 10.69,5zM10.995,0A6.003,6.003 0,0 1,17 6v0.016l-0.024,8.987a2,2 0,0 1,-2.005 1.994h-0.002l0.03,-10.986L14.999,6c0,-2.21 -1.793,-4 -4.004,-4L3,2a2,2 0,0 1,2 -2h5.995z" />
</vector>

View File

@ -0,0 +1,14 @@
<?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/. -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="18dp"
android:height="18dp"
android:viewportWidth="18"
android:viewportHeight="18">
<path
android:fillColor="?primaryText"
android:fillType="evenOdd"
android:pathData="M9,0a1.005,1.005 0,1 1,0 2.012L4.557,2.012a2.55,2.55 0,0 0,-2.547 2.547v8.883a2.55,2.55 0,0 0,2.547 2.547h8.883a2.55,2.55 0,0 0,2.547 -2.547L15.987,8.97a1.006,1.006 0,1 1,2.011 0v4.472A4.564,4.564 0,0 1,13.441 18L4.558,18A4.564,4.564 0,0 1,0 13.442L0,4.559a4.564,4.564 0,0 1,4.56 -4.56zM17,0a1,1 0,0 1,1 1v4a1,1 0,1 1,-2 0L16,3.414l-5.293,5.293a0.999,0.999 0,1 1,-1.414 -1.414L14.586,2L13,2a1,1 0,1 1,0 -2z" />
</vector>

View File

@ -2,7 +2,6 @@
<!-- 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"
xmlns:tools="http://schemas.android.com/tools"
@ -11,7 +10,7 @@
android:layout_height="wrap_content"
android:layout_marginStart="73dp"
android:layout_marginTop="12dp"
android:layout_marginEnd="20dp">
android:layout_marginEnd="12dp">
<TextView
android:id="@+id/webAddressHeader"
@ -25,7 +24,7 @@
android:textSize="12sp"
app:fontFamily="@font/metropolis_semibold"
app:layout_constraintBottom_toTopOf="@id/webAddressText"
app:layout_constraintEnd_toStartOf="@id/copyWebAddress"
app:layout_constraintEnd_toStartOf="@id/openWebAddress"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_chainStyle="packed" />
@ -35,10 +34,10 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:textColor="?primaryText"
android:textSize="16sp"
android:paddingTop="@dimen/saved_logins_detail_menu_vertical_padding"
android:paddingBottom="@dimen/saved_logins_detail_menu_vertical_padding"
android:textColor="?primaryText"
android:textSize="16sp"
app:layout_constraintEnd_toEndOf="@id/webAddressHeader"
app:layout_constraintStart_toStartOf="@id/webAddressHeader"
app:layout_constraintTop_toBottomOf="@id/webAddressHeader"
@ -46,15 +45,15 @@
tools:text="Info" />
<ImageButton
android:id="@+id/copyWebAddress"
android:layout_width="48dp"
android:layout_height="48dp"
android:id="@+id/openWebAddress"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="?android:attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/saved_login_copy_site"
android:contentDescription="@string/saved_login_open_site"
app:layout_constraintBottom_toBottomOf="@id/webAddressText"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@id/webAddressText"
app:srcCompat="@drawable/ic_copy"
app:srcCompat="@drawable/ic_open_in_new"
app:tint="?android:colorAccent" />
<TextView
@ -78,12 +77,12 @@
android:id="@+id/usernameText"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:textColor="?primaryText"
android:textSize="16sp"
android:layout_marginTop="1dp"
android:gravity="center_vertical"
android:paddingTop="@dimen/saved_logins_detail_menu_vertical_padding"
android:paddingBottom="@dimen/saved_logins_detail_menu_vertical_padding"
android:textColor="?primaryText"
android:textSize="16sp"
app:layout_constraintEnd_toEndOf="@id/usernameHeader"
app:layout_constraintStart_toStartOf="@id/usernameHeader"
app:layout_constraintTop_toBottomOf="@id/usernameHeader"
@ -92,12 +91,13 @@
<ImageButton
android:id="@+id/copyUsername"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="?android:attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/saved_login_copy_username"
app:layout_constraintBottom_toBottomOf="@id/usernameText"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintEnd_toEndOf="@id/openWebAddress"
app:layout_constraintStart_toStartOf="@id/openWebAddress"
app:layout_constraintTop_toTopOf="@id/usernameText"
app:srcCompat="@drawable/ic_copy"
app:tint="?android:colorAccent" />
@ -106,12 +106,12 @@
android:id="@+id/passwordHeader"
android:layout_width="0dp"
android:layout_height="24dp"
android:layout_marginTop="12dp"
android:gravity="center_vertical"
android:letterSpacing="0.05"
android:text="@string/preferences_passwords_saved_logins_password"
android:textColor="?primaryText"
android:textSize="12sp"
android:layout_marginTop="12dp"
app:fontFamily="@font/metropolis_semibold"
app:layout_constraintBottom_toTopOf="@id/passwordText"
app:layout_constraintEnd_toStartOf="@id/revealPasswordButton"
@ -123,14 +123,14 @@
android:id="@+id/passwordText"
android:layout_width="0dp"
android:layout_height="30dp"
android:layout_marginTop="2dp"
android:gravity="center_vertical"
android:letterSpacing="0.01"
android:lineSpacingExtra="8sp"
android:layout_marginTop="2dp"
android:textColor="?primaryText"
android:textSize="16sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="@id/passwordHeader"
app:layout_constraintEnd_toStartOf="@id/revealPasswordButton"
app:layout_constraintStart_toStartOf="@id/passwordHeader"
app:layout_constraintTop_toBottomOf="@id/passwordHeader"
app:layout_constraintVertical_chainStyle="packed"
@ -138,25 +138,27 @@
<ImageButton
android:id="@+id/revealPasswordButton"
android:layout_width="48dp"
android:layout_height="30dp"
android:layout_marginBottom="2dp"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_marginEnd="36dp"
android:background="@null"
android:contentDescription="@string/saved_login_reveal_password"
app:layout_constraintBottom_toBottomOf="@id/passwordText"
app:layout_constraintEnd_toStartOf="@id/copyPassword"
app:layout_constraintTop_toTopOf="@id/passwordText"
app:srcCompat="@drawable/mozac_ic_password_reveal"
app:tint="?android:colorAccent" />
<ImageButton
android:id="@+id/copyPassword"
android:layout_width="48dp"
android:layout_height="30dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@null"
android:contentDescription="@string/saved_logins_copy_password"
app:layout_constraintBottom_toBottomOf="@id/revealPasswordButton"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@id/revealPasswordButton"
app:layout_constraintBottom_toBottomOf="@id/passwordText"
app:layout_constraintEnd_toEndOf="@id/openWebAddress"
app:layout_constraintStart_toStartOf="@id/openWebAddress"
app:layout_constraintTop_toTopOf="@id/passwordText"
app:srcCompat="@drawable/ic_copy"
app:tint="?android:colorAccent" />
</androidx.constraintlayout.widget.ConstraintLayout>

File diff suppressed because it is too large Load Diff

View File

@ -915,6 +915,15 @@
<!-- text for firefox preview moving tip header "Firefox Preview" and "Firefox Nightly" are intentionally hardcoded -->
<string name="tip_firefox_preview_moved_header">முன்னோட்ட பயர்பாக்சு இப்போது இராக்கால பயர்பாக்சு</string>
<!-- text for firefox preview moving tip description -->
<string name="tip_firefox_preview_moved_description">ஒவ்வொரு இரவும் இராக்கால பயர்பாக்சு மேம்படுத்தப்பட்டு புதிய அம்சங்களைக் கொண்டு வெளியிடப்படுகிறது.
எப்படியாகினும், நிலைப்புத்தன்மை குறைந்திருக்கலாம். மேலும் நல்ல அனுபவத்திற்கு எங்கள் பீட்டா உலாவியைப் பதிவிறக்கவும்.</string>
<!-- text for firefox preview moving tip button. "Firefox for Android Beta" is intentionally hardcoded -->
<string name="tip_firefox_preview_moved_button_2">பீட்டா ஆண்ட்ராய்டு பயர்பாக்சைப் பெறுக</string>
<!-- text for firefox preview moving tip header. "Firefox Nightly" is intentionally hardcoded -->
<string name="tip_firefox_preview_moved_header_preview_installed">இராக்கால பயர்பாக்சு நகர்ந்தது</string>
<!-- Onboarding -->
<!-- Text for onboarding welcome message
The first parameter is the name of the app (e.g. Firefox Preview) -->

View File

@ -8,6 +8,10 @@
<!-- Content description (not visible, for screen readers etc.): "Three dot" menu button. -->
<string name="content_description_menu">మరిన్ని ఎంపికలు</string>
<!-- Content description (not visible, for screen readers etc.): "Private Browsing" menu button. -->
<string name="content_description_private_browsing_button">అంతరంగిక విహరణను చేతనించు</string>
<!-- Content description (not visible, for screen readers etc.): "Private Browsing" menu button. -->
<string name="content_description_disable_private_browsing_button">అంతరంగిక విహరణను అచేతనించు</string>
<!-- Placeholder text shown in the search bar before a user enters text -->
<string name="search_hint">వెతకండి లేదా చిరునామా ఇవ్వండి</string>
<!-- No Open Tabs Message Description -->
@ -15,6 +19,10 @@
<!-- No Private Tabs Message Description -->
<string name="no_private_tabs_description">మీ అంతరంగిక ట్యాబులు ఇక్కడ కనిపిస్తాయి.</string>
<string name="private_browsing_common_myths">అంతరంగిక విహారణ గురించి సామాన్య అపోహలు</string>
<!-- Delete session button to erase your history in a private session -->
<string name="private_browsing_delete_session">సెషనును తొలగించు</string>
<!-- Text for the negative button -->
<string name="cfr_neg_button_text">ఫరవాలేదు వద్దు</string>
@ -24,6 +32,8 @@
<!-- Home screen icons - Long press shortcuts -->
<!-- Shortcut action to open new tab -->
<string name="home_screen_shortcut_open_new_tab_2">కొత్త ట్యాబు</string>
<!-- Shortcut action to open new private tab -->
<string name="home_screen_shortcut_open_new_private_tab_2">కొత్త అంతరంగిక ట్యాబు</string>
<!-- Heading for the Top Sites block -->
<string name="home_screen_top_sites_heading">మేటి సైట్లు</string>
@ -52,8 +62,14 @@
<string name="browser_menu_install_on_homescreen">స్థాపించు</string>
<!-- Menu option on the toolbar that takes you to synced tabs page-->
<string name="synced_tabs">సింకైన ట్యాబులు</string>
<!-- Browser menu button that opens the find in page menu -->
<string name="browser_menu_find_in_page">పేజీలో వెతుకు</string>
<!-- Browser menu button that creates a private tab -->
<string name="browser_menu_private_tab">అంతరంగిక ట్యాబు</string>
<!-- Browser menu button that creates a new tab -->
<string name="browser_menu_new_tab">కొత్త ట్యాబు</string>
<!-- Browser menu button that saves the current tab to a collection -->
<string name="browser_menu_save_to_collection_2">సేకరణకు భద్రపరుచు</string>
<!-- Browser menu button to configure reader mode appearance e.g. the used font type and size -->
<string name="browser_menu_read_appearance">రూపురేఖలు</string>
@ -61,6 +77,13 @@
<!-- Content description for tick mark on selected language -->
<string name="a11y_selected_locale_content_description">ఎంచుకున్న భాష</string>
<!-- Placeholder text shown in the search bar before a user enters text -->
<string name="locale_search_hint">భాషను వెతకండి</string>
<!-- Header displayed when selecting a shortcut search engine -->
<string name="search_shortcuts_search_with_2">ఈసారి దీనితో వెతుకు:</string>
<!-- Button in the search view that lets a user navigate to the site in their clipboard -->
<string name="awesomebar_clipboard_title">క్లిప్‌బోర్డ్ నుండి లంకెను పూరించు</string>
<!-- Button in the search suggestions onboarding that allows search suggestions in private sessions -->
<string name="search_suggestions_onboarding_allow_button">అనుమతించు</string>
<!-- Button in the search suggestions onboarding that does not allow search suggestions in private sessions -->
@ -68,6 +91,12 @@
<!-- Search suggestion onboarding hint Learn more link text -->
<string name="search_suggestions_onboarding_learn_more_link">ఇంకా తెలుసుకోండి</string>
<!-- Search Widget -->
<!-- Text preview for smaller sized widgets -->
<string name="search_widget_text_short">వెతకండి</string>
<!-- Text preview for larger sized widgets -->
<string name="search_widget_text_long">జాలంలో వెతకండి</string>
<!-- Preferences -->
<!-- Title for the settings page-->
<string name="settings">అమరికలు</string>
@ -140,14 +169,28 @@
<!-- Name of the "receive tabs" notification channel. Displayed in the "App notifications" system settings for the app -->
<string name="fxa_received_tab_channel_name">అందుకన్న ట్యాబులు</string>
<!-- Advanced Preferences -->
<!-- Preference for tracking protection settings -->
<string name="preferences_tracking_protection_settings">ట్రాకింగ్ సంరక్షణ</string>
<!-- Preference switch for tracking protection -->
<string name="preferences_tracking_protection">ట్రాకింగ్ సంరక్షణ</string>
<!-- Preference for tracking protection exceptions -->
<string name="preferences_tracking_protection_exceptions">మినహాయింపులు</string>
<!-- Text displayed when there are no exceptions, with learn more link that brings users to a tracking protection SUMO page -->
<string name="exceptions_empty_message_learn_more_link">ఇంకా తెలుసుకోండి</string>
<!-- Preference switch for Telemetry -->
<string name="preferences_telemetry">టెలీమెట్రీ</string>
<!-- Preference switch for usage and technical data collection -->
<string name="preference_usage_data">వాడుక, సాంకేతిక డేటా</string>
<!-- Preference switch for marketing data collection -->
<string name="preferences_marketing_data">మార్కెటింగ్ డేటా</string>
<!-- Title for experiments preferences -->
<string name="preference_experiments">ప్రయోగాలు</string>
<!-- Preference switch for app health report. The first parameter is the name of the application (For example: Fenix) -->
<string name="preferences_fenix_health_report">%s ఆరోగ్య నివేదిక</string>
<!-- Preference for removing FxA account -->
<string name="preferences_sync_remove_account">ఖాతాను తొలగించు</string>
@ -211,14 +254,39 @@
<!-- Button in the current session menu. Saves the session when pressed -->
<string name="current_session_save">భద్రపరుచు</string>
<!-- Button to save the current set of tabs into a collection -->
<string name="save_to_collection">సేకరణకు భద్రపరుచు</string>
<!-- Text for the menu button to delete a collection -->
<string name="collection_delete">సేకరణను తొలగించు</string>
<!-- Text for the menu button to rename a collection -->
<string name="collection_rename">సేకరణ పేరుమార్చు</string>
<!-- Text for the button to open tabs of the selected collection -->
<string name="collection_open_tabs">తెరిచివున్న ట్యాబులు</string>
<!-- Text for the menu button to remove a top site -->
<string name="remove_top_site">తీసివేయి</string>
<!-- Postfix for private WebApp titles, placeholder is replaced with app name -->
<string name="pwa_site_controls_title_private">%1$s (అంతరంగిక రీతి)</string>
<!-- History -->
<!-- Text for the button to clear all history -->
<string name="history_delete_all">చరిత్రను తొలగించు</string>
<!-- Text for the dialog to confirm clearing all history -->
<string name="history_delete_all_dialog">మీరు నిజంగానే మీ చరిత్రను తుడిచివేయాలనుకుంటున్నారా?</string>
<!-- Text for the snackbar to confirm that multiple browsing history items has been deleted -->
<string name="history_delete_multiple_items_snackbar">చరిత్ర తొలగించబడింది</string>
<!-- Text for the snackbar to confirm that a single browsing history item has been deleted. The first parameter is the shortened URL of the deleted history item. -->
<string name="history_delete_single_item_snackbar">%1$s తొలగించబడింది</string>
<!-- Text for positive action to delete history in deleting history dialog -->
<string name="history_clear_dialog">తుడిచివేయి</string>
<!-- History overflow menu copy button -->
<string name="history_menu_copy_button">కాపీచేయి</string>
<!-- History overflow menu share button -->
<string name="history_menu_share_button">పంచుకోండి</string>
<!-- History overflow menu open in new tab button -->
<string name="history_menu_open_in_new_tab_button">కొత్త ట్యాబులో తెరువు</string>
<!-- History overflow menu open in private tab button -->
<string name="history_menu_open_in_private_tab_button">అంతరంగిక ట్యాబులో తెరువు</string>
<!-- Text for the button to delete a single history item -->
<string name="history_delete_item">తొలగించు</string>
@ -237,14 +305,29 @@
<!-- Text shown when no history exists -->
<string name="history_empty_message">ఇక్కడ చరిత్రేమీ లేదు</string>
<!-- Description text displayed on the tab crash page -->
<string name="tab_crash_description">మీరు ఈ ట్యాబును పునరుద్ధరించడానికి లేదా మూసివేయడానికి ప్రయత్నించవచ్చు.</string>
<!-- Send crash report checkbox text on the tab crash page -->
<string name="tab_crash_send_report">క్రాష్ నివేదికను మొజిల్లాకు పంపు</string>
<!-- Close tab button text on the tab crash page -->
<string name="tab_crash_close">ట్యాబును మూసివేయి</string>
<!-- Restore tab button text on the tab crash page -->
<string name="tab_crash_restore">ట్యాబును పునరుద్ధరించు</string>
<!-- Content Description for session item menu button -->
<string name="content_description_session_menu">సెషను ఎంపికలు</string>
<!-- Snackbar title shown after a folder has been deleted. This first parameter is the name of the deleted folder -->
<string name="bookmark_delete_folder_snackbar">%1$s తొలగించబడింది</string>
<!-- Screen title for adding a bookmarks folder -->
<string name="bookmark_add_folder">సంచయం చేర్చు</string>
<!-- Snackbar title shown after a bookmark has been created. -->
<string name="bookmark_saved_snackbar">ఇష్టాంశం భద్రమయింది!</string>
<!-- Bookmark overflow menu open in new tab button -->
<string name="bookmark_menu_open_in_new_tab_button">కొత్త ట్యాబులో తెరువు</string>
<!-- Bookmark overflow menu open in private tab button -->
<string name="bookmark_menu_open_in_private_tab_button">అంతరంగిక ట్యాబులో తెరువు</string>
<!-- Bookmark overflow menu delete button -->
<string name="bookmark_menu_delete_button">తొలగించు</string>
<!--Bookmark overflow menu save button -->
@ -254,6 +337,9 @@
<!-- Bookmark NAME editing field label -->
<string name="bookmark_name_label">పేరు</string>
<!-- Bookmark editing error missing or improper URL -->
<string name="bookmark_invalid_url_error">చెల్లని URL</string>
<!-- Site Permissions -->
<!-- Site permissions preferences header -->
<string name="permissions_header">అనుమతులు</string>
@ -277,6 +363,12 @@
<!-- Collections -->
<!-- Collections header on home fragment -->
<string name="collections_header">సేకరణలు</string>
<!-- Title for the "select collection" step of the collection creator -->
<string name="create_collection_select_collection">సేకరణ ఎంపిక</string>
<!-- Title for the "name collection" step of the collection creator -->
<string name="create_collection_name_collection">సేకరణకు పేరు పెట్టడం</string>
<!-- Button to add new collection for the "select collection" step of the collection creator -->
<string name="create_collection_add_new_collection">కొత్త సేకరణను చేర్చు</string>
<!-- Button to select all tabs in the "select tabs" step of the collection creator -->
<string name="create_collection_select_all">అన్నిటినీ ఎంచుకో</string>
<!-- Text to show users how many tabs they have selected in the "select tabs" step of the collection creator.
@ -416,6 +508,12 @@
<!-- Text for the allow button for the data deletion dialog -->
<string name="delete_browsing_data_prompt_allow">తొలగించు</string>
<!-- Text for the snackbar confirmation that the data was deleted -->
<string name="preferences_delete_browsing_data_snackbar">విహరణ డేటా తొలగించబడింది</string>
<!-- text for firefox preview moving tip button -->
<string name="tip_firefox_preview_moved_button_preview_installed">కొత్త నైట్లీకి మారండి</string>
<!-- text for firefox preview moving tip button -->
<string name="tip_firefox_preview_moved_button_preview_not_installed">కొత్త నైట్లీని పొందండి</string>

View File

@ -822,7 +822,7 @@
<!-- Collection and tab deletion prompt dialog message. This will show when the last tab from a collection is deleted -->
<string name="delete_tab_and_collection_dialog_message">Deleting this tab will delete the entire collection. You can create new collections at any time.</string>
<!-- Collection and tab deletion prompt dialog title. Placeholder will be replaced with the collection name. This will show when the last tab from a collection is deleted -->
<string name="delete_tab_and_collection_dialog_title">Delete collection %1$s?</string>
<string name="delete_tab_and_collection_dialog_title">Delete %1$s?</string>
<!-- Tab collection deletion prompt dialog option to delete the collection -->
<string name="tab_collection_dialog_positive">Delete</string>
<!-- Tab collection deletion prompt dialog option to cancel deleting the collection -->
@ -1255,6 +1255,8 @@
<string name="saved_login_copy_username">Copy username</string>
<!-- Content Description (for screenreaders etc) read for the button to copy a site in logins -->
<string name="saved_login_copy_site">Copy site</string>
<!-- Content Description (for screenreaders etc) read for the button to open a site in logins -->
<string name="saved_login_open_site">Open site in browser</string>
<!-- Content Description (for screenreaders etc) read for the button to reveal a password in logins -->
<string name="saved_login_reveal_password">Show password</string>
<!-- Content Description (for screenreaders etc) read for the button to hide a password in logins -->

View File

@ -0,0 +1,21 @@
/* 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.sync
import mozilla.components.feature.syncedtabs.view.SyncedTabsView.ErrorType
import org.junit.Assert.assertTrue
import org.junit.Assert.assertFalse
import org.junit.Test
class SyncedTabsLayoutTest {
@Test
fun `pull to refresh state`() {
assertTrue(SyncedTabsLayout.pullToRefreshEnableState(ErrorType.MULTIPLE_DEVICES_UNAVAILABLE))
assertTrue(SyncedTabsLayout.pullToRefreshEnableState(ErrorType.SYNC_ENGINE_UNAVAILABLE))
assertTrue(SyncedTabsLayout.pullToRefreshEnableState(ErrorType.NO_TABS_AVAILABLE))
assertFalse(SyncedTabsLayout.pullToRefreshEnableState(ErrorType.SYNC_NEEDS_REAUTHENTICATION))
assertFalse(SyncedTabsLayout.pullToRefreshEnableState(ErrorType.SYNC_UNAVAILABLE))
}
}

View File

@ -1,5 +1,7 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
import org.mozilla.fenix.gradle.tasks.GithubDetailsTask
buildscript {
// This logic is duplicated in the allprojects block: I don't know how to fix that.
repositories {
@ -181,9 +183,21 @@ tasks.withType(io.gitlab.arturbosch.detekt.Detekt.class) {
exclude("**/tmp/**")
}
task listRepositories {
tasks.register("listRepositories") {
doLast {
println "Repositories:"
project.repositories.each { println "Name: " + it.name + "; url: " + it.url }
}
}
tasks.register("githubTestDetails", GithubDetailsTask) {
text = "### [Unit Test Results](/reports/test/testGeckoNightlyDebugUnitTest/index.html)"
}
tasks.register("githubLintDetektDetails", GithubDetailsTask) {
text = "### [Detekt Results](/reports/detekt.html)"
}
tasks.register("githubLintAndroidDetails", GithubDetailsTask) {
text = "### [Android Lint Results](/reports/lint-results-geckoNightlyDebug.html)"
}

View File

@ -0,0 +1,48 @@
/* 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.gradle.tasks
import org.gradle.api.DefaultTask
import org.gradle.api.tasks.Input
import org.gradle.api.tasks.TaskAction
import java.io.File
/**
* Helper to write to the "customCheckRunText.md" file for Taskcluster.
* Taskcluster uses this file to populate the "Details" section in the GitHub Checks panel UI.
*/
open class GithubDetailsTask : DefaultTask() {
/**
* Text to display in the Github Checks panel under "Details". Any markdown works here.
* The text is written to a markdown file which is used by Taskcluster.
* Links are automatically rewritten to point to the correct Taskcluster URL.
*/
@Input
var text: String = ""
private val detailsFile = File("/builds/worker/github/customCheckRunText.md")
private val suffix = "\n\n_(404 if compilation failed)_"
/**
* Captures the link name and URL in a markdown link.
* i.e. "### [Hello](/world.html)" -> "/world.html"
*/
private val markdownLinkRegex = """\[(.*)]\((.*)\)""".toRegex()
@TaskAction
fun writeFile() {
val taskId = System.getenv("TASK_ID")
val url = "https://firefoxci.taskcluster-artifacts.net/$taskId/0/public"
val replaced = text.replace(markdownLinkRegex) { match ->
val (_, linkName, linkUrl) = match.groupValues
"[$linkName](${url + linkUrl})"
}
project.mkdir("/builds/worker/github")
detailsFile.writeText(replaced + suffix)
}
}

View File

@ -47,7 +47,7 @@ jobs:
description: 'Running detekt over all modules'
run:
using: gradlew
gradlew: [detekt]
gradlew: [detekt, githubLintDetektDetails]
treeherder:
symbol: detekt
worker:
@ -55,6 +55,9 @@ jobs:
- name: public/reports
path: /builds/worker/checkouts/src/build/reports
type: directory
- name: public/github
path: /builds/worker/github
type: directory
ktlint:
description: 'Running ktlint over all modules'
run:
@ -66,7 +69,7 @@ jobs:
description: 'Running lint over all modules'
run:
using: gradlew
gradlew: ['lintGeckoNightlyDebug']
gradlew: ['lintGeckoNightlyDebug', 'githubLintAndroidDetails']
treeherder:
symbol: lint
worker:
@ -74,3 +77,6 @@ jobs:
- name: public/reports
path: /builds/worker/checkouts/src/app/build/reports
type: directory
- name: public/github
path: /builds/worker/github
type: directory

View File

@ -40,7 +40,11 @@ jobs:
geckoview-engine: geckoNightly
code-review: true
run:
gradlew: ['clean', '-Pcoverage', 'jacocoGeckoNightlyDebugTestReport']
gradlew:
- 'clean'
- '-Pcoverage'
- 'jacocoGeckoNightlyDebugTestReport'
- 'githubTestDetails'
# post-gradlew:
# - ['automation/taskcluster/upload_coverage_report.sh']
secrets:
@ -59,3 +63,6 @@ jobs:
- name: public/reports/test
path: /builds/worker/checkouts/src/app/build/reports/tests
type: directory
- name: public/github
path: /builds/worker/github
type: directory