aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin/com/pitchedapps/frost/web
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-06-30 10:36:38 -0700
committerAllan Wang <me@allanwang.ca>2017-06-30 10:36:38 -0700
commit7267064d8a007e49bf05c3fc68b6338209a7c784 (patch)
tree676f2ab385b975f6ffd9b534fc8bcc11ac542635 /app/src/main/kotlin/com/pitchedapps/frost/web
parenta42519030892ede729fc37ce6cbc93bb1d80989c (diff)
downloadfrost-7267064d8a007e49bf05c3fc68b6338209a7c784.tar.gz
frost-7267064d8a007e49bf05c3fc68b6338209a7c784.tar.bz2
frost-7267064d8a007e49bf05c3fc68b6338209a7c784.zip
Remove user info in debug logs
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/web')
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClient.kt13
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewSearch.kt11
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/web/LoginWebView.kt3
3 files changed, 7 insertions, 20 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClient.kt b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClient.kt
index 065c9c08..f12212ed 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClient.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClient.kt
@@ -80,20 +80,9 @@ open class FrostWebViewClient(val webCore: FrostWebViewCore) : WebViewClient() {
L.d("Emit $flag")
}
- override fun shouldOverrideKeyEvent(view: WebView, event: KeyEvent): Boolean {
- L.d("Key event ${event.keyCode}")
- return super.shouldOverrideKeyEvent(view, event)
- }
-
override fun shouldOverrideUrlLoading(view: WebView, request: WebResourceRequest?): Boolean {
- L.d("Url Loading ${request?.url?.path}")
+ L.i("Url Loading ${request?.url?.path}")
return super.shouldOverrideUrlLoading(view, request)
}
- override fun shouldInterceptRequest(view: WebView, request: WebResourceRequest?): WebResourceResponse? {
- if (request == null || !(request.url.host?.contains(FACEBOOK_COM) ?: false)) return super.shouldInterceptRequest(view, request)
- L.v("Url intercept ${request.url.path}")
- return super.shouldInterceptRequest(view, request)
- }
-
} \ No newline at end of file
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewSearch.kt b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewSearch.kt
index f83fd63b..837df260 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewSearch.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewSearch.kt
@@ -69,9 +69,10 @@ class FrostWebViewSearch(context: Context, val contract: SearchContract) : WebVi
.subscribe {
content: List<Pair<List<String>, String>> ->
saveResultFrame(content)
+ L.d("Search element count ${content.size}")
contract.emitSearchResponse(content.map {
(texts, href) ->
- L.d("Search element $texts $href")
+ L.i("Search element $texts $href")
SearchItem(href, texts[0], texts.getOrNull(1))
})
}
@@ -96,10 +97,8 @@ class FrostWebViewSearch(context: Context, val contract: SearchContract) : WebVi
* Sets the input to have our given text, then dispatches the input event so the webpage recognizes it
*/
fun query(input: String) {
- L.d("Searching attempt for $input")
- JsBuilder().js("var e=document.getElementById('main-search-input');if(e){e.value='$input';var n=new Event('input',{bubbles:!0,cancelable:!0});e.dispatchEvent(n)}else console.log('Input field not found')").build().inject(this) {
- L.d("Searching for $input")
- }
+ L.d("Searching attempt", input)
+ JsBuilder().js("var e=document.getElementById('main-search-input');if(e){e.value='$input';var n=new Event('input',{bubbles:!0,cancelable:!0});e.dispatchEvent(n)}else console.log('Input field not found')").build().inject(this)
}
/**
@@ -130,7 +129,7 @@ class FrostWebViewSearch(context: Context, val contract: SearchContract) : WebVi
L.d("Search loaded successfully")
}
1 -> { //something is not found in the search view; this is effectively useless
- L.d("Search subject error; reverting to full overlay")
+ L.eThrow("Search subject error; reverting to full overlay")
searchSubject.onComplete()
contract.searchOverlayDispose()
}
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/web/LoginWebView.kt b/app/src/main/kotlin/com/pitchedapps/frost/web/LoginWebView.kt
index fe024ea3..a42ee4fb 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/web/LoginWebView.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/web/LoginWebView.kt
@@ -6,7 +6,6 @@ import android.util.AttributeSet
import android.view.View
import android.webkit.*
import ca.allanwang.kau.utils.fadeIn
-import ca.allanwang.kau.utils.snackbar
import com.pitchedapps.frost.R
import com.pitchedapps.frost.dbflow.CookieModel
import com.pitchedapps.frost.facebook.FACEBOOK_COM
@@ -44,7 +43,7 @@ class LoginWebView @JvmOverloads constructor(
cookieObservable.filter { (_, cookie) -> cookie?.contains(userMatcher) ?: false }
.subscribe {
(url, cookie) ->
- L.d("Checking cookie for $url\n\t$cookie")
+ L.d("Checking cookie for login", "$url\n\t$cookie")
val id = userMatcher.find(cookie!!)?.groups?.get(1)?.value
if (id != null) {
try {