Commit Graph
2909 Commits
Author SHA1 Message Date
Michael Comella 45b9e77392 Bug 1403755: Rm code to insert blanks into top sites. r=liuche
This code was being mistakenly activated when getting top sites for Activity
Stream.

This is the first removal of old top sites code and will mean we can't go back
to old top sites by flipping the `ActivityStream.isEnabled` flag. Since we're
planning to ship AS, this shouldn't matter.


MozReview-Commit-ID: 9VB0RqNHmE0
2017-09-28 14:09:48 -07:00
James Willcox 8ade88318b Bug 1405021 - Use web app origin as default scope r=droeh
MozReview-Commit-ID: EwxR6mQITmy
2017-10-02 13:34:54 -05:00
James Willcox 109dde5502 Bug 1400334 - Guard against no theme color in standalone webapp r=nechen
MozReview-Commit-ID: C9LfdSvujS9
2017-10-02 13:24:45 -05:00
Michael Comella 12245a2234 Bug 1405404: Add 'de' to list of pocket whitelisted locales. r=liuche
This is used in multi-locale builds, e.g. [1] where all German is "de" but in
[2], we have a separate l10n repo for en-GB.

[1]: https://hg.mozilla.org/releases/l10n/mozilla-beta/de
[2]: https://hg.mozilla.org/releases/l10n/mozilla-beta/en-GB

MozReview-Commit-ID: CXw9aFH9psz
2017-10-03 10:29:49 -07:00
Sebastian Hengst f0d2b77364 Backed out changeset 0bf07287d614 (bug 1405404) for failing android-test. r=backout 2017-10-03 20:18:57 +02:00
Michael Comella 1f31432fbb Bug 1405404: Add 'de' to list of pocket whitelisted locales. r=liuche
This is used in multi-locale builds, e.g. [1] where all German is "de" but in
[2], we have a separate l10n repo for en-GB.

[1]: https://hg.mozilla.org/releases/l10n/mozilla-beta/de
[2]: https://hg.mozilla.org/releases/l10n/mozilla-beta/en-GB

MozReview-Commit-ID: CXw9aFH9psz
2017-10-03 10:29:49 -07:00
Michael Comella ae4d889f67 Bug 1404460: Add test for pocket locale enabling. r=liuche
MozReview-Commit-ID: LHdQuICvVjE
2017-10-02 18:36:41 -07:00
Michael Comella 142347f994 Bug 1404460: Hide Pocket preference if Pocket not available in locale. r=liuche
When changing locales, an open dialog will not refresh but clicking on the
"Top sites" preference again (to display the dialog) will show the correct
dialog for the current locale.

MozReview-Commit-ID: 6UJvDIJZJtc
2017-10-02 17:35:03 -07:00
Michael Comella d6f46d0110 Bug 1404460: Add POCKET_ENABLED_TO_LOCALE to asUserPrefs telemetry. r=liuche
After speaking with liuche, we decided it'd be better to add a bit to determine
this rather than combining it with the isPocketEnabled field (which would be
loss of data) or cross-referencing the locale of the submitted event when
checking the Pocket value during telemetry analysis (which is hard to get right
and likely to get out of date).

MozReview-Commit-ID: JKFrdEsEbyp
2017-10-02 17:01:10 -07:00
Michael Comella cfb27ca682 Bug 1404460: Only show Pocket stories in specified locales. r=liuche
Ideally, we'd centralize all queries as to which options are user specified.
However, I wanted to do the smallest change so we can uplift so I filed
bug 1405161 for this centralization.

I opted not to include the "de" locale that is included on desktop because it
does not appear we ever get the "de" locale on Firefox for Android [1].

I tested this patch by changing the system locale between locales with Pocket
on my device (en-US, en-GB, de-DE) and locales without Pocket (ko-KR). The
locale switching system makes this refresh automatically without extra code.

I also intend to test via the in-app locale switcher but that will take time
because I can't do artifact builds with multi-locale so I'm pushing this for
review before I'm finished.

Follow-up changes:
- Add to telemetry
- Hiding the preference in the undesired locales.
- A test for isPocketEnabledByLocaleInner (useful to document how this is
intended to work for locales with variants, different scripts, etc.)

[1]: https://sql.telemetry.mozilla.org/queries/4613#table

MozReview-Commit-ID: 7AVQ8fWub8I
2017-10-02 15:59:42 -07:00
James Willcox 85ddcd8eb0 Back out bug 1395841 - Part 2 for breaking PWA shortcut installation r=me
This reverts commit eadc939a6ecf5eaff2a233f7015e814cc76a33ed.

MozReview-Commit-ID: 2V2oF1PC5cf
2017-10-02 14:14:52 -05:00
James Willcox 80a50c5440 Bug 1404478 - For reals send the right CPU ABI in the core ping r=jchen
MozReview-Commit-ID: 9tM8723iqMH
2017-10-02 13:12:43 -05:00
Wes Kocher 4253ce7dce Merge inbound to m-c a=merge
MozReview-Commit-ID: 7zOjePOWzOM
2017-09-28 16:56:44 -07:00
Jing-wei Wu 0dc0d47033 Bug 1384870 - Show 'Folder updated' in snack bar after editing a bookmark folder. r=nechen
MozReview-Commit-ID: GVRDKvMzop7
2017-09-28 14:57:49 +08:00
Jing-wei Wu e0837ab039 Bug 1403437 - Use MenuUtils#safeSetVisible to hide '.*_add_to_launcher' safely. r=nechen
MozReview-Commit-ID: iraSQCSvPw
2017-09-28 11:27:46 +08:00
Jing-wei Wu 053565febb Bug 1395841 - Part 2: Support creating a shortcut from page option in menu. r=nechen
When page option 'add page shortcut' is clicked, creating a shortcut(not PWA) on launcher.
Also make sure that heavy tasks are executed in background thread.

MozReview-Commit-ID: 8KtwdXENtEd
2017-09-28 10:57:48 +08:00
Michael Comella d7c8810cd9 Bug 1403347: Don't cache CustomListPreference dialog items. r=liuche
We're returning a list of only a few items that, at worst, reads from
resources and is infrequently accessed: there is no reason to cache these
values and the bugs, like this one, that caches entail.

At the end of this patch, there's no crash, but the scrolling behavior isn't
great: that's bug 1403139.

MozReview-Commit-ID: 3zoXWk78cM4
2017-09-26 16:23:59 -07:00
Michael Comella 3fca9e0c45 Bug 1403347: Set dialog titles in createDialogItems. r=liuche
We manipulate the data before the dialog is shown, rather than manipulating the
Views after the dialog is shown: this is more stable.

One question is what is the value of isHidden, which we branch on, when we're
manipulating the data. isHidden is set:
- When the preference is constructed (previous commit)
- When the preference is set as the default (e.g. the default panel was hidden)
- When "Hide" or "Show" is clicked in the preference

Thus the preference (and hidden state) outlives the dialog and each time we
reread the value of isHidden to set the dialog items.

This would fix the bug but the dialog values are actually cached so we'll
need to fix/remove that cache: coming up in the next changeset.

MozReview-Commit-ID: 86v1RDNFZHZ
2017-09-26 16:22:21 -07:00
Michael Comella 3afa47d81b Bug 1403347: Move initial setHidden to panel preference constructor. r=liuche
This is a code clean-up. Functionally, this is the same to the previous
implementation.

setHidden was originally called right after the constructor is called and so
should just be called from the constructor. If it's not called from the
constructor, there can be a period of confusion where a developer wonders, "Has
isHidden been initialized by the time this other method I care about has been
called?" This should make those questions disappear.

This commit does not need to be uplifted (to change less in 57 and that the
other code does not depend on it) but I'm placing it first so it's clearer to
my reviewer when isHidden is initialized (which is relevant to my other
patches).

MozReview-Commit-ID: 80KXFDB1poY
2017-09-26 16:32:20 -07:00
Wes Kocher 0960ec2e95 Merge m-c to inbound, a=merge
MozReview-Commit-ID: IsbKCdZU2Ui
2017-09-26 17:14:31 -07:00
Dylan Roeh 2601456afb Bug 1399504 - Pass more information to Intent:OpenNoHandler callback so that fallback urls may always be handled correctly. r=jchen 2017-09-26 13:46:27 -05:00
Jing-wei Wu f89687d2f0 Bug 1401871 - Check if menu item(home_add_to_launcher) exists or not before accessing it. r=nechen
We temporarily hide `home_add_to_launcher` in API 26, which means directly accesses it without checking
if it exists or not would cause NullPointerException.

MozReview-Commit-ID: KXnP81ZZa6u
2017-09-26 16:12:15 +08:00
Randall Barker f2b4565253 Bug 1402594 - Fix regression where toolbar does not become visible when link is pressed r=jchen
MozReview-Commit-ID: B5ppPaQXo5e
2017-09-25 13:06:13 -07:00
Dylan Roeh 6a49ef0c72 Bug 1388750 - Add setActive() to GeckoView to make the DocShell active/inactive. r=snorp 2017-09-22 15:57:46 -05:00
Chenxia Liu 46af8b990f Bug 1401179 - Add snackbar for bookmark add/remove actions on newtab. r=mcomella
MozReview-Commit-ID: 7DzoyDSWmVq
2017-09-22 18:08:07 -07:00
Michael Comella 7b9eaf8226 Bug 1402005: Add telemetry for Learn More clicks. r=liuche
MozReview-Commit-ID: GA4UBZ4fpK6
2017-09-22 17:32:03 -07:00
Michael Comella 247a30dc7d Bug 1402005: Add a learn more link to Top Sites. r=liuche
Explanation of our motivations are added in code comments.

In testing locally, the link I was sent to was:
- https://support.mozilla.org/1/mobile/58.0a1/Android/en-US/activity-stream

Existing code does not use a referrer so I didn't add one:
http://searchfox.org/mozilla-central/rev/56ad02e34d0d36ca4d5ccaa885d26aff270b8ff7/mobile/android/base/java/org/mozilla/gecko/preferences/LinkPreference.java#44

MozReview-Commit-ID: GTY1ku07uWy
2017-09-22 17:04:53 -07:00
Chenxia Liu eb06dfbdd4 Bug 1402481 - Reverse incorrect sign of margin calculation. r=mcomella
MozReview-Commit-ID: ICS81o8pLOE
2017-09-22 09:12:38 -07:00
Chenxia Liu 93e822057f Bug 1402145 - Use adapter child position rather than view position. r=mcomella
MozReview-Commit-ID: ESi8MMYC1lp
2017-09-22 09:09:23 -07:00
Michael Comella 54c2e383a0 Bug 1400825: Collapse top sites if there are no sites. r=liuche
MozReview-Commit-ID: D0eNQBp6IZB
2017-09-22 13:56:13 -07:00
Sebastian Kaspari 4c02d5e3ba Bug 1400825 - Show option for removing suggested sites from top sites. r=mcomella
MozReview-Commit-ID: LyAqnlMfQvr
2017-09-22 19:59:08 +02:00
Jim Chen 150d8f3d30 Bug 1396951 - 6. Remove setLayerView/getLayerView; r=snorp
Remove `GeckoAppShell.setLayerView()/getLayerView()` now that it's no
longer used anywhere.

MozReview-Commit-ID: 6URNFhSs01P
2017-09-22 14:35:23 -04:00
Jim Chen 0ba2056c24 Bug 1396951 - 4. Pass in GeckoView instance when sending a11y event; r=snorp
Pass in a `GeckoView` instance when sending a11y events so we're not
dependent on `GeckoAppShell.getLayerView()`. However, there's likely
more work to be done to make a11y work for any GeckoView.

MozReview-Commit-ID: DBeDOX5c3qY
2017-09-22 14:35:23 -04:00
Jim Chen 6cb1d852a2 Bug 1396951 - 1. Add and use HapticFeedbackDelegate; r=snorp
Instead of using `getLayerView()` to perform haptic feedback, this patch
adds a `HapticFeedbackDelegate`, which `GeckoApplication` implements to
call `performHapticFeedback()` on the active view. Also, use
HapticFeedbackDelegate elsewhere in the Fennec codebase where we want to
perform haptic feedback.

MozReview-Commit-ID: GAArA6yJFNF
2017-09-22 14:35:22 -04:00
Sebastian Hengst 25817c997a merge mozilla-central to autoland. r=merge a=merge 2017-09-22 11:50:19 +02:00
Sebastian Hengst 8b34bd4818 Backed out changeset 5e5ce5633017 (bug 1396951) for frequently failing robocop's testSettingsPages. r=backout a=backout
MozReview-Commit-ID: AGZMQKL3eft
2017-09-22 11:49:14 +02:00
Sebastian Hengst 20866f0d0f Backed out changeset e9bc6e08091b (bug 1396951)
MozReview-Commit-ID: 1vPPNL6uovN
2017-09-22 11:48:30 +02:00
Sebastian Hengst 6a1551d9d0 Backed out changeset 0a367a71ca43 (bug 1396951)
MozReview-Commit-ID: 3UwRalvlkEE
2017-09-22 11:48:19 +02:00
Sebastian Hengst f57369ed5e merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: FKzfDK7mwcx
2017-09-22 11:29:49 +02:00
Phil Ringnalda 62f4ec4130 Merge m-c to m-i
MozReview-Commit-ID: LQmIsTRxble
2017-09-21 20:49:43 -07:00
Jim Chen bb7e3663d1 Bug 1401737 - 1. Add a diagnostic crash; r=me
Add a diagnostic crash for the unexpected case where
GeckoService.register() is called a second time. We know the stack for
the second call, but we want to know the stack for the first call, so we
introduce this intentional crash. r=me for trivial diagnostic patch
which will be backed out ASAP.

MozReview-Commit-ID: HobtPiVSSTR
2017-09-21 23:41:22 -04:00
Michael Comella b7fe006c16 Bug 1399683: Change padding of content view rather than self in onSizeChanged. r=sebastian
To be honest, I'm not sure why this works. onSizeChanged seems to be a callback
to notify the user that your layout has completed and not a place to update
layout params. However, it makes *slightly* more sense that you could update
your children's layout from this view, which is what this patch changes the
code to do.

I think I could figure out why this works if I dug further into [1] but I have
other things to focus on.

I don't think this is the most correct solution, but it is likely the smallest
and least risky change we can make to fix this issue, which is ideal because
we'd like to uplift this to the 57 Beta.

A more correct solution would override the Activity Stream RecyclerView and
provide different desired measurements to its parent so that the new size is
set *during* layout rather than after it, which would make the layout process
more efficient. However, this type of code is less commonly written day-to-day
by developers so it's harder to write, harder to maintain, and I'd have to read
a lot of [1] in order to write it. :)

[1]: https://developer.android.com/guide/topics/ui/how-android-draws.html

MozReview-Commit-ID: AceUvDYGWCR
2017-09-21 15:40:55 -07:00
Chenxia Liu 6c6b0ddad1 Bug 1400408 - Add telemetry for clicking on "MORE" link. r=francois,mcomella
MozReview-Commit-ID: Kp8X8dbyzN9
2017-09-20 16:06:51 -07:00
Chenxia Liu 412a7c11a1 Bug 1400408 - Fill in basic documentation of existing Pocket telemetry. r=mcomella
MozReview-Commit-ID: FiZI6ebihD9
2017-09-20 17:11:37 -07:00
Jim Chen 46cc7479ad Bug 1396951 - 6. Remove setLayerView/getLayerView; r=snorp
Remove `GeckoAppShell.setLayerView()/getLayerView()` now that it's no
longer used anywhere.

MozReview-Commit-ID: 6URNFhSs01P
2017-09-21 17:36:07 -04:00
Jim Chen 0d7df73804 Bug 1396951 - 4. Pass in GeckoView instance when sending a11y event; r=snorp
Pass in a `GeckoView` instance when sending a11y events so we're not
dependent on `GeckoAppShell.getLayerView()`. However, there's likely
more work to be done to make a11y work for any GeckoView.

MozReview-Commit-ID: DBeDOX5c3qY
2017-09-21 17:36:07 -04:00
Jim Chen b7adf526fc Bug 1396951 - 1. Add and use HapticFeedbackDelegate; r=snorp
Instead of using `getLayerView()` to perform haptic feedback, this patch
adds a `HapticFeedbackDelegate`, which `GeckoApplication` implements to
call `performHapticFeedback()` on the active view. Also, use
HapticFeedbackDelegate elsewhere in the Fennec codebase where we want to
perform haptic feedback.

MozReview-Commit-ID: GAArA6yJFNF
2017-09-21 17:36:02 -04:00
Dylan Roeh e5704f3137 Bug 1386712 - Add null-checking to fix test bustage. r=me 2017-09-21 17:55:36 -05:00
Dylan Roeh 2d10ceafbd Bug 1386712 - Load about:blank in CustomTabsActivity.finish() to immediately stop media playback. r=snorp 2017-09-19 15:09:16 -05:00
Chenxia Liu 45554f0680 Bug 1401404 - Add telemetry for AS content prefs. r=francois,mcomella
MozReview-Commit-ID: 3IiDeghnhgX
2017-09-21 17:29:27 -07:00