When the device is rotated between portrait and landscape mode (or vice versa), the View's final size is not yet available during the first OnPreDrawListener call for some of the TabsLayoutItemViews. It would be possible to skip the listener removal, so this is no longer used as a one-shot listener, however onPreDraw is frequently called even when the View's dimensions haven't changed.
Therefore, we switch this to an OnLayoutChangeListener, which is more appropriate for what we need.
MozReview-Commit-ID: 6JAzXdEBxbL
This is more or less a straight copy of our TouchDelegateWithReset class adapted to using HoverEvents instead of TouchEvents.
MozReview-Commit-ID: KtQvf1is5xK
We found sometimes Robocop operates wrong UI components when it deals with a complex layout.
Since default panel shows Activity Stream which contains complex UI components, we configure
bookmarks panel as default panel to keep the layout as simple as possible.
MozReview-Commit-ID: 12xhVOdlIRK
I don't want to call BitmapUtils.getBitmapFromDrawable() here for AdaptiveIconDrawable cause there might be performance impact if I create bitmap in main thread.
I'll use bug 1397174 to follow up this issue.
MozReview-Commit-ID: 64FE2MOk5g0
Currently, this only concerns setImageAs, where not running on the UI thread after a permissions prompt triggers a network-related strict mode violation and interestingly enough results in a crash (as opposed to a logcat complaint) on release builds.
There's also a permissions check in the UpdateService which runs on a (but not *the*) background thread, but since we don't prompt in that case there's no action necessary.
MozReview-Commit-ID: KKxW96AyDWH
The tint logic for menu icons on different devices is:
Normal mode:
1. Mobile & small tablet -> dark color(#272727)
2. Large tablet -> dark color(#272727)
Private mode:
1. Mobile & small tablet -> dark color(#272727)
2. Large tablet -> light color(#38383D)
MozReview-Commit-ID: 9cz53PieQHY
When app is not runing, Gecko is not running. Thus we can't get Gecko pref.
We should skip Gecko pref check and show notifications when we recieve push messages and while app is not running.
Other checks (ie. Switchboard, Health Report...etc) remain the same.
MozReview-Commit-ID: H2X18VI0cnW
We show a message:
1) On first run
2) When there are no highlights
However, these are actually the same case (there are no highlights) so I wanted
to defer to that situation.
I felt it was easier to rm the WelcomePanel and rewrite it than it was to try
to morph it into an empty state for the highlights.
MozReview-Commit-ID: CrRbzA0NoRx
We show a message:
1) On first run
2) When there are no highlights
However, these are actually the same case (there are no highlights) so I wanted
to defer to that situation.
I felt it was easier to rm the WelcomePanel and rewrite it than it was to try
to morph it into an empty state for the highlights.
MozReview-Commit-ID: CrRbzA0NoRx
I tested this by replacing the placeholder top story URLs with [1], clicking on
the links, and verifying clicks from top stories included the referrer but
clicks from highlights and top sites did not.
[1]: https://www.whatismybrowser.com/detect/what-http-headers-is-my-browser-sending
MozReview-Commit-ID: CcOxkvNgOHY
We might decide that there's an older dateAdded timestamp present for an incoming bookmark while processing it,
in which case we need to ensure that our changes will be uploaded.
MozReview-Commit-ID: BKLh4rYBiRu