зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1497977 p5 - Flag local client record for upload on fxa device id change. r=nalexander
Depends on D8610 Differential Revision: https://phabricator.services.mozilla.com/D8611 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
f21637ae6a
Коммит
171423c58a
|
@ -571,7 +571,18 @@ public class SyncClientsEngineStage extends AbstractSessionManagingSyncStage {
|
|||
protected void handleDownloadedLocalRecord(ClientRecord r) {
|
||||
session.config.persistServerClientRecordTimestamp(r.lastModified);
|
||||
|
||||
if (!getLocalClientVersion().equals(r.version) ||
|
||||
final Context context = session.getContext();
|
||||
final Account account = FirefoxAccounts.getFirefoxAccount(context);
|
||||
String fxaDeviceId;
|
||||
if (account != null) {
|
||||
final AndroidFxAccount fxAccount = new AndroidFxAccount(context, account);
|
||||
fxaDeviceId = fxAccount.getDeviceId();
|
||||
} else {
|
||||
fxaDeviceId = null;
|
||||
}
|
||||
|
||||
if (!TextUtils.equals(r.fxaDeviceId, fxaDeviceId) ||
|
||||
!getLocalClientVersion().equals(r.version) ||
|
||||
!getLocalClientProtocols().equals(r.protocols)) {
|
||||
shouldUploadLocalRecord = true;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче