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

Commit 8c92f888 authored by Sarah Chin's avatar Sarah Chin Committed by Sarah Kim
Browse files

Send userdata from ES response to purchase webapp

Test: manual verify via fake response from ES and confirm webview URL
Bug: 278504655
Change-Id: I6749815ada4b35ce270f258d17c3573cc8b916c7
parent f639e3ab
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@ import android.content.Intent;
import android.os.Bundle;
import android.telephony.SubscriptionManager;
import android.telephony.TelephonyManager;
import android.text.TextUtils;
import android.util.Log;
import android.view.KeyEvent;
import android.webkit.WebView;
@@ -183,7 +184,14 @@ public class SlicePurchaseActivity extends Activity {
        setContentView(mWebView);

        // Load the URL
        String userData = mIntent.getStringExtra(SlicePurchaseController.EXTRA_USER_DATA);
        if (TextUtils.isEmpty(userData)) {
            logd("Starting WebView with url: " + mUrl.toString());
            mWebView.loadUrl(mUrl.toString());
        } else {
            logd("Starting WebView with url: " + mUrl.toString() + ", userData=" + userData);
            mWebView.postUrl(mUrl.toString(), userData.getBytes());
        }
    }

    private static void logd(@NonNull String s) {