Loading app/src/main/java/at/bitfire/davdroid/ui/setup/EeloAuthenticatorFragment.kt +3 −15 Original line number Diff line number Diff line Loading @@ -191,20 +191,8 @@ class EeloAuthenticatorFragment : Fragment(), AuthorizationService.TokenResponse override fun onTokenRequestCompleted(response: TokenResponse?, ex: AuthorizationException?) { authState?.update(response, ex) progress_bar.visibility = View.GONE successful_oauth_text_view.visibility = View.VISIBLE val account = Account("user1@e.email", getString(R.string.eelo_account_type)) val userData = AccountSettings.initialUserData(Credentials("user1@e.email", null, AuthState(), null)) val accountManager = AccountManager.get(activity) if (!accountManager.addAccountExplicitly(account, null, userData)) { Toast.makeText(context, "Failed to create test account", Toast.LENGTH_LONG).show() } else { Toast.makeText(context, "Successfully created test account", Toast.LENGTH_LONG).show() validateLoginData("user1", authState!!)?.let { info -> DetectConfigurationFragment.newInstance(info).show(fragmentManager, null) } // TODO Get the userId for future requests Loading Loading @@ -361,7 +349,7 @@ class EeloAuthenticatorFragment : Fragment(), AuthorizationService.TokenResponse } private fun validateLoginData(emailAddress: String, authState: AuthState): LoginInfo? { val baseUrl = Uri.parse("https://apidata.googleusercontent.com/caldav/v2/$emailAddress/events") val baseUrl = Uri.parse("https://nc.test.eelo.io/remote.php/dav/") val uri = validateBaseUrl(baseUrl, false, { message -> view!!.urlpwd_base_url.error = message }) Loading app/src/main/res/layout/fragment_eelo_authenticator.xml +0 −11 Original line number Diff line number Diff line Loading @@ -11,15 +11,4 @@ android:layout_height="wrap_content" android:layout_centerInParent="true" /> <TextView android:id="@+id/successful_oauth_text_view" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_centerInParent="true" android:textSize="16sp" android:visibility="gone" android:padding="16dp" android:gravity="center" android:text="Successfully received OAuth token. Contacts and calendar syncing is currently not supported for eelo accounts."/> </RelativeLayout> No newline at end of file Loading
app/src/main/java/at/bitfire/davdroid/ui/setup/EeloAuthenticatorFragment.kt +3 −15 Original line number Diff line number Diff line Loading @@ -191,20 +191,8 @@ class EeloAuthenticatorFragment : Fragment(), AuthorizationService.TokenResponse override fun onTokenRequestCompleted(response: TokenResponse?, ex: AuthorizationException?) { authState?.update(response, ex) progress_bar.visibility = View.GONE successful_oauth_text_view.visibility = View.VISIBLE val account = Account("user1@e.email", getString(R.string.eelo_account_type)) val userData = AccountSettings.initialUserData(Credentials("user1@e.email", null, AuthState(), null)) val accountManager = AccountManager.get(activity) if (!accountManager.addAccountExplicitly(account, null, userData)) { Toast.makeText(context, "Failed to create test account", Toast.LENGTH_LONG).show() } else { Toast.makeText(context, "Successfully created test account", Toast.LENGTH_LONG).show() validateLoginData("user1", authState!!)?.let { info -> DetectConfigurationFragment.newInstance(info).show(fragmentManager, null) } // TODO Get the userId for future requests Loading Loading @@ -361,7 +349,7 @@ class EeloAuthenticatorFragment : Fragment(), AuthorizationService.TokenResponse } private fun validateLoginData(emailAddress: String, authState: AuthState): LoginInfo? { val baseUrl = Uri.parse("https://apidata.googleusercontent.com/caldav/v2/$emailAddress/events") val baseUrl = Uri.parse("https://nc.test.eelo.io/remote.php/dav/") val uri = validateBaseUrl(baseUrl, false, { message -> view!!.urlpwd_base_url.error = message }) Loading
app/src/main/res/layout/fragment_eelo_authenticator.xml +0 −11 Original line number Diff line number Diff line Loading @@ -11,15 +11,4 @@ android:layout_height="wrap_content" android:layout_centerInParent="true" /> <TextView android:id="@+id/successful_oauth_text_view" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_centerInParent="true" android:textSize="16sp" android:visibility="gone" android:padding="16dp" android:gravity="center" android:text="Successfully received OAuth token. Contacts and calendar syncing is currently not supported for eelo accounts."/> </RelativeLayout> No newline at end of file