diff options
author | Ricardo Cerqueira <cyanogenmod@cerqueira.org> | 2012-11-19 00:34:58 +0000 |
---|---|---|
committer | Ricardo Cerqueira <cyanogenmod@cerqueira.org> | 2012-11-19 00:43:52 +0000 |
commit | 285eb1d81de6887ae4e7a8b725a7dd7038b6b231 (patch) | |
tree | 77821a6f00686a14817f444d31886824fdbd671f /src | |
parent | bf5e496dc1f5f69b6c24a03828e89849a5587235 (diff) | |
download | packages_apps_browser-285eb1d81de6887ae4e7a8b725a7dd7038b6b231.zip packages_apps_browser-285eb1d81de6887ae4e7a8b725a7dd7038b6b231.tar.gz packages_apps_browser-285eb1d81de6887ae4e7a8b725a7dd7038b6b231.tar.bz2 |
Revert "Multimedia feature port from ICS"
This reverts commit 9aa4a1b524d567c70967565bce2636f01c298d84.
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/browser/BaseUi.java | 26 | ||||
-rw-r--r-- | src/com/android/browser/BrowserSettings.java | 17 | ||||
-rw-r--r-- | src/com/android/browser/Controller.java | 10 | ||||
-rw-r--r-- | src/com/android/browser/NetworkStateHandler.java | 18 | ||||
-rw-r--r-- | src/com/android/browser/PreferenceKeys.java | 2 | ||||
-rw-r--r-- | src/com/android/browser/preferences/BandwidthPreferencesFragment.java | 10 |
6 files changed, 6 insertions, 77 deletions
diff --git a/src/com/android/browser/BaseUi.java b/src/com/android/browser/BaseUi.java index 1165c53..b555621 100644 --- a/src/com/android/browser/BaseUi.java +++ b/src/com/android/browser/BaseUi.java @@ -1,6 +1,5 @@ /* * Copyright (C) 2010 The Android Open Source Project - * Copyright (c) 2012, Code Aurora Forum. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -77,9 +76,7 @@ public abstract class BaseUi implements UI { Gravity.CENTER); private static final int MSG_HIDE_TITLEBAR = 1; - private static final int MSG_HIDE_CUSTOM_VIEW = 2; public static final int HIDE_TITLEBAR_DELAY = 1500; // in ms - public static final int HIDE_CUSTOM_VIEW_DELAY = 750; // in ms Activity mActivity; UiController mUiController; @@ -543,31 +540,22 @@ public abstract class BaseUi implements UI { mActivity.setRequestedOrientation(requestedOrientation); } - private void hideCustomViewAfterDuration() { - Message msg = Message.obtain(mHandler, MSG_HIDE_CUSTOM_VIEW); - mHandler.sendMessageDelayed(msg, HIDE_CUSTOM_VIEW_DELAY); - } - - private void hideCustomView() { + @Override + public void onHideCustomView() { + ((BrowserWebView) getWebView()).setVisibility(View.VISIBLE); + if (mCustomView == null) + return; setFullscreen(false); FrameLayout decor = (FrameLayout) mActivity.getWindow().getDecorView(); decor.removeView(mFullscreenContainer); mFullscreenContainer = null; mCustomView = null; + mCustomViewCallback.onCustomViewHidden(); // Show the content view. mActivity.setRequestedOrientation(mOriginalOrientation); } @Override - public void onHideCustomView() { - ((BrowserWebView) getWebView()).setVisibility(View.VISIBLE); - if (mCustomView == null) - return; - mCustomViewCallback.onCustomViewHidden(); - hideCustomViewAfterDuration(); - } - - @Override public boolean isCustomViewShowing() { return mCustomView != null; } @@ -846,8 +834,6 @@ public abstract class BaseUi implements UI { public void handleMessage(Message msg) { if (msg.what == MSG_HIDE_TITLEBAR) { suggestHideTitleBar(); - } else if (msg.what == MSG_HIDE_CUSTOM_VIEW) { - hideCustomView(); } BaseUi.this.handleMessage(msg); } diff --git a/src/com/android/browser/BrowserSettings.java b/src/com/android/browser/BrowserSettings.java index cec3b30..4073f1c 100644 --- a/src/com/android/browser/BrowserSettings.java +++ b/src/com/android/browser/BrowserSettings.java @@ -1,6 +1,5 @@ /* * Copyright (C) 2011 The Android Open Source Project - * Copyright (c) 2011, 2012, Code Aurora Forum. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -918,22 +917,6 @@ public class BrowserSettings implements OnSharedPreferenceChangeListener, return mPrefs.getString(PREF_LINK_PREFETCH, getDefaultLinkPrefetchSetting()); } - public String getVideoPreloadOnWifiOnlyPreferenceString() { - return mContext.getResources().getString(R.string.pref_video_preload_value_wifi_only); - } - - public String getVideoPreloadAlwaysPreferenceString() { - return mContext.getResources().getString(R.string.pref_video_preload_value_always); - } - - public String getDefaultVideoPreloadSetting() { - return mContext.getResources().getString(R.string.pref_video_preload_default_value); - } - - public String getVideoPreloadEnabled() { - return mPrefs.getString(PREF_VIDEO_PRELOAD, getDefaultVideoPreloadSetting()); - } - // ----------------------------- // getter/setters for browser recovery // ----------------------------- diff --git a/src/com/android/browser/Controller.java b/src/com/android/browser/Controller.java index 2b449ec..77ceb95 100644 --- a/src/com/android/browser/Controller.java +++ b/src/com/android/browser/Controller.java @@ -1,6 +1,5 @@ /* * Copyright (C) 2010 The Android Open Source Project - * Copyright (c) 2011, 2012, Code Aurora Forum. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -834,15 +833,6 @@ public class Controller view.setNetworkAvailable(false); } - WebSettings settings = view.getSettings(); - String preload = mSettings.getVideoPreloadEnabled(); - if (mSettings.getVideoPreloadAlwaysPreferenceString().equals(preload)) - settings.setMediaPreloadEnabled(true); - else if (mSettings.getVideoPreloadOnWifiOnlyPreferenceString().equals(preload)) - settings.setMediaPreloadEnabled(mNetworkHandler.isWifiUp()); - else - settings.setMediaPreloadEnabled(false); - // when BrowserActivity just starts, onPageStarted may be called before // onResume as it is triggered from onCreate. Call resumeWebViewTimers // to start the timer. As we won't switch tabs while an activity is in diff --git a/src/com/android/browser/NetworkStateHandler.java b/src/com/android/browser/NetworkStateHandler.java index f3c46aa..4480664 100644 --- a/src/com/android/browser/NetworkStateHandler.java +++ b/src/com/android/browser/NetworkStateHandler.java @@ -1,6 +1,5 @@ /* * Copyright (C) 2010 The Android Open Source Project - * Copyright (c) 2012, Code Aurora Forum. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -113,23 +112,6 @@ public class NetworkStateHandler { return mIsNetworkUp; } - boolean isWifiUp() { - ConnectivityManager cm = (ConnectivityManager) mActivity - .getSystemService(Context.CONNECTIVITY_SERVICE); - NetworkInfo info = cm.getActiveNetworkInfo(); - if (info != null) { - switch (info.getType()) { - case ConnectivityManager.TYPE_WIFI: - case ConnectivityManager.TYPE_ETHERNET: - case ConnectivityManager.TYPE_BLUETOOTH: - return true; - default: - return false; - } - } else - return false; - } - private void sendNetworkType(String type, String subtype) { WebView w = mController.getCurrentWebView(); if (w != null) { diff --git a/src/com/android/browser/PreferenceKeys.java b/src/com/android/browser/PreferenceKeys.java index 405d893..1828032 100644 --- a/src/com/android/browser/PreferenceKeys.java +++ b/src/com/android/browser/PreferenceKeys.java @@ -1,6 +1,5 @@ /* * Copyright (C) 2011 The Android Open Source Project - * Copyright (c) 2011, 2012, Code Aurora Forum. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -105,7 +104,6 @@ public interface PreferenceKeys { // ---------------------- static final String PREF_DATA_PRELOAD = "preload_when"; static final String PREF_LINK_PREFETCH = "link_prefetch_when"; - static final String PREF_VIDEO_PRELOAD = "preload_video"; static final String PREF_LOAD_IMAGES = "load_images"; // ---------------------- diff --git a/src/com/android/browser/preferences/BandwidthPreferencesFragment.java b/src/com/android/browser/preferences/BandwidthPreferencesFragment.java index 36d1689..0cb064a 100644 --- a/src/com/android/browser/preferences/BandwidthPreferencesFragment.java +++ b/src/com/android/browser/preferences/BandwidthPreferencesFragment.java @@ -1,6 +1,5 @@ /* * Copyright (C) 2011 The Android Open Source Project - * Copyright (c) 2012, Code Aurora Forum. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -59,15 +58,6 @@ public class BandwidthPreferencesFragment extends PreferenceFragment { prefetch.setValue(BrowserSettings.getInstance().getDefaultLinkPrefetchSetting()); } } - if (!getPreferenceScreen().getSharedPreferences() - .contains(PreferenceKeys.PREF_VIDEO_PRELOAD)) { - // set default value for preload setting - ListPreference preload = (ListPreference) getPreferenceScreen().findPreference( - PreferenceKeys.PREF_VIDEO_PRELOAD); - if (preload != null) { - preload.setValue(BrowserSettings.getInstance().getDefaultVideoPreloadSetting()); - } - } } } |