This will be used by highlights, top sites, and the AS bottom sheet to set
their icons.
I chose to use centerCrop, over centerInside, because the mocks look like they
chose to do a center crop scale pattern:
https://mozilla.invisionapp.com/share/5JCHCGXPG#/screens/224085516
To my reviewer: some of this code comes from the next commit, where it is moved
from the Highlights code to this file.
MozReview-Commit-ID: 8rtTpjW8noL
This change is unrelated to this bug.
According to my IDE warning:
```
This custom view should extend android.support.v7.widget.AppCompatImageView
instead.
In order to support features such as tinting, the appcompat library will
automatically load special appcompat replacements for the builtin widgets.
However, this does not work for your custom views.
Instead of extending the android.widget classes directly, you should instead
extend one of the delegate classes in android.support.v7.widget.AppCompat.
```
Seems reasonable and I don't see any documentation telling me not to. :)
MozReview-Commit-ID: H60bYGVgTIT
So far, we haven't tested session restoring and saving in combination, which led to bug 1379374 where restored background tabs weren't being written back to disk after upgrading to Firefox 55.
MozReview-Commit-ID: 7CUbis7u8fb
Our home panel context menu is shared by classic top sites, history and bookmark panels.
For acitivty stream, we've added a new context menu, and a new type of pins. However,
old context menu is still used for history and bookmarks. New style of pins allows for
items to be pinned from those panels to activity stream. This requires having both "classic"
pin buttons for old Top Sites panel, as well as the new AS Pin button.
However, initial implementation forgot to disable the new AS Pin button for the classic
Top Sites panel context menu. This caused two "pin site" menu items to appear, and the
AS one would crash the browser if it's interacted with.
We'll be unifying context menus at some point, and removing the old Top Sites code,
and so this simple patch should be sufficient.
MozReview-Commit-ID: 3cxVTv6QP8L
SkinConfig is used to detect current skin is Australis or Photon at runtime.
Since we don't support Australis anymore in Nightly, this class should be removed.
MozReview-Commit-ID: 8yjTFYyQcgt
We don't build with the required version of the support library yet, so in the meantime we just copy the needed options flag definition and define it ourselves.
MozReview-Commit-ID: 3wAbquE5rOT
This adds a new class, GeckoView.ProgressListener.SecurityInformation, which provides an API for accessing the information passed to GeckoView in GeckoView:SecurityChange messages. GeckoView then passes this object to ProgressListener in onSecurityChanged() calls. Also updates CustomTabsActivity and GeckoViewActivity to reflect the new API and removes the old integer security status param from onSecurityChanged.