Commit a0800b8e authored by Alex Catarineu's avatar Alex Catarineu Committed by Pier Angelo Vendrame
Browse files

TB 40015: [android] Port padlock states for .onion services

parent e9c31b0f
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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()
+5 −0
Original line number Diff line number Diff line
@@ -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
            }
        }
    }
}
+3 −0
Original line number Diff line number Diff line
@@ -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" />
+4 −0
Original line number Diff line number Diff line
@@ -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>
+1 −0
Original line number Diff line number Diff line
@@ -494,6 +494,7 @@ interface Toolbar : ScrollableToolbar {
        INSECURE,
        SECURE,
        LOCAL_PDF,
        ONION,
    }

    /**
Loading