Commit Graph
2909 Commits
Author SHA1 Message Date
Jing-wei Wu 97abf78000 Bug 1323366 - Create new IconRequest to prevent ConcurrentModificationException, r=sebastian 2017-02-20 09:45:16 +08:00
Grisha Kruglov 6694eb16a3 Bug 1291821 - Move bulk insert logic for new history to BrowserProvider r=rnewman
This commit does two things:

1) It simplifies history insertion logic, which wrongly assumed that history which was
being inserted might be not new. As such, it was necessary to check for collisions of
visit inserts, record number of visits actually inserted, and update remote visit counts
correspondingly in a separate step, making history insert a three step operation (insert
history record, insert its visits, update history record with a count). However, bulkInsert
runs only for records which were determined to be entirely new, so it's possible to drop
the third step.

2) Makes all of the insertions (history records and their visits) run in one transaction.
Prepared statements for both history and visit inserts are used are used as a
performance optimization measure.

MozReview-Commit-ID: 48T4G5IsQNS
2016-11-29 13:42:53 -08:00
Andrzej Hunt 2b26cc7964 Bug 1340957 - Don't rely on SuggestedSites being loaded r=sebastian
MozReview-Commit-ID: JjWurcyDoWQ
2017-02-21 08:21:56 -08:00
Phil Ringnalda 361c4f92de Merge m-c to m-i 2017-02-23 22:31:18 -08:00
Phil Ringnalda 042d1cc238 Backed out changeset 7ee8f1e428c0 (bug 1340041) for Android near-permaorange in media/mediasource/test/test_FrameSelection.html and media/webspeech/synth/test/test_speech_simple.html 2017-02-23 22:27:13 -08:00
Carsten "Tomcat" Book bba4222305 merge mozilla-inbound to mozilla-central a=merge 2017-02-23 14:59:37 +01:00
Michael Kaply 8702aa26dd Bug 1332562 - OMA Downloads should go to the system Download directory. r=snorp
MozReview-Commit-ID: 48fGzGYBoS6
2017-02-23 12:27:43 -06:00
Jim Chen 8ca36b3f30 Bug 1337459 - Update to selected tab when ToolbarDisplayLayout is ready; r=sebastian
We don't update ToolbarDisplayLayout when it's not ready (i.e. when it's
not attached to a window yet), but when it does become ready, we should
update it to the selected tab, if any.
2017-02-22 23:10:16 -05:00
John Lin df6d25f2ac Bug 1340582 - fix exception logging. r=jchen
MozReview-Commit-ID: 2PnTCeFAW4e
2017-02-23 11:16:28 +08:00
John Lin 4629602a09 Bug 1340582 - handle shared memory allocation failure. r=jchen
MozReview-Commit-ID: ETk9nHHkyYA
2017-02-22 14:17:26 +08:00
Grigory Kruglov 95c1a5936b Bug 1341125 - Clear accounts in-memory cache when necessary. r=nalexander
MozReview-Commit-ID: sf5WhXxRVg
2017-02-21 11:31:22 -08:00
Jan Henning 375b4f8102 Bug 1339737 - Don't set the bookmarks panel scroll position again if the same loader has been reloaded. r=ahunt
Changes in the BrowserDB, e.g. because of sync or when opening a link (in a new tab) will trigger the BookmarksLoader's onContentChanged() method, which will trigger a new load reusing the current loader. This means that currently, the code for setting the scroll position in onLoadFinished() gets to run again in that case.

We only want to set the scroll position when the user has navigated to a different folder. Folder navigation will always create a fresh loader, therefore we now keep track whether we've already seen a particular loader in onLoadFinished() and only set the scroll position if we're encountering this particular BookmarksLoader instance for the first time.

MozReview-Commit-ID: Ln8yeUEoEfr
2017-02-15 21:48:29 +01:00
John Lin 22ade8e856 Bug 1340041 - make callbacks no-op for dying CodecProxy. r=jchen
MozReview-Commit-ID: CJPwRNp78HP
2017-02-21 17:17:34 +08:00
Tom Klein 42bfda4542 Bug 1339066 - Don't add a private tab opened while viewing the normal-mode tab strip. r=sebastian
MozReview-Commit-ID: AZEZq4boaJW
2017-02-16 07:25:54 -06:00
Andrzej Hunt fa91be6536 Bug 1342105 - actually return if suggested site data is missing r=sebastian
MozReview-Commit-ID: GdshIa0e5Cj
2017-02-23 09:17:05 -08:00
maliu e9a61904c7 Bug 1331995 - Reset text direction to locale in order to reveal text hint, r=sebastian
MozReview-Commit-ID: I1FIL7QDRSu
2017-03-01 14:04:52 +08:00
Jan Henning 619e08fa59 Bug 1342718 - Don't query for search engine suggestions if we're not displaying them. r=sebastian
If the user has deactivated search suggestions (either live suggestions from the search engine or those coming from our history), we shouldn't even bother to restart the corresponding loader in that case, so as to avoid
- wasting processing and network resources
- and perhaps more importantly, not leaking the user's search terms to the default search engine if the user doesn't want that kind of suggestions.

At the moment we only exit early from filterSuggestions() when in private mode or if both kinds of search suggestions have been deactivated, but we don't properly handle the case where only one kind of search suggestions has been deactivated.

This should also improve the display of search history results if the user has deactivated the display of live search suggestions, since currently duplicates between the fresh suggestions and the search history are always removed from the latter even when we're not displaying the former.

MozReview-Commit-ID: IOTMLRaZeyP
2017-02-26 13:39:49 +01:00
Wes Kocher 7edbcda21d Merge m-c to inbound, a=merge
MozReview-Commit-ID: 18xg2cleATb
2017-02-17 13:51:01 -08:00
Michael Kaply 7e3ae86ebb Bug 1330714 - Allow distributions to override firstrun wizard. r=rnewman
MozReview-Commit-ID: 8vEqApRi9bC
2017-02-17 11:33:03 -06:00
Carsten "Tomcat" Book 13d4aead60 merge mozilla-inbound to mozilla-central a=merge 2017-02-17 13:24:55 +01:00
Dale Harvey b87295edb9 Bug 1321320 - Track installed manifests. r=marcos, r=s.kaspari 2017-02-17 08:24:06 +00:00
Andrzej Hunt 615ea63208 Bug 1339520 - Keep existing TopPanel when cursor is swapped r=sebastian
By default RecyclerView assumes any item change *might* need animation. It then
creates a new copy of the item that has changed, and interpolates between the two
to "animate" the change. We don't need that for topsites (the RecyclerView's we use
inside each TopSitePanel already animate changes, the overall size doesn't change -
moreover ViewPager state gets lost if you create a new panel), so we override
this behaviour to retain the existing panel. This stops the previously visible
horrible flickering.

(Every time history changes, which can happen if sync is working, or even if a page
finishes loading in the background, the DB is changed, and a reload is triggered.
Prior to this commit, topsites would flicker horribly, and would reset back to the first
topsites page. After this commit the page is retained, and the visible topsites
are rearranged by the inner RecyclerView's animations. You can test this by pinning a
site on the first page, the pinned site will shift to the front, the other sites smoothly
move to the right.)

MozReview-Commit-ID: CnocNfdQ2FS
2017-02-16 18:42:46 -08:00
Andrzej Hunt d2e233c167 Bug 1339520 - Don't refresh topsites pages, only modify if needed r=sebastian
If we clear and recreate pages every time the cursor changes, we'll (A) lose
the current page position and (B) create a new RecyclerView per page, resulting
in flickering. We also need to make sure positioning is correctly handled (i.e. pages
never move, they only get added or removed).

We also switch to an ArrayList: the number of pages will be fixed for most users,
and searching an ArrayList could potentially be slightly faster than with the LinkedList.
There's little advantage to a LinkedList here.

MozReview-Commit-ID: 6NIfc2otQMV
2017-02-16 18:39:08 -08:00
Carsten "Tomcat" Book 9d3beb92ef merge mozilla-inbound to mozilla-central a=merge 2017-02-16 13:15:55 +01:00
Wes Kocher 0e7757aeda Merge m-c to inbound a=merge
MozReview-Commit-ID: BemR756HJnR
2017-02-15 16:33:03 -08:00
Jim Chen 9273f8e5a9 Bug 1339160 - 4. Use GeckoService to extract libs on update; r=esawin
Use the GeckoService load-libs action to load and extract new libraries
when we receive the update broadcast. This makes us not block the UI
thread to extract libs, and lets Fennec run normally if the user
launches Fennec right after updating.
2017-02-15 17:13:05 -05:00
Jim Chen a7cb665028 Bug 1339160 - 3. Use GeckoService to warm up Gecko from custom tabs service; r=snorp
Use the GeckoService load-gecko action to warm up Gecko instead of using
a separate method.
2017-02-15 17:12:59 -05:00
Jim Chen 5f931c94b0 Bug 1339160 - 2. Add GeckoService actions for loading libs and starting Gecko; r=snorp
Add two actions to GeckoService to load libs only, and to load libs plus
start Gecko, respectively.
2017-02-15 17:12:56 -05:00
Jim Chen 30c4ea20bf Bug 1339160 - 1. Allow GeckoThread to launch without being initialized; r=snorp
When GeckoThread is launched without being initialized, it will load all
Gecko libs and then wait until it is initialized, before calling the
Gecko entry point. This allows us to preload Gecko libs without actually
running Gecko.
2017-02-15 17:12:56 -05:00
Jim Chen abbf1d1749 Bug 1337290 - 1. Detect ARM emulation for some x86 devices; r=snorp
Some x86 devices set the CPU ABI to ARM (and even change /proc/cpuinfo)
as part of emulating ARM. In that case, we check the kernel release
string find out whether it's really x86 or not.
2017-02-15 17:12:56 -05:00
John Lin aa63b08942 Bug 1338975 - Don't leak MediaCodec exceptions to CodecProxy. r=jchen
MozReview-Commit-ID: AaouG5McGNb
2017-02-14 13:43:35 +08:00
Andrzej Hunt 49d3e748cd Bug 1335814 - Add topsites page swipe telemetry r=Grisha
MozReview-Commit-ID: EN00Lh2I7V5
2017-02-14 10:42:00 -08:00
Andrzej Hunt 1e1329f09a Bug 1325931 - Use compound drawable text centering hack for AS Topsites r=sebastian
MozReview-Commit-ID: 4reNZTHHZNw
2017-02-09 13:27:20 -08:00
Andrzej Hunt be4870e89c Bug 1325931 - Implement ViewUtil.setCenteredText() for TextViews with compound drawables r=sebastian
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
2017-02-09 13:26:43 -08:00
Sebastian Hengst 2722133849 Backed out changeset 76f34a9578d2 (bug 1335814) on request of developer. r=backout 2017-02-14 20:28:01 +01:00
Andrzej Hunt 025654b981 Bug 1335814 - Add topsites page swipe telemetry r=Grisha
MozReview-Commit-ID: EN00Lh2I7V5
2017-02-14 10:42:00 -08:00
Jan Henning db19f40f8a Bug 1269210 - Part 2 - Notify the UI to update the button state on subframe navigation. r=ahunt
Even if we do the rest of our location change processing only for top level location changes, we still need to update the state of the back and forward buttons even on subframe navigation, so they can become enabled/disabled as necessary.

MozReview-Commit-ID: 2wuFZMKtTfj
2017-02-11 20:32:32 +01:00
Jan Henning 2f53d6a739 Bug 1269210 - Part 1 - Remove unused variables from location change message and Java tab object. r=ahunt
We used to need these for the back button long press history menu, but now we no longer do.

MozReview-Commit-ID: LAZYffLODN3
2017-02-11 20:13:00 +01:00
Jan Henning 87f1bfa2d3 Bug 1337264 - Don't depend on page title changes for updating the displayed URL. r=sebastian
We've been displaying the URL in place of the page title in the toolbar for quite some time now, but still had the old logic in place whereby only title changes would trigger an update of the displayed text. Most of the time this works fine, because
- page navigation usually goes hand in hand with a DOMTitleChanged event, and
- when our loading progress bar stops, we update the displayed text anyway

however a page doing its navigation in-place using some fancy JS logic and the corresponding history APIs etc. can bypass both of these provisions, since it might trigger neither a title change nor a full browser-side page load.

MozReview-Commit-ID: KRrTSmz1xxi
2017-02-11 17:12:48 +01:00
brainbreaker 2774e87870 Bug 1312686 - Link "default browser" setting to app info screen on Android 7+; r=sebastian
Added support for changing default browser by opening settings screen in API Levels >=24.

MozReview-Commit-ID: 5rxJm6hQQ4A
2017-02-15 02:27:26 +05:30
Carsten "Tomcat" Book a5c0126a56 Merge mozilla-central to autoland 2017-02-17 13:28:16 +01:00
Jean-Yves Avenard edd006e6d6 Bug 1340096: Remove MediaCodecDataDecoder. r=bwu,jolin
We prefer the RemoteDataDecoder instead.

MozReview-Commit-ID: SK0D3hycRh
2017-02-16 12:26:53 +01:00
Edouard Oger 154bc10d66 Bug 1339681 - PushServiceAndroidGCM: Send strings instead of json in event callbacks. r=Grisha
MozReview-Commit-ID: 29BEjnh1TpT
2017-02-15 18:47:30 +01:00
Andrzej Hunt 5c62a52f1c Bug 1320775 - Use bundled touch-tiles as favicons for suggested sites r=sebastian
There are a number of ways in which we could supply favicons for the default suggested
sites. Reusing the touch tiles has the advantage that it works for both our own suggested
sites, and also distribution-supplied suggested sites. If we were to add yet another
icon source, distribution supplied sites would end up having no nice icon in AS topsites.

The priority ordering of the SuggestedSitePreparer means icons will be overriden as soon
as a site-supplied favicon is available - these icons will only be used up until the point
where a site has been visited.

MozReview-Commit-ID: CHsinHHpfnw
2017-02-08 15:15:12 -08:00
Andrzej Hunt 5b7058bf0e Bug 1320775 - Pre: move favicon colour fading to color generator r=sebastian
In order to allow for a background which merges into a favicon, we
need to allow for solid (non faded) colours. It is simplest to do this
by letting the colour generator (i.e. either the colour extractor,
or the favicon generator) fade the dominant colour as it wishes.
That also means the colour generator can in future choose to
not fade the colour if appropriate.

MozReview-Commit-ID: LsI8PlZsaGn
2017-02-08 10:12:24 -08:00
Jan Henning f9dcd71f39 Bug 1336734 - Part 2 - Don't stop the GeckoNetworkManager unless we're really backgrounded. r=sebastian
Launching a new activity within our app triggers both onActivityPause() (the current activity) and onActivityResume() (the new activity) in GeckoApplication. The most prominent example at the moment are probably our preferences - entering/exiting/navigating within them always triggers a pause/resume combo. This means that currently each time this happens, the network manager is stopped only to be immediately restarted.

To prevent this, we now stop the network manager only when Gecko is actually being paused. In order to avoid unmatched start/stop calls, we need to treat the calls to start() similarly and provide an additional code path for the initial call to start() immediately after startup.

Since the BatteryManager is only started and currently never stopped, we can use this for its startup, too, so as to avoid duplicated calls to its start() method.

MozReview-Commit-ID: 6NdScT5cLYL
2017-02-05 15:47:51 +01:00
Jan Henning a1f57e39b4 Bug 1336734 - Part 1 - Have GeckoPreferences properly support GeckoActivityStatus. r=sebastian
Currently, GeckoPreferences always returns "false" for isGeckoActivityOpened(), which means that when we're e.g. opening a new settings screen, GeckoApplication's onActivityPause() code assumes that Firefox is being backgrounded for real, calling GeckoThread.onPause(). This is then immediately followed by a call to onActivityResume() which unpauses Gecko again.

To avoid this, GeckoPreferences needs to properly implement support for GeckoActivityStatus and check the target of outgoing intents along the lines of the implementation in GeckoActivity.

Since checkIfGeckoActivity() is now used outside GeckoActivity as well, we refactor it into our IntentUtils.

MozReview-Commit-ID: UfPNAic5os
2017-02-05 15:35:00 +01:00
Wes Kocher 2c09640198 Backed out 3 changesets (bug 1336734) for android build bustage a=backout
Backed out changeset a7f9815aeec1 (bug 1336734)
Backed out changeset fa9cca3e321c (bug 1336734)
Backed out changeset a2b69382c9ad (bug 1336734)

MozReview-Commit-ID: FMKZ88jlEZ0
2017-02-10 12:52:33 -08:00
Jan Henning 6bb37e1b1e Bug 1336734 - Part 3 - Don't stop the GeckoNetworkManager unless we're really backgrounded. r=sebastian
Launching a new activity within our app triggers both onActivityPause() (the current activity) and onActivityResume() (the new activity) in GeckoApplication. The most prominent example at the moment are probably our preferences - entering/exiting/navigating within them always triggers a pause/resume combo. This means that currently each time this happens, the network manager is stopped only to be immediately restarted.

To prevent this, we now stop the network manager only when Gecko is actually being paused. In order to avoid unmatched start/stop calls, we need to treat the calls to start() similarly and provide an additional code path for the initial call to start() immediately after startup.

Since the BatteryManager is only started and currently never stopped, we can use this for its startup, too, so as to avoid duplicated calls to its start() method.

MozReview-Commit-ID: 6NdScT5cLYL
2017-02-05 15:47:51 +01:00
Jan Henning d9f19756bc Bug 1336734 - Part 1 - Have GeckoPreferences properly support GeckoActivityStatus. r=sebastian
Currently, GeckoPreferences always returns "false" for isGeckoActivityOpened(), which means that when we're e.g. opening a new settings screen, GeckoApplication's onActivityPause() code assumes that Firefox is being backgrounded for real, calling GeckoThread.onPause(). This is then immediately followed by a call to onActivityResume() which unpauses Gecko again.

To avoid this, GeckoPreferences needs to properly implement support for GeckoActivityStatus and check the target of outgoing intents along the lines of the implementation in GeckoActivity.

Since checkIfGeckoActivity() is now used outside GeckoActivity as well, we refactor it into our IntentUtils.

MozReview-Commit-ID: UfPNAic5os
2017-02-05 15:35:00 +01:00