diff options
author | Jackal Guo <jackalguo@google.com> | 2021-04-29 03:42:42 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2021-04-29 03:42:42 +0000 |
commit | efd8506386d03e10551495c9704d4acddc830762 (patch) | |
tree | 89f0a8633ccb6a4a6b832776d8f9f15504c1476e /src/com/android/htmlviewer | |
parent | 4238f2a0fd02f66f1c1e8df7176f5e53fe2ef30f (diff) | |
parent | 068c339411058931a79499101ecc56804069b107 (diff) | |
download | HTMLViewer-efd8506386d03e10551495c9704d4acddc830762.tar.gz |
Revert "Create CarHTMLViewer for car builds" am: 6934fc55b2 am: 068c339411
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/HTMLViewer/+/14328772
Change-Id: I7473b2581ac89bc75d8721b379401d899cf8bca5
Diffstat (limited to 'src/com/android/htmlviewer')
-rw-r--r-- | src/com/android/htmlviewer/CarHTMLViewerActivity.java | 45 | ||||
-rw-r--r-- | src/com/android/htmlviewer/HTMLViewerActivity.java | 6 |
2 files changed, 1 insertions, 50 deletions
diff --git a/src/com/android/htmlviewer/CarHTMLViewerActivity.java b/src/com/android/htmlviewer/CarHTMLViewerActivity.java deleted file mode 100644 index de31bff..0000000 --- a/src/com/android/htmlviewer/CarHTMLViewerActivity.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (C) 2021 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.android.htmlviewer; - -import android.webkit.WebView; - -import com.android.car.ui.core.CarUi; -import com.android.car.ui.toolbar.Toolbar; -import com.android.car.ui.toolbar.ToolbarController; - -/** - * An HTMLViewerActivity used for car builds. - */ -public class CarHTMLViewerActivity extends HTMLViewerActivity { - private ToolbarController mToolbar; - - @Override - protected void setContentView() { - setContentView(R.layout.main_car); - WebView webView = requireViewById(R.id.webview); - webView.setDefaultFocusHighlightEnabled(false); - mToolbar = CarUi.requireToolbar(this); - mToolbar.setState(Toolbar.State.SUBPAGE); - } - - @Override - public void setTitle(CharSequence title) { - super.setTitle(title); - mToolbar.setTitle(title); - } -} diff --git a/src/com/android/htmlviewer/HTMLViewerActivity.java b/src/com/android/htmlviewer/HTMLViewerActivity.java index 233a87d..1aa1f68 100644 --- a/src/com/android/htmlviewer/HTMLViewerActivity.java +++ b/src/com/android/htmlviewer/HTMLViewerActivity.java @@ -55,7 +55,7 @@ public class HTMLViewerActivity extends Activity { protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); - setContentView(); + setContentView(R.layout.main); mWebView = findViewById(R.id.webview); mLoading = findViewById(R.id.loading); @@ -83,10 +83,6 @@ public class HTMLViewerActivity extends Activity { loadUrl(); } - protected void setContentView() { - setContentView(R.layout.main); - } - private void loadUrl() { if (mIntent.hasExtra(Intent.EXTRA_TITLE)) { setTitle(mIntent.getStringExtra(Intent.EXTRA_TITLE)); |