mirror of
https://gitlab.com/timvisee/send.git
synced 2025-12-10 04:05:34 +00:00
To do so, we clear the webview history once the login process is complete so that the intermediate redirect urls used by the login process are not in the history. Also, update the versions of some of the libraries we use.
This commit is contained in:
committed by
Danny Coates
parent
fd3caa3cc6
commit
a42cec97f3
@@ -26,7 +26,7 @@ dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
||||
implementation 'com.android.support:appcompat-v7:27.1.1'
|
||||
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
|
||||
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
|
||||
testImplementation 'junit:junit:4.12'
|
||||
androidTestImplementation 'com.android.support.test:runner:1.0.2'
|
||||
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
|
||||
|
||||
@@ -167,7 +167,11 @@ class MainActivity : AppCompatActivity(), AdvancedWebView.Listener {
|
||||
val toPass = "{\"accessToken\": \"${accessToken}\", \"keys\": '${keys}', \"avatar\": \"${avatar}\", \"displayName\": \"${displayName}\", \"email\": \"${email}\", \"uid\": \"${uid}\"}"
|
||||
mToCall = "finishLogin(${toPass})"
|
||||
this@MainActivity.runOnUiThread({
|
||||
// But then we also reload this here because we need to make sure onPageFinished runs after mToCall has been set.
|
||||
// Clear the history so that the user can't use the back button to see broken pages
|
||||
// that were inserted into the history by the login process.
|
||||
mWebView!!.clearHistory()
|
||||
|
||||
// We also reload this here because we need to make sure onPageFinished runs after mToCall has been set.
|
||||
// We can't guarantee that onPageFinished wasn't already called at this point.
|
||||
mWebView!!.loadUrl("file:///android_asset/android.html")
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user