Loading mobile/android/android-components/components/browser/toolbar/src/main/java/mozilla/components/browser/toolbar/display/DisplayToolbar.kt +1 −0 Original line number Diff line number Diff line Loading @@ -517,6 +517,7 @@ class DisplayToolbar internal constructor( @ColorInt val color = when (siteSecurity) { Toolbar.SiteSecurity.INSECURE -> colors.securityIconInsecure Toolbar.SiteSecurity.SECURE -> colors.securityIconSecure Toolbar.SiteSecurity.ONION -> colors.securityIconSecure } if (color == Color.TRANSPARENT && Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { views.securityIndicator.clearColorFilter() Loading mobile/android/android-components/components/browser/toolbar/src/main/java/mozilla/components/browser/toolbar/display/SiteSecurityIconView.kt +5 −0 Original line number Diff line number Diff line Loading @@ -43,6 +43,11 @@ internal class SiteSecurityIconView @JvmOverloads constructor( View.mergeDrawableStates(drawableState, intArrayOf(R.attr.state_site_secure)) drawableState } SiteSecurity.ONION -> { val drawableState = super.onCreateDrawableState(extraSpace + 1) View.mergeDrawableStates(drawableState, intArrayOf(R.attr.state_site_onion)) drawableState } } } } mobile/android/android-components/components/browser/toolbar/src/main/res/drawable/mozac_ic_site_security.xml +3 −0 Original line number Diff line number Diff line Loading @@ -3,6 +3,9 @@ - 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/. --> <selector xmlns:android="http://schemas.android.com/apk/res/android" xmlns:ac="http://schemas.android.com/apk/res-auto"> <item android:drawable="@drawable/mozac_ic_onion" ac:state_site_onion="true" /> <item android:drawable="@drawable/mozac_ic_lock_24" ac:state_site_secure="true" /> Loading mobile/android/android-components/components/browser/toolbar/src/main/res/values/attrs_browser_toolbar.xml +4 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,10 @@ <attr name="state_site_secure" format="boolean"/> </declare-styleable> <declare-styleable name="BrowserToolbarSiteOnionState"> <attr name="state_site_onion" format="boolean"/> </declare-styleable> <declare-styleable name="ActionContainer"> <attr name="actionContainerItemSize" format="dimension" /> </declare-styleable> Loading mobile/android/android-components/components/concept/toolbar/src/main/java/mozilla/components/concept/toolbar/Toolbar.kt +1 −0 Original line number Diff line number Diff line Loading @@ -483,6 +483,7 @@ interface Toolbar : ScrollableToolbar { enum class SiteSecurity { INSECURE, SECURE, ONION, } /** Loading Loading
mobile/android/android-components/components/browser/toolbar/src/main/java/mozilla/components/browser/toolbar/display/DisplayToolbar.kt +1 −0 Original line number Diff line number Diff line Loading @@ -517,6 +517,7 @@ class DisplayToolbar internal constructor( @ColorInt val color = when (siteSecurity) { Toolbar.SiteSecurity.INSECURE -> colors.securityIconInsecure Toolbar.SiteSecurity.SECURE -> colors.securityIconSecure Toolbar.SiteSecurity.ONION -> colors.securityIconSecure } if (color == Color.TRANSPARENT && Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { views.securityIndicator.clearColorFilter() Loading
mobile/android/android-components/components/browser/toolbar/src/main/java/mozilla/components/browser/toolbar/display/SiteSecurityIconView.kt +5 −0 Original line number Diff line number Diff line Loading @@ -43,6 +43,11 @@ internal class SiteSecurityIconView @JvmOverloads constructor( View.mergeDrawableStates(drawableState, intArrayOf(R.attr.state_site_secure)) drawableState } SiteSecurity.ONION -> { val drawableState = super.onCreateDrawableState(extraSpace + 1) View.mergeDrawableStates(drawableState, intArrayOf(R.attr.state_site_onion)) drawableState } } } }
mobile/android/android-components/components/browser/toolbar/src/main/res/drawable/mozac_ic_site_security.xml +3 −0 Original line number Diff line number Diff line Loading @@ -3,6 +3,9 @@ - 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/. --> <selector xmlns:android="http://schemas.android.com/apk/res/android" xmlns:ac="http://schemas.android.com/apk/res-auto"> <item android:drawable="@drawable/mozac_ic_onion" ac:state_site_onion="true" /> <item android:drawable="@drawable/mozac_ic_lock_24" ac:state_site_secure="true" /> Loading
mobile/android/android-components/components/browser/toolbar/src/main/res/values/attrs_browser_toolbar.xml +4 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,10 @@ <attr name="state_site_secure" format="boolean"/> </declare-styleable> <declare-styleable name="BrowserToolbarSiteOnionState"> <attr name="state_site_onion" format="boolean"/> </declare-styleable> <declare-styleable name="ActionContainer"> <attr name="actionContainerItemSize" format="dimension" /> </declare-styleable> Loading
mobile/android/android-components/components/concept/toolbar/src/main/java/mozilla/components/concept/toolbar/Toolbar.kt +1 −0 Original line number Diff line number Diff line Loading @@ -483,6 +483,7 @@ interface Toolbar : ScrollableToolbar { enum class SiteSecurity { INSECURE, SECURE, ONION, } /** Loading