├── MODULE_LICENSE_APACHE2 ├── res ├── drawable │ ├── ssl_icon.png │ ├── ic_btn_stop_v2.png │ ├── ic_close_tab.png │ ├── ic_list_gps_on.png │ ├── ic_menu_list.png │ ├── page_indicator.png │ ├── btn_close_window.png │ ├── ic_btn_bookmarks.png │ ├── ic_btn_find_next.png │ ├── ic_btn_find_prev.png │ ├── ic_list_bookmark.png │ ├── ic_list_data_off.png │ ├── ic_menu_bookmark.png │ ├── ic_menu_windows.png │ ├── app_web_browser_sm.png │ ├── bookmark_shadow.9.png │ ├── browser_thumbnail.png │ ├── fav_icn_background.png │ ├── ic_btn_close_panel.png │ ├── ic_dialog_bookmark.png │ ├── ic_launcher_browser.png │ ├── ic_list_data_large.png │ ├── ic_list_data_small.png │ ├── ic_list_gps_denied.png │ ├── ic_list_new_window.png │ ├── ic_menu_bookmarks.png │ ├── ic_menu_new_window.png │ ├── ic_menu_thumbnail.png │ ├── default_video_poster.png │ ├── ic_launcher_drm_file.png │ ├── ic_menu_add_bookmark.png │ ├── ic_dialog_menu_generic.png │ ├── ic_tab_history_selected.png │ ├── search_plate_browser.9.png │ ├── ic_btn_bookmark_browsertab.png │ ├── ic_search_category_browser.png │ ├── ic_search_category_history.png │ ├── ic_search_category_suggest.png │ ├── ic_tab_bookmarks_selected.png │ ├── ic_tab_history_unselected.png │ ├── page_indicator_unselected2.png │ ├── pattern_carbon_fiber_dark.png │ ├── ic_search_category_bookmark.png │ ├── ic_tab_bookmarks_unselected.png │ ├── ic_tab_most_visited_selected.png │ ├── ic_dialog_browser_security_bad.png │ ├── ic_dialog_browser_security_good.png │ ├── ic_tab_most_visited_unselected.png │ ├── dialog_divider_horizontal_light.9.png │ ├── ic_dialog_browser_certificate_secure.png │ ├── ic_launcher_shortcut_browser_bookmark.png │ ├── ic_dialog_browser_certificate_partially_secure.png │ ├── blank.xml │ ├── browser_history_tab.xml │ ├── browser_bookmark_tab.xml │ ├── browser_visited_tab.xml │ ├── button_line.xml │ ├── title_text.xml │ ├── btn_bookmark.xml │ └── close_background.xml ├── drawable-mdpi │ └── ic_launcher_browser.png ├── menu │ ├── downloadhistorycontextfailed.xml │ ├── downloadhistorycontextrunning.xml │ ├── websitesettings.xml │ ├── history.xml │ ├── bookmarks.xml │ ├── downloadhistorycontextfinished.xml │ ├── downloadhistory.xml │ ├── tabscontext.xml │ ├── title_context.xml │ ├── historycontext.xml │ ├── bookmarkscontext.xml │ ├── browsercontext.xml │ └── browser.xml ├── anim │ ├── find_dialog_enter.xml │ ├── find_dialog_exit.xml │ ├── title_bar_exit.xml │ └── title_bar_enter.xml ├── layout │ ├── no_downloads.xml │ ├── empty_history.xml │ ├── history_header.xml │ ├── browser_bookmarks_page.xml │ ├── browser_downloads_page.xml │ ├── title_bar_bg.xml │ ├── tabs.xml │ ├── custom_screen.xml │ ├── tab_view_add_tab.xml │ ├── video_loading_progress.xml │ ├── ssl_warning.xml │ ├── tab.xml │ ├── active_tabs.xml │ ├── ssl_success.xml │ ├── ssl_warnings.xml │ ├── tabitem.xml │ ├── browser_subwindow.xml │ ├── add_new_bookmark.xml │ ├── error_console.xml │ ├── http_authentication.xml │ ├── history_item.xml │ ├── website_settings_row.xml │ ├── page_info.xml │ ├── browser_find.xml │ ├── tab_view.xml │ ├── bookmark_thumbnail.xml │ ├── title_bar.xml │ ├── browser_download_item.xml │ ├── geolocation_permissions_prompt.xml │ ├── browser_add_bookmark.xml │ └── permission_dialog.xml ├── values │ ├── themes.xml │ ├── colors.xml │ └── styles.xml ├── xml │ ├── bookmarks_searchable.xml │ ├── searchable.xml │ └── debug_preferences.xml ├── values-ja │ └── arrays.xml ├── values-ko │ └── arrays.xml ├── values-zh-rCN │ └── arrays.xml ├── values-zh-rTW │ └── arrays.xml ├── values-nb │ └── arrays.xml ├── values-ru │ └── arrays.xml ├── values-sv │ └── arrays.xml ├── values-de │ └── arrays.xml ├── values-el │ └── arrays.xml ├── values-es-rUS │ └── arrays.xml ├── values-es │ └── arrays.xml ├── values-fr │ └── arrays.xml ├── values-it │ └── arrays.xml ├── values-nl │ └── arrays.xml ├── values-pt │ └── arrays.xml ├── values-tr │ └── arrays.xml ├── values-cs │ └── arrays.xml ├── values-da │ └── arrays.xml ├── values-pl │ └── arrays.xml ├── values-pt-rPT │ └── arrays.xml └── layout-land │ ├── page_info.xml │ └── http_authentication.xml ├── Android.mk ├── assets └── html │ └── flashtest.html ├── tests ├── Android.mk └── AndroidManifest.xml └── src └── com └── android └── browser ├── BookmarkSearch.java ├── AddNewBookmark.java ├── Browser.java ├── BrowserHomepagePreference.java ├── BrowserYesNoPreference.java ├── Dots.java ├── HistoryItem.java ├── BookmarkItem.java ├── GeolocationPermissionsPrompt.java ├── DownloadTouchIcon.java └── FetchUrlMimeType.java /MODULE_LICENSE_APACHE2: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /res/drawable/ssl_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nobunobuta/android_packages_apps_Browser/HEAD/res/drawable/ssl_icon.png -------------------------------------------------------------------------------- /res/drawable/ic_btn_stop_v2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nobunobuta/android_packages_apps_Browser/HEAD/res/drawable/ic_btn_stop_v2.png -------------------------------------------------------------------------------- /res/drawable/ic_close_tab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nobunobuta/android_packages_apps_Browser/HEAD/res/drawable/ic_close_tab.png -------------------------------------------------------------------------------- /res/drawable/ic_list_gps_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nobunobuta/android_packages_apps_Browser/HEAD/res/drawable/ic_list_gps_on.png -------------------------------------------------------------------------------- /res/drawable/ic_menu_list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nobunobuta/android_packages_apps_Browser/HEAD/res/drawable/ic_menu_list.png -------------------------------------------------------------------------------- /res/drawable/page_indicator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nobunobuta/android_packages_apps_Browser/HEAD/res/drawable/page_indicator.png -------------------------------------------------------------------------------- /res/drawable/btn_close_window.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nobunobuta/android_packages_apps_Browser/HEAD/res/drawable/btn_close_window.png -------------------------------------------------------------------------------- /res/drawable/ic_btn_bookmarks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nobunobuta/android_packages_apps_Browser/HEAD/res/drawable/ic_btn_bookmarks.png -------------------------------------------------------------------------------- /res/drawable/ic_btn_find_next.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nobunobuta/android_packages_apps_Browser/HEAD/res/drawable/ic_btn_find_next.png -------------------------------------------------------------------------------- /res/drawable/ic_btn_find_prev.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nobunobuta/android_packages_apps_Browser/HEAD/res/drawable/ic_btn_find_prev.png -------------------------------------------------------------------------------- /res/drawable/ic_list_bookmark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nobunobuta/android_packages_apps_Browser/HEAD/res/drawable/ic_list_bookmark.png -------------------------------------------------------------------------------- /res/drawable/ic_list_data_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nobunobuta/android_packages_apps_Browser/HEAD/res/drawable/ic_list_data_off.png -------------------------------------------------------------------------------- /res/drawable/ic_menu_bookmark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nobunobuta/android_packages_apps_Browser/HEAD/res/drawable/ic_menu_bookmark.png -------------------------------------------------------------------------------- /res/drawable/ic_menu_windows.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nobunobuta/android_packages_apps_Browser/HEAD/res/drawable/ic_menu_windows.png -------------------------------------------------------------------------------- /res/drawable/app_web_browser_sm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nobunobuta/android_packages_apps_Browser/HEAD/res/drawable/app_web_browser_sm.png -------------------------------------------------------------------------------- /res/drawable/bookmark_shadow.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nobunobuta/android_packages_apps_Browser/HEAD/res/drawable/bookmark_shadow.9.png -------------------------------------------------------------------------------- /res/drawable/browser_thumbnail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nobunobuta/android_packages_apps_Browser/HEAD/res/drawable/browser_thumbnail.png -------------------------------------------------------------------------------- /res/drawable/fav_icn_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nobunobuta/android_packages_apps_Browser/HEAD/res/drawable/fav_icn_background.png -------------------------------------------------------------------------------- /res/drawable/ic_btn_close_panel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nobunobuta/android_packages_apps_Browser/HEAD/res/drawable/ic_btn_close_panel.png -------------------------------------------------------------------------------- /res/drawable/ic_dialog_bookmark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nobunobuta/android_packages_apps_Browser/HEAD/res/drawable/ic_dialog_bookmark.png -------------------------------------------------------------------------------- /res/drawable/ic_launcher_browser.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nobunobuta/android_packages_apps_Browser/HEAD/res/drawable/ic_launcher_browser.png -------------------------------------------------------------------------------- /res/drawable/ic_list_data_large.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nobunobuta/android_packages_apps_Browser/HEAD/res/drawable/ic_list_data_large.png -------------------------------------------------------------------------------- /res/drawable/ic_list_data_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nobunobuta/android_packages_apps_Browser/HEAD/res/drawable/ic_list_data_small.png -------------------------------------------------------------------------------- /res/drawable/ic_list_gps_denied.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nobunobuta/android_packages_apps_Browser/HEAD/res/drawable/ic_list_gps_denied.png -------------------------------------------------------------------------------- /res/drawable/ic_list_new_window.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nobunobuta/android_packages_apps_Browser/HEAD/res/drawable/ic_list_new_window.png -------------------------------------------------------------------------------- /res/drawable/ic_menu_bookmarks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nobunobuta/android_packages_apps_Browser/HEAD/res/drawable/ic_menu_bookmarks.png -------------------------------------------------------------------------------- /res/drawable/ic_menu_new_window.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nobunobuta/android_packages_apps_Browser/HEAD/res/drawable/ic_menu_new_window.png -------------------------------------------------------------------------------- /res/drawable/ic_menu_thumbnail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nobunobuta/android_packages_apps_Browser/HEAD/res/drawable/ic_menu_thumbnail.png -------------------------------------------------------------------------------- /res/drawable/default_video_poster.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nobunobuta/android_packages_apps_Browser/HEAD/res/drawable/default_video_poster.png -------------------------------------------------------------------------------- /res/drawable/ic_launcher_drm_file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nobunobuta/android_packages_apps_Browser/HEAD/res/drawable/ic_launcher_drm_file.png -------------------------------------------------------------------------------- /res/drawable/ic_menu_add_bookmark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nobunobuta/android_packages_apps_Browser/HEAD/res/drawable/ic_menu_add_bookmark.png -------------------------------------------------------------------------------- /res/drawable-mdpi/ic_launcher_browser.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nobunobuta/android_packages_apps_Browser/HEAD/res/drawable-mdpi/ic_launcher_browser.png -------------------------------------------------------------------------------- /res/drawable/ic_dialog_menu_generic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nobunobuta/android_packages_apps_Browser/HEAD/res/drawable/ic_dialog_menu_generic.png -------------------------------------------------------------------------------- /res/drawable/ic_tab_history_selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nobunobuta/android_packages_apps_Browser/HEAD/res/drawable/ic_tab_history_selected.png -------------------------------------------------------------------------------- /res/drawable/search_plate_browser.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nobunobuta/android_packages_apps_Browser/HEAD/res/drawable/search_plate_browser.9.png -------------------------------------------------------------------------------- /res/drawable/ic_btn_bookmark_browsertab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nobunobuta/android_packages_apps_Browser/HEAD/res/drawable/ic_btn_bookmark_browsertab.png -------------------------------------------------------------------------------- /res/drawable/ic_search_category_browser.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nobunobuta/android_packages_apps_Browser/HEAD/res/drawable/ic_search_category_browser.png -------------------------------------------------------------------------------- /res/drawable/ic_search_category_history.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nobunobuta/android_packages_apps_Browser/HEAD/res/drawable/ic_search_category_history.png -------------------------------------------------------------------------------- /res/drawable/ic_search_category_suggest.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nobunobuta/android_packages_apps_Browser/HEAD/res/drawable/ic_search_category_suggest.png -------------------------------------------------------------------------------- /res/drawable/ic_tab_bookmarks_selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nobunobuta/android_packages_apps_Browser/HEAD/res/drawable/ic_tab_bookmarks_selected.png -------------------------------------------------------------------------------- /res/drawable/ic_tab_history_unselected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nobunobuta/android_packages_apps_Browser/HEAD/res/drawable/ic_tab_history_unselected.png -------------------------------------------------------------------------------- /res/drawable/page_indicator_unselected2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nobunobuta/android_packages_apps_Browser/HEAD/res/drawable/page_indicator_unselected2.png -------------------------------------------------------------------------------- /res/drawable/pattern_carbon_fiber_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nobunobuta/android_packages_apps_Browser/HEAD/res/drawable/pattern_carbon_fiber_dark.png -------------------------------------------------------------------------------- /res/drawable/ic_search_category_bookmark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nobunobuta/android_packages_apps_Browser/HEAD/res/drawable/ic_search_category_bookmark.png -------------------------------------------------------------------------------- /res/drawable/ic_tab_bookmarks_unselected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nobunobuta/android_packages_apps_Browser/HEAD/res/drawable/ic_tab_bookmarks_unselected.png -------------------------------------------------------------------------------- /res/drawable/ic_tab_most_visited_selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nobunobuta/android_packages_apps_Browser/HEAD/res/drawable/ic_tab_most_visited_selected.png -------------------------------------------------------------------------------- /res/drawable/ic_dialog_browser_security_bad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nobunobuta/android_packages_apps_Browser/HEAD/res/drawable/ic_dialog_browser_security_bad.png -------------------------------------------------------------------------------- /res/drawable/ic_dialog_browser_security_good.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nobunobuta/android_packages_apps_Browser/HEAD/res/drawable/ic_dialog_browser_security_good.png -------------------------------------------------------------------------------- /res/drawable/ic_tab_most_visited_unselected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nobunobuta/android_packages_apps_Browser/HEAD/res/drawable/ic_tab_most_visited_unselected.png -------------------------------------------------------------------------------- /res/drawable/dialog_divider_horizontal_light.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nobunobuta/android_packages_apps_Browser/HEAD/res/drawable/dialog_divider_horizontal_light.9.png -------------------------------------------------------------------------------- /res/drawable/ic_dialog_browser_certificate_secure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nobunobuta/android_packages_apps_Browser/HEAD/res/drawable/ic_dialog_browser_certificate_secure.png -------------------------------------------------------------------------------- /res/drawable/ic_launcher_shortcut_browser_bookmark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nobunobuta/android_packages_apps_Browser/HEAD/res/drawable/ic_launcher_shortcut_browser_bookmark.png -------------------------------------------------------------------------------- /res/drawable/ic_dialog_browser_certificate_partially_secure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nobunobuta/android_packages_apps_Browser/HEAD/res/drawable/ic_dialog_browser_certificate_partially_secure.png -------------------------------------------------------------------------------- /Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH:= $(call my-dir) 2 | include $(CLEAR_VARS) 3 | 4 | LOCAL_MODULE_TAGS := user 5 | 6 | LOCAL_STATIC_JAVA_LIBRARIES := google-framework 7 | 8 | LOCAL_SRC_FILES := $(call all-subdir-java-files) 9 | LOCAL_JAVA_LIBRARIES := com.cyanogenmod.android 10 | 11 | LOCAL_PACKAGE_NAME := Browser 12 | 13 | include $(BUILD_PACKAGE) 14 | 15 | # additionally, build tests in sub-folders in a separate .apk 16 | include $(call all-makefiles-under,$(LOCAL_PATH)) 17 | -------------------------------------------------------------------------------- /assets/html/flashtest.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Flash test 4 | 5 | 6 |

Flash test

7 | This is text above the plugin 8 | Google 9 |
10 | lhs 11 | 12 | 13 | 14 |
15 | 16 | This is some the text and more text and more text and more text and more text and more text and more text and more text and more text and more text and more text 17 | 18 | 19 | -------------------------------------------------------------------------------- /res/menu/downloadhistorycontextfailed.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /res/menu/downloadhistorycontextrunning.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /res/menu/websitesettings.xml: -------------------------------------------------------------------------------- 1 | 15 | 16 | 17 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /res/menu/history.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 21 | 22 | -------------------------------------------------------------------------------- /res/drawable/blank.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /res/drawable/browser_history_tab.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /res/drawable/browser_bookmark_tab.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /res/drawable/browser_visited_tab.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /res/menu/bookmarks.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 21 | 23 | 24 | -------------------------------------------------------------------------------- /res/anim/find_dialog_enter.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /res/anim/find_dialog_exit.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /res/menu/downloadhistorycontextfinished.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 | 21 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /res/layout/no_downloads.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 26 | -------------------------------------------------------------------------------- /res/drawable/button_line.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /res/layout/empty_history.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 27 | -------------------------------------------------------------------------------- /res/anim/title_bar_exit.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 18 | 20 | 22 | 23 | -------------------------------------------------------------------------------- /res/layout/history_header.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | -------------------------------------------------------------------------------- /res/anim/title_bar_enter.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 19 | 21 | 23 | 24 | -------------------------------------------------------------------------------- /res/drawable/title_text.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 19 | 20 | 22 | 24 | 25 | -------------------------------------------------------------------------------- /res/layout/browser_bookmarks_page.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 22 | 27 | 28 | -------------------------------------------------------------------------------- /res/menu/downloadhistory.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 | 22 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /res/drawable/btn_bookmark.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 19 | 20 | 22 | 24 | 25 | -------------------------------------------------------------------------------- /res/drawable/close_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 | 21 | 23 | 25 | 26 | -------------------------------------------------------------------------------- /res/menu/tabscontext.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 20 | 22 | 24 | 26 | 27 | -------------------------------------------------------------------------------- /res/layout/browser_downloads_page.xml: -------------------------------------------------------------------------------- 1 | 2 | 21 | 22 | 26 | 31 | 32 | -------------------------------------------------------------------------------- /res/layout/title_bar_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 23 | 29 | 30 | -------------------------------------------------------------------------------- /res/menu/title_context.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 22 | 24 | 26 | 27 | -------------------------------------------------------------------------------- /res/values/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 28 | 29 | -------------------------------------------------------------------------------- /tests/Android.mk: -------------------------------------------------------------------------------- 1 | # Copyright 2008, The Android Open Source Project 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | LOCAL_PATH:= $(call my-dir) 16 | include $(CLEAR_VARS) 17 | 18 | # We only want this apk build for tests. 19 | LOCAL_MODULE_TAGS := tests 20 | 21 | LOCAL_JAVA_LIBRARIES := android.test.runner 22 | 23 | # Include all test java files. 24 | LOCAL_SRC_FILES := $(call all-java-files-under, src) 25 | 26 | # Notice that we don't have to include the src files of Browser because, by 27 | # running the tests using an instrumentation targeting Browser, we 28 | # automatically get all of its classes loaded into our environment. 29 | 30 | LOCAL_PACKAGE_NAME := BrowserTests 31 | 32 | LOCAL_INSTRUMENTATION_FOR := Browser 33 | 34 | LOCAL_SDK_VERSION := current 35 | 36 | include $(BUILD_PACKAGE) 37 | 38 | -------------------------------------------------------------------------------- /res/xml/bookmarks_searchable.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 31 | -------------------------------------------------------------------------------- /res/layout/tabs.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 20 | 21 | 25 | 26 | 30 | 31 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /res/xml/searchable.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 19 | 20 | 34 | -------------------------------------------------------------------------------- /res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 20 | 22 | 23 | #ffffffff 24 | #ff000000 25 | 26 | #ffffffff 27 | #ff000000 28 | 29 | #ffffffff 30 | #ffffffff 31 | 32 | #ffffffff 33 | #ff000000 34 | #ffbbbbbb 35 | #ff777777 36 | 37 | #ffdddddd 38 | 39 | 40 | -------------------------------------------------------------------------------- /res/values-ja/arrays.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 18 | 19 | "割り当てられません" 20 | "5MB" 21 | "10MB" 22 | "30MB" 23 | "100MB" 24 | 25 | 26 | "0" 27 | "5" 28 | "10" 29 | "30" 30 | "100" 31 | 32 | 33 | -------------------------------------------------------------------------------- /res/values-ko/arrays.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 18 | 19 | "할당된 저장용량이 없습니다." 20 | "5MB" 21 | "10MB" 22 | "30MB" 23 | "100MB" 24 | 25 | 26 | "0" 27 | "5" 28 | "10" 29 | "30" 30 | "100" 31 | 32 | 33 | -------------------------------------------------------------------------------- /res/values-zh-rCN/arrays.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 18 | 19 | "不允许设置配额" 20 | "5 MB" 21 | "10 MB" 22 | "30 MB" 23 | "100 MB" 24 | 25 | 26 | "0" 27 | "5" 28 | "10" 29 | "30" 30 | "100" 31 | 32 | 33 | -------------------------------------------------------------------------------- /res/values-zh-rTW/arrays.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 18 | 19 | "未獲得任何配額" 20 | "5 MB" 21 | "10 MB" 22 | "30 MB" 23 | "100 MB" 24 | 25 | 26 | "0" 27 | "5" 28 | "10" 29 | "30" 30 | "100" 31 | 32 | 33 | -------------------------------------------------------------------------------- /res/values-nb/arrays.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 18 | 19 | "Ingen kvote tillatt" 20 | "5 MB" 21 | "10 MB" 22 | "30 MB" 23 | "100 MB" 24 | 25 | 26 | "0" 27 | "5" 28 | "10" 29 | "30" 30 | "100" 31 | 32 | 33 | -------------------------------------------------------------------------------- /res/values-ru/arrays.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 18 | 19 | "Квота не назначена" 20 | "5 МБ" 21 | "10 МБ" 22 | "30 МБ" 23 | "100 МБ" 24 | 25 | 26 | "0" 27 | "5" 28 | "10" 29 | "30" 30 | "100" 31 | 32 | 33 | -------------------------------------------------------------------------------- /res/values-sv/arrays.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 18 | 19 | "Ingen kvot tillåts" 20 | "5 MB" 21 | "10 MB" 22 | "30 MB" 23 | "100 MB" 24 | 25 | 26 | "0" 27 | "5" 28 | "10" 29 | "30" 30 | "100" 31 | 32 | 33 | -------------------------------------------------------------------------------- /res/values-de/arrays.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 18 | 19 | "Kein Kontingent erlaubt" 20 | "5 MB" 21 | "10 MB" 22 | "30 MB" 23 | "100 MB" 24 | 25 | 26 | "0" 27 | "5" 28 | "10" 29 | "30" 30 | "100" 31 | 32 | 33 | -------------------------------------------------------------------------------- /res/values-el/arrays.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 18 | 19 | "Δεν επιτρέπονται όρια" 20 | "5 MB" 21 | "10 MB" 22 | "30 MB" 23 | "100 MB" 24 | 25 | 26 | "0" 27 | "5" 28 | "10" 29 | "30" 30 | "100" 31 | 32 | 33 | -------------------------------------------------------------------------------- /res/values-es-rUS/arrays.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 18 | 19 | "Cuota no permitida" 20 | "5 MB" 21 | "10 MB" 22 | "30 MB" 23 | "100 MB" 24 | 25 | 26 | "0" 27 | "5" 28 | "10" 29 | "30" 30 | "100" 31 | 32 | 33 | -------------------------------------------------------------------------------- /res/values-es/arrays.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 18 | 19 | "Ninguna cuota permitida" 20 | "5 MB" 21 | "10 MB" 22 | "30 MB" 23 | "100 MB" 24 | 25 | 26 | "0" 27 | "5" 28 | "10" 29 | "30" 30 | "100" 31 | 32 | 33 | -------------------------------------------------------------------------------- /res/values-fr/arrays.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 18 | 19 | "Aucun quota autorisé" 20 | "5 Mo" 21 | "10 Mo" 22 | "30 Mo" 23 | "100 Mo" 24 | 25 | 26 | "0" 27 | "5" 28 | "10" 29 | "30" 30 | "100" 31 | 32 | 33 | -------------------------------------------------------------------------------- /res/values-it/arrays.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 18 | 19 | "Nessuna quota consentita" 20 | "5 MB" 21 | "10 MB" 22 | "30 MB" 23 | "100 MB" 24 | 25 | 26 | "0" 27 | "5" 28 | "10" 29 | "30" 30 | "100" 31 | 32 | 33 | -------------------------------------------------------------------------------- /res/values-nl/arrays.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 18 | 19 | "Geen maximum toegestaan" 20 | "5 MB" 21 | "10 MB" 22 | "30 MB" 23 | "100 MB" 24 | 25 | 26 | "0" 27 | "5" 28 | "10" 29 | "30" 30 | "100" 31 | 32 | 33 | -------------------------------------------------------------------------------- /res/values-pt/arrays.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 18 | 19 | "Nenhuma quota permitida" 20 | "5 MB" 21 | "10 MB" 22 | "30 MB" 23 | "100 MB" 24 | 25 | 26 | "0" 27 | "5" 28 | "10" 29 | "30" 30 | "100" 31 | 32 | 33 | -------------------------------------------------------------------------------- /res/values-tr/arrays.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 18 | 19 | "İzin verilen kota yok" 20 | "5 MB" 21 | "10 MB" 22 | "30 MB" 23 | "100 MB" 24 | 25 | 26 | "0" 27 | "5" 28 | "10" 29 | "30" 30 | "100" 31 | 32 | 33 | -------------------------------------------------------------------------------- /res/values-cs/arrays.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 18 | 19 | "Není povolena žádná kvóta" 20 | "5 MB" 21 | "10 MB" 22 | "30 MB" 23 | "100 MB" 24 | 25 | 26 | "0" 27 | "5" 28 | "10" 29 | "30" 30 | "100" 31 | 32 | 33 | -------------------------------------------------------------------------------- /res/values-da/arrays.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 18 | 19 | "Der er ingen tilladt kvote" 20 | "5 Mb" 21 | "10 Mb" 22 | "30 Mb" 23 | "100 Mb" 24 | 25 | 26 | "0" 27 | "5" 28 | "10" 29 | "30" 30 | "100" 31 | 32 | 33 | -------------------------------------------------------------------------------- /res/values-pl/arrays.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 18 | 19 | "Brak dozwolonego przydziału" 20 | "5 MB" 21 | "10 MB" 22 | "30 MB" 23 | "100 MB" 24 | 25 | 26 | "0" 27 | "5" 28 | "10" 29 | "30" 30 | "100" 31 | 32 | 33 | -------------------------------------------------------------------------------- /res/values-pt-rPT/arrays.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 18 | 19 | "Nenhuma quota permitida" 20 | "5 MB" 21 | "10 MB" 22 | "30 MB" 23 | "100 MB" 24 | 25 | 26 | "0" 27 | "5" 28 | "10" 29 | "30" 30 | "100" 31 | 32 | 33 | -------------------------------------------------------------------------------- /res/layout/custom_screen.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 24 | 27 | 28 | 32 | 33 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /res/menu/historycontext.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 20 | 22 | 24 | 26 | 28 | 30 | 32 | 33 | -------------------------------------------------------------------------------- /src/com/android/browser/BookmarkSearch.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009 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 | 17 | package com.android.browser; 18 | 19 | import android.app.Activity; 20 | import android.content.Intent; 21 | import android.os.Bundle; 22 | 23 | /** 24 | * This activity is never started from the browser. Its purpose is to provide bookmark suggestions 25 | * to global search (through its searchable meta-data), and to handle the intents produced 26 | * by clicking such suggestions. 27 | */ 28 | public class BookmarkSearch extends Activity { 29 | 30 | @Override 31 | protected void onCreate(Bundle savedInstanceState) { 32 | super.onCreate(savedInstanceState); 33 | Intent intent = getIntent(); 34 | if (intent != null) { 35 | String action = intent.getAction(); 36 | if (Intent.ACTION_VIEW.equals(action)) { 37 | intent.setClass(this, BrowserActivity.class); 38 | startActivity(intent); 39 | } 40 | } 41 | finish(); 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /res/layout/tab_view_add_tab.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 24 | 30 | 39 | 40 | -------------------------------------------------------------------------------- /res/layout/video_loading_progress.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 23 | 24 | 29 | 30 | 36 | -------------------------------------------------------------------------------- /res/layout/ssl_warning.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 22 | 23 | 24 | 29 | 30 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /res/layout/tab.xml: -------------------------------------------------------------------------------- 1 | 2 | 21 | 22 | 27 | 28 | 29 | 33 | 34 | 35 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /tests/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 20 | 21 | 24 | 25 | 26 | 27 | 28 | 33 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /res/layout/active_tabs.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 23 | 28 | 37 | 38 | 44 | 45 | -------------------------------------------------------------------------------- /res/layout/ssl_success.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 21 | 22 | 23 | 30 | 31 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /res/menu/bookmarkscontext.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 | 21 | 22 | 23 | 25 | 27 | 29 | 31 | 33 | 35 | 37 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /res/layout/ssl_warnings.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 22 | 23 | 27 | 28 | 29 | 40 | 41 | 42 | 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /src/com/android/browser/AddNewBookmark.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2008 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 | 17 | package com.android.browser; 18 | 19 | import android.content.Context; 20 | import android.view.LayoutInflater; 21 | import android.widget.ImageView; 22 | import android.widget.LinearLayout; 23 | import android.widget.TextView; 24 | 25 | /** 26 | * Custom layout for an item representing a bookmark in the browser. 27 | */ 28 | // FIXME: Remove BrowserBookmarkItem 29 | class AddNewBookmark extends LinearLayout { 30 | 31 | private TextView mTextView; 32 | private TextView mUrlText; 33 | private ImageView mImageView; 34 | 35 | /** 36 | * Instantiate a bookmark item, including a default favicon. 37 | * 38 | * @param context The application context for the item. 39 | */ 40 | AddNewBookmark(Context context) { 41 | super(context); 42 | 43 | setWillNotDraw(false); 44 | LayoutInflater factory = LayoutInflater.from(context); 45 | factory.inflate(R.layout.add_new_bookmark, this); 46 | mTextView = (TextView) findViewById(R.id.title); 47 | mUrlText = (TextView) findViewById(R.id.url); 48 | mImageView = (ImageView) findViewById(R.id.favicon); 49 | } 50 | 51 | /** 52 | * Set the new url for the bookmark item. 53 | * @param url The new url for the bookmark item. 54 | */ 55 | /* package */ void setUrl(String url) { 56 | mUrlText.setText(url); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /res/layout/tabitem.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 22 | 23 | 27 | 28 | 41 | 42 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /res/layout/browser_subwindow.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 21 | 25 | 30 | 35 | 36 | 37 | 43 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /src/com/android/browser/Browser.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2006 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 | 17 | package com.android.browser; 18 | 19 | import android.util.Log; 20 | 21 | import android.app.Application; 22 | import android.content.Intent; 23 | import android.webkit.CookieManager; 24 | import android.webkit.CookieSyncManager; 25 | 26 | import dalvik.system.VMRuntime; 27 | 28 | public class Browser extends Application { 29 | 30 | private final static String LOGTAG = "browser"; 31 | 32 | // Set to true to enable extra debugging. 33 | final static boolean DEBUG = false; 34 | 35 | // Set to true to enable verbose logging. 36 | final static boolean LOGV_ENABLED = DEBUG; 37 | 38 | // Set to true to enable extra debug logging. 39 | final static boolean LOGD_ENABLED = true; 40 | 41 | /** 42 | * Specifies a heap utilization ratio that works better 43 | * for the browser than the default ratio does. 44 | */ 45 | private final static float TARGET_HEAP_UTILIZATION = 0.75f; 46 | 47 | public Browser() { 48 | } 49 | 50 | public void onCreate() { 51 | if (LOGV_ENABLED) 52 | Log.v(LOGTAG, "Browser.onCreate: this=" + this); 53 | // Fix heap utilization for better heap size characteristics. 54 | VMRuntime.getRuntime().setTargetHeapUtilization( 55 | TARGET_HEAP_UTILIZATION); 56 | // create CookieSyncManager with current Context 57 | CookieSyncManager.createInstance(this); 58 | // remove all expired cookies 59 | CookieManager.getInstance().removeExpiredCookie(); 60 | } 61 | 62 | static Intent createBrowserViewIntent() { 63 | Intent intent = new Intent(Intent.ACTION_WEB_SEARCH); 64 | return intent; 65 | } 66 | } 67 | 68 | -------------------------------------------------------------------------------- /res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 20 | 21 | 28 | 29 | 33 | 34 | 44 | 45 | 49 | 50 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /src/com/android/browser/BrowserHomepagePreference.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2008 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 | 17 | package com.android.browser; 18 | 19 | import android.app.AlertDialog; 20 | import android.content.Context; 21 | import android.preference.EditTextPreference; 22 | import android.util.AttributeSet; 23 | 24 | public class BrowserHomepagePreference extends EditTextPreference { 25 | 26 | public BrowserHomepagePreference(Context context, AttributeSet attrs, 27 | int defStyle) { 28 | super(context, attrs, defStyle); 29 | } 30 | 31 | public BrowserHomepagePreference(Context context, AttributeSet attrs) { 32 | super(context, attrs); 33 | } 34 | 35 | public BrowserHomepagePreference(Context context) { 36 | super(context); 37 | } 38 | 39 | @Override 40 | protected void onDialogClosed(boolean positiveResult) { 41 | if (positiveResult) { 42 | String url = getEditText().getText().toString(); 43 | if (url.length() > 0 44 | && !BrowserActivity.ACCEPTED_URI_SCHEMA.matcher(url) 45 | .matches()) { 46 | int colon = url.indexOf(':'); 47 | int space = url.indexOf(' '); 48 | if (colon == -1 && space == -1) { 49 | // if no colon, no space, add "http://" to make it a url 50 | getEditText().setText("http://" + url); 51 | } else { 52 | // show an error dialog and change the positiveResult to 53 | // false so that the bad url will not override the old url 54 | new AlertDialog.Builder(this.getContext()).setMessage( 55 | R.string.bookmark_url_not_valid).setPositiveButton( 56 | R.string.ok, null).show(); 57 | positiveResult = false; 58 | } 59 | } 60 | } 61 | super.onDialogClosed(positiveResult); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /res/layout/add_new_bookmark.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 28 | 37 | 42 | 50 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /src/com/android/browser/BrowserYesNoPreference.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2008 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 | 17 | package com.android.browser; 18 | 19 | import com.android.internal.preference.YesNoPreference; 20 | 21 | import android.content.Context; 22 | import android.util.AttributeSet; 23 | 24 | class BrowserYesNoPreference extends YesNoPreference { 25 | 26 | // This is the constructor called by the inflater 27 | public BrowserYesNoPreference(Context context, AttributeSet attrs) { 28 | super(context, attrs); 29 | } 30 | 31 | @Override 32 | protected void onDialogClosed(boolean positiveResult) { 33 | super.onDialogClosed(positiveResult); 34 | 35 | if (positiveResult) { 36 | setEnabled(false); 37 | 38 | Context context = getContext(); 39 | if (BrowserSettings.PREF_CLEAR_CACHE.equals(getKey())) { 40 | BrowserSettings.getInstance().clearCache(context); 41 | BrowserSettings.getInstance().clearDatabases(context); 42 | } else if (BrowserSettings.PREF_CLEAR_COOKIES.equals(getKey())) { 43 | BrowserSettings.getInstance().clearCookies(context); 44 | } else if (BrowserSettings.PREF_CLEAR_HISTORY.equals(getKey())) { 45 | BrowserSettings.getInstance().clearHistory(context); 46 | } else if (BrowserSettings.PREF_CLEAR_FORM_DATA.equals(getKey())) { 47 | BrowserSettings.getInstance().clearFormData(context); 48 | } else if (BrowserSettings.PREF_CLEAR_PASSWORDS.equals(getKey())) { 49 | BrowserSettings.getInstance().clearPasswords(context); 50 | } else if (BrowserSettings.PREF_EXTRAS_RESET_DEFAULTS.equals( 51 | getKey())) { 52 | BrowserSettings.getInstance().resetDefaultPreferences(context); 53 | setEnabled(true); 54 | } else if (BrowserSettings.PREF_CLEAR_GEOLOCATION_ACCESS.equals( 55 | getKey())) { 56 | BrowserSettings.getInstance().clearLocationAccess(context); 57 | } 58 | } 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/com/android/browser/Dots.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2008 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 | 17 | package com.android.browser; 18 | 19 | import android.content.Context; 20 | import android.util.AttributeSet; 21 | import android.view.Gravity; 22 | import android.widget.ImageView; 23 | import android.widget.LinearLayout; 24 | 25 | import java.util.Map; 26 | 27 | /** 28 | * Displays a series of dots. The selected one is highlighted. 29 | * No animations yet. Nothing fancy. 30 | */ 31 | class Dots extends LinearLayout { 32 | 33 | private static final int MAX_DOTS = 8; 34 | private int mSelected = -1; 35 | 36 | public Dots(Context context) { 37 | this(context, null); 38 | } 39 | 40 | public Dots(Context context, AttributeSet attrs) { 41 | super(context, attrs); 42 | 43 | setGravity(Gravity.CENTER); 44 | setPadding(0, 4, 0, 4); 45 | 46 | LayoutParams lp = 47 | new LayoutParams(LayoutParams.WRAP_CONTENT, 48 | LayoutParams.WRAP_CONTENT); 49 | 50 | for (int i = 0; i < MAX_DOTS; i++) { 51 | ImageView dotView = new ImageView(mContext); 52 | dotView.setImageResource(R.drawable.page_indicator_unselected2); 53 | addView(dotView, lp); 54 | } 55 | } 56 | 57 | /** 58 | * @param dotCount if less than 1 or greater than MAX_DOTS, Dots 59 | * disappears 60 | */ 61 | public void setDotCount(int dotCount) { 62 | if (dotCount > 1 && dotCount <= MAX_DOTS) { 63 | setVisibility(VISIBLE); 64 | for (int i = 0; i < MAX_DOTS; i++) { 65 | getChildAt(i).setVisibility(i < dotCount? VISIBLE : GONE); 66 | } 67 | } else { 68 | setVisibility(GONE); 69 | } 70 | } 71 | 72 | public void setSelected(int index) { 73 | if (index < 0 || index >= MAX_DOTS) return; 74 | 75 | if (mSelected >= 0) { 76 | // Unselect old 77 | ((ImageView)getChildAt(mSelected)).setImageResource( 78 | R.drawable.page_indicator_unselected2); 79 | } 80 | ((ImageView)getChildAt(index)).setImageResource(R.drawable.page_indicator); 81 | mSelected = index; 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /res/layout/error_console.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 17 | 18 | 24 | 25 | 35 | 36 | 44 | 45 | 50 | 51 | 60 | 61 |