We only extract metadata that we'd want to store. For now this is just image_url.
In case we try to store page metadata before corresponding history record has been inserted,
we queue up metadata and wait for an event from GlobalHistory letting us know that history
record is now available, at which point we try inserting metadata again.
MozReview-Commit-ID: 2FpIqc6uHMb
We'll want to switch to AppCompatResources as soon as it's available (i.e. support library 24.2).
Keeping this call in one central location should make that upgrade slightly easier. (Especially
since there is a good chance we will expand VectorDrawable usage to other parts of the app
before we get round to upgrading the support library.)
MozReview-Commit-ID: CvnLzE0mbwz
Catching everything is annoying, since we want to be able to see non-JSON related
exceptions that happen during icon loading. Specifically: it was harder to debug
issues during the VectorDrawable support upgrade.
MozReview-Commit-ID: 79j7FRxu2hh
In order to use VectorDrawable's in this code we need to use AppCompatDrawableManager, which
is in the v7 appcompat support library. GeckoView cannot access that library, hence
we should move getDrawable() into the main Fennec jar in order to let us use
VectorDrawable's.
Similarly we need to move DrawableUtil for the same reasons.
(This commit only takes care of moving the code, the following code adds VectorDrawable support.)
MozReview-Commit-ID: CE2yTMLgBlJ
By default, a TextView within e.g. a RelativeLayout will be used as the description for
the entire layout. I.e. traversal of the RecyclerView would begin with the Highlights title
being read, and the entire toppanel (i.e. TopSites + the Highlights title) being focused,
followed by traversing the TopSites pager. Instead we want to make sure TopSites are
traversed _before_ getting to the highlights title.
MozReview-Commit-ID: IIrts6vGouK
Setting the max height is completely arbitrary, and largely unnecessary - I think it's better
to let the bottom automatically handle this until we know more about how the bottom sheet
is perceived by real users.
The peek height is similarly arbitrary - we'll probably want to discuss a good default height
algorithm with UX, but setting an arbitrary hardcoded value seems wrong, especially since
it doesn't behave well in landscape mode. BottomSheetDialog already does an acceptable
job of finding a default peek height.
MozReview-Commit-ID: LyAYzcytR6H
Not really happy about the change but it addresses the problem.
* Loading the list from disk is much faster than parsing the string (2500ms vs. 30-50ms on a Nexus 6P)
* Because of (potential) disk I/O we are required to extract the label asynchronously on a background thread
* We load the list only once and then keep it in memory - like we did before the change.
MozReview-Commit-ID: 9MPGbmIGRnS