We would like to change the status bar color based on different situation:
- For mobile, the status bar color is
#F7FAFC in normal mode,
#38383D in private mode, and
#272727 in tabs tray page
- For tablet, the status bar color is always #272727
MozReview-Commit-ID: Ala5ZOYJ8Ad
The util PackageUtil helps to get ResolveInfo of default browser, then
we can use it in CustomTabs menu. If user hasn't set any default
browser, instead we display "..." for browser name.
MozReview-Commit-ID: 6DkFkZ8Ovzq
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
In Photon, the reader-mode icon should support private mode. Therefore
we rename resource in Australis to *ic_readermode* for consistent.
MozReview-Commit-ID: 1ejwk3OfUex
In Photon, the reader-mode icon should support private mode. Therefore
we rename resource in Australis to *ic_readermode* for consistent.
MozReview-Commit-ID: 1ejwk3OfUex
Future commits will update the tabs lists in Tabs and gecko; for now we're just
updating the TabsLayoutAdapter list.
When considering some of the changes in TabsTouchHelperCallback, note that
TabStripView uses the new drag and drop, but not swipe to close.
MozReview-Commit-ID: EEseqmVIZmY
Compound drawables shift the point where text is "centered". This hack dynamically adds
equivalent padding on the opposite side from a compound drawable, to force the text
to be centered again. (We can't set this padding under all circumstances, it's unneeded
when the text is longer than the available space, i.e. when we wrap text we might
as well use the full width without fake padding.)
MozReview-Commit-ID: 8WDXCNOs2DX
This has no benefit right now, but this lets us avoid forgetting to upgrade to the non-deprecated
method once we no longer need to support api 15.
MozReview-Commit-ID: FmRoP5PnGDC
On some devices, ImageView appears to lose it's padding when calling
setBackground[Drawable](). We therefore need to save and restore the
padding on those devices.
Known affected devices are various Asus Transformer tablets,
and also the Motorola Droid 4, running various Android 4.X versions.
We therefore make this workaround conditional on Android 4 to minimise
the number of devices where this workaround is used. (Having the conditional
should also make it easy to notice when we can remove the workaround, i.e.
whenever Android 5 becomes the baseline.)
MozReview-Commit-ID: B88gWwEx48x
The circular ripple is only available on API >= 21. We can fallback to a different solution
for older devices, see following patch.
MozReview-Commit-ID: C0aBqsKsuZ5
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
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
This is the first step only. It moves Experiments out of util (just
for convenience) -- I would have liked to have moved WhatsNewReceiver
out of notifications as well, but it's referenced in
AndroidManifest.xml.in and I don't want to break that.
The set of files in GeckoView is slightly larger than what we really
want, but it's close to correct. Future tickets will get things
compiling and trim the set of files down to size. Hopefully we can
move notifications/, permissions/, and restrictions/ back to Fennec.
This is not technically required, but it's best to bulk move the files
up front and patch later, rather than jump through hoops to
distinguish the set of files in Gradle (and moz.build).
MozReview-Commit-ID: EWaAeswFoeG
We hit an issue where adding a new env var, MOZ_DISABLE_TELEMETRY, added env10
and caused crashes. I suspect the issue is that there are is now a double-digit
number of env vars (bug 1277390). Here, we do the quick fix by removing
MOZ_DISABLE_TELEMETRY & repurposing MOZ_DISABLE_SWITCHBOARD to be generic.
While we're at it, we simplify the code by making the setDisabled methods a
strict getter without checking for how many times they're called.
MozReview-Commit-ID: 19DDbVYRZ2
In the previous implementation, we'd stop reading when the value would return
null, however, this breaks with SafeIntents where null is returned if a value
throws a runtime exception - i.e. we might stop reading at env2 if it throws
even though env3+ exist.
MozReview-Commit-ID: 7iZgUAjBSmB