1
0
Fork 0

Closes #4012 - Animate quick settings (#4047)

master
Tiger Oakes 2019-07-30 12:50:50 -04:00 committed by Sawyer Blatz
parent 2467588c4a
commit d1651ecf71
40 changed files with 698 additions and 245 deletions

View File

@ -8,10 +8,10 @@ import android.content.Context
import android.view.View
import android.widget.RadioButton
import android.widget.TextView
import androidx.core.content.ContextCompat
import androidx.core.text.HtmlCompat
import mozilla.components.feature.sitepermissions.SitePermissions
import mozilla.components.feature.sitepermissions.SitePermissionsRules
import mozilla.components.support.ktx.android.view.putCompoundDrawablesRelative
import org.mozilla.fenix.R
import org.mozilla.fenix.ThemeManager
@ -104,11 +104,11 @@ fun PhoneFeature.getPreferenceKey(context: Context): String {
*/
fun RadioButton.setStartCheckedIndicator() {
val attr = ThemeManager.resolveAttribute(android.R.attr.listChoiceIndicatorSingle, context)
val buttonDrawable = ContextCompat.getDrawable(context, attr)
val buttonDrawable = context.getDrawable(attr)
buttonDrawable?.apply {
setBounds(0, 0, this.intrinsicWidth, this.intrinsicHeight)
setBounds(0, 0, intrinsicWidth, intrinsicHeight)
}
setCompoundDrawablesRelative(buttonDrawable, null, null, null)
putCompoundDrawablesRelative(start = buttonDrawable)
}
fun initBlockedByAndroidView(phoneFeature: PhoneFeature, blockedByAndroidView: View) {

View File

@ -24,13 +24,11 @@ enum class PhoneFeature(val id: Int, val androidPermissionsList: Array<String>)
MICROPHONE(ID_MICROPHONE_PERMISSION, arrayOf(RECORD_AUDIO)),
NOTIFICATION(ID_NOTIFICATION_PERMISSION, emptyArray());
@Suppress("SpreadOperator")
fun isAndroidPermissionGranted(context: Context): Boolean {
val permissions = when (this) {
CAMERA, LOCATION, MICROPHONE -> androidPermissionsList
NOTIFICATION -> return true
return when (this) {
CAMERA, LOCATION, MICROPHONE -> context.isPermissionGranted(androidPermissionsList.asIterable())
NOTIFICATION -> true
}
return context.isPermissionGranted(*permissions)
}
fun getActionLabel(context: Context, sitePermissions: SitePermissions? = null, settings: Settings? = null): String {

View File

@ -4,15 +4,16 @@
package org.mozilla.fenix.settings.quicksettings
import android.graphics.drawable.Drawable
import android.view.View
import android.view.View.GONE
import android.view.View.VISIBLE
import android.view.ViewGroup
import android.widget.TextView
import androidx.appcompat.content.res.AppCompatResources
import androidx.annotation.ColorRes
import androidx.annotation.DrawableRes
import androidx.annotation.IdRes
import androidx.annotation.StringRes
import androidx.core.content.ContextCompat
import androidx.core.net.toUri
import androidx.core.view.isVisible
import io.reactivex.Observable
import io.reactivex.Observer
import io.reactivex.functions.Consumer
@ -21,6 +22,7 @@ import mozilla.components.feature.sitepermissions.SitePermissions
import mozilla.components.feature.sitepermissions.SitePermissions.Status.BLOCKED
import mozilla.components.feature.sitepermissions.SitePermissions.Status.NO_DECISION
import mozilla.components.support.ktx.android.net.hostWithoutCommonPrefixes
import mozilla.components.support.ktx.android.view.putCompoundDrawablesRelativeWithIntrinsicBounds
import org.mozilla.fenix.R
import org.mozilla.fenix.mvi.UIView
import org.mozilla.fenix.settings.PhoneFeature
@ -30,6 +32,8 @@ import org.mozilla.fenix.settings.PhoneFeature.MICROPHONE
import org.mozilla.fenix.settings.PhoneFeature.NOTIFICATION
import org.mozilla.fenix.utils.Settings
typealias LabelActionPair = Pair<TextView, TextView>
@Suppress("TooManyFunctions")
class QuickSettingsUIView(
container: ViewGroup,
@ -40,8 +44,28 @@ class QuickSettingsUIView(
container, actionEmitter, changesObservable
) {
private val blockedByAndroidPhoneFeatures = mutableListOf<PhoneFeature>()
private val context get() = view.context
private inline val context get() = view.context
private val settings: Settings = Settings.getInstance(context)
private val trackingProtectionSettingView = TrackingProtectionSettingView(view, actionEmitter)
private val labelAndActions = mapOf(
CAMERA to findLabelActionPair(R.id.camera_icon, R.id.camera_action_label),
LOCATION to findLabelActionPair(R.id.location_icon, R.id.location_action_label),
MICROPHONE to findLabelActionPair(R.id.microphone_icon, R.id.microphone_action_label),
NOTIFICATION to findLabelActionPair(R.id.notification_icon, R.id.notification_action_label)
)
private val blockedByAndroidClickListener = View.OnClickListener {
val feature = it.tag as PhoneFeature
actionEmitter.onNext(
QuickSettingsAction.SelectBlockedByAndroid(feature.androidPermissionsList)
)
}
private val togglePermissionClickListener = View.OnClickListener {
val feature = it.tag as PhoneFeature
actionEmitter.onNext(
QuickSettingsAction.TogglePermission(feature)
)
}
override fun updateView() = Consumer<QuickSettingsState> { state ->
when (state.mode) {
@ -49,8 +73,7 @@ class QuickSettingsUIView(
bindUrl(state.mode.url)
bindSecurityInfo(state.mode.isSecured)
bindReportSiteIssueAction(state.mode.url)
bindTrackingProtectionAction()
bindTrackingProtectionInfo(state.mode.isTrackingProtectionOn)
trackingProtectionSettingView.bind(state.mode.isTrackingProtectionOn)
bindPhoneFeatureItem(CAMERA, state.mode.sitePermissions)
bindPhoneFeatureItem(MICROPHONE, state.mode.sitePermissions)
bindPhoneFeatureItem(NOTIFICATION, state.mode.sitePermissions)
@ -69,35 +92,6 @@ class QuickSettingsUIView(
this.url.text = url.toUri().hostWithoutCommonPrefixes
}
private fun bindTrackingProtectionInfo(isTrackingProtectionOn: Boolean) {
val globalTPSetting = Settings.getInstance(context).shouldUseTrackingProtection
val drawableId =
if (isTrackingProtectionOn) R.drawable.ic_tracking_protection else
R.drawable.ic_tracking_protection_disabled
val icon = AppCompatResources.getDrawable(context, drawableId)
tracking_protection.setCompoundDrawablesWithIntrinsicBounds(icon, null, null, null)
tracking_protection.isChecked = isTrackingProtectionOn
tracking_protection.isEnabled = globalTPSetting
tracking_protection.setOnCheckedChangeListener { _, isChecked ->
actionEmitter.onNext(
QuickSettingsAction.ToggleTrackingProtection(
isChecked
)
)
}
}
private fun bindTrackingProtectionAction() {
val globalTPSetting = Settings.getInstance(context).shouldUseTrackingProtection
tracking_protection_action.visibility = if (globalTPSetting) View.GONE else View.VISIBLE
tracking_protection_action.setOnClickListener {
actionEmitter.onNext(
QuickSettingsAction.SelectTrackingProtectionSettings
)
}
}
private fun bindReportSiteIssueAction(url: String) {
report_site_issue_action.setOnClickListener {
actionEmitter.onNext(
@ -107,9 +101,9 @@ class QuickSettingsUIView(
}
private fun bindSecurityInfo(isSecured: Boolean) {
val stringId: Int
val drawableId: Int
val drawableTint: Int
@StringRes val stringId: Int
@DrawableRes val drawableId: Int
@ColorRes val drawableTint: Int
if (isSecured) {
stringId = R.string.quick_settings_sheet_secure_connection
@ -121,39 +115,29 @@ class QuickSettingsUIView(
drawableTint = R.color.photonRed50
}
val icon = AppCompatResources.getDrawable(context, drawableId)
val icon = context.getDrawable(drawableId)
icon?.setTint(ContextCompat.getColor(context, drawableTint))
security_info.setText(stringId)
security_info.setCompoundDrawablesWithIntrinsicBounds(icon, null, null, null)
security_info.putCompoundDrawablesRelativeWithIntrinsicBounds(start = icon)
}
private fun bindPhoneFeatureItem(phoneFeature: PhoneFeature, sitePermissions: SitePermissions? = null) {
if (phoneFeature.shouldBeHidden(sitePermissions)) {
hide(phoneFeature)
return
}
show(phoneFeature)
if (!phoneFeature.isAndroidPermissionGranted(context)) {
handleBlockedByAndroidAction(phoneFeature)
} else {
bindPhoneAction(phoneFeature, sitePermissions)
val (label, action) = labelAndActions.getValue(phoneFeature)
val shouldBeVisible = phoneFeature.shouldBeVisible(sitePermissions)
label.isVisible = shouldBeVisible
action.isVisible = shouldBeVisible
if (shouldBeVisible) {
if (phoneFeature.isAndroidPermissionGranted(context)) {
bindPhoneAction(phoneFeature, sitePermissions)
} else {
handleBlockedByAndroidAction(phoneFeature)
}
}
}
private fun show(phoneFeature: PhoneFeature) {
val (label, action) = phoneFeature.labelAndAction
label.visibility = VISIBLE
action.visibility = VISIBLE
}
private fun hide(phoneFeature: PhoneFeature) {
val (label, action) = phoneFeature.labelAndAction
label.visibility = GONE
action.visibility = GONE
}
private fun PhoneFeature.shouldBeHidden(sitePermissions: SitePermissions?): Boolean {
return getStatus(sitePermissions, settings) == NO_DECISION
private fun PhoneFeature.shouldBeVisible(sitePermissions: SitePermissions?): Boolean {
return getStatus(sitePermissions, settings) != NO_DECISION
}
private fun PhoneFeature.isPermissionBlocked(sitePermissions: SitePermissions?): Boolean {
@ -161,25 +145,17 @@ class QuickSettingsUIView(
}
private fun handleBlockedByAndroidAction(phoneFeature: PhoneFeature) {
val (label, action) = phoneFeature.labelAndAction
val (label, action) = labelAndActions.getValue(phoneFeature)
action.setText(R.string.phone_feature_blocked_by_android)
action.tag = phoneFeature
action.setOnClickListener {
val feature = it.tag as PhoneFeature
actionEmitter.onNext(
QuickSettingsAction.SelectBlockedByAndroid(
feature.androidPermissionsList
)
)
}
label.setCompoundDrawablesWithIntrinsicBounds(phoneFeature.disabledIcon, null, null, null)
action.setOnClickListener(blockedByAndroidClickListener)
label.isEnabled = false
blockedByAndroidPhoneFeatures.add(phoneFeature)
}
private fun bindPhoneAction(phoneFeature: PhoneFeature, sitePermissions: SitePermissions? = null) {
val (label, action) = phoneFeature.labelAndAction
val (label, action) = labelAndActions.getValue(phoneFeature)
action.text = phoneFeature.getActionLabel(
context = context,
@ -188,63 +164,21 @@ class QuickSettingsUIView(
)
action.tag = phoneFeature
action.setOnClickListener {
val feature = it.tag as PhoneFeature
actionEmitter.onNext(
QuickSettingsAction.TogglePermission(feature)
)
}
action.setOnClickListener(togglePermissionClickListener)
val icon = if (phoneFeature.isPermissionBlocked(sitePermissions)) {
label.isEnabled = false
phoneFeature.disabledIcon
} else {
label.isEnabled = true
phoneFeature.enabledIcon
}
label.setCompoundDrawablesWithIntrinsicBounds(icon, null, null, null)
label.isEnabled = !phoneFeature.isPermissionBlocked(sitePermissions)
blockedByAndroidPhoneFeatures.remove(phoneFeature)
}
private fun checkFeaturesBlockedByAndroid(sitePermissions: SitePermissions?) {
val clonedList = blockedByAndroidPhoneFeatures.toTypedArray()
clonedList.forEach { phoneFeature ->
blockedByAndroidPhoneFeatures.forEach { phoneFeature ->
if (phoneFeature.isAndroidPermissionGranted(context)) {
bindPhoneAction(phoneFeature, sitePermissions)
}
}
}
private val PhoneFeature.labelAndAction
get(): Pair<TextView, TextView> {
return when (this) {
CAMERA -> camera_icon to camera_action_label
LOCATION -> location_icon to location_action_label
MICROPHONE -> microphone_icon to microphone_action_label
NOTIFICATION -> notification_icon to notification_action_label
}
}
private val PhoneFeature.enabledIcon
get(): Drawable {
val drawableId = when (this) {
CAMERA -> R.drawable.ic_camera
LOCATION -> R.drawable.ic_location
MICROPHONE -> R.drawable.ic_microphone
NOTIFICATION -> R.drawable.ic_notification
}
return requireNotNull(AppCompatResources.getDrawable(context, drawableId))
}
private val PhoneFeature.disabledIcon
get(): Drawable {
val drawableId = when (this) {
CAMERA -> R.drawable.ic_camera_disabled
LOCATION -> R.drawable.ic_location_disabled
MICROPHONE -> R.drawable.ic_microphone_disabled
NOTIFICATION -> R.drawable.ic_notifications_disabled
}
return requireNotNull(AppCompatResources.getDrawable(context, drawableId))
}
private fun findLabelActionPair(@IdRes labelId: Int, @IdRes actionId: Int): LabelActionPair {
return view.findViewById<TextView>(labelId) to view.findViewById(actionId)
}
}

View File

@ -0,0 +1,52 @@
/* 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.settings.quicksettings
import android.view.View
import android.widget.CompoundButton
import android.widget.Switch
import android.widget.TextView
import androidx.core.view.isVisible
import io.reactivex.Observer
import mozilla.components.support.ktx.android.view.putCompoundDrawablesRelativeWithIntrinsicBounds
import org.mozilla.fenix.R
import org.mozilla.fenix.utils.Settings
class TrackingProtectionSettingView(
container: View,
private val actionEmitter: Observer<QuickSettingsAction>
) : View.OnClickListener, CompoundButton.OnCheckedChangeListener {
private val trackingProtectionSwitch: Switch = container.findViewById(R.id.tracking_protection)
private val trackingProtectionAction: TextView = container.findViewById(R.id.tracking_protection_action)
init {
trackingProtectionSwitch.putCompoundDrawablesRelativeWithIntrinsicBounds(
start = container.context.getDrawable(R.drawable.ic_tracking_protection)
)
}
fun bind(isTrackingProtectionOn: Boolean) {
val globalTPSetting = Settings.getInstance(trackingProtectionSwitch.context).shouldUseTrackingProtection
trackingProtectionAction.isVisible = !globalTPSetting
trackingProtectionAction.setOnClickListener(this)
trackingProtectionSwitch.isChecked = isTrackingProtectionOn
trackingProtectionSwitch.isEnabled = globalTPSetting
trackingProtectionSwitch.setOnCheckedChangeListener(this)
}
override fun onClick(view: View) {
actionEmitter.onNext(
QuickSettingsAction.SelectTrackingProtectionSettings
)
}
override fun onCheckedChanged(buttonView: CompoundButton, isChecked: Boolean) {
actionEmitter.onNext(
QuickSettingsAction.ToggleTrackingProtection(isChecked)
)
}
}

View File

@ -0,0 +1,13 @@
<?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/. -->
<objectAnimator
xmlns:android="http://schemas.android.com/apk/res/android"
android:propertyName="fillColor"
android:startOffset="@integer/strike_thru_start_offset"
android:duration="@integer/strike_thru_duration"
android:valueFrom="?primaryText"
android:valueTo="@color/disabled_text"
android:valueType="colorType"
android:interpolator="@android:interpolator/fast_out_slow_in" />

View File

@ -0,0 +1,13 @@
<?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/. -->
<objectAnimator
xmlns:android="http://schemas.android.com/apk/res/android"
android:propertyName="fillColor"
android:startOffset="@integer/strike_thru_start_offset"
android:duration="@integer/strike_thru_duration"
android:valueFrom="@color/disabled_text"
android:valueTo="?primaryText"
android:valueType="colorType"
android:interpolator="@android:interpolator/fast_out_slow_in" />

View File

@ -0,0 +1,13 @@
<?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/. -->
<objectAnimator
xmlns:android="http://schemas.android.com/apk/res/android"
android:propertyName="pathData"
android:startOffset="@integer/strike_thru_start_offset"
android:duration="@integer/strike_thru_duration"
android:valueFrom="M 0 0 L 0 24 L 24 24 L 24 0 L 0 0 Z M 21 2 L 23 4 L 23 4 L 21 2 L 21 2 Z"
android:valueTo="M 0 0 L 0 24 L 24 24 L 24 0 L 0 0 Z M 21 2 L 23 4 L 6 21 L 4 19 L 21 2 Z"
android:valueType="pathType"
android:interpolator="@android:interpolator/fast_out_slow_in" />

View File

@ -0,0 +1,13 @@
<?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/. -->
<objectAnimator
xmlns:android="http://schemas.android.com/apk/res/android"
android:propertyName="pathData"
android:startOffset="@integer/strike_thru_start_offset"
android:duration="@integer/strike_thru_duration"
android:valueFrom="M 0 0 L 0 24 L 24 24 L 24 0 L 0 0 Z M 21 2 L 23 4 L 6 21 L 4 19 L 21 2 Z"
android:valueTo="M 0 0 L 0 24 L 24 24 L 24 0 L 0 0 Z M 21 2 L 23 4 L 23 4 L 21 2 L 21 2 Z"
android:valueType="pathType"
android:interpolator="@android:interpolator/fast_out_slow_in" />

View File

@ -0,0 +1,22 @@
<?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/. -->
<set xmlns:android="http://schemas.android.com/apk/res/android">
<objectAnimator
android:propertyName="pathData"
android:startOffset="@integer/strike_thru_start_offset"
android:duration="@integer/strike_thru_duration"
android:valueFrom="M 20 1.6 L 21.4 3 L 21.9 2.5 C 20.9 3.5 19.5 2 20.5 1.1 L 20 1.6 Z"
android:valueTo="M 20 1.6 L 21.4 3 L 5.2 19.2 C 4.2 20.2 2.8 18.8 3.8 17.8 L 20 1.6 Z"
android:valueType="pathType"
android:interpolator="@android:interpolator/fast_out_slow_in" />
<objectAnimator
android:propertyName="fillColor"
android:startOffset="@integer/strike_thru_start_offset"
android:duration="@integer/strike_thru_duration"
android:valueFrom="?primaryText"
android:valueTo="@color/disabled_text"
android:valueType="colorType"
android:interpolator="@android:interpolator/fast_out_slow_in" />
</set>

View File

@ -0,0 +1,22 @@
<?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/. -->
<set xmlns:android="http://schemas.android.com/apk/res/android">
<objectAnimator
android:propertyName="pathData"
android:startOffset="@integer/strike_thru_start_offset"
android:duration="@integer/strike_thru_duration"
android:valueFrom="M 20 1.6 L 21.4 3 L 5.2 19.2 C 4.2 20.2 2.8 18.8 3.8 17.8 L 20 1.6 Z"
android:valueTo="M 20 1.6 L 21.4 3 L 21.9 2.5 C 20.9 3.5 19.5 2 20.5 1.1 L 20 1.6 Z"
android:valueType="pathType"
android:interpolator="@android:interpolator/fast_out_slow_in" />
<objectAnimator
android:propertyName="fillColor"
android:startOffset="@integer/strike_thru_start_offset"
android:duration="@integer/strike_thru_duration"
android:valueFrom="@color/disabled_text"
android:valueTo="?primaryText"
android:valueType="colorType"
android:interpolator="@android:interpolator/fast_out_slow_in" />
</set>

View File

@ -2,11 +2,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/. -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path android:fillColor="?primaryText"
android:pathData="M17,10.5V7c0,-0.55 -0.45,-1 -1,-1H4c-0.55,0 -1,0.45 -1,1v10c0,0.55 0.45,1 1,1h12c0.55,0 1,-0.45 1,-1v-3.5l4,4v-11l-4,4z"/>
</vector>
<animated-selector xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:id="@+id/enabled"
android:drawable="@drawable/ic_camera_enabled"
android:state_enabled="true" />
<item
android:id="@+id/disabled"
android:drawable="@drawable/ic_camera_disabled" />
<transition
android:drawable="@drawable/ic_camera_anim_enable"
android:fromId="@id/disabled"
android:toId="@id/enabled" />
<transition
android:drawable="@drawable/ic_camera_anim_disable"
android:fromId="@+id/enabled"
android:toId="@+id/disabled" />
</animated-selector>

View File

@ -0,0 +1,11 @@
<?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/. -->
<animated-vector
xmlns:android="http://schemas.android.com/apk/res/android"
android:drawable="@drawable/ic_camera_enabled">
<target android:name="strike_thru_path" android:animation="@animator/strike_thru_path_disable" />
<target android:name="strike_thru_mask" android:animation="@animator/strike_thru_mask_disable" />
<target android:name="icon" android:animation="@animator/fill_disable" />
</animated-vector>

View File

@ -0,0 +1,11 @@
<?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/. -->
<animated-vector
xmlns:android="http://schemas.android.com/apk/res/android"
android:drawable="@drawable/ic_camera_disabled">
<target android:name="strike_thru_path" android:animation="@animator/strike_thru_path_enable" />
<target android:name="strike_thru_mask" android:animation="@animator/strike_thru_mask_enable" />
<target android:name="icon" android:animation="@animator/fill_enable" />
</animated-vector>

View File

@ -3,11 +3,25 @@
- 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="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="@color/disabled_text"
android:pathData="M21.46,6.16L8.63,19h5.55A1.88,1.88 0,0 0,16 17.06v-2.73l4.4,3.41A1,1 0,0 0,22 17L22,7a1,1 0,0 0,-0.54 -0.84zM21.71,2.29a1,1 0,0 0,-1.42 0L16,6.62A1.84,1.84 0,0 0,14.18 5L3.81,5A1.88,1.88 0,0 0,2 6.94v10.12A1.89,1.89 0,0 0,3.61 19l-1.32,1.29a1,1 0,0 0,0 1.42,1 1,0 0,0 1.42,0l18,-18a1,1 0,0 0,0 -1.42z"/>
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<group>
<clip-path android:pathData="M 18.8 2.8 C 19.8 1.8 21.1 3.3 20.2 4.2 L 3.4 21 L 2 19.6 L 18.8 2.8 Z"/>
<path
android:name="strike_thru_path"
android:pathData="M 20 1.6 L 21.4 3 L 5.2 19.2 C 4.2 20.2 2.8 18.8 3.8 17.8 L 20 1.6 Z"
android:fillColor="@color/disabled_text"
android:strokeWidth="1"/>
</group>
<group>
<clip-path
android:name="strike_thru_mask"
android:pathData="M 0 0 L 0 24 L 24 24 L 24 0 L 0 0 Z M 21 2 L 23 4 L 6 21 L 4 19 L 21 2 Z"/>
<path
android:name="icon"
android:fillColor="@color/disabled_text"
android:pathData="M17 16a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8c0-1.1 0.9-2 2-2h10a2 2 0 0 1 2 2v2l2.9-2.8c0.4-0.4 1.07 0 1.07 0.62v8.4c0 0.6-0.6 1.06-1.07 0.6L17 14v2z" />
</group>
</vector>

View File

@ -0,0 +1,27 @@
<?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="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<group>
<clip-path android:pathData="M 18.8 2.8 C 19.8 1.8 21.1 3.3 20.2 4.2 L 3.4 21 L 2 19.6 L 18.8 2.8 Z"/>
<path
android:name="strike_thru_path"
android:pathData="M 20 1.6 L 21.4 3 L 21.9 2.5 C 20.9 3.5 19.5 2 20.5 1.1 L 20 1.6 Z"
android:fillColor="?primaryText"
android:strokeWidth="1"/>
</group>
<group>
<clip-path
android:name="strike_thru_mask"
android:pathData="M 0 0 L 0 24 L 24 24 L 24 0 L 0 0 Z M 21 2 L 23 4 L 23 4 L 21 2 L 21 2 Z"/>
<path
android:name="icon"
android:fillColor="?primaryText"
android:pathData="M17 16a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8c0-1.1 0.9-2 2-2h10a2 2 0 0 1 2 2v2l2.9-2.8c0.4-0.4 1.07 0 1.07 0.62v8.4c0 0.6-0.6 1.06-1.07 0.6L17 14v2z" />
</group>
</vector>

View File

@ -2,12 +2,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/. -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="?primaryText"
android:pathData="M12,9a3,3 0,1 0,3 3,3 3,0 0,0 -3,-3zM21,11h-1.07A8,8 0,0 0,13 4.07L13,3a1,1 0,0 0,-2 0v1.07A8,8 0,0 0,4.07 11L3,11a1,1 0,0 0,0 2h1.07A8,8 0,0 0,11 19.93L11,21a1,1 0,0 0,2 0v-1.07A8,8 0,0 0,19.93 13L21,13a1,1 0,0 0,0 -2zM12,18a6,6 0,1 1,6 -6,6 6,0 0,1 -6,6z"/>
</vector>
<animated-selector xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:id="@+id/enabled"
android:drawable="@drawable/ic_location_enabled"
android:state_enabled="true" />
<item
android:id="@+id/disabled"
android:drawable="@drawable/ic_location_disabled" />
<transition
android:drawable="@drawable/ic_location_anim_enable"
android:fromId="@id/disabled"
android:toId="@id/enabled" />
<transition
android:drawable="@drawable/ic_location_anim_disable"
android:fromId="@+id/enabled"
android:toId="@+id/disabled" />
</animated-selector>

View File

@ -0,0 +1,11 @@
<?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/. -->
<animated-vector
xmlns:android="http://schemas.android.com/apk/res/android"
android:drawable="@drawable/ic_location_enabled">
<target android:name="strike_thru_path" android:animation="@animator/strike_thru_path_disable" />
<target android:name="strike_thru_mask" android:animation="@animator/strike_thru_mask_disable" />
<target android:name="icon" android:animation="@animator/fill_disable" />
</animated-vector>

View File

@ -0,0 +1,11 @@
<?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/. -->
<animated-vector
xmlns:android="http://schemas.android.com/apk/res/android"
android:drawable="@drawable/ic_location_disabled">
<target android:name="strike_thru_path" android:animation="@animator/strike_thru_path_enable" />
<target android:name="strike_thru_mask" android:animation="@animator/strike_thru_mask_enable" />
<target android:name="icon" android:animation="@animator/fill_enable" />
</animated-vector>

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,27 @@
<?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="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<group>
<clip-path android:pathData="M 18.8 2.8 C 19.8 1.8 21.1 3.3 20.2 4.2 L 3.4 21 L 2 19.6 L 18.8 2.8 Z"/>
<path
android:name="strike_thru_path"
android:pathData="M 20 1.6 L 21.4 3 L 21.9 2.5 C 20.9 3.5 19.5 2 20.5 1.1 L 20 1.6 Z"
android:fillColor="?primaryText"
android:strokeWidth="1"/>
</group>
<group>
<clip-path
android:name="strike_thru_mask"
android:pathData="M 0 0 L 0 24 L 24 24 L 24 0 L 0 0 Z M 21 2 L 23 4 L 23 4 L 21 2 L 21 2 Z"/>
<path
android:name="icon"
android:fillColor="?primaryText"
android:pathData="M12,9a3,3 0,1 0,3 3,3 3,0 0,0 -3,-3zM21,11h-1.07A8,8 0,0 0,13 4.07L13,3a1,1 0,0 0,-2 0v1.07A8,8 0,0 0,4.07 11L3,11a1,1 0,0 0,0 2h1.07A8,8 0,0 0,11 19.93L11,21a1,1 0,0 0,2 0v-1.07A8,8 0,0 0,19.93 13L21,13a1,1 0,0 0,0 -2zM12,18a6,6 0,1 1,6 -6,6 6,0 0,1 -6,6z" />
</group>
</vector>

View File

@ -2,12 +2,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/. -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M17,11v-1c0,-0.552 0.448,-1 1,-1s1,0.5 1,1v1c0,3.5 -2.6,6.4 -6,6.9L13,21c0,0.6 -0.5,1 -1,1s-1,-0.5 -1,-1v-3c-3.4,-0.5 -6,-3.4 -6,-7v-1c0,-0.6 0.5,-1 1,-1s1,0.5 1,1v1c0,2.8 2.2,5 5,5s5,-2.2 5,-5zM12,2c1.7,0 3,1.3 3,3v6c0,1.7 -1.3,3 -3,3s-3,-1.343 -3,-3L9,5c0,-1.657 1.343,-3 3,-3z"
android:fillColor="?primaryText"/>
</vector>
<animated-selector xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:id="@+id/enabled"
android:drawable="@drawable/ic_microphone_enabled"
android:state_enabled="true" />
<item
android:id="@+id/disabled"
android:drawable="@drawable/ic_microphone_disabled" />
<transition
android:drawable="@drawable/ic_microphone_anim_enable"
android:fromId="@id/disabled"
android:toId="@id/enabled" />
<transition
android:drawable="@drawable/ic_microphone_anim_disable"
android:fromId="@+id/enabled"
android:toId="@+id/disabled" />
</animated-selector>

View File

@ -0,0 +1,11 @@
<?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/. -->
<animated-vector
xmlns:android="http://schemas.android.com/apk/res/android"
android:drawable="@drawable/ic_microphone_enabled">
<target android:name="strike_thru_path" android:animation="@animator/strike_thru_path_disable" />
<target android:name="strike_thru_mask" android:animation="@animator/strike_thru_mask_disable" />
<target android:name="icon" android:animation="@animator/fill_disable" />
</animated-vector>

View File

@ -0,0 +1,11 @@
<?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/. -->
<animated-vector
xmlns:android="http://schemas.android.com/apk/res/android"
android:drawable="@drawable/ic_microphone_disabled">
<target android:name="strike_thru_path" android:animation="@animator/strike_thru_path_enable" />
<target android:name="strike_thru_mask" android:animation="@animator/strike_thru_mask_enable" />
<target android:name="icon" android:animation="@animator/fill_enable" />
</animated-vector>

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,27 @@
<?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="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<group>
<clip-path android:pathData="M 18.8 2.8 C 19.8 1.8 21.1 3.3 20.2 4.2 L 3.4 21 L 2 19.6 L 18.8 2.8 Z"/>
<path
android:name="strike_thru_path"
android:pathData="M 20 1.6 L 21.4 3 L 21.9 2.5 C 20.9 3.5 19.5 2 20.5 1.1 L 20 1.6 Z"
android:fillColor="?primaryText"
android:strokeWidth="1"/>
</group>
<group>
<clip-path
android:name="strike_thru_mask"
android:pathData="M 0 0 L 0 24 L 24 24 L 24 0 L 0 0 Z M 21 2 L 23 4 L 23 4 L 21 2 L 21 2 Z"/>
<path
android:name="icon"
android:fillColor="?primaryText"
android:pathData="M17,11v-1c0,-0.552 0.448,-1 1,-1s1,0.5 1,1v1c0,3.5 -2.6,6.4 -6,6.9L13,21c0,0.6 -0.5,1 -1,1s-1,-0.5 -1,-1v-3c-3.4,-0.5 -6,-3.4 -6,-7v-1c0,-0.6 0.5,-1 1,-1s1,0.5 1,1v1c0,2.8 2.2,5 5,5s5,-2.2 5,-5zM12,2c1.7,0 3,1.3 3,3v6c0,1.7 -1.3,3 -3,3s-3,-1.343 -3,-3L9,5c0,-1.657 1.343,-3 3,-3z" />
</group>
</vector>

View File

@ -1,13 +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/. -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="?primaryText"
android:pathData="M19 3H5a3 3 0 0 0-3 3v8a3 3 0 0 0 3 3h7.6l3.7 3.7A1 1 0 0 0 18 20v-3h1a3 3 0 0 0 3-3V6a3 3 0 0 0-3-3zm1 11c0 0.6-0.4 1-1 1h-2a1 1 0 0 0-1 1v1.6l-2.3-2.3a1 1 0 0 0-0.7-0.3H5a1 1 0 0 1-1-1V6c0-0.6 0.4-1 1-1h14c0.6 0 1 0.4 1 1v8zm-3.5-6h-9a0.5 0.5 0 0 0 0 1h9a0.5 0.5 0 0 0 0-1zm0 3h-9a0.5 0.5 0 0 0 0 1h9a0.5 0.5 0 0 0 0-1z" />
</vector>

View File

@ -0,0 +1,22 @@
<?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/. -->
<animated-selector xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:id="@+id/enabled"
android:drawable="@drawable/ic_notifications_enabled"
android:state_enabled="true" />
<item
android:id="@+id/disabled"
android:drawable="@drawable/ic_notifications_disabled" />
<transition
android:drawable="@drawable/ic_notifications_anim_enable"
android:fromId="@id/disabled"
android:toId="@id/enabled" />
<transition
android:drawable="@drawable/ic_notifications_anim_disable"
android:fromId="@+id/enabled"
android:toId="@+id/disabled" />
</animated-selector>

View File

@ -0,0 +1,11 @@
<?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/. -->
<animated-vector
xmlns:android="http://schemas.android.com/apk/res/android"
android:drawable="@drawable/ic_notifications_enabled">
<target android:name="strike_thru_path" android:animation="@animator/strike_thru_path_disable" />
<target android:name="strike_thru_mask" android:animation="@animator/strike_thru_mask_disable" />
<target android:name="icon" android:animation="@animator/fill_disable" />
</animated-vector>

View File

@ -0,0 +1,11 @@
<?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/. -->
<animated-vector
xmlns:android="http://schemas.android.com/apk/res/android"
android:drawable="@drawable/ic_notifications_disabled">
<target android:name="strike_thru_path" android:animation="@animator/strike_thru_path_enable" />
<target android:name="strike_thru_mask" android:animation="@animator/strike_thru_mask_enable" />
<target android:name="icon" android:animation="@animator/fill_enable" />
</animated-vector>

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,27 @@
<?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="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<group>
<clip-path android:pathData="M 18.8 2.8 C 19.8 1.8 21.1 3.3 20.2 4.2 L 3.4 21 L 2 19.6 L 18.8 2.8 Z"/>
<path
android:name="strike_thru_path"
android:pathData="M 20 1.6 L 21.4 3 L 21.9 2.5 C 20.9 3.5 19.5 2 20.5 1.1 L 20 1.6 Z"
android:fillColor="?primaryText"
android:strokeWidth="1"/>
</group>
<group>
<clip-path
android:name="strike_thru_mask"
android:pathData="M 0 0 L 0 24 L 24 24 L 24 0 L 0 0 Z M 21 2 L 23 4 L 23 4 L 21 2 L 21 2 Z"/>
<path
android:name="icon"
android:fillColor="?primaryText"
android:pathData="M19 3H5a3 3 0 0 0-3 3v8a3 3 0 0 0 3 3h7.6l3.7 3.7A1 1 0 0 0 18 20v-3h1a3 3 0 0 0 3-3V6a3 3 0 0 0-3-3zm1 11c0 0.6-0.4 1-1 1h-2a1 1 0 0 0-1 1v1.6l-2.3-2.3a1 1 0 0 0-0.7-0.3H5a1 1 0 0 1-1-1V6c0-0.6 0.4-1 1-1h14c0.6 0 1 0.4 1 1v8zm-3.5-6h-9a0.5 0.5 0 0 0 0 1h9a0.5 0.5 0 0 0 0-1zm0 3h-9a0.5 0.5 0 0 0 0 1h9a0.5 0.5 0 0 0 0-1z" />
</group>
</vector>

View File

@ -2,12 +2,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/. -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="?primaryText"
android:pathData="M20 6c0-1-0.8-1.9-1.8-2L12 3 5.8 4C4.8 4 4 5 4 6l0.1 5c0.3 3.2 1 5 2.5 7a8.4 8.4 0 0 0 5.3 3h0.2c2.1-0.3 4-1.4 5.3-3 1.6-2 2.2-3.8 2.5-7l0.1-5zm-2.1 4.8a10 10 0 0 1-2 6c-1 1.1-2.4 2-3.9 2.3a6.5 6.5 0 0 1-3.9-2.4 9.9 9.9 0 0 1-2-5.9 67.3 67.3 0 0 1 0-4.9L12 5l5.9 1 0.1 0.2-0.1 4.7zM8 7.6v3c0.3 2.7 0.8 3.7 1.7 5 0.6 0.6 1.4 1.2 2.3 1.4V7l-4 0.6z" />
</vector>
<animated-selector xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:id="@+id/enabled"
android:drawable="@drawable/ic_tracking_protection_enabled"
android:state_checked="true" />
<item
android:id="@+id/disabled"
android:drawable="@drawable/ic_tracking_protection_disabled" />
<transition
android:drawable="@drawable/ic_tracking_protection_anim_enable"
android:fromId="@id/disabled"
android:toId="@id/enabled" />
<transition
android:drawable="@drawable/ic_tracking_protection_anim_disable"
android:fromId="@+id/enabled"
android:toId="@+id/disabled" />
</animated-selector>

View File

@ -0,0 +1,11 @@
<?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/. -->
<animated-vector
xmlns:android="http://schemas.android.com/apk/res/android"
android:drawable="@drawable/ic_tracking_protection_enabled">
<target android:name="strike_thru_path" android:animation="@animator/strike_thru_path_disable" />
<target android:name="strike_thru_mask" android:animation="@animator/strike_thru_mask_disable" />
<target android:name="icon" android:animation="@animator/fill_disable" />
</animated-vector>

View File

@ -0,0 +1,11 @@
<?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/. -->
<animated-vector
xmlns:android="http://schemas.android.com/apk/res/android"
android:drawable="@drawable/ic_tracking_protection_disabled">
<target android:name="strike_thru_path" android:animation="@animator/strike_thru_path_enable" />
<target android:name="strike_thru_mask" android:animation="@animator/strike_thru_mask_enable" />
<target android:name="icon" android:animation="@animator/fill_enable" />
</animated-vector>

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,27 @@
<?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="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<group>
<clip-path android:pathData="M 18.8 2.8 C 19.8 1.8 21.1 3.3 20.2 4.2 L 3.4 21 L 2 19.6 L 18.8 2.8 Z"/>
<path
android:name="strike_thru_path"
android:pathData="M 20 1.6 L 21.4 3 L 21.9 2.5 C 20.9 3.5 19.5 2 20.5 1.1 L 20 1.6 Z"
android:fillColor="?primaryText"
android:strokeWidth="1"/>
</group>
<group>
<clip-path
android:name="strike_thru_mask"
android:pathData="M 0 0 L 0 24 L 24 24 L 24 0 L 0 0 Z M 21 2 L 23 4 L 23 4 L 21 2 L 21 2 Z"/>
<path
android:name="icon"
android:fillColor="?primaryText"
android:pathData="M20 6c0-1-0.8-1.9-1.8-2L12 3 5.8 4C4.8 4 4 5 4 6l0.1 5c0.3 3.2 1 5 2.5 7a8.4 8.4 0 0 0 5.3 3h0.2c2.1-0.3 4-1.4 5.3-3 1.6-2 2.2-3.8 2.5-7l0.1-5zm-2.1 4.8a10 10 0 0 1-2 6c-1 1.1-2.4 2-3.9 2.3a6.5 6.5 0 0 1-3.9-2.4 9.9 9.9 0 0 1-2-5.9 67.3 67.3 0 0 1 0-4.9L12 5l5.9 1 0.1 0.2-0.1 4.7zM8 7.6v3c0.3 2.7 0.8 3.7 1.7 5 0.6 0.6 1.4 1.2 2.3 1.4V7l-4 0.6z" />
</group>
</vector>

View File

@ -20,22 +20,24 @@
<TextView
android:id="@+id/url"
style="@style/QuickSettingsText"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="@dimen/quicksettings_item_height"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="https://wikipedia.org" />
tools:text="https://wikipedia.org"
app:layout_constraintEnd_toEndOf="parent" />
<TextView
android:id="@+id/security_info"
style="@style/QuickSettingsText.Icon"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="@dimen/quicksettings_item_height"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/url"
tools:drawableStartCompat="@drawable/mozac_ic_lock"
tools:drawableStart="@drawable/mozac_ic_lock"
tools:drawableTint="@color/photonGreen50"
tools:text="Secure connection" />
tools:text="Secure connection"
app:layout_constraintEnd_toEndOf="parent"/>
<View
android:id="@+id/line_divider_security"
@ -52,7 +54,7 @@
style="@style/QuickSettingsText.Icon"
android:layout_width="match_parent"
android:layout_height="@dimen/quicksettings_item_height"
android:drawableStart="@drawable/ic_tracking_protection"
tools:drawableStart="@drawable/ic_tracking_protection"
android:paddingEnd="24dp"
android:text="@string/preferences_tracking_protection"
app:layout_constraintBottom_toTopOf="@id/tracking_protection_action"
@ -96,12 +98,13 @@
<TextView
android:id="@+id/camera_icon"
style="@style/QuickSettingsText.Icon"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="@dimen/quicksettings_item_height"
android:text="@string/preference_phone_feature_camera"
app:drawableStartCompat="@drawable/ic_camera"
android:drawableStart="@drawable/ic_camera"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/line_divider" />
app:layout_constraintTop_toBottomOf="@id/line_divider"
app:layout_constraintEnd_toStartOf="@+id/camera_action_label"/>
<TextView
android:id="@+id/camera_action_label"
@ -115,13 +118,13 @@
<TextView
android:id="@+id/microphone_icon"
style="@style/QuickSettingsText.Icon"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="@dimen/quicksettings_item_height"
android:text="@string/preference_phone_feature_microphone"
app:drawableStartCompat="@drawable/ic_microphone"
android:drawableStart="@drawable/ic_microphone"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/camera_icon" />
app:layout_constraintTop_toBottomOf="@id/camera_icon"
app:layout_constraintEnd_toStartOf="@+id/microphone_action_label"/>
<TextView
android:id="@+id/microphone_action_label"
@ -135,12 +138,13 @@
<TextView
android:id="@+id/notification_icon"
style="@style/QuickSettingsText.Icon"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="@dimen/quicksettings_item_height"
android:text="@string/preference_phone_feature_notification"
app:drawableStartCompat="@drawable/ic_notification"
android:drawableStart="@drawable/ic_notifications"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/microphone_icon" />
app:layout_constraintTop_toBottomOf="@id/microphone_icon"
app:layout_constraintEnd_toStartOf="@+id/notification_action_label" />
<TextView
android:id="@+id/notification_action_label"
@ -154,12 +158,13 @@
<TextView
android:id="@+id/location_icon"
style="@style/QuickSettingsText.Icon"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="@dimen/quicksettings_item_height"
android:text="@string/preference_phone_feature_location"
app:drawableStartCompat="@drawable/ic_location"
android:drawableStart="@drawable/ic_location"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/notification_icon" />
app:layout_constraintTop_toBottomOf="@id/notification_icon"
app:layout_constraintEnd_toStartOf="@+id/location_action_label"/>
<TextView
android:id="@+id/location_action_label"

View File

@ -0,0 +1,8 @@
<?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/. -->
<resources>
<integer name="strike_thru_start_offset">0</integer>
<integer name="strike_thru_duration">500</integer>
</resources>

View File

@ -5,25 +5,25 @@
<androidx.preference.PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android">
<androidx.preference.Preference
android:icon="@drawable/ic_camera"
android:icon="@drawable/ic_camera_enabled"
android:key="@string/pref_key_phone_feature_camera"
android:title="@string/preference_phone_feature_camera"
android:summary="@string/preference_option_phone_feature_ask_to_allow"/>
<androidx.preference.Preference
android:icon="@drawable/ic_location"
android:icon="@drawable/ic_location_enabled"
android:key="@string/pref_key_phone_feature_location"
android:title="@string/preference_phone_feature_location"
android:summary="@string/preference_option_phone_feature_ask_to_allow"/>
<androidx.preference.Preference
android:icon="@drawable/ic_microphone"
android:icon="@drawable/ic_microphone_enabled"
android:key="@string/pref_key_phone_feature_microphone"
android:title="@string/preference_phone_feature_microphone"
android:summary="@string/preference_option_phone_feature_ask_to_allow"/>
<androidx.preference.Preference
android:icon="@drawable/ic_notification"
android:icon="@drawable/ic_notifications_enabled"
android:key="@string/pref_key_phone_feature_notification"
android:title="@string/preference_phone_feature_notification"
android:summary="@string/preference_option_phone_feature_ask_to_allow"/>
@ -32,4 +32,4 @@
android:key="@string/pref_key_exceptions_clear_site_permissions"
android:layout="@layout/layout_clear_permission_button"/>
</androidx.preference.PreferenceScreen>
</androidx.preference.PreferenceScreen>

View File

@ -15,27 +15,27 @@
app:iconSpaceReserved="false"
app:allowDividerAbove="false">
<androidx.preference.Preference
android:icon="@drawable/ic_camera"
android:icon="@drawable/ic_camera_enabled"
android:key="@string/pref_key_phone_feature_camera"
android:title="@string/preference_phone_feature_camera"
android:summary="@string/preference_option_phone_feature_ask_to_allow"/>
<androidx.preference.Preference
android:icon="@drawable/ic_location"
android:icon="@drawable/ic_location_enabled"
android:key="@string/pref_key_phone_feature_location"
android:title="@string/preference_phone_feature_location"
android:summary="@string/preference_option_phone_feature_ask_to_allow"/>
<androidx.preference.Preference
android:icon="@drawable/ic_microphone"
android:icon="@drawable/ic_microphone_enabled"
android:key="@string/pref_key_phone_feature_microphone"
android:title="@string/preference_phone_feature_microphone"
android:summary="@string/preference_option_phone_feature_ask_to_allow"/>
<androidx.preference.Preference
android:icon="@drawable/ic_notification"
android:icon="@drawable/ic_notifications_enabled"
android:key="@string/pref_key_phone_feature_notification"
android:title="@string/preference_phone_feature_notification"
android:summary="@string/preference_option_phone_feature_ask_to_allow"/>
</androidx.preference.PreferenceCategory>
</androidx.preference.PreferenceScreen>
</androidx.preference.PreferenceScreen>