Commit Graph
2909 Commits
Author SHA1 Message Date
Michael Comella f5fd2e3b00 Bug 1249288 - review: Correct concurrency issues with searchEngineManager. r=sebastian
Additionally, added WeakReferences to the SEM in its callbacks so we can
GC ASAP if the Activity (and thus the SEM) gets GC'd. This is important
since we hold a reference to Context which can be a rather large object.

Furthermore, I added some related thread annotations where I felt they
were useful.

MozReview-Commit-ID: KaWlw14uOoN
2016-03-24 11:18:58 -07:00
Michael Comella 1cbd3368e7 Bug 1249288 - Don't call SearchEngineManager change callback if it's null. r=margaret
The callback may be null if setChangeCallback is never called and would cause
a crash.

MozReview-Commit-ID: BNd16Db1A8Q
2016-02-23 18:11:57 -08:00
Michael Comella 8bb75b1f90 Bug 1249288 - Add default search engine to core ping. r=rnewman
The default search engine attribute may be null in the core ping if we haven't
been able to retrieve the value yet. It's unclear when this might be, but the
possibility is in the javadoc of `SearchEngineManager.getEngine`.

MozReview-Commit-ID: IrJB6GyjyTO
2016-03-10 16:00:15 -08:00
Michael Comella bf1add2294 Bug 1249288 - Move om.search.providers.SearchEngine\* to omg.search. r=nalexander
We want to reuse this code for the main Activity.

MozReview-Commit-ID: BZxIrgmJI2r
2016-02-23 17:27:24 -08:00
Sebastian Kaspari b0a0b1e8a0 Bug 1258812 - Create switchboard experiments for content notifications. r=margaret
MozReview-Commit-ID: 8SD5BRHRr0W
2016-03-24 10:42:37 +01:00
Michael Comella 547ec8d580 Bug 1258605 - Don't show about:neterror when intents fail to load. r=margaret
Motivations are in the added comment.

MozReview-Commit-ID: 1EymB8rXzT5
2016-03-25 17:36:37 -07:00
Michael Comella 3a3a26b092 Bug 1258769 - Remove tabs from various files to pass checkstyle check. r=nalexander
MozReview-Commit-ID: JAbrVoi6Cxg
2016-03-25 11:41:24 -07:00
Michael Comella b419891759 Bug 1256427 - Backed out changeset 57572ba7a904 for crash on API 15-16.
AtomicFile is only available for API 17+ so we need to use the framework.

MozReview-Commit-ID: HBrLHvp57Uv
2016-03-24 14:10:56 -07:00
Sebastian Kaspari 83291577d3 Bug 1257319 - (Bustage) Follow-up: Migrate new code to use notifyObservers() API. r=me CLOSED TREE
MozReview-Commit-ID: msStUIbCV3
2016-03-24 17:39:11 +01:00
Carsten "Tomcat" Book 1a6dec1838 Merge mozilla-central to fx-team 2016-03-24 16:20:13 +01:00
Carsten "Tomcat" Book 5e150f1109 merge mozilla-inbound to mozilla-central a=merge 2016-03-24 16:15:30 +01:00
Andrzej Hunt 0fd1143996 Bug 1219343 - Enable "Always restore tabs" by default r=margaret
Note, the effect of this change varies as follows:

(A) New users:
(B) Existing users who have never opened Settings->Advanced:
- Tabs will restore by default

(D) Existing users who have explicitly set the preference to disabled:
(D) Existing users who visited Settings->Advanced, without explicitly opening this preference:
- Tabs will not restore by default
(The preference already has a value set, hence the default has no effect)

MozReview-Commit-ID: DjMeEcYhusj
2016-03-23 11:19:10 -07:00
Sebastian Kaspari ab54abfede Bug 1241810 - Follow-up: Fix FeedSubscription.hasBeenUpdated() after conflicts. r=me
MozReview-Commit-ID: LL7t96m1u6s
2016-03-24 13:52:19 +01:00
Sebastian Kaspari 30a4c96a7f Bug 1241810 - Review follow-up: Ensure that FeedService always calls completeWakefulIntent(). r=me
MozReview-Commit-ID: GWnPCYBilNJ
2016-03-23 16:08:33 +01:00
Sebastian Kaspari 0ba50e223c Bug 1241810 - Review follow-up: Rename actions to be more descriptive. r=me
MozReview-Commit-ID: 5VbOQv4W7CZ
2016-03-23 16:07:52 +01:00
Sebastian Kaspari 5e2fb57920 Bug 1241810 - Review follow-up: Rename CheckAction.notify() to CheckAction.showNotification(). r=me
MozReview-Commit-ID: EIRYnna6yf9
2016-03-23 15:56:24 +01:00
Andrzej Hunt c3acbd9822 Bug 1254468 - Post: Remove unused TransitionsTracker r=sebastian
This is no longer needed - TransitionAwareCursorLoaderCallbacks was the only
consumer - it was removed as it caused race conditions. The ideal future solution
is probably to use recyclerviews to avoid jank, rather than trying to wait for
transitions to happen.

It's also extremely difficult to use this correctly - the
TransitionAwareCursorLoaderCallbacks simply held the cursor that would usually
be swapped in onLoadFinished until transitions have finished (which is incorrect,
since cursors need to be swapped in before onLoadFinished returns). It's hard to imagine
any alternative solutions, short of avoiding loading cursors in the first place (which
isn't too useful, since cursor loading happens in the background, at which point the UI
status is irrelevant), or hacking the CursorLoader to not return from its worker thread
until UI transitions are done (which would require a new thread-safe implementation of
TransitionsTracker), or maybe even hacking Android Framework's AsyncTaskLoader  to not run Loader.deliverResult
while transitions are running (which seems awfully brittle and hacky).

MozReview-Commit-ID: 3JWDcznYL4Y
2016-03-15 09:06:46 -07:00
Andrzej Hunt 9e1c0e3acb Bug 1254468 - Remove broken TransitionAwareCursorLoaderCallbacks r=sebastian
TransitionAwareCursorLoaderCallbacks is fundamentally flawed: old CursorLoader
cursors _must_ not be used after onLoadFinished has been called. However
we sometimes queue the cursor swapping (which is implemented by subclasses
in onLoadFinishedAfterTransitions) until after transitions have finished.
CursorLoader.deliverResult() closes the old cursor immediately after calling
onLoadFinished (with the new cursor). At this stage the adapter is
still holding onto the old (but now closed cursor), and will crash if it tries
to read this cursor (which can happen if the adapter is still iterating over the
cursor).

Instead we should ensure that we swap the cursors during onLoadFinished - the simplest
way to do this is by eliminating TransitionAwareCursorLoader and using onLoadFinished
the way the Android framework expects.

It's worth noting that TransitionAwareCursorLoader is obsolete: at the time it was added,
home panels were placed in the HomePagerTabStrip, which notified TransitionsTracker about
its transitions. However HomePagerTabStrip no longer exists, hence there's no need
for us to care about these transitions anymore. (The crash seems to happen because we
try to hide the doorhanger every time we receive LOCATION_CHANGE, and each of these starts
a hide transition - even if no doorhanger is shown - hence we often have a transition
in progress every time we show topsites.)

MozReview-Commit-ID: HsytLpHOrp2
2016-03-14 15:38:53 -07:00
Michael Comella 2be5d5b18e Bug 1256427 - Move to AtomicFile in framework from support lib. r=sebastian
MozReview-Commit-ID: 6DOKydvvSGJ
2016-03-23 10:30:52 -07:00
Michael Comella cb0491b8ba Bug 1256427 - Move to LruCache in framework from support lib. r=sebastian
MozReview-Commit-ID: HImxvIVjIhw
2016-03-23 10:29:25 -07:00
Carsten "Tomcat" Book b542f21ae2 merge mozilla-inbound to mozilla-central a=merge 2016-03-23 16:14:48 +01:00
Carsten "Tomcat" Book 684f8d7e60 Backed out changeset 0b0b229e5968 (bug 1257319) for causing merge conflicts when uplifting to mozilla-central 2016-03-23 10:55:31 +01:00
Carsten "Tomcat" Book 1e05e48e46 Backed out changeset 3e80b5052d0b (bug 1257319) 2016-03-23 10:55:10 +01:00
Carsten "Tomcat" Book 4185e207f8 Backed out changeset ba16cc23d7c4 (bug 1257319) 2016-03-23 10:55:09 +01:00
Carsten "Tomcat" Book 26a9134e8a Backed out changeset 48d6faa3bf0f (bug 1257319) 2016-03-23 10:55:06 +01:00
Chenxia Liu 1e1070eeea Bug 1255077 - Bookmarks menu item does nothing if bookmarks panel is disabled. r=margaret
MozReview-Commit-ID: 7219EueXxtw
2016-03-22 13:21:08 -07:00
Sebastian Kaspari f5ff785f1f Bug 1241810 - Review follow-up: Avoid logging potential personal information. r=me
MozReview-Commit-ID: BsGgce12yWd
2016-03-03 13:28:08 +01:00
Sebastian Kaspari f07fbce4b4 Bug 1241810 - Review Follow-up: Remove duplicated hasBeenUpdated() / isNewer() methods. r=me
MozReview-Commit-ID: 1Q0IoZ1DqJP
2016-03-23 14:49:00 +01:00
Sebastian Kaspari 486b3ca70b Bug 1241810 - Bug 1251317 - Add telemetry for content notifications. r=mcomella,mfinkle
MozReview-Commit-ID: Hlh1sW0kHFg
2016-03-03 14:16:17 +01:00
Sebastian Kaspari 2d21b5624d Bug 1241810 - Bug 1238087 - Add "notifications setting" action to content notification. r=mcomella
MozReview-Commit-ID: BsGgce12yWd
2016-03-23 15:45:30 +01:00
Sebastian Kaspari 5cd99bc8b8 Bug 1241810 - Use UrlAnnotations table as storage. r=mcomella
This patch removes the JSON flat file based storage and instead uses the
new url_annotations table.

Two mappings will be created in the database:
* Key "feed": website URL -> feed URL
  This maps an URL to its feed URL. Multiple URLs can have the same feed
  URL. Later this mapping could be used to highlight URLs with feeds or
  subscriptions in the UI.
* Key "feed_subscription": feed URL -> Object describing the feed
  This is the actual subscription and saves the state of a subscription
  linked to the feed URL.

MozReview-Commit-ID: EFVxAwbhT5o
2016-02-26 17:51:17 -08:00
Sebastian Kaspari dd71db782c Bug 1241810 - Add support for wordpress.com. r=mcomella
MozReview-Commit-ID: AhXTAFszx6F
2016-02-26 08:59:51 -08:00
Sebastian Kaspari 42f98a8790 Bug 1241810 - Bug 1247788 - Add "Notifications" in Settings. r=mcomella
MozReview-Commit-ID: girmjH2J7Q
2016-02-25 16:16:57 -08:00
Sebastian Kaspari c463bd9f18 Bug 1241810 - Restructure FeedService to always complete wakeful intent. r=mcomella
MozReview-Commit-ID: FyczEKtsTgv
2016-02-25 14:59:32 -08:00
Sebastian Kaspari f2b075f6fd Bug 1241810 - Bug 1238087 - Update style of content notification. r=mcomella
Group multiple updates into one notification and use a different style
for single and multiple updates.

MozReview-Commit-ID: 6PXUEcJ280P
2016-02-25 12:22:57 -08:00
Sebastian Kaspari 54f3f1d98e Bug 1241810 - FeedSubscription: Treat ETag and "Last modified" header as optional. r=mcomella
Some services just do not return any of those headers.

MozReview-Commit-ID: 3LpvZqsHgzJ
2016-02-25 12:21:08 -08:00
Sebastian Kaspari 1dcec32054 Bug 1241810 - Do not do anything if not connected to a network or network is metered. r=mcomella
MozReview-Commit-ID: LilXNpxQhyI
2016-02-24 16:10:47 -08:00
Sebastian Kaspari 85b0527df8 Bug 1241810 - Run setup on app start and when the device boots. r=mcomella
MozReview-Commit-ID: 4k5KqnjLg3L
2016-02-24 15:34:24 -08:00
Sebastian Kaspari e15607d54b Bug 1241810 - Add SetupAction for setting up various alarms to start FeedService. r=mcomella
MozReview-Commit-ID: GT6pLuUUEyY
2016-02-24 15:29:01 -08:00
Sebastian Kaspari 4b063caa4a Bug 1241810 - Add WithdrawAction for removing subscriptions of bookmarks that do not exist anymore. r=mcomella
MozReview-Commit-ID: 9jFnIgLDgws
2016-02-24 15:20:12 -08:00
Sebastian Kaspari 5012ab5ae2 Bug 1241810 - Add EnrollAction for finding bookmarks of known sites to subscribe to. r=mcomella
MozReview-Commit-ID: LS59SRlAjH0
2016-02-24 15:12:58 -08:00
Sebastian Kaspari 59d18f8e57 Bug 1241810 - Add configuration/whitelist for known sites we want to show notifications for. r=mcomella
We'll start with Blogger and Medium.

MozReview-Commit-ID: FKXcsdE6F8M
2016-02-24 14:55:40 -08:00
Sebastian Kaspari 31a98dc29f Bug 1253684 - Introduce preference for forwarding OMA downloads to Android's download manager. r=margaret
MozReview-Commit-ID: u9j3CGex2q
2016-03-10 10:51:25 +01:00
Jim Chen e9cd4fc2f9 Bug 1257934 - Make the GeckoPreferences pref handler a static class; r=sebastian
The pref handler class in GeckoPreferences doesn't need a reference back
to GeckoPreferences, so it's better to make it a static class rather
than a (non-static) anonymous inner class, in order to avoid leaking
the GeckoPreferences instance inadvertently.

To avoid confusion, the patch also renames the class to "PrefCallbacks",
because GeckoPreferences already has an unrelated interface named
"PrefHandler".
2016-03-22 22:26:19 -04:00
Jim Chen 8e1f418443 Bug 1257319 - Remove BROADCAST GeckoEvent; r=me
Remove the now-obsolete BROADCAST GeckoEvent.
2016-03-22 22:24:32 -04:00
Jim Chen b0cafd977c Bug 1257319 - Convert broadcast event usage in HomeConfig.java; r=margaret
HomeConfig.java saved a list of events to be sent later in a batch. This
patch makes it save a pair of strings instead, and the strings are later
used to make calls to GeckoAppShell.

The patch also makes two small optimizations. It makes the queue an
ArrayList instead of a LinkedList to save memory. It also makes copying
the queue a swap instead of a true copy.
2016-03-22 22:24:31 -04:00
Jim Chen 8ca658a8c1 Bug 1257319 - Convert existing broadcast events to calls; r=margaret
Convert existing places where we use broadcast events to use
new GeckoAppShell calls.
2016-03-22 22:24:31 -04:00
Jim Chen f736fc9776 Bug 1257319 - Add notifyObservers methods to GeckoAppShell; r=snorp
Add notifyObservers and the synchronous syncNotifyObservers methods to
GeckoAppShell to replace the BROADCAST event.
2016-03-22 22:24:31 -04:00
Kannan Vijayan afe71cc3f0 Bug 1272101 - Fix nsINetworkInfoService implementation on Android to use Linux C APIs instead of Android Java APIs. r=snorp 2016-06-02 16:42:36 -04:00
Alastor Wu f86ffd0d7e Bug 1277373 - remove the errors in lint and checktests. r=Margaret
MozReview-Commit-ID: JmlgpSzE1HV
2016-06-02 16:16:33 +08:00