Граф коммитов

383 Коммитов

Автор SHA1 Сообщение Дата
Grigory Kruglov 10116eac39 Bug 1395703 - Make sure modifiedBySync CV field isn't passed to ContentProvider on updates r=rnewman
Comment from bugzilla on this ugly hack:

While processing bookmarks, we sometimes need to mark them for re-upload as we're inserting new ones or updating existing ones. For example, we might set or update a dateAdded field.
We perform insertions "in-bulk", and so we might be inserting some bookmarks which need to be re-uploaded, and some bookmarks which don't. We compile an array of ContentValue objects, and make a single call to our ContentProvider. This means we can't use a URI param to indicate our intent, and so a non-column field in ContentValues objects - modifiedFromSync - is set for those bookmarks which need special treatment during insertion.
Bug 1392802 added a similar mechanism for updating bookmarks. However, updates are done differently - currently, we perform a single call to our ContentProvider for each bookmark. Which means we _can_ use a URI field as a signaling mechanism, which is what that patch did. However, in haste I forgot to take into consideration existing signaling mechanism, which lead to update failures.
And so we're left with an even clumsier interface to our data store, with two ways to signal the same thing in different circumstances... A quick solution is to just make sure 'modifiedBySync' field never makes its way to contentprovider on updates; a more refined fix would probably modify update logic to use a ContentValues field for consistency... Either way, there's going to be something ugly, somewhere in the code.
I anticipate a lot of this code changing sometime soon in order to support better transactionality of bookmark syncing, and smarter merging, and so I'm inclined to just to the simple thing for now.

MozReview-Commit-ID: H10LFsqjbFY

--HG--
extra : rebase_source : f7f311d266d75c505bb8871a567ac96d39f1b1cb
2017-08-31 18:05:20 -04:00
Grigory Kruglov 8414560f22 Bug 1392505 - Let RepositorySessions track their own lastFetch and lastStore timestamps r=rnewman
This patch moves some of the state tracking (fetchEnd/storeEnd timestamps) away from RecordsChannel
and into individual RepositorySessions. The core assumption behind this move is that
sessions are better suited to know when they were fetched from during this sync, and when they
were stored to.
Sessions are growing in complexity - local ones are wrapped in a buffer, remote
now support batching downloads and uploads. In order to hide these details, it's easier to let
sessions keep track of the fetch/store timestamps in the way that fits their implementations.

Instead of flowing these timestamps upwards from sessions and into the SynchronizerSession,
the latter now simply queries sessions at the end of their flows.

The default behavior if a certain operation wasn't performed - that is, if fetchEnd or storeEnd
aren't set during sync for a session - is to return timestamp persisted during the previous sync.

This allows us to skip certain flows (no remote data available), and ensure that we're always
using correct timestamps of the same origin for any given session.

Prior behaviour was to "make up" a timestamp at the RecordsChannel level in cases of certain
errors or skipped flows, which resulted in comparing timestamps of different origins on the consequent sync.

MozReview-Commit-ID: 2wqeTo7mhz3

--HG--
extra : rebase_source : 21b02d4164abf75422920225749ffcfd3fc71e91
2017-08-30 19:48:21 -04:00
Grigory Kruglov 1c3783ec74 Bug 1392505 - Pre: remove unused delegate interface r=rnewman
MozReview-Commit-ID: K93rK1pILky

--HG--
extra : rebase_source : 9f8927d4298759ca7f9b862e51932a54ed7cb590
2017-08-25 21:44:37 -04:00
Grigory Kruglov ba86f4a1fb Bug 1392802 - Increment localVersion while reconciling a bookmark if we modified its dateAdded t.s. r=rnewman
We might decide that there's an older dateAdded timestamp present for an incoming bookmark while processing it,
in which case we need to ensure that our changes will be uploaded.

MozReview-Commit-ID: BKLh4rYBiRu

--HG--
extra : rebase_source : 3f8ac41de99d7082cd9d7fc7254386d99d5431bd
2017-08-29 20:12:46 -04:00
Mark Hammond 273d4d9a9d Bug 1392449 - introduce shouldReconcileRecords so reconcileRecords never returns null. r=Grisha
MozReview-Commit-ID: L0rsLmzNTRr

--HG--
extra : rebase_source : c1ff236c9f4cdcc95fbb9bcda70c8fe6452f66d1
2017-08-29 17:31:10 +10:00
Grigory Kruglov 01cce9ce69 Bug 1394073 - Call onStoreFailed in case last payload fails in the uploader r=rnewman
MozReview-Commit-ID: 9cRuevmqbLD

--HG--
extra : rebase_source : be0249ddf14ff40bf1f51fc99f4d01c8eb168be0
2017-08-25 21:41:35 -04:00
Grigory Kruglov e79d77c3a4 Bug 1392716 - Clean up version map while de-duping records r=rnewman
This is meant as a stop-gap measure to stop the obviously bad thing from happening.

MozReview-Commit-ID: Gqvc32K04xD

--HG--
extra : rebase_source : 04f1b5cb7ead6b7949b8433b3fc75c0d67283315
2017-08-23 21:28:49 -04:00
Grigory Kruglov eddb3a7e06 Bug 1392078 - More detailed strong assertions to help narrow down root cause r=rnewman
MozReview-Commit-ID: JSN9Q837u6R

--HG--
extra : rebase_source : 75c197c8af0d0cebeb8ff7506cab61a0b283cea1
2017-08-21 17:42:44 -04:00
Thom Chiovoloni e3dd5dd448 Bug 1291822 - Part 2. Integrate bookmark validator into android sync flow r=Grisha
MozReview-Commit-ID: LMmHAcfhnD

--HG--
extra : rebase_source : 914235a5e7db612ad1b42f8ce7d43cb21a6d3bfb
2017-07-17 16:49:11 -04:00
Thom Chiovoloni feb4b73a23 Bug 1291822 - Part 1. Implement bookmark client server validator r=Grisha
MozReview-Commit-ID: D84KLUSQbe6

--HG--
extra : rebase_source : e8ee4d1d421a85c4fc2ce683206ab18742fb3170
2017-06-07 17:25:14 -04:00
Nevin Chen a2f064998a Bug 1366664t - Update color and layout. Hide splash screen if first seen. r=walkingice
MozReview-Commit-ID: EP6hQIGcdyo

--HG--
extra : rebase_source : eb36ca2400be06e22f9f8024fa70d79f143a6d65
2017-08-09 18:13:55 +08:00
Grigory Kruglov fe8f3dcf20 Bug 1364644 - Post: remove AndroidBrowser prefix from class names r=rnewman
MozReview-Commit-ID: Bpgba2BR7hp

--HG--
rename : mobile/android/services/src/main/java/org/mozilla/gecko/sync/repositories/android/AndroidBrowserBookmarksDataAccessor.java => mobile/android/services/src/main/java/org/mozilla/gecko/sync/repositories/android/BookmarksDataAccessor.java
rename : mobile/android/services/src/main/java/org/mozilla/gecko/sync/repositories/android/AndroidBrowserBookmarksRepository.java => mobile/android/services/src/main/java/org/mozilla/gecko/sync/repositories/android/BookmarksRepository.java
rename : mobile/android/services/src/main/java/org/mozilla/gecko/sync/repositories/android/AndroidBrowserRepositoryDataAccessor.java => mobile/android/services/src/main/java/org/mozilla/gecko/sync/repositories/android/DataAccessor.java
rename : mobile/android/services/src/main/java/org/mozilla/gecko/sync/repositories/android/AndroidBrowserHistoryDataAccessor.java => mobile/android/services/src/main/java/org/mozilla/gecko/sync/repositories/android/HistoryDataAccessor.java
rename : mobile/android/services/src/main/java/org/mozilla/gecko/sync/repositories/android/AndroidBrowserHistoryRepository.java => mobile/android/services/src/main/java/org/mozilla/gecko/sync/repositories/android/HistoryRepository.java
rename : mobile/android/services/src/main/java/org/mozilla/gecko/sync/repositories/android/AndroidBrowserHistoryRepositorySession.java => mobile/android/services/src/main/java/org/mozilla/gecko/sync/repositories/android/HistoryRepositorySession.java
rename : mobile/android/services/src/main/java/org/mozilla/gecko/sync/repositories/android/AndroidBrowserRepository.java => mobile/android/services/src/main/java/org/mozilla/gecko/sync/repositories/android/ThreadedRepository.java
rename : mobile/android/services/src/main/java/org/mozilla/gecko/sync/stage/AndroidBrowserBookmarksServerSyncStage.java => mobile/android/services/src/main/java/org/mozilla/gecko/sync/stage/BookmarksServerSyncStage.java
rename : mobile/android/services/src/main/java/org/mozilla/gecko/sync/stage/AndroidBrowserHistoryServerSyncStage.java => mobile/android/services/src/main/java/org/mozilla/gecko/sync/stage/HistoryServerSyncStage.java
rename : mobile/android/services/src/main/java/org/mozilla/gecko/sync/stage/AndroidBrowserRecentHistoryServerSyncStage.java => mobile/android/services/src/main/java/org/mozilla/gecko/sync/stage/RecentHistoryServerSyncStage.java
rename : mobile/android/tests/background/junit3/src/org/mozilla/gecko/background/db/AndroidBrowserRepositoryTestCase.java => mobile/android/tests/background/junit3/src/org/mozilla/gecko/background/db/ThreadedRepositoryTestCase.java
extra : rebase_source : 232ac4da5187fdf24cb4234a6173e6eab43a50cf
2017-08-14 21:21:29 -04:00
Grigory Kruglov fe05737745 Bug 1364644 - Versioned syncing of bookmarks r=rnewman
MozReview-Commit-ID: 5IdRPUXMDPh

--HG--
extra : rebase_source : a1f830df665df46db87ad5b4ac909158d6d883b5
2017-08-16 21:02:21 -04:00
Grigory Kruglov f0367018f1 Bug 1364644 - Pre: Refactor bookmark and history sessions to allow for different superclasses r=rnewman
Versioned syncing work later in the patch series introduces functionality that is best suited to live
within the RepositorySession inheritance chain.

We'd like to introduce a new RepositorySession subclass which individual RepositorySessions are able to
inherit. And that's when the current inheritance structure gets in the way: history and bookmarks both share
a superclass, and we'd like to only introduce this new functionality for bookmarks.
This makes our task, as stated, impossible without breaking apart the current inheritance structure.

This patch introduces a few "delegate" objects:
- SessionHelper
--> HistorySessionHelper
--> BookmarksSessionHelper

... which absorb most of the functionality from AndroidBrowserRepositorySession (removed) and bookmark and history
repository sessions.

This change is not functional - everything remains as before otherwise.

MozReview-Commit-ID: 7WwUmY3Wql7

--HG--
extra : rebase_source : a8cd49fd14cdc76b9e2906d4ee8c2052b9152413
2017-08-04 18:43:49 -04:00
Grigory Kruglov 1b34ae734e Bug 1364644 - Pre: Move change tracking responsibilities into repositories r=rnewman
As part of moving toward versioned syncing, we need to start decoupling change tracking
concepts from parts of the system that facilitate flow of records. This allows us to track
what changed differently for different data types, while maintaining a consistent and predictable API.

A move toward that is to let repositories own determinining that a record has been modified.
Repositories are now asked to provide modified records, instead of a very specific "records modified since".

This patch does not change behaviour of the system: every repository still uses timestamp-based
change tracking to actually provide modified records to the caller. A changeover to version
tracking will come later in this series for bookmarks, and as part of Bug 1383894 for other repositories.

MozReview-Commit-ID: LQuWYdlNHpt

--HG--
extra : rebase_source : 5552d74d4a967ce85af09aaa57ca438fe5b949f3
2017-07-28 17:15:22 -04:00
Grigory Kruglov cefa33d6d6 Bug 1364644 - Pre: Remove guidsSince RepositorySession interface r=rnewman
We're moving toward version-based syncing. This is one of the bricks in that road,
removing an unused timestamp-based interface for accessing changed records.

MozReview-Commit-ID: CYUyASWXrMW

--HG--
extra : rebase_source : b95687409bc5f3e8e21fb9b084efdcd14a975d01
2017-07-24 14:48:38 -04:00
Ryan VanderMeulen 84df616efe Backed out 5 changesets (bug 1366664) for landing non-localizable strings.
Backed out changeset e5dfbde553d6 (bug 1366664)
Backed out changeset e078166d9857 (bug 1366664)
Backed out changeset 014d0def1489 (bug 1366664)
Backed out changeset 51868598947e (bug 1366664)
Backed out changeset 6a21eb146fba (bug 1366664)
2017-08-16 16:34:06 -04:00
Edouard Oger 0afc2d529d Bug 1389623 - Check that account is not null before notiyfing clients. r=Grisha
MozReview-Commit-ID: 4I0vfxdghgV

--HG--
extra : rebase_source : d8f6c1c31fdd3151362c63c4abe2d83468f08810
2017-08-14 16:32:53 -04:00
Nevin Chen 2a319e5242 Bug 1366664 - Update color and layout. Hide splash screen if first seen. r=walkingice
MozReview-Commit-ID: EP6hQIGcdyo

--HG--
extra : rebase_source : 19b6397f83f0c75ca8816326919b000af539a02d
2017-08-09 18:13:55 +08:00
Edouard Oger 5beff3890e Bug 1372655 - Notify other clients when uploading the local clients record for the first time. r=Grisha
MozReview-Commit-ID: HepBI6cbV3J

--HG--
extra : rebase_source : 621fd761f51697605c16d16a38d2a77dd98ab6a6
2017-08-03 16:10:40 -04:00
Grigory Kruglov da35d1368a Bug 1386027 - Simplify handleError interfaces for SessionCallback and TelemetryCollector r=rnewman
Error reporting, and especially the split between per-stage and global session errors,
are a bit of a mess; at the very least, this patch unifies things a little bit, and
ensures we're not passing around nulls unexpectedly.

MozReview-Commit-ID: JTSp7GuOji0

--HG--
extra : rebase_source : 19bbd2c98776b32b803d7febb55549bc430cbc3e
2017-08-08 13:45:29 -04:00
kimsaehun c6d2cf08df Bug 959033 - Don't send X-Confirm-Delete header with Android Sync requests. r=Grisha
MozReview-Commit-ID: AQqcfeX9TlA

--HG--
extra : rebase_source : a3db5d2ad8b0ecd791044b047ab933ade29a5125
2017-08-03 16:26:45 -07:00
Edouard Oger 5f64094bc9 Bug 1387053 - Make sure we don't do DB migration multiple times. r=rnewman
MozReview-Commit-ID: I799FUjIG4M

--HG--
extra : rebase_source : cf6b8591121cace64353f3bdfdca9de193e74e6f
2017-08-03 11:04:44 -04:00
Edouard Oger 03513f17af Bug 1351104 part 4 - Sync the clients collection after an update. r=Grisha
MozReview-Commit-ID: 2NvrYEVL7ZZ

--HG--
extra : rebase_source : 2f104517f5dfd83f0f8530ff2ea4e3adb0ecd386
2017-06-13 16:01:33 -04:00
Edouard Oger 4d981374e4 Bug 1351104 part 3 - Refresh the FxA device list on client disconnected push notification. r=Grisha
MozReview-Commit-ID: IxpBxaBROGv

--HG--
extra : rebase_source : b7f25868991827eca2fb7d5dc3a713a63fda910d
2017-06-07 16:31:13 -04:00
Edouard Oger 5fccf18ee5 Bug 1351104 part 2 - Filter the clients list in Send Tab with the FxA device list. r=Grisha
MozReview-Commit-ID: KqSyWVfwva3

--HG--
extra : rebase_source : 49b3eadec9527bc51f99747bc9f5a2bc9f24822a
2017-06-07 16:24:30 -04:00
Edouard Oger 322ba44ea6 Bug 1351104 part 1 - Store the fxaDeviceId in the Clients database. r=Grisha
MozReview-Commit-ID: Hs25rAX6dIB

--HG--
extra : rebase_source : 15eb9bf8c3f088e9bdc454b625620b69effce591
2017-06-07 14:41:38 -04:00
Grigory Kruglov 933d747314 Bug 1365865 - Update set of default ciphers for API26+ r=nalexander
TLS_DHE_RSA_WITH_AES_128_CBC_SHA is no longer supported in API26+.

MozReview-Commit-ID: AtNf2xZh2Bz

--HG--
extra : rebase_source : fef7d2018e77a4a4a7594bf32de750c8fa39e2ea
2017-06-27 17:36:21 -04:00
friedger bd0bd7094d Bug 1217675 - Eliminate Honeycomb compatibility from Fennec code r=nalexander
Remove all references to Build.SDK_INT comparing 14 and lower

MozReview-Commit-ID: JdAjYvQ6mfX

--HG--
extra : rebase_source : f6cae8af84c26f42dcc02c133e7bc702f1af61e6
2017-06-10 08:57:55 +02:00
Grigory Kruglov 83aa322bb6 Bug 1229216 - Make Firefox Accounts "sign-in" flow default to sign-in, not registration r=nalexander
MozReview-Commit-ID: IM6FybTH6OX

--HG--
extra : rebase_source : 15fa2c0c535589c30599b2e34d22a689a46cc1bc
2017-06-09 14:27:31 -04:00
Grigory Kruglov 986de19758 Bug 1370221 - Don't try to serialize ExtendedJSONObject r=nalexander
MozReview-Commit-ID: 3Q4rD2Ljfc

--HG--
extra : rebase_source : 483dca7fe06acf1fbdcccfe9b9282041eeab2bf7
2017-06-06 14:15:31 -04:00
Grigory Kruglov 9c7b9b69cd Bug 1370656 - Don't re-use the same instance of TelemetryCollector between syncs r=nalexander
Parent class (FxAccountSyncAdapter) is essentially a singleton, and so we'd end up re-using class
fields between syncs, among them the collected telemetry data. It's cleaner and safer to move
ownership of TelemetryCollector into IntrumentedSessionCallback. With this change, telemetry
data is contained within and eventually emitted from a single owner object.

MozReview-Commit-ID: Abx13VmILcE

--HG--
extra : rebase_source : b68b44951361727015c2a10895e42f6a34806b27
2017-06-06 17:42:28 -04:00
Grigory Kruglov fd1e018417 Bug 1370111 - Post: More explicit global error handling for Sync Telemetry r=nalexander
While this patch does make it clearer that telemetry error handling could be factored better,
at least it gets us to a consistent usage pattern.

MozReview-Commit-ID: 4Oamt9D03Ue

--HG--
extra : rebase_source : da73247ae0a27ba6ae3d6ad0d8814c1e2249e722
2017-06-05 19:44:15 -04:00
Grigory Kruglov 3eecfb6932 Bug 1370111 - Set 'started' telemetry timestamp before attempting to talk to the Token Server r=nalexander
MozReview-Commit-ID: E0vN1NY10WA

--HG--
extra : rebase_source : fdf22f1cdc2a5eba3ada1339aeefcc23c2debfe7
2017-06-05 19:51:27 -04:00
Grigory Kruglov 30acdf7a94 Bug 1308337 - Post: Remove old background telemetry code r=nalexander
MozReview-Commit-ID: CONHqQWzB6c

--HG--
extra : rebase_source : d492bf600a105f8ae2ac57c9aea6a5fb1a55f4e7
2017-04-11 22:31:18 -04:00
Grigory Kruglov dc5518fc5c Bug 1308337 - Part 7: Instrument Crypto Keys stage r=nalexander
MozReview-Commit-ID: 8a9zKsdhkbv

--HG--
extra : rebase_source : c105a2a9b5fb7986c4114af21cb62e2c6abe23bd
2017-05-29 17:20:20 -04:00
Grigory Kruglov 77bca8c547 Bug 1308337 - Part 6: Instrument FetchInfoConfiguration stage r=nalexander
MozReview-Commit-ID: HvDWBVBxb5I

--HG--
extra : rebase_source : 5e884830eaf1004e98ec1f6bca923fc4c84d1068
2017-05-31 17:38:47 -04:00
Grigory Kruglov 31f9e82f6f Bug 1308337 - Part 5: Instrument FetchInfoCollectionsStage r=nalexander
MozReview-Commit-ID: 64jTO81tDpK

--HG--
extra : rebase_source : 801c9c27730c217c6cf2d6e2bf086ef78f36f3a4
2017-05-31 17:38:30 -04:00
Grigory Kruglov 627c7eaf6d Bug 1308337 - Part 4: Instrument FetchMetaGlobal stage r=nalexander
MozReview-Commit-ID: 6zXqgsAIajN

--HG--
extra : rebase_source : c4a10afafe83bbb404ad47a56b7c5c389c716dd6
2017-05-29 21:48:05 -04:00
Grigory Kruglov c4c33eaf1b Bug 1308337 - Part 3: Handle sync restarts during telemetry collection r=nalexander
The approach here is to simply mark current TelemetryCollector as having restarted.
The downside of this approach is that two technically separate syncs are combined into one
telemetry ping. However, the two syncs are logically connected to each other, and combining
their telemetry will make it easier to figure out why a restart occurred, as well as what
happened after the restart.

MozReview-Commit-ID: AtJbge2ulMz

--HG--
extra : rebase_source : 4f9efb83da8f31b2e0470df6538c67533872f23a
2017-05-30 19:46:31 -04:00
Grigory Kruglov 9535e628ad Bug 1308337 - Part 2: Instrument Clients engine r=nalexander
While this is a "named" stage, it doesn't follow the Repository<->Repository
semantics of other named stages, and so it needs to be instrumented separately.

MozReview-Commit-ID: IKrc5Fb1bYm

--HG--
extra : rebase_source : 59c83e44235101f76b42f0eced867ce7b9d5a464
2017-05-31 17:38:59 -04:00
Grigory Kruglov 1153de2299 Bug 1308337 - Part 1: Instrument named sync stages and broadcast collected telemetry r=nalexander
SyncAdapter owns a TelemetryCollector, which is passed into GlobalSession to be "filled up"
with telemtry data.

GlobalSession obtains instances of TelemetryStageCollector from the TelemetryCollector, and
passes them into individual stages. They are filled up with telemetry as stages are executed.

Stage errors are recorded in TelemetryStageCollector.
Various global errors are recorded in TelemetryCollector itself.

On completion (success, failure, abort), telemetry is "built" and broadcasted via LocalBroadcastManager.
TelemetryContract is used to establish a key convention between the "broadcaster" and whoever is
on the receiving end of this telemetry.

This patch instruments stages which follow the Repository<->Repository flow semantics. Other stages,
such as the clients stage, meta/globa, info/* and crypto/keys are instrumented separately in follow-up
patches.

MozReview-Commit-ID: 5VLRc96GLdV

--HG--
extra : rebase_source : 4c7a7e1fde2e32d401eb28c70b9f04fdbd148ffd
2017-05-31 17:38:14 -04:00
Grigory Kruglov cf21801c0a Bug 1308337 - Pre: Read hashedFxaUid from the token server r=nalexander
This is what we (and other platforms) use as part of telemetry payloads in place of either
our local FxA Device ID or the sync client ID.

Note that this server API is currently undocumented.
Parameter introduced in 2021994ca4

MozReview-Commit-ID: 64sY5RZ2ZxK

--HG--
extra : rebase_source : d1790feae1c0f46dc5f420aeed347da12a6ac85c
2017-05-26 17:44:42 -04:00
Grigory Kruglov 5e6e442c6e Bug 1308337 - Pre: Don't throw away store and fetch exceptions as they're encountered r=nalexander
We will need them later for telemetry reporting. For now we're just keeping the last exception which
we encountered (which agrees with desktop's behaviour), and Bug 1362208 explores follow-up work to
aggregate and count the exceptions as we see them.

MozReview-Commit-ID: 8yKkZVGJZ9e

--HG--
extra : rebase_source : 501ff746ecfb3022a0fe89844e307153bfdb5164
2017-05-26 17:44:27 -04:00
Grigory Kruglov 9c8d7b3d37 Bug 1308337 - Pre: More granular tracking of record flow between repositories r=nalexander
This patch:
- introduces a way to signal that a record has been reconciled; this is not a "flow control"
  event type, and must be used in addition to regular "recordStored" delegate call
- draws a clearer distinction between "attempted to store" and "stored, as reported by session's storage layer"

MozReview-Commit-ID: 99UbUJzu57w

--HG--
extra : rebase_source : d7424fec748b9a2d07d1c98b78ce89fd418750e4
2017-05-26 17:34:07 -04:00
Grigory Kruglov fdb45b29fc Bug 1308337 - Pre: clean up wrong annotation r=nalexander
It's not just used for testing, and annotation is causing IDE to highlight its uses in code as invalid.

MozReview-Commit-ID: JvzX2VgNKom

--HG--
extra : rebase_source : a16933121371818307329523916d35e82b2446c9
2017-04-11 22:22:28 -04:00
udara cd5f595a60 Bug 1367533 - Remove extra error logging during device disconnect on Android. r=eoger
MozReview-Commit-ID: wonLHOwwzP

--HG--
extra : rebase_source : 01a0723c88de1f45c57e0a8576f3f8e8304d5fec
2017-05-24 15:47:57 -04:00
Edouard Oger 37008cf22a Bug 1361534 - Fix typo in AndroidFxAccount. r=eoger
MozReview-Commit-ID: EhMWO9jmLJ8

--HG--
extra : rebase_source : 1ebf2aa1d3b51a53377f5c4e42c6ce2ed8cd8b26
2017-05-02 18:52:21 -04:00
Andrzej Hunt 135c35d919 Bug 1356693 - infer: fix RESOURCE_LEAK's in services r=Grisha
The primary issue is that we use a throwing InputStreamReader
constructor. If it throws, then any nested streams will be lost.
We can fix that by using the non-throwing InputStreamReader
constructor (which uses a Charset as the second parameter,
instead of a String which causes an Exception to be thrown
if it can't be parsed)

We also simplify some nested Stream's a little: most of the
Stream constructors don't throw, so there's no harm in not keeping
individual references to those that don't throw - and that
results in less Stream references for us to handle.

MozReview-Commit-ID: 2hyRFGVmGnU

--HG--
extra : rebase_source : 9d2b25997e0f71089c0ef56c0069cafe068f821e
2017-04-14 20:58:59 -07:00
Carsten "Tomcat" Book d7e4098cb8 Backed out changeset 6d26ad68f31f (bug 1356693)
--HG--
extra : rebase_source : 2f0adc16fa93b32d8183fa51b36cbb02e95597bd
2017-04-27 15:19:50 +02:00
Andrzej Hunt 1c5d02830f Bug 1356693 - infer: fix RESOURCE_LEAK's in services r=Grisha
The primary issue is that we use a throwing InputStreamReader
constructor. If it throws, then any nested streams will be lost.
We can fix that by using the non-throwing InputStreamReader
constructor (which uses a Charset as the second parameter,
instead of a String which causes an Exception to be thrown
if it can't be parsed)

We also simplify some nested Stream's a little: most of the
Stream constructors don't throw, so there's no harm in not keeping
individual references to those that don't throw - and that
results in less Stream references for us to handle.

MozReview-Commit-ID: 2hyRFGVmGnU

--HG--
extra : rebase_source : 15dd97d28012a017326b01ae8ddc370c7f1ec484
2017-04-14 20:58:59 -07:00
Edouard Oger 027e105cad Bug 1351805 part 3 - Refresh the remote devices list on Married/Engaged states. r=Grisha
MozReview-Commit-ID: 1Ktbtlzc1fI

--HG--
extra : rebase_source : 0d17b41e17b01f65d38be93b7b01be056c75f652
2017-04-19 17:45:49 -04:00
Edouard Oger 61034e9bd7 Bug 1351805 part 1 - Create a org.mozilla.gecko.fxa.devices package. r=Grisha,nalexander
MozReview-Commit-ID: FjJmRiHlqEg

--HG--
extra : rebase_source : 0342756d408c89c82e2afbf3c561fd2efad9cb4f
2017-04-07 11:56:38 -04:00
Wes Kocher c9b3f40856 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 dd3f4bde18 Bug 1351805 part 3 - Refresh the remote devices list on Married/Engaged states. r=Grisha
MozReview-Commit-ID: 1Ktbtlzc1fI

--HG--
extra : rebase_source : 2d52926ee1ba8511a32b5a9cfdc13cd04ef4bbb8
2017-04-19 17:45:49 -04:00
Edouard Oger 96c75ddc3d Bug 1351805 part 1 - Create a org.mozilla.gecko.fxa.devices package. r=Grisha,nalexander
MozReview-Commit-ID: FjJmRiHlqEg

--HG--
extra : rebase_source : 0342756d408c89c82e2afbf3c561fd2efad9cb4f
2017-04-07 11:56:38 -04:00
Edouard Oger 73ec204121 Bug 1349299 - Register device on FxA even on Push registration failure. r=Grisha
MozReview-Commit-ID: 3qDkm9iV9C0

--HG--
extra : rebase_source : 907538907f43fb911ad28222ceecdc38fb2feb24
2017-04-06 11:30:23 -04:00
Grigory Kruglov 68882a5021 Bug 1335198 - Add support for synchronizing bookmark creation date r=rnewman
Incoming records might be missing the dateAdded field, and so we perform some pre-processing:
- during reconciliation, dateAdded is set to the lowest of (remote lastModified, remote dateAdded, local dateAdded)
- during insertion, if dateAdded is missing it is set to lastModified

Whenever we modify dateAdded for a record during sync, we also bump its lastModified value. This will trigger an
upload of this record, and consequently a re-upload by clients which are able to provide an older dateAdded value.
It is possible that this might cause conflicts on other devices, but the expected likelyhood of that happening is low.


MozReview-Commit-ID: 3tDeXKSBgrO

--HG--
extra : rebase_source : 26cb13838df7a4adb6d4fe3c51f0ecf3fd2eda95
2017-04-18 18:04:45 -04:00
Grigory Kruglov 626ce95975 Bug 1350442 - Remove redundant storeDone from the RepositorySession class r=rnewman
Confusion between storeDone() and storeDone(long end) resulted in certain sessions (bookmarks
and form history) not overriding the current method. As a result, their final "flush the queue"
methods weren't being called by the buffering middleware.

This patch removes the storeDone(long end) method, making such confusion a non-issue.

Given that a lot of sessions tend to build up buffers which they need to then flush after a storeDone()
call, passing in a timestamp into that method doesn't make sense. Instead, let's supply a default
implementation in RepositorySession which calls onStoreCompleted(endTimestamp) with current time,
and allow sessions to override this method and own the onStoreCompleted(endTimestamp) call.

MozReview-Commit-ID: 84o7aAL8RPC

--HG--
extra : rebase_source : 41767ad502bd5ad8a0a487235bfdca8cf0d0c927
2017-03-31 19:00:13 -04:00
Grigory Kruglov 9d248590c8 Bug 1350442 - Use the main storeWorkQueue for failures in the buffering middleware r=rnewman
MozReview-Commit-ID: ByZtR5zSKZB

--HG--
extra : rebase_source : 9cef0ba0c76e0ef11a32585f1c73508f87337a02
2017-04-04 17:15:02 -04:00
Grigory Kruglov 2a7dc44081 Bug 1343726 - Ensure that bookmark folders are processed first by the uploader r=rnewman
Since we're uploading records atomically, order in which they're processed by the uploader
only matters if we want to do sanity checks on certain types of records. Server might still
preserve some of the order, but for our purposes here it shouldn't matter.

We'd like to ensure that we process the "mobile root" bookmark record along with other folder
records first, so that we increase our chances of avoiding making a failing network request if
that those records' payload is too large.

Sorting by bookmark type achieves this.

MozReview-Commit-ID: KrAs3zepaOk

--HG--
extra : rebase_source : 24f1d3d6aa2ee3b6777dc38abdd1e01aba5213c2
2017-03-15 14:12:13 -07:00
Grigory Kruglov b7266cbba2 Bug 1343726 - Respect max_record_payload_bytes limit while uploading records r=rnewman
If we try to upload a record whose payload BSO field is larger than the limit specified
by the server, fail that record during BatchingUploader's processing.

Consequently, Synchronizer will fail current sync stage and advance to the next.

Previous behaviour was to essentially rely on the server to fail our POST request,
at which point we'll fail current sync stage. So in a way, this is an optimization to
avoid making network requests which we know will fail.

MozReview-Commit-ID: 5aJRRNoUuXe

--HG--
extra : rebase_source : 18920cfe7b7599be1984c53ebc0c9897c98fb7d9
2017-03-15 13:51:31 -07:00
Grigory Kruglov a8810d8865 Bug 1352608 - Close a cursor after we're done with it r=eoger
Removed "final" because "safeQuery" provides terrible developer ergonomics.

MozReview-Commit-ID: 2F0XZnBM3Yv

--HG--
extra : rebase_source : 634c6f8cfc14cce8d15e2911d474086dc85c6db4
2017-03-31 20:22:06 -04:00
Ryan VanderMeulen f4a0d77ffc Merge inbound to m-c. a=merge 2017-03-29 09:41:54 -04:00
Grigory Kruglov 7443c95aab Bug 1350196 - Part 2: Perform PRNGFixes earlier. r=rnewman, r=nalexander
MozReview-Commit-ID: 18jnRRFhyPq

--HG--
extra : rebase_source : 703dd7ab2d67e522d36130fe1815c5d2610827de
2017-03-27 18:32:54 -07:00
Grigory Kruglov 719d2c720d Bug 1350196 - Part 1: Generate IV ourselves. r=rnewman, r=nalexander
MozReview-Commit-ID: 5rR8BQRcJoR

--HG--
extra : rebase_source : 0d474e3818f8b5abfd6c5904473cf3801a98b1cb
2017-03-27 18:40:02 -07:00
Edouard Oger 466b73fea5 Bug 1346061 part 3 - Trigger a sync/email-verification-check on empty FxA push message. r=Grisha,nalexander
MozReview-Commit-ID: ABUm6LZij4M

--HG--
extra : rebase_source : 4818f95bf7dbe3f1c9891f3aeb7ade4c83d58870
2017-03-22 13:10:09 -04:00
Edouard Oger 965ba52d24 Bug 1346061 part 2 - Register device on FxA on Engaged state. r=Grisha,nalexander
MozReview-Commit-ID: 3HrXePgBxg6

--HG--
extra : rebase_source : ba6f805c4f313a8c317dd71fa34511c4544f0a54
2017-03-22 13:11:34 -04:00
Edouard Oger b2e227a8e3 Bug 1346061 part 1 - Expose getSessionToken() on State. r=Grisha,nalexander
We need to access sessionToken in the Engaged state in order to perform device
registration. We expose getSessionToken() on the base State class, to allow
customers to get the sessionToken easily instead of having to downcast the
TokensAndKeysState/Engaged states.

MozReview-Commit-ID: 8s2C350noUG

--HG--
extra : rebase_source : e0bc8bf7ebfdcb7a31bb4a6ddb5b928acf7baba9
2017-03-22 13:07:00 -04:00
Edouard Oger b52bdd3388 Bug 1265314 - Set tabs record lastModified to clients.lastModified. r=nalexander
MozReview-Commit-ID: 84g7WXxRwdX

--HG--
extra : rebase_source : 3b041d9f3cb0b9285b5e7bad66a8f14f9c71410e
2017-03-24 15:40:34 -04:00
Grigory Kruglov e7b03d35b1 Bug 1346438 - Specify X-I-U-S header value as 0 when uploading crypto/keys r=nalexander
MozReview-Commit-ID: GTcZUdvVU8E

--HG--
extra : rebase_source : 14318877ae4d52384090e99e7668e1deb19f3408
2017-03-17 19:09:43 -07:00
Grigory Kruglov 8009760a1c Bug 1346438 - Specify X-I-U-S header value while uploading meta/global r=nalexander
We upload meta/global in three scenarios:
- fresh start
- when it was modified after a successful sync
- when it was modified after an aborted sync

Use X-I-U-S header to assert what we believe about meta/global's presence (during freshStart)
and last-modified timestamp (in all other cases).

We might encounter a concurrent modification condition, manifesting as a 412 error. If we see such an error:
- on fresh start, we restart globalSession
- on regular upload, we request a re-sync of all stages

MozReview-Commit-ID: 3qyb6rUSOeY

--HG--
extra : rebase_source : 166be44aceb634b4e9fa3a8e20f7047cfec2af54
2017-03-20 16:40:13 -07:00
Edouard Oger ec0e5f70b8 Bug 1254643 - Delete FxA device when Fennec Firefox Account is removed. r=Grisha
MozReview-Commit-ID: H4lJlXGYIBg

--HG--
extra : rebase_source : f5862b9591def7ee300c6f02ff7750ead043241a
2017-03-13 14:35:41 -04:00
Grigory Kruglov 4d75d6610b Bug 1346390 - Use Long.parseLong instead of Long.valueOf for efficiency r=nalexander
MozReview-Commit-ID: 29fwjlxRqZ3

--HG--
extra : rebase_source : 6f23bf647d8547a2f711d418ba2801c5059e0ab8
2017-03-10 13:17:51 -08:00
Grigory Kruglov 9c2a8e93e0 Bug 1329793 - Re-subscribe for a push channel periodically r=eoger,nalexander
On startup and at the beginning of a sync we check how long it has been since we've subscribed
to a channel for fxa service. If it's been over 21 days, request re-subscription.

MozReview-Commit-ID: GzvPecZ9hTy

--HG--
extra : rebase_source : d0292acddbdd231502808469d4e5502a4ac93779
2017-03-08 18:14:43 -08:00
Grisha Kruglov 8e54812b61 Bug 1291821 - Post: remove unused files r=rnewman
MozReview-Commit-ID: 4qM5vx4AQyQ

--HG--
extra : rebase_source : 5428e67f40947d58521b635cda86121d21ebe275
2016-11-29 13:36:26 -08:00
Grisha Kruglov 283d1a3450 Bug 1291821 - Allow BatchingDownloader to resume downloads using offset r=rnewman
BatchingDownloader uses provided RepositoryStateProvider instance in order to track
offset and high water mark as it performs batching.

The state holder objects are initialized by individual ServerSyncStages, and prefixes are used to ensure keys
won't clash.

Two RepositoryStateProvider implementations are used: persistent and non-persistent. Non-persistent
state provider does not allow for resuming after a sync restart, while persistent one does.

Persistent state provider is used by the history stage. It is fetched oldest-first, and records are applied
to live storage as they're downloaded. These conditions let use resume downloads. It's also possible to
resume downloads for stages which use a persistent buffer, but currently we do not have any.

Offset value and its context is reset if we hit a 412 error; it is maintained if we hit a sync deadline, allowing us to
minimize number of records we'll redownload. BatchingDownloaderController owns resuming and context checking logic.

High water mark (h.w.m.) is maintained across syncs and used instead of stage's "last-synced" timestamp if said stage is
set to fetch oldest-first and explicitely allows use of a h.w.m. Server15RepositorySession provides correct timestamp
to RecordsChannel, decoupling BatchingDownloader from this logic.

MozReview-Commit-ID: IH28YrDU4vW

--HG--
extra : rebase_source : 63bd7daaa1fd2a63e10289d6d4cd198aaf81498b
2017-01-19 13:11:18 -08:00
Grisha Kruglov 976fe61ec1 Bug 1291821 - Track incomplete stages and re-sync them r=rnewman
Stage re-sync is requested if:
- We hit a 412 either during batching download or batching upload
- We hit a sync deadline either during batching download or when merging records from the buffer

SessionStoreDelegate interface was expanded with onStoreFailed,
indicating that not just a particular record failed, but the whole operation did.

onFetchFailed is used to inform delegates of 412/deadline failures during downloads.
Three new exception types were added, to facilitated messaging between different layers.

MozReview-Commit-ID: Ltdi5noEvdV

--HG--
extra : rebase_source : 9d4af039198b9bc92fbbf25cf8e3d32375a2ab26
2017-02-24 13:04:54 -08:00
Grisha Kruglov 29a79ad111 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

--HG--
extra : rebase_source : 280d468ef9b57163a178e42707aee610977625c4
2016-11-29 13:42:53 -08:00
Grisha Kruglov 277bfc33aa Bug 1291821 - Rename repositories/sessions r=rnewman
We're at Sync 1.5 now, so might as well rename the files.

Also, renamed the ConstrainedRepository... to a name that's more reflective
of that session's role after the changes.

MozReview-Commit-ID: 96XCzoBzD5D

--HG--
rename : mobile/android/services/src/main/java/org/mozilla/gecko/sync/Server11PreviousPostFailedException.java => mobile/android/services/src/main/java/org/mozilla/gecko/sync/Server15PreviousPostFailedException.java
rename : mobile/android/services/src/main/java/org/mozilla/gecko/sync/Server11RecordPostFailedException.java => mobile/android/services/src/main/java/org/mozilla/gecko/sync/Server15RecordPostFailedException.java
rename : mobile/android/services/src/main/java/org/mozilla/gecko/sync/repositories/ConstrainedServer11Repository.java => mobile/android/services/src/main/java/org/mozilla/gecko/sync/repositories/ConfigurableServer15Repository.java
rename : mobile/android/services/src/main/java/org/mozilla/gecko/sync/repositories/Server11Repository.java => mobile/android/services/src/main/java/org/mozilla/gecko/sync/repositories/Server15Repository.java
rename : mobile/android/services/src/main/java/org/mozilla/gecko/sync/repositories/Server11RepositorySession.java => mobile/android/services/src/main/java/org/mozilla/gecko/sync/repositories/Server15RepositorySession.java
rename : mobile/android/tests/background/junit4/src/org/mozilla/android/sync/net/test/TestServer11Repository.java => mobile/android/tests/background/junit4/src/org/mozilla/android/sync/net/test/TestServer15Repository.java
rename : mobile/android/tests/background/junit4/src/org/mozilla/android/sync/test/TestServer11RepositorySession.java => mobile/android/tests/background/junit4/src/org/mozilla/android/sync/test/TestServer15RepositorySession.java
extra : rebase_source : 96f7211951611ce7785edbef9dce412accb2878d
2017-02-24 13:04:15 -08:00
Grisha Kruglov 0311f49437 Bug 1291821 - Ensure sink repository is aware of new events coming from the source r=rnewman
MozReview-Commit-ID: DgqGzfoJxhj

--HG--
extra : rebase_source : da0d451422e4733e5a6ab8a4558150197f08c253
2016-10-11 20:00:09 -07:00
Grisha Kruglov 1020737f7f Bug 1291821 - Split history stage into recent and full history stages r=rnewman
Recent history stage will only run if full history stage did not complete yet.
Bug 1316110 tracks follow up work to make this more efficient.

MozReview-Commit-ID: 7dtbfEFUMGB

--HG--
extra : rebase_source : 94a3e652d9dcf7996e14b96aee28810baee078ea
2016-11-16 14:53:07 -08:00
Grisha Kruglov 5632261a6b Bug 1291821 - Wrap local repositories in buffering middleware r=rnewman
History stage does not wrap history respository in a buffer, because we'd like to
use a high-water-mark and offset resuming later on, and using a persistent buffer
for this stage does not make sense.

MozReview-Commit-ID: FS1swml2bIC

--HG--
extra : rebase_source : be197e0459d86a320076174936cea8ee76e1dbed
2016-10-20 16:31:31 -07:00
Grisha Kruglov dc5b52e557 Bug 1291821 - Use sync deadline to decide of batching downloader should proceed r=rnewman
MozReview-Commit-ID: IDgIj9lBt61

--HG--
extra : rebase_source : a3d1773abb50748631e28c0aa14797b17b857def
2016-11-01 18:52:18 -07:00
Grisha Kruglov 2c49e9087a Bug 1291821 - Keep track of sync deadline r=rnewman
MozReview-Commit-ID: Fvuc05K1arV

--HG--
extra : rebase_source : 74b0d4dc58c0cd2c1113253eee28ba783e114803
2016-11-08 12:38:00 -08:00
Grisha Kruglov 2b78e4d632 Bug 1291821 - Remove total sync limits, refactor batching downloader r=rnewman
MozReview-Commit-ID: 2SYxemfTv9V

--HG--
extra : rebase_source : 1c795598a9c4d9c7538c740a89a8867dc32bdca1
2016-10-20 13:34:06 -07:00
Grisha Kruglov f5cae92f97 Bug 1291821 - Decouple BatchingUploader from Server11Repository r=rnewman
MozReview-Commit-ID: 7mPy1cmr3vq

--HG--
extra : rebase_source : 0f48a86e5d6861ffc217bd8c69c154e37c6fd871
2016-11-01 18:55:15 -07:00
Grisha Kruglov 18478e0806 Bug 1291821 - Simplify onFetchFailed, clean up some exception code r=rnewman
MozReview-Commit-ID: 11sIAPCfLWk

--HG--
extra : rebase_source : fb565ed391b721f485f9be74ec3a7986bbc1dfd6
2016-10-11 19:29:46 -07:00
Grisha Kruglov eb469c632e Bug 1291821 - Add onBatchComplete to a FetchRecordsDelegate r=rnewman
Intended to signal that a group of records have been fetched, and more are
to come after a pause.

MozReview-Commit-ID: 8ozZTc6aNdA

--HG--
extra : rebase_source : e2fdf70d6db6e242e65b788dcb6a09f975b5124b
2016-10-11 19:29:02 -07:00
Grisha Kruglov 3a6788a0df Bug 1291821 - Rename RepositorySession's delegate to storeDelegate, for clarity r=rnewman
Otherwise we often end up with delegate meaning both fetch delegate and store delegate
in extending classes, which gets a little confusing.

MozReview-Commit-ID: L4Sd79jLr88

--HG--
extra : rebase_source : c8df4e2ea373dd415e1c113ccf37c09e392a5302
2016-10-08 17:03:38 -07:00
Grisha Kruglov f12e7032ca Bug 1291821 - Switch stage duration interval counting to use elapsedRealtime r=rnewman
It is a better fit for interval counting.

MozReview-Commit-ID: LCF0U24MAwF

--HG--
extra : rebase_source : e8a1f4d7d000194f415e882c137cda2b15a0b7b3
2016-10-08 15:28:14 -07:00
Grisha Kruglov 481be98952 Bug 1291821 - Buffering repository middleware r=rnewman
MozReview-Commit-ID: GS3M7k670Po

--HG--
extra : rebase_source : 1b3f102b011fe171f8cafab0cf47ca69b2eb9b93
2017-01-19 13:11:41 -08:00
Grisha Kruglov c9b5e4ff48 Bug 1291821 - Add storeIncomplete to RepositorySession interface r=rnewman
MozReview-Commit-ID: 68ty7KlP5NR

--HG--
extra : rebase_source : b4ae0a3c286963f4c476c7c0ed768ad5a2b5bb8b
2016-11-02 16:40:15 -07:00
Grisha Kruglov 6052f6ca4c Bug 1291821 - Pre: remove unused SerialRecordConsumer r=rnewman
MozReview-Commit-ID: 3fiHVErUA1g

--HG--
extra : rebase_source : d23b3f157fe7cf42e30a40c034970a355098c68c
2016-10-08 14:49:46 -07:00
Grigory Kruglov 6aca49eb8a Bug 1336001 - Refactor BatchingUploader's state-holder objects to fix threading problems r=rnewman
Previous state:
- Two threads were racing to get to batchMeta - one to reset its state, and the other to
read its internal state to construct a network request, and then to update its internal state.
- This resulted in data corruption when payloads had to be split into multiple batches.

A core problem was that there is a lot of state shared across thread boundaries. Specifically,
BatchMeta is being written and read both by record consumer threads running off of a thread pool,
and by the network worker thread(s).

This patch refactors BatchMeta and scheduling of network runnables to ensure that cross-thread access
is minimized, and "who owns/accesses what" is explicit.

- PayloadDispatcher owns scheduling payload runnables and any data they need to share between each other.
- UploaderMeta owns information that's necessary to process incoming records.


MozReview-Commit-ID: 9hFs3fXGaGM

--HG--
rename : mobile/android/services/src/main/java/org/mozilla/gecko/sync/repositories/uploaders/BatchMeta.java => mobile/android/services/src/main/java/org/mozilla/gecko/sync/repositories/uploaders/UploaderMeta.java
rename : mobile/android/tests/background/junit4/src/org/mozilla/gecko/sync/repositories/uploaders/BatchMetaTest.java => mobile/android/tests/background/junit4/src/org/mozilla/gecko/sync/repositories/uploaders/UploaderMetaTest.java
extra : rebase_source : f0f1a05f19f40a6514d4f0dac9d531b086c3f3ed
2017-02-22 11:26:35 -08:00
Carsten "Tomcat" Book eb91cb7ec4 Merge mozilla-central to autoland 2017-02-22 14:47:47 +01:00
Grigory Kruglov 11a71d0abd Bug 1341125 - Clear accounts in-memory cache when necessary. r=nalexander
MozReview-Commit-ID: sf5WhXxRVg
2017-02-21 11:31:22 -08:00
Sean Maltby 40f095b3eb Bug 1317643 - Resolved issue where the avatar icon resets to default. r=maliu
When debug mode is toggled, hardRefresh() is called, removing and adding all preferences. However, profileAvatarTarget wasn't being updated with the new instance of profilePreference. This was resolved by moving the creation of profileAvatarTarget to refresh(), which is called in hardRefresh().

MozReview-Commit-ID: 8raarHbmR23

--HG--
extra : rebase_source : cf0bf90ca67b4e5dd322af25ed16ac43116fafd1
2017-01-21 19:03:02 -05:00
Wes Kocher 836bb052d3 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 4fe7cf54b6 Bug 1336734 - Part 2 - Implement GeckoActivityStatus for the FxAccountStatusActivity. r=sebastian
Since we're no longer pausing Gecko when entering this activity, it must implement this interface so we can still properly pause Gecko if we get backgrounded while on the Sync preferences screen.

Most actions here are actually done via the application context (i.e. GeckoApplication), so overriding startActivity et al. and using mGeckoActivityOpened doesn't achieve all that much for most cases, but since we currently at most exit the screen (activity is finishing, so won't trigger a GeckoThread.onPause() call) and stay within our application (open a new tab in Firefox), we're still fine for now.

MozReview-Commit-ID: 3760hXMjckX

--HG--
extra : rebase_source : 026654ca101082140f9fbbc922562f9890daab50
2017-02-06 20:30:20 +01:00