From 96c75ddc3d8668080f2f8cb2041764cfe42d8ef4 Mon Sep 17 00:00:00 2001 From: Edouard Oger Date: Fri, 7 Apr 2017 11:56:38 -0400 Subject: [PATCH] Bug 1351805 part 1 - Create a org.mozilla.gecko.fxa.devices package. r=Grisha,nalexander MozReview-Commit-ID: FjJmRiHlqEg --HG-- extra : rebase_source : 0342756d408c89c82e2afbf3c561fd2efad9cb4f --- mobile/android/base/android-services.mozbuild | 4 ++-- .../android/base/java/org/mozilla/gecko/AccountsHelper.java | 1 - .../android/base/java/org/mozilla/gecko/push/PushService.java | 2 +- .../org/mozilla/gecko/background/fxa/FxAccountClient.java | 2 +- .../org/mozilla/gecko/background/fxa/FxAccountClient20.java | 2 +- .../org/mozilla/gecko/fxa/{ => devices}/FxAccountDevice.java | 2 +- .../gecko/fxa/{ => devices}/FxAccountDeviceRegistrator.java | 2 +- .../java/org/mozilla/gecko/fxa/sync/FxAccountSyncAdapter.java | 3 +-- .../gecko/sync/SharedPreferencesClientsDataDelegate.java | 1 - .../fxa/{ => devices}/TestFxAccountDeviceRegistrator.java | 2 +- .../src/org/mozilla/gecko/fxa/login/MockFxAccountClient.java | 3 +-- 11 files changed, 10 insertions(+), 14 deletions(-) rename mobile/android/services/src/main/java/org/mozilla/gecko/fxa/{ => devices}/FxAccountDevice.java (98%) rename mobile/android/services/src/main/java/org/mozilla/gecko/fxa/{ => devices}/FxAccountDeviceRegistrator.java (99%) rename mobile/android/tests/background/junit4/src/org/mozilla/gecko/fxa/{ => devices}/TestFxAccountDeviceRegistrator.java (99%) diff --git a/mobile/android/base/android-services.mozbuild b/mobile/android/base/android-services.mozbuild index 04f1c73c7d28..adf93a62b66e 100644 --- a/mobile/android/base/android-services.mozbuild +++ b/mobile/android/base/android-services.mozbuild @@ -831,10 +831,10 @@ sync_java_files = [TOPSRCDIR + '/mobile/android/services/src/main/java/org/mozil 'fxa/authenticator/FxAccountLoginDelegate.java', 'fxa/authenticator/FxAccountLoginException.java', 'fxa/authenticator/FxADefaultLoginStateMachineDelegate.java', + 'fxa/devices/FxAccountDevice.java', + 'fxa/devices/FxAccountDeviceRegistrator.java', 'fxa/FirefoxAccounts.java', 'fxa/FxAccountConstants.java', - 'fxa/FxAccountDevice.java', - 'fxa/FxAccountDeviceRegistrator.java', 'fxa/FxAccountPushHandler.java', 'fxa/login/BaseRequestDelegate.java', 'fxa/login/Cohabiting.java', diff --git a/mobile/android/base/java/org/mozilla/gecko/AccountsHelper.java b/mobile/android/base/java/org/mozilla/gecko/AccountsHelper.java index 2d1539792a68..9d8ad3afc201 100644 --- a/mobile/android/base/java/org/mozilla/gecko/AccountsHelper.java +++ b/mobile/android/base/java/org/mozilla/gecko/AccountsHelper.java @@ -19,7 +19,6 @@ import org.json.JSONException; import org.mozilla.gecko.background.fxa.FxAccountUtils; import org.mozilla.gecko.fxa.FirefoxAccounts; import org.mozilla.gecko.fxa.FxAccountConstants; -import org.mozilla.gecko.fxa.FxAccountDeviceRegistrator; import org.mozilla.gecko.fxa.authenticator.AndroidFxAccount; import org.mozilla.gecko.fxa.login.Engaged; import org.mozilla.gecko.fxa.login.State; diff --git a/mobile/android/base/java/org/mozilla/gecko/push/PushService.java b/mobile/android/base/java/org/mozilla/gecko/push/PushService.java index 03db25dfda06..f60a499509b3 100644 --- a/mobile/android/base/java/org/mozilla/gecko/push/PushService.java +++ b/mobile/android/base/java/org/mozilla/gecko/push/PushService.java @@ -25,7 +25,7 @@ import org.mozilla.gecko.TelemetryContract; import org.mozilla.gecko.annotation.ReflectionTarget; import org.mozilla.gecko.db.BrowserDB; import org.mozilla.gecko.fxa.FxAccountConstants; -import org.mozilla.gecko.fxa.FxAccountDeviceRegistrator; +import org.mozilla.gecko.fxa.devices.FxAccountDeviceRegistrator; import org.mozilla.gecko.fxa.FxAccountPushHandler; import org.mozilla.gecko.fxa.authenticator.AndroidFxAccount; import org.mozilla.gecko.fxa.login.State; diff --git a/mobile/android/services/src/main/java/org/mozilla/gecko/background/fxa/FxAccountClient.java b/mobile/android/services/src/main/java/org/mozilla/gecko/background/fxa/FxAccountClient.java index 5ef203abd4cb..3807cb277272 100644 --- a/mobile/android/services/src/main/java/org/mozilla/gecko/background/fxa/FxAccountClient.java +++ b/mobile/android/services/src/main/java/org/mozilla/gecko/background/fxa/FxAccountClient.java @@ -8,7 +8,7 @@ import org.mozilla.gecko.background.fxa.FxAccountClient20.AccountStatusResponse; import org.mozilla.gecko.background.fxa.FxAccountClient20.RecoveryEmailStatusResponse; import org.mozilla.gecko.background.fxa.FxAccountClient20.RequestDelegate; import org.mozilla.gecko.background.fxa.FxAccountClient20.TwoKeys; -import org.mozilla.gecko.fxa.FxAccountDevice; +import org.mozilla.gecko.fxa.devices.FxAccountDevice; import org.mozilla.gecko.sync.ExtendedJSONObject; import java.util.List; diff --git a/mobile/android/services/src/main/java/org/mozilla/gecko/background/fxa/FxAccountClient20.java b/mobile/android/services/src/main/java/org/mozilla/gecko/background/fxa/FxAccountClient20.java index 8c3dd3950c13..b11df5177e75 100644 --- a/mobile/android/services/src/main/java/org/mozilla/gecko/background/fxa/FxAccountClient20.java +++ b/mobile/android/services/src/main/java/org/mozilla/gecko/background/fxa/FxAccountClient20.java @@ -13,7 +13,7 @@ import org.mozilla.gecko.background.fxa.FxAccountClientException.FxAccountClient import org.mozilla.gecko.background.fxa.FxAccountClientException.FxAccountClientRemoteException; import org.mozilla.gecko.fxa.FxAccountConstants; import org.mozilla.gecko.Locales; -import org.mozilla.gecko.fxa.FxAccountDevice; +import org.mozilla.gecko.fxa.devices.FxAccountDevice; import org.mozilla.gecko.sync.ExtendedJSONObject; import org.mozilla.gecko.sync.Utils; import org.mozilla.gecko.sync.crypto.HKDF; diff --git a/mobile/android/services/src/main/java/org/mozilla/gecko/fxa/FxAccountDevice.java b/mobile/android/services/src/main/java/org/mozilla/gecko/fxa/devices/FxAccountDevice.java similarity index 98% rename from mobile/android/services/src/main/java/org/mozilla/gecko/fxa/FxAccountDevice.java rename to mobile/android/services/src/main/java/org/mozilla/gecko/fxa/devices/FxAccountDevice.java index e8a1fa57b12d..91a2ecbd5f55 100644 --- a/mobile/android/services/src/main/java/org/mozilla/gecko/fxa/FxAccountDevice.java +++ b/mobile/android/services/src/main/java/org/mozilla/gecko/fxa/devices/FxAccountDevice.java @@ -2,7 +2,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.mozilla.gecko.fxa; +package org.mozilla.gecko.fxa.devices; import org.mozilla.gecko.sync.ExtendedJSONObject; diff --git a/mobile/android/services/src/main/java/org/mozilla/gecko/fxa/FxAccountDeviceRegistrator.java b/mobile/android/services/src/main/java/org/mozilla/gecko/fxa/devices/FxAccountDeviceRegistrator.java similarity index 99% rename from mobile/android/services/src/main/java/org/mozilla/gecko/fxa/FxAccountDeviceRegistrator.java rename to mobile/android/services/src/main/java/org/mozilla/gecko/fxa/devices/FxAccountDeviceRegistrator.java index 75b4b8d59eb3..2ec3420e25db 100644 --- a/mobile/android/services/src/main/java/org/mozilla/gecko/fxa/FxAccountDeviceRegistrator.java +++ b/mobile/android/services/src/main/java/org/mozilla/gecko/fxa/devices/FxAccountDeviceRegistrator.java @@ -2,7 +2,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.mozilla.gecko.fxa; +package org.mozilla.gecko.fxa.devices; import android.content.Context; import android.content.Intent; diff --git a/mobile/android/services/src/main/java/org/mozilla/gecko/fxa/sync/FxAccountSyncAdapter.java b/mobile/android/services/src/main/java/org/mozilla/gecko/fxa/sync/FxAccountSyncAdapter.java index 83d629eb1e44..b967e5c149f8 100644 --- a/mobile/android/services/src/main/java/org/mozilla/gecko/fxa/sync/FxAccountSyncAdapter.java +++ b/mobile/android/services/src/main/java/org/mozilla/gecko/fxa/sync/FxAccountSyncAdapter.java @@ -22,7 +22,7 @@ import org.mozilla.gecko.background.fxa.SkewHandler; import org.mozilla.gecko.browserid.JSONWebTokenUtils; import org.mozilla.gecko.fxa.FirefoxAccounts; import org.mozilla.gecko.fxa.FxAccountConstants; -import org.mozilla.gecko.fxa.FxAccountDeviceRegistrator; +import org.mozilla.gecko.fxa.devices.FxAccountDeviceRegistrator; import org.mozilla.gecko.fxa.authenticator.AccountPickler; import org.mozilla.gecko.fxa.authenticator.AndroidFxAccount; import org.mozilla.gecko.fxa.authenticator.FxADefaultLoginStateMachineDelegate; @@ -34,7 +34,6 @@ import org.mozilla.gecko.fxa.login.State.StateLabel; import org.mozilla.gecko.fxa.sync.FxAccountSyncDelegate.Result; import org.mozilla.gecko.sync.BackoffHandler; import org.mozilla.gecko.sync.GlobalSession; -import org.mozilla.gecko.sync.MetaGlobal; import org.mozilla.gecko.sync.PrefsBackoffHandler; import org.mozilla.gecko.sync.SharedPreferencesClientsDataDelegate; import org.mozilla.gecko.sync.SyncConfiguration; diff --git a/mobile/android/services/src/main/java/org/mozilla/gecko/sync/SharedPreferencesClientsDataDelegate.java b/mobile/android/services/src/main/java/org/mozilla/gecko/sync/SharedPreferencesClientsDataDelegate.java index 4d921f3dc72c..f2a65c35654b 100644 --- a/mobile/android/services/src/main/java/org/mozilla/gecko/sync/SharedPreferencesClientsDataDelegate.java +++ b/mobile/android/services/src/main/java/org/mozilla/gecko/sync/SharedPreferencesClientsDataDelegate.java @@ -6,7 +6,6 @@ package org.mozilla.gecko.sync; import org.mozilla.gecko.background.fxa.FxAccountUtils; import org.mozilla.gecko.fxa.FirefoxAccounts; -import org.mozilla.gecko.fxa.FxAccountDeviceRegistrator; import org.mozilla.gecko.fxa.authenticator.AndroidFxAccount; import org.mozilla.gecko.sync.delegates.ClientsDataDelegate; import org.mozilla.gecko.util.HardwareUtils; diff --git a/mobile/android/tests/background/junit4/src/org/mozilla/gecko/fxa/TestFxAccountDeviceRegistrator.java b/mobile/android/tests/background/junit4/src/org/mozilla/gecko/fxa/devices/TestFxAccountDeviceRegistrator.java similarity index 99% rename from mobile/android/tests/background/junit4/src/org/mozilla/gecko/fxa/TestFxAccountDeviceRegistrator.java rename to mobile/android/tests/background/junit4/src/org/mozilla/gecko/fxa/devices/TestFxAccountDeviceRegistrator.java index 296ab6a78103..5a47da659164 100644 --- a/mobile/android/tests/background/junit4/src/org/mozilla/gecko/fxa/TestFxAccountDeviceRegistrator.java +++ b/mobile/android/tests/background/junit4/src/org/mozilla/gecko/fxa/devices/TestFxAccountDeviceRegistrator.java @@ -1,7 +1,7 @@ /* Any copyright is dedicated to the Public Domain. http://creativecommons.org/publicdomain/zero/1.0/ */ -package org.mozilla.gecko.fxa; +package org.mozilla.gecko.fxa.devices; import org.junit.Before; import org.junit.Test; diff --git a/mobile/android/tests/background/junit4/src/org/mozilla/gecko/fxa/login/MockFxAccountClient.java b/mobile/android/tests/background/junit4/src/org/mozilla/gecko/fxa/login/MockFxAccountClient.java index e697a3d196b3..d10c3c932ddd 100644 --- a/mobile/android/tests/background/junit4/src/org/mozilla/gecko/fxa/login/MockFxAccountClient.java +++ b/mobile/android/tests/background/junit4/src/org/mozilla/gecko/fxa/login/MockFxAccountClient.java @@ -6,7 +6,6 @@ package org.mozilla.gecko.fxa.login; import android.text.TextUtils; import org.mozilla.gecko.background.fxa.FxAccountClient; -import org.mozilla.gecko.background.fxa.FxAccountClient20; import org.mozilla.gecko.background.fxa.FxAccountClient20.AccountStatusResponse; import org.mozilla.gecko.background.fxa.FxAccountClient20.RequestDelegate; import org.mozilla.gecko.background.fxa.FxAccountClient20.RecoveryEmailStatusResponse; @@ -15,7 +14,7 @@ import org.mozilla.gecko.background.fxa.FxAccountClient20.LoginResponse; import org.mozilla.gecko.background.fxa.FxAccountClientException.FxAccountClientRemoteException; import org.mozilla.gecko.background.fxa.FxAccountRemoteError; import org.mozilla.gecko.background.fxa.FxAccountUtils; -import org.mozilla.gecko.fxa.FxAccountDevice; +import org.mozilla.gecko.fxa.devices.FxAccountDevice; import org.mozilla.gecko.browserid.MockMyIDTokenFactory; import org.mozilla.gecko.browserid.RSACryptoImplementation; import org.mozilla.gecko.sync.ExtendedJSONObject;