Commit Graph

22322 Commits

Author SHA1 Message Date
Petru Lingurar
ad67bdea7e Bug 1465323 - Update FxAccountUpgradeReceiver. r=JanH
Listening for `ACTION_MY_PACKAGE_REPLACED` [1] is the easiest way to get notified
when the app has been updated.
This broadcast, while not explicitly exempt from Oreo's Background Execution
Limits [2] is considered explicit because it is sent only to the package being
replaced and so it is compatible with the new limitations.

The previous intent action was chosen because at that time this action was not
supported by all platforms Fennec ran on [3], but this is not the case anymore.

[1] https://developer.android.com/reference/android/content/Intent.html#ACTION_MY_PACKAGE_REPLACED
[2] https://developer.android.com/guide/components/broadcast-exceptions
[3] 5c06063be6

MozReview-Commit-ID: Ak0dd2koJ9U

--HG--
extra : rebase_source : 58f32f574b13e5d7e9256f578821445eae1e3b57
extra : histedit_source : 204d858fe7408276714b2d228b612baddf76804d
2018-06-12 19:26:53 +03:00
Petru Lingurar
4378fd95bb Bug 1465323 - Update PackageAddedReceiver. r=JanH
This Receiver was used for implicit broadcasts and registered statically.
Refactored MmaDelegate() to register it dynamically in the init() method,
called in activity's onCreate and unregister it in activity's onDestroy.
This way we will still get notified immediately if the user installs any of
the apps we are interested in, even though he might not return to Fennec
immediately after. This will help to better asses the impact of suggestions to
install recommended packages.

For the cases in which the user installs the packages without us suggesting to
or if he kills our app before completing the new install, we will trigger a
check for the install status of the packages in MmaDelegate().init().

Also cleaned the code a little.

MozReview-Commit-ID: I00mLS2snzj

--HG--
extra : rebase_source : 9d767744dc3f4f2a44ab6de67c20f68a137a3beb
extra : histedit_source : e33a46fe4ece77b08eb8c9d161513e669fc14631
2018-07-16 21:15:32 +03:00
Petru Lingurar
55070cd7e6 Bug 1465323 - Update NotificationReceiver. r=JanH
The only change needed was to make sure the broadcast for
NotificationHelper.HELPER_BROADCAST_ACTION is sent explicitly to
our receiver.
The other 2 broadcasts that this receiver listens for are already explicit.

MozReview-Commit-ID: C3A88ijqIsd

--HG--
extra : rebase_source : bd6beb4a6b5656b59ee61d0122a133042d77e380
extra : histedit_source : 63103038680580f5e30082e245fb0be5168529eb
2018-06-12 13:01:23 +03:00
Petru Lingurar
f249aa63e8 Bug 1465323 - Update WhatsNewReceiver. r=JanH
Listening for `ACTION_MY_PACKAGE_REPLACED` [1] is the easiest way to get
notified when the app has been updated.
This broadcast, while not explicitly exempt from Oreo's Background Execution
Limits [2] is considered explicit because it is sent only to the package being
replaced and so it is compatible with the new limitations.
The previous intent action was chosen because at that time this action was not
supported by all platforms Fennec ran on [3], but this is not the case anymore.

The other broadcast - `ACTION_NOTIFICATION_CANCELLED` that this receiver
listens to is send explicitly.

[1] https://developer.android.com/reference/android/content/Intent.html#ACTION_MY_PACKAGE_REPLACED
[2] https://developer.android.com/guide/components/broadcast-exceptions
[3] 5c06063be6

MozReview-Commit-ID: DLUdw906i3P

--HG--
extra : rebase_source : a8544ae169344896aba4c7b922b68af4ad4bc94c
extra : histedit_source : c41c60cedea452ba8662fa836faa2aa8f9b5627e
2018-06-12 12:43:55 +03:00
Petru Lingurar
0940f02f48 Bug 1467840 - Use a JobIntentService for GCM token refresh; r=JanH
Whenever the GCM token expires it need to be refreshed.
For this, after targeting Android 8.0 (API level 26) or higher
Google recommends using a JobIntentService
https://developers.google.com/cloud-messaging/android/client

MozReview-Commit-ID: 1vz092TQfbz

--HG--
extra : amend_source : afecc9454dd64c1b0a83bc469d7cf201909ee2ae
2018-06-26 19:04:10 +03:00
Petru Lingurar
37e967daf5 Bug 1467840 - Migrate GeckoService to JobIntentService; r=snorp
This simple Service needed to be migrated to JobIntentService because it could
be started from background and we don't want it as a foreground service
(with a notification).
(For example: when the app is updated org.mozilla.gecko.PackageReplacedReceiver
would try and start this service. If in background, the app would crash)

Had to break the initial Service into separate JobIntentServices because in the
event that there are concurrent calls (even with different Intent actions)
JobScheduler would assume they are for the same already running service.

INTENT_ACTION_UPDATE_ADDONS was removed as it was being unused.

MozReview-Commit-ID: 2GiWFZdAVvp

--HG--
extra : amend_source : 7236a78707b781ee24eafe1e69662c10bd6a0ea6
2018-06-26 18:41:38 +03:00
petru
86aa31b5f4 Bug 1407046 - Migrate FileCleanupService to JobIntentService: Follow-up to for android-test. r=test-fix 2018-07-16 21:46:15 +03:00
Eitan Isaacson
6d59d60177 Bug 1471951 - Support expand selection with caret (2/2). r=yzen r=jchen 2018-07-16 10:53:27 -07:00
Eitan Isaacson
ffbf9af4d8 Bug 1471951 - Support set selection and clipboard actions (1/2). r=yzen r=jchen 2018-07-16 10:53:27 -07:00
Petru Lingurar
417a481b63 Bug 1467461 - Migrate CrashReportingService to JobIntentService. r=snorp
Use the fact that a JobIntentService is still a Service to keep most of the
previous implementation and method of starting CrashReportingService.
On 26+ devices it will be called with "start-foreground-service".
This ensures it can be started even from background and the crash reporting
process would work as before but ActivityManager will post an ANR error to
logcat after 5 seconds because we aren't calling Service.startForeground()
(which would mean a user visible notification).

Will use different Job Ids depending on if the app is Firefox Release or
Firefox Beta.
The Job Id will be passed to GeckoThread when first initializing and then be
made available to CrashHandler and nsExceptionHandler.cpp to be sent in the
Intent that starts the CrashReporterService.

MozReview-Commit-ID: GATl6Waa9St

--HG--
extra : amend_source : 70bc130b9411df336181e825ebb3e19bdc5a778c
2018-07-02 17:32:10 +03:00
Petru Lingurar
8ee271210b Bug 1407046 - Migrate UpdateService to JobIntentService. r=jchen
Broke the big IntentService into four small JobIntentServices because
the same JobIntentService class cannot be used with multiple JobIds
(b6838fd2d2/compat/src/main/java/android/support/v4/app/JobIntentService.java (L121))
Also:
    - will make the code easier to be migrated to WorkManager in the future
    - more in line with SRP. It was initially doing too much.

All the functionality of the big UpdateService class has been incorporated in
Updater.java, UpdatesPrefs.java and UpdatesServiceHelper.java
with the main logic to drive the important actions inside the new Services.
UpdaterService is used as parent of the newly created service to help avoid
duplicated code.
Created an inner BroadcastReceiver to act upon notification actions while
the service which posted it is running as it's state needed to be modified.
Created a BroadcastReceiver to act on actions from notifications which remained
posted after the service that posted them finished. This receiver will just
start another UpdaterService.
Otherwise the services are to be started from the UpdateServiceHelper class.

MozReview-Commit-ID: 2OyBZ4YYvgh

--HG--
extra : rebase_source : 17b98a1209409c09227490ca66d75d8d37717a6e
2018-07-13 20:53:38 +03:00
Petru Lingurar
0ce784d030 Bug 1407046 - Migrate FileCleanupService to JobIntentService. r=JanH
Also cleaned the code a little.

MozReview-Commit-ID: Bs3bUdxxz8k

--HG--
extra : rebase_source : bf564b683e786010d8f4836a1ee75aefa0514fa8
2018-06-26 17:42:28 +03:00
Petru Lingurar
d1e02a31c5 Bug 1407046 - Migrate TelemetryUploadService to JobIntentService. r=JanH
MozReview-Commit-ID: 8UGDzgmY81y

--HG--
extra : rebase_source : c5495972fe15769eb15f97ea6121123804868bd2
2018-06-26 17:40:48 +03:00
Petru Lingurar
41571be939 Bug 1407046 - Migrate FxAccountDeletedService to JobIntentService. r=jchen
MozReview-Commit-ID: 5ksrTc1Stre

--HG--
extra : rebase_source : 01bf5896d1fd23baf1cab223cd7a3985ab4e8450
2018-06-26 17:38:30 +03:00
Petru Lingurar
cbed3e4cc6 Bug 1407046 - Migrate FxAccountProfileService to JobIntentService. r=JanH
Also cleaned the code a little.

MozReview-Commit-ID: 1Zm3oLVVZ8s

--HG--
extra : rebase_source : 88c392f4276860785e98a6f7d7122fc4ca689d19
2018-06-26 17:36:11 +03:00
Petru Lingurar
198f113ef4 Bug 1407046 - Migrate TabReceivedService to JobIntentService. r=JanH
MozReview-Commit-ID: 5CEfJtUfmHq

--HG--
extra : rebase_source : 430bf2dde4dc7f52c954c404fa7bbec4641e9eb9
2018-06-26 17:33:58 +03:00
Petru Lingurar
8830f08311 Bug 1407046 - Migrate DownloadContentService to JobIntentService. r=snorp
Broke the big IntentService into four small JobIntentServices because
the same JobIntentService class cannot be used with multiple JobIds
(b6838fd2d2/compat/src/main/java/android/support/v4/app/JobIntentService.java (L121))
Also:
    - will make the code easier to be migrated to WorkManager in the future
    - more in line with SRP. It was initially doing too much.

Cleaned the code a little, removed the superfluous creation of new Threads for
DownloadContentCatalog().persistChanges() / .startLoadFromDisk()
as those methods are always called from the background threads
of the new JobIntentServices.
The new DlcHelper helps reducing duplicated code.

MozReview-Commit-ID: G3fsWYOGEbR

--HG--
extra : rebase_source : 5bdc3e64a44b7a3f77743b2b2f8f5d528a7b51c3
2018-06-26 17:31:19 +03:00
Andrei Lazar
a9d68faf15 Bug 1438716 - Upgrade Leanplum SDK. r=nechen
Upgraded to version 3.0.2 from official repository while keeping the internal changes.
This upgrade encapsulates some major changes as well as bug fixes.

MozReview-Commit-ID: DMOEIKnw0nJ

--HG--
extra : amend_source : b25a47601b1be6d23c389bc97a3dea033559c0a9
2018-05-30 17:09:30 +03:00
Andrei Lazar
5101981098 Bug 1463376 - Update to latest Google Play Services version. r=nalexander
Updated google play services version as part of work of the Oreo migration and removed unused libraries from gradle.

MozReview-Commit-ID: BKCWs938k3q

--HG--
extra : rebase_source : 2e9ad83904276607f27974206bd3ad0ba2879279
2018-07-13 15:40:03 +03:00
Petru Lingurar
71b46df0d4 Bug 1385464 - Start using support library v. 26; r=nalexander
This patch also:
Resolves missing resources and api changes
- LeanplumActionBarActivity was removed because Support Library 26 deprecated
ActionBarActivity. Class was already not in use.
- CustomTabsService added two new methods which we need to override.
Tested to make sure that previous functionality was maintained but with the
addition of the two new methods maybe that feature could be improved.
- For checking layout direction we'll use our own new method from ViewUtil
which mimics what the now restricted method from the support library would do.
- Upgraded to use AppCompatResources#getDrawable(..) in place
of the now restricted AppCompatDrawableManager.get().getDrawable(..).

Resolves obscure leaks and crashes after the upgrade
- LoaderManager.destroyLoader(..) was added before the existing call to
LoaderManager.restartLoader(..) to prevent potential Cursor leaks
- Disable website suggestions depending on the address bar inputs when running
in automation to avoid Robocop tests failing (they were entering serially maybe
100 characters in <5 ms which created around that many new Threads,
operation that could cause the Executor to throw a RejectedExecutionException)
At the moment this functionality is not covered by tests anyway and it was the
only fix I could find that would not involve changing the whole implemenation
for address bar suggestions, implementation which in the real world works ok.

MozReview-Commit-ID: 2fX1SBHiSh0

--HG--
extra : amend_source : edb6c5853cdcea5ad50a7cf680f2214fdc176cb2
2018-07-13 17:16:37 +03:00
Rob Wu
73fe9f0dac Bug 1448305 - Fall back to the memory cache when a shortcut is created. r=JanH 2018-07-16 12:19:18 +02:00
Rob Wu
3ad9b090b9 Bug 1448305 - Avoid disk cache for icons of TwoLinePageRow in private tabs. r=JanH
E.g. autocompletion results and the "Recently closed" list.
2018-07-16 12:19:18 +02:00
Rob Wu
2102d829dc Bug 1448305 - Avoid disk cache for icons of private tabs in the TabsLayoutItemView. r=JanH 2018-07-16 12:19:18 +02:00
Rob Wu
cbf96abda6 Bug 1448305 - Avoid disk cache for icons of private tab's session history. r=JanH 2018-07-16 12:19:18 +02:00
Rob Wu
82f197ff52 Bug 1448305 - Avoid disk cache for icons of private tabs. r=JanH 2018-07-16 12:19:18 +02:00
Ciure Andrei
14976cd6b3 Merge inbound to mozilla-central. a=merge 2018-07-15 12:52:50 +03:00
James Willcox
62bff0228d Fix up eslint bustage, no bug, on a CLOSED TREE r=me
MozReview-Commit-ID: 51TNwK6BYeK
2018-07-13 20:05:54 -05:00
James Willcox
0ea85d1e35 Bug 1475324 - Add a test for synchronous saveState() r=droeh
MozReview-Commit-ID: Bz6AK1Y1dUH
2018-07-13 19:46:25 -05:00
James Willcox
4f14025c2f Bug 1475662 - Ensure GeckoSession.saveState() always completes r=droeh
MozReview-Commit-ID: CLcdjOkGI9b
2018-07-13 19:46:25 -05:00
James Willcox
d1c649f6bd Bug 1475644 - Don't send URL in GeckoView crash reports r=jchen
MozReview-Commit-ID: 1Fx1tfcjoQ6
2018-07-13 19:46:24 -05:00
James Willcox
a558c2aed2 Bug 1474618 - Dispatch GeckoResult listeners on thread where we were created r=jchen,droeh
MozReview-Commit-ID: IJNnyhFJX8M
2018-07-13 19:46:24 -05:00
James Willcox
613a4f2d54 Bug 1474454 - Use GeckoResult in GeckoSession.NavigationDelegate.onNewSession() r=jchen,droeh
MozReview-Commit-ID: E59Scu8tnuq
2018-07-13 19:46:24 -05:00
James Willcox
084bc7a336 Bug 1474454 - Use GeckoResult in GeckoSession.NavigationDelegate.onLoadRequest() r=jchen,droeh
MozReview-Commit-ID: CmdjYhqpZcZ
2018-07-13 19:46:23 -05:00
Kris Maglione
b744713e4e Bug 1471025: Part 3c - Also pass the shared preference map handle to Android content processes. r=jld
MozReview-Commit-ID: CTjDzVC9gcD

--HG--
extra : intermediate-source : 7c03b7dd00e9675f9ac045ed1ea733eb0486904f
extra : absorb_source : c79df6bd9ebbec3454fcca1a81cbfa540ad91a3e
extra : source : 38f690f30e78764763bb012045073fa781efa691
extra : histedit_source : 544ff4257f38fae99a800276d06eb0d719882ca2
2018-07-13 11:06:58 -07:00
Brindusan Cristian
fe91a8922e Backed out 13 changesets (bug 1471025) for reftest failures on variation-format-hint-1a.html; bc failures performance/browser_preferences_usage.js; wpt failures on format-specifiers-variations.html. CLOSED TREE
Backed out changeset 6b672d70f335 (bug 1471025)
Backed out changeset 200bec7e766a (bug 1471025)
Backed out changeset 6c72dc1bff88 (bug 1471025)
Backed out changeset 7f4cc96fae12 (bug 1471025)
Backed out changeset b4f9178f132d (bug 1471025)
Backed out changeset 8eff817d2f7e (bug 1471025)
Backed out changeset f9362cf1add4 (bug 1471025)
Backed out changeset ce379eaab179 (bug 1471025)
Backed out changeset 7c03b7dd00e9 (bug 1471025)
Backed out changeset ff41551f5ff1 (bug 1471025)
Backed out changeset 46a6f9d0773b (bug 1471025)
Backed out changeset 434106f1b75e (bug 1471025)
Backed out changeset c490838c8329 (bug 1471025)
2018-07-14 01:16:06 +03:00
Kris Maglione
92550be97d Bug 1471025: Part 3c - Also pass the shared preference map handle to Android content processes. r=jld
MozReview-Commit-ID: CTjDzVC9gcD

--HG--
extra : source : 38f690f30e78764763bb012045073fa781efa691
extra : histedit_source : 2daf7386fbc9f9696c73168d6421139c5cefc5b4%2Ca0adf715f65281047915e678f8c054e5ec671de3
2018-07-13 11:06:58 -07:00
Brindusan Cristian
a68383b333 Backed out 12 changesets (bug 1471025) for build bustages on dom/ipc/ContentProcess.cpp. CLOSED TREE
Backed out changeset 398ccedc20dc (bug 1471025)
Backed out changeset 599895de063e (bug 1471025)
Backed out changeset dc7ec17179d1 (bug 1471025)
Backed out changeset 5051f15fc200 (bug 1471025)
Backed out changeset faef4df47b20 (bug 1471025)
Backed out changeset d344247b8706 (bug 1471025)
Backed out changeset 83d98ea5ebac (bug 1471025)
Backed out changeset 38f690f30e78 (bug 1471025)
Backed out changeset 4b7a8a35ed95 (bug 1471025)
Backed out changeset e3bbc87b71af (bug 1471025)
Backed out changeset 68bb03c63b3c (bug 1471025)
Backed out changeset 4a8fbb472c91 (bug 1471025)
2018-07-13 22:11:24 +03:00
Kris Maglione
6c6960d4c8 Bug 1471025: Part 3c - Also pass the shared preference map handle to Android content processes. r=jld
MozReview-Commit-ID: CTjDzVC9gcD

--HG--
extra : rebase_source : c06aa38ff4bc2bdfa09a4aae359e1f418727ce29
extra : absorb_source : c68cd5f0e8f52980d35432cf21e1fc5552542bf2
2018-07-13 11:06:58 -07:00
Andrew Swan
16e4b0c0f5 Bug 1451525 Convert roboextender to a webextension r=jmaher
MozReview-Commit-ID: CIewLE5Rzuk

--HG--
rename : mobile/android/tests/browser/robocop/roboextender/bootstrap.js => mobile/android/tests/browser/robocop/roboextender/api.js
extra : rebase_source : 366171067f1445e53da72fbc1475b28d05425f35
2018-07-11 13:07:05 -07:00
Andreea Pavel
1e8d2e6f7d Backed out 7 changesets (bug 1420514) for breaking bc on different files on a CLOSED TREE
Backed out changeset 5a46a221b6e8 (bug 1420514)
Backed out changeset 48ed6dfe8772 (bug 1420514)
Backed out changeset 01bf643c77e5 (bug 1420514)
Backed out changeset 5791b17ccb82 (bug 1420514)
Backed out changeset 416e398d942f (bug 1420514)
Backed out changeset de4a4592dbd9 (bug 1420514)
Backed out changeset d3399edf0197 (bug 1420514)
2018-07-12 21:22:32 +03:00
Marco Bonardo
a543f35d4b Bug 1472722 - Use the unix-excl Sqlite VFS by default. r=nalexander,asuth
Use the exclusive VFS on unix systems, so that:
1. we can avoid the memory mapped -shm files in wal mode
2. we gain more compatibility with nfs shares
3. we gain some protection from third parties touching open dbs

On the other side it won't be possible anymore to use an open database from a
different process (like the Sqlite command line), for which we provide an hidden
pref: storage.multiProcessAccess.enabled

Differential Revision: https://phabricator.services.mozilla.com/D1964

--HG--
extra : moz-landing-system : lando
2018-07-13 16:54:57 +00:00
Kirk Steuber
e75835a2a5 Bug 1420514 - Remove app.update.enabled from prefs files r=rstrong
MozReview-Commit-ID: 5pv8VFNYqKu

--HG--
extra : rebase_source : 32dc323ce01c7d5a0a275d4e1a640a6fe495a1fa
extra : source : e868b975027062043e1d94ad47b2ce63f4ecd793
2018-05-21 14:48:47 -07:00
Tudor-Gabriel Vîjială
ca27308a26 Bug 1474575 - Use the fetch-content script to download grcov for A(test-ccov) builds. r=marco
MozReview-Commit-ID: 5AJ2R72eDjN

--HG--
extra : rebase_source : 57aacc2d1eee39fdbf927602da67fbd0baa62e87
2018-07-12 15:18:27 +01:00
Jim Chen
3d5c2669f8 Bug 1474450 - 3. Fix javadoc; r=jchen
1) Add some missing javadoc and fix existing javadoc warnings.

2) Expand the GeckoResult javadoc with some examples.

3) Make @IntDef/@StringDef interfaces package-private, so they don't
   show up in javadoc as empty stubs.

MozReview-Commit-ID: JzvlLzTMgAQ

--HG--
extra : rebase_source : d5654895b01284c2cea35439eb42d5e9d46a0ae4
2018-07-10 13:12:56 -04:00
Jim Chen
0fa20b8ac6 Bug 1474450 - 2. Rethrow uncaught and unhandled exceptions in GeckoResult; r=snorp
If at the end of a chain, we have an uncaught and unhandled exception,
rethrow the exception to make it more visible.

Also, when a GeckoResult is completed with a value/exception, propagate
the value/exception properly down the chain.

MozReview-Commit-ID: F4tnST1nKe5

--HG--
extra : rebase_source : 6be2d44592c793eca39c83443688dd2dd4280b4a
2018-07-10 13:12:56 -04:00
Jim Chen
5bb9e0e210 Bug 1474450 - 1. Add some tests for more GeckoResult behavior; r=snorp
Add some tests for handling of uncaught exceptions, and tests for value
and exception propagation.

MozReview-Commit-ID: 4sEakRr1lLo

--HG--
extra : rebase_source : abdd25a09b56e70f45e4a7a7221498faca04c84d
2018-07-10 13:12:55 -04:00
Gurzau Raul
ea7ebc8d56 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-07-12 01:09:58 +03:00
Kearwood Gilbert
04e66eb0c1 Bug 1470348 - Enable gfxVRExternal for Android; r=kip
MozReview-Commit-ID: 4XMdLLoedIh

--HG--
extra : rebase_source : b71d5d73b832f1f16ae261463860b4f60b38c559
2018-07-10 17:41:58 -07:00
Eitan Isaacson
1f354f1604 Bug 1473998 - Use EditText entry in accessible's classNames and use the hint for the label. r=yzen r=jchen 2018-07-10 17:31:00 +03:00
Petru Lingurar
edc9580e01 Bug 1468487 - Enable multidex for local builds; r=nalexander
MozReview-Commit-ID: BEQmkKajTxF

--HG--
extra : rebase_source : 294aa4baaa6234517bfa8cdb6e5fdf9414e504f3
2018-06-15 13:25:00 +03:00