diff options
author | Stefan Niedermann <info@niedermann.it> | 2020-04-20 13:33:51 +0300 |
---|---|---|
committer | Stefan Niedermann <info@niedermann.it> | 2020-04-20 13:33:51 +0300 |
commit | 7bd155ba9f7ad039144abe7f976d4095f101b6bd (patch) | |
tree | ea8ab2b09b30f86413de72eae8239042b39f19f3 /app/src/main/java/it/niedermann/nextcloud/deck/ui/ImportAccountActivity.java | |
parent | e74c360bee0da192dc31bff874f4893ad69dbede (diff) |
Reduce code duplication
Diffstat (limited to 'app/src/main/java/it/niedermann/nextcloud/deck/ui/ImportAccountActivity.java')
-rw-r--r-- | app/src/main/java/it/niedermann/nextcloud/deck/ui/ImportAccountActivity.java | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/ui/ImportAccountActivity.java b/app/src/main/java/it/niedermann/nextcloud/deck/ui/ImportAccountActivity.java index 48c803f2a..668726f6d 100644 --- a/app/src/main/java/it/niedermann/nextcloud/deck/ui/ImportAccountActivity.java +++ b/app/src/main/java/it/niedermann/nextcloud/deck/ui/ImportAccountActivity.java @@ -20,7 +20,6 @@ import com.nextcloud.android.sso.exceptions.NextcloudFilesAppNotInstalledExcepti import com.nextcloud.android.sso.exceptions.NextcloudHttpRequestFailedException; import com.nextcloud.android.sso.helper.SingleAccountHelper; import com.nextcloud.android.sso.model.SingleSignOnAccount; -import com.nextcloud.android.sso.ui.UiExceptionManager; import it.niedermann.nextcloud.deck.DeckLog; import it.niedermann.nextcloud.deck.R; @@ -34,6 +33,7 @@ import it.niedermann.nextcloud.deck.persistence.sync.SyncManager; import it.niedermann.nextcloud.deck.persistence.sync.SyncWorker; import it.niedermann.nextcloud.deck.persistence.sync.adapters.db.util.WrappedLiveData; import it.niedermann.nextcloud.deck.ui.exception.ExceptionHandler; +import it.niedermann.nextcloud.deck.util.ExceptionUtil; import static com.nextcloud.android.sso.AccountImporter.REQUEST_AUTH_TOKEN_SSO; import static it.niedermann.nextcloud.deck.util.ExceptionUtil.handleHttpRequestFailedException; @@ -84,11 +84,7 @@ public class ImportAccountActivity extends AppCompatActivity { try { AccountImporter.pickNewAccount(this); } catch (NextcloudFilesAppNotInstalledException e) { - UiExceptionManager.showDialogForException(this, e); - binding.addButton.setEnabled(true); - DeckLog.warn("============================================================="); - DeckLog.warn("Nextcloud app is not installed. Cannot choose account"); - e.printStackTrace(); + ExceptionUtil.handleNextcloudFilesAppNotInstalledException(this, e); } catch (AndroidGetAccountsPermissionNotGranted e) { binding.addButton.setEnabled(true); AccountImporter.requestAndroidAccountPermissionsAndPickAccount(this); |