Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f42e38b7 authored by Sarah Kim's avatar Sarah Kim Committed by Automerger Merge Worker
Browse files

Merge "Clear cookies and webview state for new purchase requests" into udc-qpr-dev am: a682ffea

parents 7367b624 a682ffea
Loading
Loading
Loading
Loading
+7 −0
Original line number Original line Diff line number Diff line
@@ -27,6 +27,7 @@ import android.telephony.TelephonyManager;
import android.text.TextUtils;
import android.text.TextUtils;
import android.util.Log;
import android.util.Log;
import android.view.KeyEvent;
import android.view.KeyEvent;
import android.webkit.CookieManager;
import android.webkit.WebView;
import android.webkit.WebView;


import com.android.phone.slice.SlicePurchaseController;
import com.android.phone.slice.SlicePurchaseController;
@@ -168,6 +169,12 @@ public class SlicePurchaseActivity extends Activity {
        // Create WebView
        // Create WebView
        mWebView = new WebView(this);
        mWebView = new WebView(this);


        // Clear any cookies and state that might be saved from previous sessions
        CookieManager.getInstance().removeAllCookies(null);
        CookieManager.getInstance().flush();
        mWebView.clearCache(true);
        mWebView.clearHistory();

        // Enable JavaScript for the carrier purchase website to send results back to
        // Enable JavaScript for the carrier purchase website to send results back to
        //  the slice purchase application.
        //  the slice purchase application.
        mWebView.getSettings().setJavaScriptEnabled(true);
        mWebView.getSettings().setJavaScriptEnabled(true);