diff --git a/mobile/android/base/background/fxa/FxAccountUtils.java b/mobile/android/base/background/fxa/FxAccountUtils.java index c70c59bb0eba..b77c5eb5a072 100644 --- a/mobile/android/base/background/fxa/FxAccountUtils.java +++ b/mobile/android/base/background/fxa/FxAccountUtils.java @@ -185,6 +185,6 @@ public class FxAccountUtils { */ public static String getAudienceForURL(String serverURI) throws URISyntaxException { URI uri = new URI(serverURI); - return new URI(uri.getScheme(), uri.getHost(), null, null).toString(); + return new URI(uri.getScheme(), null, uri.getHost(), uri.getPort(), null, null, null).toString(); } } diff --git a/mobile/android/base/browserid/MockMyIDTokenFactory.java b/mobile/android/base/browserid/MockMyIDTokenFactory.java index c807d4cbbd3a..ee4933ec3b2f 100644 --- a/mobile/android/base/browserid/MockMyIDTokenFactory.java +++ b/mobile/android/base/browserid/MockMyIDTokenFactory.java @@ -21,7 +21,7 @@ public class MockMyIDTokenFactory { public static final BigInteger MOCKMYID_g = new BigInteger("c52a4a0ff3b7e61fdf1867ce84138369a6154f4afa92966e3c827e25cfa6cf508b90e5de419e1337e07a2e9e2a3cd5dea704d175f8ebf6af397d69e110b96afb17c7a03259329e4829b0d03bbc7896b15b4ade53e130858cc34d96269aa89041f409136c7242a38895c9d5bccad4f389af1d7a4bd1398bd072dffa896233397a", 16); // Computed lazily by static getMockMyIDPrivateKey. - protected static SigningPrivateKey cachedMockMyIDPrivateKey; + protected static SigningPrivateKey cachedMockMyIDPrivateKey = null; public static SigningPrivateKey getMockMyIDPrivateKey() throws NoSuchAlgorithmException, InvalidKeySpecException { if (cachedMockMyIDPrivateKey == null) { diff --git a/mobile/android/base/fxa/authenticator/FxAccountAuthenticatorService.java b/mobile/android/base/fxa/authenticator/FxAccountAuthenticatorService.java index d138e6c45a2e..d66163a81616 100644 --- a/mobile/android/base/fxa/authenticator/FxAccountAuthenticatorService.java +++ b/mobile/android/base/fxa/authenticator/FxAccountAuthenticatorService.java @@ -14,7 +14,7 @@ public class FxAccountAuthenticatorService extends Service { public static final String LOG_TAG = FxAccountAuthenticatorService.class.getSimpleName(); // Lazily initialized by getAuthenticator. - protected FxAccountAuthenticator accountAuthenticator; + protected FxAccountAuthenticator accountAuthenticator = null; protected synchronized FxAccountAuthenticator getAuthenticator() { if (accountAuthenticator == null) { diff --git a/mobile/android/base/fxa/sync/FxAccountSyncAdapter.java b/mobile/android/base/fxa/sync/FxAccountSyncAdapter.java index b13cd0c26a6b..903c10d328ca 100644 --- a/mobile/android/base/fxa/sync/FxAccountSyncAdapter.java +++ b/mobile/android/base/fxa/sync/FxAccountSyncAdapter.java @@ -74,7 +74,7 @@ public class FxAccountSyncAdapter extends AbstractThreadedSyncAdapter { // Used to do cheap in-memory rate limiting. Don't sync again if we // successfully synced within this duration. private static final int MINIMUM_SYNC_DELAY_MILLIS = 15 * 1000; // 15 seconds. - private volatile long lastSyncRealtimeMillis; + private volatile long lastSyncRealtimeMillis = 0L; protected final ExecutorService executor; protected final FxAccountNotificationManager notificationManager; diff --git a/mobile/android/base/fxa/sync/FxAccountSyncService.java b/mobile/android/base/fxa/sync/FxAccountSyncService.java index 59c06ca97609..0d271e8615d4 100644 --- a/mobile/android/base/fxa/sync/FxAccountSyncService.java +++ b/mobile/android/base/fxa/sync/FxAccountSyncService.java @@ -10,7 +10,7 @@ import android.os.IBinder; public class FxAccountSyncService extends Service { private static final Object syncAdapterLock = new Object(); - private static FxAccountSyncAdapter syncAdapter; + private static FxAccountSyncAdapter syncAdapter = null; @Override public void onCreate() { diff --git a/mobile/android/base/fxa/sync/FxAccountSyncStatusHelper.java b/mobile/android/base/fxa/sync/FxAccountSyncStatusHelper.java index fc4b33f866cf..fad35584a95c 100644 --- a/mobile/android/base/fxa/sync/FxAccountSyncStatusHelper.java +++ b/mobile/android/base/fxa/sync/FxAccountSyncStatusHelper.java @@ -23,7 +23,7 @@ public class FxAccountSyncStatusHelper implements SyncStatusObserver { @SuppressWarnings("unused") private static final String LOG_TAG = FxAccountSyncStatusHelper.class.getSimpleName(); - protected static FxAccountSyncStatusHelper sInstance; + protected static FxAccountSyncStatusHelper sInstance = null; public synchronized static FxAccountSyncStatusHelper getInstance() { if (sInstance == null) { @@ -33,7 +33,7 @@ public class FxAccountSyncStatusHelper implements SyncStatusObserver { } // Used to unregister this as a listener. - protected Object handle; + protected Object handle = null; // Maps delegates to whether their underlying Android account was syncing the // last time we observed a status change. diff --git a/mobile/android/base/fxa/tasks/FxAccountSetupTask.java b/mobile/android/base/fxa/tasks/FxAccountSetupTask.java index aa2b5324dab8..4ef71de60729 100644 --- a/mobile/android/base/fxa/tasks/FxAccountSetupTask.java +++ b/mobile/android/base/fxa/tasks/FxAccountSetupTask.java @@ -85,9 +85,9 @@ public abstract class FxAccountSetupTask extends AsyncTask implements RequestDelegate { protected final CountDownLatch latch; - public T response; - public Exception exception; - public FxAccountClientRemoteException failure; + public T response = null; + public Exception exception = null; + public FxAccountClientRemoteException failure = null; protected InnerRequestDelegate(CountDownLatch latch) { this.latch = latch;