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 @@ -540,6 +540,7 @@ class DisplayToolbar internal constructor( Toolbar.SiteInfo.INSECURE -> colors.siteInfoIconInsecure Toolbar.SiteInfo.SECURE -> colors.siteInfoIconSecure Toolbar.SiteInfo.LOCAL_PDF -> colors.siteInfoIconLocalPdf Toolbar.SiteInfo.ONION -> colors.siteInfoIconSecure } if (color == Color.TRANSPARENT) { views.siteInfoIndicator.clearColorFilter() Loading mobile/android/android-components/components/browser/toolbar/src/main/java/mozilla/components/browser/toolbar/display/SiteInfoIconView.kt +5 −0 Original line number Diff line number Diff line Loading @@ -48,6 +48,11 @@ internal class SiteInfoIconView @JvmOverloads constructor( View.mergeDrawableStates(drawableState, intArrayOf(R.attr.state_site_secure)) drawableState } SiteInfo.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_info.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_shield_checkmark_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 @@ -13,6 +13,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 @@ -494,6 +494,7 @@ interface Toolbar : ScrollableToolbar { INSECURE, SECURE, LOCAL_PDF, 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 @@ -540,6 +540,7 @@ class DisplayToolbar internal constructor( Toolbar.SiteInfo.INSECURE -> colors.siteInfoIconInsecure Toolbar.SiteInfo.SECURE -> colors.siteInfoIconSecure Toolbar.SiteInfo.LOCAL_PDF -> colors.siteInfoIconLocalPdf Toolbar.SiteInfo.ONION -> colors.siteInfoIconSecure } if (color == Color.TRANSPARENT) { views.siteInfoIndicator.clearColorFilter() Loading
mobile/android/android-components/components/browser/toolbar/src/main/java/mozilla/components/browser/toolbar/display/SiteInfoIconView.kt +5 −0 Original line number Diff line number Diff line Loading @@ -48,6 +48,11 @@ internal class SiteInfoIconView @JvmOverloads constructor( View.mergeDrawableStates(drawableState, intArrayOf(R.attr.state_site_secure)) drawableState } SiteInfo.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_info.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_shield_checkmark_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 @@ -13,6 +13,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 @@ -494,6 +494,7 @@ interface Toolbar : ScrollableToolbar { INSECURE, SECURE, LOCAL_PDF, ONION, } /** Loading