Commit Graph
16 Commits
Author SHA1 Message Date
Edouard Oger 7ab54c4e02 Bug 1497977 p1 - Renew the fxa device registration/client record on FxA account reconnection. r=nalexander
Differential Revision: https://phabricator.services.mozilla.com/D8606
2018-10-17 18:22:57 +00:00
Nick Alexander c11011e9c3 Bug 1456487 - Update Firefox Account's first run UUID when re-connecting. r=rnewman
The behaviour of Android Firefox Account instances recently changed in
the face of system "Clear data" commands.  To align more closely with
common Apps like Dropbox and Whatsapp (which generally don't use
Android Account instances), after a "Clear data" a Firefox Account is
moved to the Separated state, requiring the user to re-connect them
with a password challenge.  To achieve this, newly created accounts
include a first run UUID; after a "Clear data", the App is killed and
restarted, Sync sees a different first run UUID, and the Account is
moved to the Separated state.  (I honestly don't know what happens if
the Sync code never sees a different first run UUID, but that's for
another day.)  If the user then, in the same first run session,
re-connects the Firefox Account... the Sync code will again see the
different first run UUID and move the Account to the Separated state.

This patch updates the first run UUID when the Account is
re-connected, breaking that cycle.

MozReview-Commit-ID: 9jcO9Ym54an
2018-04-25 12:17:05 -07:00
Grigory Kruglov cf73e73536 Bug 1400742 - Remove per-account in-memory cache r=nalexander
1368147 added reading fxa.account.json into the unbundle() codepath for the cases
when the in-memory cache isn't populated. This surfaced a race condition:
pickling of the fxa.account.json file and running unbundle() (as triggered from various
parts of the UI, or othe SyncStatusObservers) will race, and if unbundle wins, it
will attempt to read a yet-to-be-created fxa.account.json file, and crash.

Fixing the race isn't trivial, but we can avoid it by removing the in-memory cache,
thus avoiding having to read the cache key from the pickled file (uid).

In-memory cache was added in response to caching/invalidation issues of set/getUserData,
see Bug 964854 for the history. The current thinking is that those problems are pre-API16,
which hopefully means that we shouldn't encounter them anymore, and thus can remove the
workaround entirely.

MozReview-Commit-ID: AfL2Jq4IlYT
2017-09-20 18:21:06 -04:00
Grigory Kruglov f97dbbe992 Bug 1368147 - Migrate sync and reading list preferences to be keyed by account UID r=nalexander,sebastian
Due to how we access our prefs files (read: all over the place), the idea here is to perform the migration whenever
some component actually attempts to get the prefs. This guarantees that every consumer of prefs will receive the
correct version, and we won't accidentally duplicate our shared prefs either.

I would have preferred to just perform this migration at a set point.
We have a "services upgrade point" - FxAccountUpgradeReceiver - which receives a "package upgraded" intent and kicks
off some async work. Unfortunately, we can't guarantee that its tasks won't overlap with our uses of prefs
(either in the background or foreground code).

MozReview-Commit-ID: AWQ4IY7i32F
2017-09-12 16:00:37 -04:00
Edouard Oger 87f243259e Bug 1351805 part 1 - Create a org.mozilla.gecko.fxa.devices package. r=Grisha,nalexander
MozReview-Commit-ID: FjJmRiHlqEg
2017-04-07 11:56:38 -04:00
Wes Kocher e5cf37107d Backed out 3 changesets (bug 1351805) for android Test failures a=backout
Backed out changeset da34da5f310a (bug 1351805)
Backed out changeset 430b56176e04 (bug 1351805)
Backed out changeset a3dfb4b9dc66 (bug 1351805)

MozReview-Commit-ID: AE4RcKV3akz
2017-04-25 12:47:59 -07:00
Edouard Oger bfc7019308 Bug 1351805 part 1 - Create a org.mozilla.gecko.fxa.devices package. r=Grisha,nalexander
MozReview-Commit-ID: FjJmRiHlqEg
2017-04-07 11:56:38 -04: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
Jim Chen c348eac8e1 Bug 1336007 - Ignore invalid key/tokens when updating account; r=sebastian
The refactor patch removed a try/catch block that would have caught this
error before. Instead of using try/catch, this patch checks for the
affected items and send an error when the items are missing.
2017-02-08 19:50:33 -05:00
Jim Chen aa5629f0ac Bug 1333586 - Convert AccountsHelper events to bundle events; r=sebastian
Convert events used in AccountsHelper to bundle events. Most events are
kept as Gecko thread events, but a couple events that start activities
are converted to UI thread events.
2017-01-25 18:57:31 -05:00
Jim Chen 47e56c851a Bug 1320603 - Revert to global EventDispatcher for certain events; r=sebastian
These events are not accessed through GeckoApp, and should therefore use
the global EventDispatcher rather than the per-GeckoApp/GeckoView
EventDispatcher. Otherwise, we could run into situations where we end up
registering / unregistering the same event using different
EventDispatcher instances, causing exceptions like this one.
2016-11-30 14:01:20 -05:00
Dylan Roeh 45a079c5d5 Bug 1294821 - De-singletonize EventDispatcher and make it application-specific. r=jchen 2016-09-27 11:07:24 -05:00
Edouard Oger 6a806ff869 Bug 1250782 - Register device on married state. r=mcomella, nalexander
MozReview-Commit-ID: CswoGEpoNl3
2016-05-18 12:48:49 -07:00
Mouaad 0df9bf4ca3 Bug 1255394 - Restrictions: Fix java package. r=sebastian
MozReview-Commit-ID: XzS7bSaXhW
2016-03-31 17:30:43 +02:00
Nick Alexander 9200d76fff Bug 1220906 - Part 2: Deprecate Accounts.syncAccountsExist. r=rnewman 2016-01-18 15:35:45 -08:00
Nick Alexander c682759005 Bug 1107811 - Part 1: Move Java code. r=mfinkle
#!/bin/bash
set -x
pushd mobile/android/base
# Can't be present in glob below.
rm -rf java/org/mozilla/gecko
for i in */ ; do
# But is necessary to copy into.
mkdir -p java/org/mozilla/gecko
hg mv $i java/org/mozilla/gecko ;
done
hg mv *.java java/org/mozilla/gecko
# Move back stuff we didn't want to move.
hg mv java/org/mozilla/gecko/crashreporter crashreporter
hg mv java/org/mozilla/gecko/docs docs
hg mv java/org/mozilla/gecko/locales locales
hg mv java/org/mozilla/gecko/resources resources
popd
2015-12-04 11:51:34 -08:00