This was implemented, but never wired up.
I thought long and hard about how to unit test this, and it's quite
difficult. First, we'd have to chose a layer of testing. We could
unit test:
* the JS <-> Java message passing;
* the permission prompts <-> JS interface;
* some interactions with the Service Worker interface.
The first is difficult because none of our current testing emulators
have Google Play Services and GCM enabled, so we'd need to allow to
mock or otherwise fake the GCM registration. Then we'd need to stand
up a mock autopush server (using httpd.js or the Java-side
equivalent), or mock out the autopush client as well. At this point,
we're testing sendMessage. This could be done, but I'd rather slide
this fix in before building out quite a bit of test infrastructure.
(For the record, the Java Push Service state machine is thoroughly
tested with Java unit tests, so I have confidence that the unsubscribe
logic works.)
The second is tested via the PushWebSocket tests, which are now
running on Android. That is, if permissions and the PushService are
interacting badly, we should see it with the existing test suite.
Since PushServiceAndroidGCM is pretty much a pass-through, there's
little value to be added here.
Finally, the third is also tested via the PushWebSocket tests.
There's absolutely nothing GCM specific about the Service Worker
interface to the PushService.
So I'm left manually testing this -- and now we can unsubscribe from
Push messages from sites.
MozReview-Commit-ID: HiRiqasHJ27
This patch does a couple of things:
* Add a SyncAction for synchronizing the catalog from Kinto
* Add a CleanupAction for removing files no longer needed
* Migrate the data structure of DownloadContentCatalog from a list to a map.
* Move the more complex builder code to its own class: DownloadContentBuilder
* Introduce a switchboard expriment for staged rollout (download-content-catalog-sync)
MozReview-Commit-ID: D733Xx6LxOb
The existing code assumes an Activity, not just a Context, but doesn't
statically guarantee it. This patch is safe because it dynamically
type-checks, but it would be better to declare the member to be an
Activity.
MozReview-Commit-ID: 9AigV055I5j
GlobalHistory is Fennec-specific: it accesses the Fennec history data
store, and collects Telemetry. This allows other consumers to
implement their own store as appropriate.
MozReview-Commit-ID: 75Uxc5k8V0O
This moves some Fennec-specific home-screen icon manipulations out of
GeckoAppShell. A GeckoView interface can follow.
MozReview-Commit-ID: 7OhRAT9Agdh