1529794c369a78e2da986ebb2054de462183955b6Phil Dubach/*
2529794c369a78e2da986ebb2054de462183955b6Phil Dubach * Copyright (C) 2009 The Android Open Source Project
3529794c369a78e2da986ebb2054de462183955b6Phil Dubach *
4529794c369a78e2da986ebb2054de462183955b6Phil Dubach * Licensed under the Apache License, Version 2.0 (the "License");
5529794c369a78e2da986ebb2054de462183955b6Phil Dubach * you may not use this file except in compliance with the License.
6529794c369a78e2da986ebb2054de462183955b6Phil Dubach * You may obtain a copy of the License at
7529794c369a78e2da986ebb2054de462183955b6Phil Dubach *
8529794c369a78e2da986ebb2054de462183955b6Phil Dubach *      http://www.apache.org/licenses/LICENSE-2.0
9529794c369a78e2da986ebb2054de462183955b6Phil Dubach *
10529794c369a78e2da986ebb2054de462183955b6Phil Dubach * Unless required by applicable law or agreed to in writing, software
11529794c369a78e2da986ebb2054de462183955b6Phil Dubach * distributed under the License is distributed on an "AS IS" BASIS,
12529794c369a78e2da986ebb2054de462183955b6Phil Dubach * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13529794c369a78e2da986ebb2054de462183955b6Phil Dubach * See the License for the specific language governing permissions and
14529794c369a78e2da986ebb2054de462183955b6Phil Dubach * limitations under the License.
15529794c369a78e2da986ebb2054de462183955b6Phil Dubach */
16529794c369a78e2da986ebb2054de462183955b6Phil Dubach
17529794c369a78e2da986ebb2054de462183955b6Phil Dubachpackage android.webkit.cts;
18529794c369a78e2da986ebb2054de462183955b6Phil Dubach
19529794c369a78e2da986ebb2054de462183955b6Phil Dubachimport com.android.cts.stub.R;
20529794c369a78e2da986ebb2054de462183955b6Phil Dubach
21529794c369a78e2da986ebb2054de462183955b6Phil Dubachimport android.app.Activity;
22529794c369a78e2da986ebb2054de462183955b6Phil Dubachimport android.os.Bundle;
23529794c369a78e2da986ebb2054de462183955b6Phil Dubachimport android.webkit.WebView;
24529794c369a78e2da986ebb2054de462183955b6Phil Dubach
25529794c369a78e2da986ebb2054de462183955b6Phil Dubachpublic class WebViewStubActivity extends Activity {
26529794c369a78e2da986ebb2054de462183955b6Phil Dubach    private WebView mWebView;
27529794c369a78e2da986ebb2054de462183955b6Phil Dubach
28529794c369a78e2da986ebb2054de462183955b6Phil Dubach    @Override
29529794c369a78e2da986ebb2054de462183955b6Phil Dubach    public void onCreate(Bundle savedInstanceState) {
30529794c369a78e2da986ebb2054de462183955b6Phil Dubach        super.onCreate(savedInstanceState);
31529794c369a78e2da986ebb2054de462183955b6Phil Dubach        setContentView(R.layout.webview_layout);
32529794c369a78e2da986ebb2054de462183955b6Phil Dubach        mWebView = (WebView) findViewById(R.id.web_page);
33529794c369a78e2da986ebb2054de462183955b6Phil Dubach    }
34529794c369a78e2da986ebb2054de462183955b6Phil Dubach
35529794c369a78e2da986ebb2054de462183955b6Phil Dubach    public WebView getWebView() {
36529794c369a78e2da986ebb2054de462183955b6Phil Dubach        return mWebView;
37529794c369a78e2da986ebb2054de462183955b6Phil Dubach    }
385d5d8e4ddc18f1f9445c798f67429e0f9f929a1aJohn Reck
395d5d8e4ddc18f1f9445c798f67429e0f9f929a1aJohn Reck    @Override
405d5d8e4ddc18f1f9445c798f67429e0f9f929a1aJohn Reck    public void onDestroy() {
415d5d8e4ddc18f1f9445c798f67429e0f9f929a1aJohn Reck        mWebView.destroy();
425d5d8e4ddc18f1f9445c798f67429e0f9f929a1aJohn Reck        super.onDestroy();
435d5d8e4ddc18f1f9445c798f67429e0f9f929a1aJohn Reck    }
44529794c369a78e2da986ebb2054de462183955b6Phil Dubach}
45