Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
AloqaIM-Android
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
AloqaIM-Android
Commits
b7b83e11
Commit
b7b83e11
authored
Jun 05, 2018
by
Filipe de Lima Brito
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removes web view cookies.
parent
26ead887
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
0 deletions
+12
-0
OauthWebViewActivity.kt
...t/rocket/android/webview/oauth/ui/OauthWebViewActivity.kt
+6
-0
SsoWebViewActivity.kt
.../chat/rocket/android/webview/sso/ui/SsoWebViewActivity.kt
+6
-0
No files found.
app/src/main/java/chat/rocket/android/webview/oauth/ui/OauthWebViewActivity.kt
View file @
b7b83e11
...
@@ -6,6 +6,7 @@ import android.content.Context
...
@@ -6,6 +6,7 @@ import android.content.Context
import
android.content.Intent
import
android.content.Intent
import
android.os.Bundle
import
android.os.Bundle
import
android.support.v7.app.AppCompatActivity
import
android.support.v7.app.AppCompatActivity
import
android.webkit.CookieManager
import
android.webkit.WebView
import
android.webkit.WebView
import
android.webkit.WebViewClient
import
android.webkit.WebViewClient
import
androidx.core.net.toUri
import
androidx.core.net.toUri
...
@@ -56,6 +57,11 @@ class OauthWebViewActivity : AppCompatActivity() {
...
@@ -56,6 +57,11 @@ class OauthWebViewActivity : AppCompatActivity() {
}
}
}
}
override
fun
onDestroy
()
{
super
.
onDestroy
()
CookieManager
.
getInstance
().
removeAllCookies
(
null
)
}
override
fun
onBackPressed
()
{
override
fun
onBackPressed
()
{
if
(
web_view
.
canGoBack
())
{
if
(
web_view
.
canGoBack
())
{
web_view
.
goBack
()
web_view
.
goBack
()
...
...
app/src/main/java/chat/rocket/android/webview/sso/ui/SsoWebViewActivity.kt
View file @
b7b83e11
...
@@ -7,6 +7,7 @@ import android.content.Intent
...
@@ -7,6 +7,7 @@ import android.content.Intent
import
android.graphics.Bitmap
import
android.graphics.Bitmap
import
android.os.Bundle
import
android.os.Bundle
import
android.support.v7.app.AppCompatActivity
import
android.support.v7.app.AppCompatActivity
import
android.webkit.CookieManager
import
android.webkit.WebView
import
android.webkit.WebView
import
android.webkit.WebViewClient
import
android.webkit.WebViewClient
import
chat.rocket.android.R
import
chat.rocket.android.R
...
@@ -52,6 +53,11 @@ class SsoWebViewActivity : AppCompatActivity() {
...
@@ -52,6 +53,11 @@ class SsoWebViewActivity : AppCompatActivity() {
}
}
}
}
override
fun
onDestroy
()
{
super
.
onDestroy
()
CookieManager
.
getInstance
().
removeAllCookies
(
null
)
}
override
fun
onBackPressed
()
{
override
fun
onBackPressed
()
{
if
(
web_view
.
canGoBack
())
{
if
(
web_view
.
canGoBack
())
{
web_view
.
goBack
()
web_view
.
goBack
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment