FileDocCategorySizeDatePackage
JankActivity.javaAPI DocAndroid 5.1 API1911Thu Mar 12 22:22:56 GMT 2015com.android.webview.chromium.shell

JankActivity

public class JankActivity extends android.app.Activity
This activity is designed for Android Jank testing of WebView. It takes a URL as an argument, and displays the page ready for the Jank tester to test scrolling etc.

Fields Summary
Constructors Summary
Methods Summary
private static java.lang.StringgetUrlFromIntent(android.content.Intent intent)

        return intent != null ? intent.getDataString() : null;
    
public voidonCreate(android.os.Bundle savedInstanceState)

        super.onCreate(savedInstanceState);
        getWindow().setTitle(
                getResources().getString(R.string.title_activity_jank));
        setContentView(R.layout.activity_telemetry);

        WebView webView = (WebView) findViewById(R.id.webview);
        CookieManager.setAcceptFileSchemeCookies(true);

        webView.setWebViewClient(new WebViewClient() {
            @Override
            public boolean shouldOverrideUrlLoading(WebView webView, String url) {
                return false;
            }
        });

        String url = getUrlFromIntent(getIntent());
        webView.loadUrl(url);