From 0a7435cd60447fd6185920f36365912b3c72ca48 Mon Sep 17 00:00:00 2001 From: niculescu-bogdan-constantin Date: Tue, 12 Jul 2022 16:42:55 +0200 Subject: [PATCH] Small refactor --- .../webflows/activities/AuthorizationManagementActivity.kt | 2 +- .../java/com/schibsted/account/webflows/client/Client.kt | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/webflows/src/main/java/com/schibsted/account/webflows/activities/AuthorizationManagementActivity.kt b/webflows/src/main/java/com/schibsted/account/webflows/activities/AuthorizationManagementActivity.kt index 033c42c6..5004c553 100644 --- a/webflows/src/main/java/com/schibsted/account/webflows/activities/AuthorizationManagementActivity.kt +++ b/webflows/src/main/java/com/schibsted/account/webflows/activities/AuthorizationManagementActivity.kt @@ -165,9 +165,9 @@ class AuthorizationManagementActivity : Activity() { } override fun onSaveInstanceState(outState: Bundle) { - super.onSaveInstanceState(outState) outState.putBoolean(KEY_AUTHORIZATION_STARTED, authStarted) outState.putParcelable(KEY_AUTH_INTENT, authIntent) + super.onSaveInstanceState(outState) } private fun handleAuthorizationComplete() { diff --git a/webflows/src/main/java/com/schibsted/account/webflows/client/Client.kt b/webflows/src/main/java/com/schibsted/account/webflows/client/Client.kt index 6b4350f2..49e08930 100644 --- a/webflows/src/main/java/com/schibsted/account/webflows/client/Client.kt +++ b/webflows/src/main/java/com/schibsted/account/webflows/client/Client.kt @@ -1,6 +1,5 @@ package com.schibsted.account.webflows.client -import android.content.ActivityNotFoundException import android.content.Context import android.content.Intent import android.net.Uri @@ -103,7 +102,7 @@ class Client : ClientInterface { intent.data = loginUrl }.intent } else { - Intent(Intent.ACTION_VIEW, loginUrl) + Intent(Intent.ACTION_VIEW, loginUrl).addCategory(Intent.CATEGORY_BROWSABLE) } return AuthorizationManagementActivity.createStartIntent(context, intent) } @@ -121,7 +120,7 @@ class Client : ClientInterface { .build() .launchUrl(context, loginUrl) } else { - val intent = Intent(Intent.ACTION_VIEW, loginUrl) + val intent = Intent(Intent.ACTION_VIEW, loginUrl).addCategory(Intent.CATEGORY_BROWSABLE) context.startActivity(intent) } }