aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClients.kt
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-08-07 14:56:48 -0700
committerGitHub <noreply@github.com>2017-08-07 14:56:48 -0700
commitab7ec131b62ac1567e983c846c921bd3ada11dd4 (patch)
tree1e9e7db2151ba531f438a2ac9c4fc960c913dc46 /app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClients.kt
parent7746e63373c905faa6d7e45e45fffc48d3ffff85 (diff)
downloadfrost-ab7ec131b62ac1567e983c846c921bd3ada11dd4.tar.gz
frost-ab7ec131b62ac1567e983c846c921bd3ada11dd4.tar.bz2
frost-ab7ec131b62ac1567e983c846c921bd3ada11dd4.zip
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
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClients.kt')
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClients.kt8
1 files changed, 1 insertions, 7 deletions
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)
}