Loading buildSrc/src/main/java/Dependencies.kt +1 −1 Original line number Diff line number Diff line Loading @@ -26,7 +26,7 @@ object Versions { const val disklrucache = "2.0.2" const val leakcanary = "1.6.3" const val mozilla_appservices = "0.36.0" const val mozilla_appservices = "0.37.1" const val servo = "0.0.1.20181017.aa95911" const val material = "1.0.0" Loading components/concept/sync/src/main/java/mozilla/components/concept/sync/Devices.kt +3 −0 Original line number Diff line number Diff line Loading @@ -127,6 +127,9 @@ interface DeviceConstellationObserver { enum class DeviceType { DESKTOP, MOBILE, TABLET, TV, VR, UNKNOWN } Loading components/concept/sync/src/main/java/mozilla/components/concept/sync/OAuthAccount.kt +1 −1 Original line number Diff line number Diff line Loading @@ -25,7 +25,7 @@ class AuthException(type: AuthExceptionType, cause: Exception? = null) : Throwab */ @SuppressWarnings("TooManyFunctions") interface OAuthAccount : AutoCloseable { fun beginOAuthFlowAsync(scopes: Set<String>, wantsKeys: Boolean): Deferred<String?> fun beginOAuthFlowAsync(scopes: Set<String>): Deferred<String?> fun beginPairingFlowAsync(pairingUrl: String, scopes: Set<String>): Deferred<String?> fun getProfileAsync(ignoreCache: Boolean): Deferred<Profile?> fun getProfileAsync(): Deferred<Profile?> Loading components/feature/accounts/src/test/java/mozilla/components/feature/accounts/FirefoxAccountsAuthFeatureTest.kt +2 −2 Original line number Diff line number Diff line Loading @@ -129,7 +129,7 @@ class FirefoxAccountsAuthFeatureTest { val profile = Profile(uid = "testUID", avatar = null, email = "test@example.com", displayName = "test profile") `when`(mockAccount.getProfileAsync(anyBoolean())).thenReturn(CompletableDeferred(profile)) `when`(mockAccount.beginOAuthFlowAsync(any(), anyBoolean())).thenReturn(CompletableDeferred("auth://url")) `when`(mockAccount.beginOAuthFlowAsync(any())).thenReturn(CompletableDeferred("auth://url")) `when`(mockAccount.beginPairingFlowAsync(anyString(), any())).thenReturn(CompletableDeferred("auth://url")) `when`(mockAccount.completeOAuthFlowAsync(anyString(), anyString())).thenReturn(CompletableDeferred(true)) Loading @@ -154,7 +154,7 @@ class FirefoxAccountsAuthFeatureTest { `when`(mockAccount.getProfileAsync(anyBoolean())).thenReturn(CompletableDeferred(profile)) `when`(mockAccount.beginOAuthFlowAsync(any(), anyBoolean())).thenReturn(CompletableDeferred(value = null)) `when`(mockAccount.beginOAuthFlowAsync(any())).thenReturn(CompletableDeferred(value = null)) `when`(mockAccount.beginPairingFlowAsync(anyString(), any())).thenReturn(CompletableDeferred(value = null)) `when`(mockAccount.completeOAuthFlowAsync(anyString(), anyString())).thenReturn(CompletableDeferred(true)) Loading components/service/firefox-accounts/src/main/java/mozilla/components/service/fxa/FirefoxAccount.kt +2 −3 Original line number Diff line number Diff line Loading @@ -103,13 +103,12 @@ class FirefoxAccount internal constructor( * Constructs a URL used to begin the OAuth flow for the requested scopes and keys. * * @param scopes List of OAuth scopes for which the client wants access * @param wantsKeys Fetch keys for end-to-end encryption of data from Mozilla-hosted services * @return Deferred<String> that resolves to the flow URL when complete */ override fun beginOAuthFlowAsync(scopes: Set<String>, wantsKeys: Boolean): Deferred<String?> { override fun beginOAuthFlowAsync(scopes: Set<String>): Deferred<String?> { return scope.async { handleFxaExceptions(logger, "begin oauth flow", { null }) { inner.beginOAuthFlow(scopes.toTypedArray(), wantsKeys) inner.beginOAuthFlow(scopes.toTypedArray()) } } } Loading Loading
buildSrc/src/main/java/Dependencies.kt +1 −1 Original line number Diff line number Diff line Loading @@ -26,7 +26,7 @@ object Versions { const val disklrucache = "2.0.2" const val leakcanary = "1.6.3" const val mozilla_appservices = "0.36.0" const val mozilla_appservices = "0.37.1" const val servo = "0.0.1.20181017.aa95911" const val material = "1.0.0" Loading
components/concept/sync/src/main/java/mozilla/components/concept/sync/Devices.kt +3 −0 Original line number Diff line number Diff line Loading @@ -127,6 +127,9 @@ interface DeviceConstellationObserver { enum class DeviceType { DESKTOP, MOBILE, TABLET, TV, VR, UNKNOWN } Loading
components/concept/sync/src/main/java/mozilla/components/concept/sync/OAuthAccount.kt +1 −1 Original line number Diff line number Diff line Loading @@ -25,7 +25,7 @@ class AuthException(type: AuthExceptionType, cause: Exception? = null) : Throwab */ @SuppressWarnings("TooManyFunctions") interface OAuthAccount : AutoCloseable { fun beginOAuthFlowAsync(scopes: Set<String>, wantsKeys: Boolean): Deferred<String?> fun beginOAuthFlowAsync(scopes: Set<String>): Deferred<String?> fun beginPairingFlowAsync(pairingUrl: String, scopes: Set<String>): Deferred<String?> fun getProfileAsync(ignoreCache: Boolean): Deferred<Profile?> fun getProfileAsync(): Deferred<Profile?> Loading
components/feature/accounts/src/test/java/mozilla/components/feature/accounts/FirefoxAccountsAuthFeatureTest.kt +2 −2 Original line number Diff line number Diff line Loading @@ -129,7 +129,7 @@ class FirefoxAccountsAuthFeatureTest { val profile = Profile(uid = "testUID", avatar = null, email = "test@example.com", displayName = "test profile") `when`(mockAccount.getProfileAsync(anyBoolean())).thenReturn(CompletableDeferred(profile)) `when`(mockAccount.beginOAuthFlowAsync(any(), anyBoolean())).thenReturn(CompletableDeferred("auth://url")) `when`(mockAccount.beginOAuthFlowAsync(any())).thenReturn(CompletableDeferred("auth://url")) `when`(mockAccount.beginPairingFlowAsync(anyString(), any())).thenReturn(CompletableDeferred("auth://url")) `when`(mockAccount.completeOAuthFlowAsync(anyString(), anyString())).thenReturn(CompletableDeferred(true)) Loading @@ -154,7 +154,7 @@ class FirefoxAccountsAuthFeatureTest { `when`(mockAccount.getProfileAsync(anyBoolean())).thenReturn(CompletableDeferred(profile)) `when`(mockAccount.beginOAuthFlowAsync(any(), anyBoolean())).thenReturn(CompletableDeferred(value = null)) `when`(mockAccount.beginOAuthFlowAsync(any())).thenReturn(CompletableDeferred(value = null)) `when`(mockAccount.beginPairingFlowAsync(anyString(), any())).thenReturn(CompletableDeferred(value = null)) `when`(mockAccount.completeOAuthFlowAsync(anyString(), anyString())).thenReturn(CompletableDeferred(true)) Loading
components/service/firefox-accounts/src/main/java/mozilla/components/service/fxa/FirefoxAccount.kt +2 −3 Original line number Diff line number Diff line Loading @@ -103,13 +103,12 @@ class FirefoxAccount internal constructor( * Constructs a URL used to begin the OAuth flow for the requested scopes and keys. * * @param scopes List of OAuth scopes for which the client wants access * @param wantsKeys Fetch keys for end-to-end encryption of data from Mozilla-hosted services * @return Deferred<String> that resolves to the flow URL when complete */ override fun beginOAuthFlowAsync(scopes: Set<String>, wantsKeys: Boolean): Deferred<String?> { override fun beginOAuthFlowAsync(scopes: Set<String>): Deferred<String?> { return scope.async { handleFxaExceptions(logger, "begin oauth flow", { null }) { inner.beginOAuthFlow(scopes.toTypedArray(), wantsKeys) inner.beginOAuthFlow(scopes.toTypedArray()) } } } Loading