From ab7ec131b62ac1567e983c846c921bd3ada11dd4 Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Mon, 7 Aug 2017 14:56:48 -0700 Subject: Fix/2FA (#115) * Create basis for downloading videos * Resolve some download errors and allow video to be opened in external apps * Remove url checks for loging * Update readme with build links * Allow for all apks to build * Fix travis apk uploads * Fix null mapping * Fix some notation * Add commit message to test builds * Remove faulty commit from test release * Add intent overriding to login web client * Add resource logging * Add intent verification without url check * Simplify login activity * Check start activity for result * Add check before resolving intent * Fix wrong index * Temporary fix for 2FA login with U2F (#116) * Clean up and add comments --- .../main/kotlin/com/pitchedapps/frost/web/FrostWebViewClients.kt | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClients.kt') diff --git a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClients.kt b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClients.kt index 9f7dd916..94bff3c3 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClients.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClients.kt @@ -132,13 +132,7 @@ open class FrostWebViewClient(val webCore: FrostWebViewCore) : BaseWebViewClient if (path.startsWith("/composer/")) return launchRequest(request) if (request.url.toString().contains("scontent-sea1-1.xx.fbcdn.net") && (path.endsWith(".jpg") || path.endsWith(".png"))) return launchImage(request) - if (!request.url.toString().contains(FACEBOOK_COM)) { - val intent = Intent(Intent.ACTION_VIEW, request.url) - if (intent.resolveActivity(view.context.packageManager) != null) { - view.context.startActivity(Intent(Intent.ACTION_VIEW, request.url)) - return true - } - } + if (view.context.resolveActivityForUri(request.url)) return true return super.shouldOverrideUrlLoading(view, request) } -- cgit v1.2.3