blob: 59f96cb0f59faee1cd0ddaa2209de95b4b9e4e63 [file] [log] [blame]
Alice Leee4839c32015-09-04 15:11:35 -07001/*
2 * Copyright (C) 2015 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package android.assist.testapp;
18
19import android.assist.common.Utils;
20
21import android.app.Activity;
22import android.content.Intent;
23import android.os.Bundle;
24import android.util.Log;
25import android.view.View;
26import android.webkit.WebView;
27import android.webkit.WebViewClient;
28
29import java.lang.Override;
30
31public class WebViewActivity extends Activity {
32 static final String TAG = "WebViewActivity";
33
34 private String mTestCaseName;
35
36 @Override
37 public void onCreate(Bundle savedInstanceState) {
38 super.onCreate(savedInstanceState);
39 Log.i(TAG, "TestApp created");
40 mTestCaseName = getIntent().getStringExtra(Utils.TESTCASE_TYPE);
41 setContentView(R.layout.webview);
42 WebView webview = (WebView) findViewById(R.id.webview);
43 webview.setWebViewClient(new WebViewClient() {
44 @Override
45 public void onPageFinished(WebView view, String url){
46 sendBroadcast(new Intent(Utils.APP_3P_HASRESUMED));
47 }
48 });
49 webview.loadData(Utils.WEBVIEW_HTML, "text/html", "UTF-8");
50 //webview.loadUrl(
51 // "https://android-developers.blogspot.com/2015/08/m-developer-preview-3-final-sdk.html");
52 }
53}