Merge "Limit the number of preloader sessions to one."
diff --git a/res/drawable-hdpi/ic_bookmark_off_holo_dark.png b/res/drawable-hdpi/ic_bookmark_off_holo_dark.png
index 9ec0a44..fd5fdb9 100644
--- a/res/drawable-hdpi/ic_bookmark_off_holo_dark.png
+++ b/res/drawable-hdpi/ic_bookmark_off_holo_dark.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_bookmark_on_holo_dark.png b/res/drawable-hdpi/ic_bookmark_on_holo_dark.png
index 1d67f1a..4651918 100644
--- a/res/drawable-hdpi/ic_bookmark_on_holo_dark.png
+++ b/res/drawable-hdpi/ic_bookmark_on_holo_dark.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_bookmarks_holo_dark.png b/res/drawable-hdpi/ic_bookmarks_holo_dark.png
index d3070bf..76f54a1 100644
--- a/res/drawable-hdpi/ic_bookmarks_holo_dark.png
+++ b/res/drawable-hdpi/ic_bookmarks_holo_dark.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_close_window_holo_dark.png b/res/drawable-hdpi/ic_close_window_holo_dark.png
index d459352..6e852ec 100644
--- a/res/drawable-hdpi/ic_close_window_holo_dark.png
+++ b/res/drawable-hdpi/ic_close_window_holo_dark.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_incognito_holo_dark.png b/res/drawable-hdpi/ic_incognito_holo_dark.png
index f4997ae..9d6bc59 100644
--- a/res/drawable-hdpi/ic_incognito_holo_dark.png
+++ b/res/drawable-hdpi/ic_incognito_holo_dark.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_new_window_holo_dark.png b/res/drawable-hdpi/ic_new_window_holo_dark.png
index bc4017a..2849a16 100644
--- a/res/drawable-hdpi/ic_new_window_holo_dark.png
+++ b/res/drawable-hdpi/ic_new_window_holo_dark.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_refresh_holo_dark.png b/res/drawable-hdpi/ic_refresh_holo_dark.png
index 1da3ea8..f6c4f72 100644
--- a/res/drawable-hdpi/ic_refresh_holo_dark.png
+++ b/res/drawable-hdpi/ic_refresh_holo_dark.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_search_holo_dark.png b/res/drawable-hdpi/ic_search_holo_dark.png
index 688ef5d..8ed044a 100644
--- a/res/drawable-hdpi/ic_search_holo_dark.png
+++ b/res/drawable-hdpi/ic_search_holo_dark.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_stop_holo_dark.png b/res/drawable-hdpi/ic_stop_holo_dark.png
index e31dd22..b68c60f 100644
--- a/res/drawable-hdpi/ic_stop_holo_dark.png
+++ b/res/drawable-hdpi/ic_stop_holo_dark.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_web_holo_dark.png b/res/drawable-hdpi/ic_web_holo_dark.png
index d936c2c..1afe636 100644
--- a/res/drawable-hdpi/ic_web_holo_dark.png
+++ b/res/drawable-hdpi/ic_web_holo_dark.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_windows_holo_dark.png b/res/drawable-hdpi/ic_windows_holo_dark.png
index 98d5693..c79005c 100644
--- a/res/drawable-hdpi/ic_windows_holo_dark.png
+++ b/res/drawable-hdpi/ic_windows_holo_dark.png
Binary files differ
diff --git a/res/drawable-hdpi/nav_tab_bg.9.png b/res/drawable-hdpi/nav_tab_bg.9.png
new file mode 100644
index 0000000..203c358
--- /dev/null
+++ b/res/drawable-hdpi/nav_tab_bg.9.png
Binary files differ
diff --git a/res/drawable-mdpi/browsertab_add.png b/res/drawable-mdpi/browsertab_add.png
index f960c1d..3f20f2a 100644
--- a/res/drawable-mdpi/browsertab_add.png
+++ b/res/drawable-mdpi/browsertab_add.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_bookmark_off_holo_dark.png b/res/drawable-mdpi/ic_bookmark_off_holo_dark.png
index 7446bdf..a863fe6 100644
--- a/res/drawable-mdpi/ic_bookmark_off_holo_dark.png
+++ b/res/drawable-mdpi/ic_bookmark_off_holo_dark.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_bookmark_on_holo_dark.png b/res/drawable-mdpi/ic_bookmark_on_holo_dark.png
index 79a183f..5a6d469 100644
--- a/res/drawable-mdpi/ic_bookmark_on_holo_dark.png
+++ b/res/drawable-mdpi/ic_bookmark_on_holo_dark.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_bookmarks_holo_dark.png b/res/drawable-mdpi/ic_bookmarks_holo_dark.png
index ea45051..8cd9242 100644
--- a/res/drawable-mdpi/ic_bookmarks_holo_dark.png
+++ b/res/drawable-mdpi/ic_bookmarks_holo_dark.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_close_window_holo_dark.png b/res/drawable-mdpi/ic_close_window_holo_dark.png
index 9bb8e87..95d6f62 100644
--- a/res/drawable-mdpi/ic_close_window_holo_dark.png
+++ b/res/drawable-mdpi/ic_close_window_holo_dark.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_incognito_holo_dark.png b/res/drawable-mdpi/ic_incognito_holo_dark.png
index dfb380a..14747b6 100644
--- a/res/drawable-mdpi/ic_incognito_holo_dark.png
+++ b/res/drawable-mdpi/ic_incognito_holo_dark.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_new_window_holo_dark.png b/res/drawable-mdpi/ic_new_window_holo_dark.png
index b16aacc..5cdd4b5 100644
--- a/res/drawable-mdpi/ic_new_window_holo_dark.png
+++ b/res/drawable-mdpi/ic_new_window_holo_dark.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_refresh_holo_dark.png b/res/drawable-mdpi/ic_refresh_holo_dark.png
index 0aec8a0..bcb350f 100644
--- a/res/drawable-mdpi/ic_refresh_holo_dark.png
+++ b/res/drawable-mdpi/ic_refresh_holo_dark.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_search_holo_dark.png b/res/drawable-mdpi/ic_search_holo_dark.png
index a84edf3..b5eeb78 100644
--- a/res/drawable-mdpi/ic_search_holo_dark.png
+++ b/res/drawable-mdpi/ic_search_holo_dark.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_stop_holo_dark.png b/res/drawable-mdpi/ic_stop_holo_dark.png
index 61edb02..b230ab9 100644
--- a/res/drawable-mdpi/ic_stop_holo_dark.png
+++ b/res/drawable-mdpi/ic_stop_holo_dark.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_web_holo_dark.png b/res/drawable-mdpi/ic_web_holo_dark.png
index fcf6785..b394fbb 100644
--- a/res/drawable-mdpi/ic_web_holo_dark.png
+++ b/res/drawable-mdpi/ic_web_holo_dark.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_windows_holo_dark.png b/res/drawable-mdpi/ic_windows_holo_dark.png
index 7eabd08..37891ee 100644
--- a/res/drawable-mdpi/ic_windows_holo_dark.png
+++ b/res/drawable-mdpi/ic_windows_holo_dark.png
Binary files differ
diff --git a/res/drawable-mdpi/nav_tab_bg.9.png b/res/drawable-mdpi/nav_tab_bg.9.png
new file mode 100644
index 0000000..8c466d8
--- /dev/null
+++ b/res/drawable-mdpi/nav_tab_bg.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/app_web_browser_sm.png b/res/drawable-xhdpi/app_web_browser_sm.png
new file mode 100644
index 0000000..35d857b
--- /dev/null
+++ b/res/drawable-xhdpi/app_web_browser_sm.png
Binary files differ
diff --git a/res/drawable-xhdpi/bg_bookmarks_widget_holo.9.png b/res/drawable-xhdpi/bg_bookmarks_widget_holo.9.png
new file mode 100644
index 0000000..62b411e
--- /dev/null
+++ b/res/drawable-xhdpi/bg_bookmarks_widget_holo.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/bookmarks_widget_thumb_selector_focused.9.png b/res/drawable-xhdpi/bookmarks_widget_thumb_selector_focused.9.png
new file mode 100644
index 0000000..e95564f
--- /dev/null
+++ b/res/drawable-xhdpi/bookmarks_widget_thumb_selector_focused.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/bookmarks_widget_thumb_selector_longpressed.9.png b/res/drawable-xhdpi/bookmarks_widget_thumb_selector_longpressed.9.png
new file mode 100644
index 0000000..ed5a00b
--- /dev/null
+++ b/res/drawable-xhdpi/bookmarks_widget_thumb_selector_longpressed.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/bookmarks_widget_thumb_selector_pressed.9.png b/res/drawable-xhdpi/bookmarks_widget_thumb_selector_pressed.9.png
new file mode 100644
index 0000000..20941ec
--- /dev/null
+++ b/res/drawable-xhdpi/bookmarks_widget_thumb_selector_pressed.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/border_thumb_bookmarks_widget_holo.9.png b/res/drawable-xhdpi/border_thumb_bookmarks_widget_holo.9.png
new file mode 100644
index 0000000..40964eb
--- /dev/null
+++ b/res/drawable-xhdpi/border_thumb_bookmarks_widget_holo.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/browser_thumbnail.png b/res/drawable-xhdpi/browser_thumbnail.png
new file mode 100644
index 0000000..a2db941
--- /dev/null
+++ b/res/drawable-xhdpi/browser_thumbnail.png
Binary files differ
diff --git a/res/drawable-xhdpi/browser_widget_preview.png b/res/drawable-xhdpi/browser_widget_preview.png
new file mode 100644
index 0000000..2112b9e
--- /dev/null
+++ b/res/drawable-xhdpi/browser_widget_preview.png
Binary files differ
diff --git a/res/drawable-xhdpi/browsertab_add.png b/res/drawable-xhdpi/browsertab_add.png
new file mode 100644
index 0000000..e44f72b
--- /dev/null
+++ b/res/drawable-xhdpi/browsertab_add.png
Binary files differ
diff --git a/res/drawable-xhdpi/browsertab_add_focused.png b/res/drawable-xhdpi/browsertab_add_focused.png
new file mode 100644
index 0000000..7039974
--- /dev/null
+++ b/res/drawable-xhdpi/browsertab_add_focused.png
Binary files differ
diff --git a/res/drawable-xhdpi/browsertab_inactive.png b/res/drawable-xhdpi/browsertab_inactive.png
new file mode 100644
index 0000000..28eeed4
--- /dev/null
+++ b/res/drawable-xhdpi/browsertab_inactive.png
Binary files differ
diff --git a/res/drawable-xhdpi/default_video_poster.png b/res/drawable-xhdpi/default_video_poster.png
new file mode 100644
index 0000000..5eff15c
--- /dev/null
+++ b/res/drawable-xhdpi/default_video_poster.png
Binary files differ
diff --git a/res/drawable-xhdpi/geolocation_permissions_prompt_background.9.png b/res/drawable-xhdpi/geolocation_permissions_prompt_background.9.png
new file mode 100644
index 0000000..19a35a3
--- /dev/null
+++ b/res/drawable-xhdpi/geolocation_permissions_prompt_background.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_add_string.png b/res/drawable-xhdpi/ic_add_string.png
new file mode 100644
index 0000000..7ea150d
--- /dev/null
+++ b/res/drawable-xhdpi/ic_add_string.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_back_disabled_holo_dark.png b/res/drawable-xhdpi/ic_back_disabled_holo_dark.png
new file mode 100644
index 0000000..9f99c00
--- /dev/null
+++ b/res/drawable-xhdpi/ic_back_disabled_holo_dark.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_back_hierarchy_holo_dark.png b/res/drawable-xhdpi/ic_back_hierarchy_holo_dark.png
new file mode 100644
index 0000000..e459b98
--- /dev/null
+++ b/res/drawable-xhdpi/ic_back_hierarchy_holo_dark.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_back_holo_dark.png b/res/drawable-xhdpi/ic_back_holo_dark.png
new file mode 100644
index 0000000..f79f20a
--- /dev/null
+++ b/res/drawable-xhdpi/ic_back_holo_dark.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_bookmark_off_holo_dark.png b/res/drawable-xhdpi/ic_bookmark_off_holo_dark.png
new file mode 100644
index 0000000..05e9ec8
--- /dev/null
+++ b/res/drawable-xhdpi/ic_bookmark_off_holo_dark.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_bookmark_on_holo_dark.png b/res/drawable-xhdpi/ic_bookmark_on_holo_dark.png
new file mode 100644
index 0000000..764adb3
--- /dev/null
+++ b/res/drawable-xhdpi/ic_bookmark_on_holo_dark.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_bookmark_widget_bookmark_holo_dark.png b/res/drawable-xhdpi/ic_bookmark_widget_bookmark_holo_dark.png
new file mode 100644
index 0000000..8025248
--- /dev/null
+++ b/res/drawable-xhdpi/ic_bookmark_widget_bookmark_holo_dark.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_bookmarks_history_holo_dark.png b/res/drawable-xhdpi/ic_bookmarks_history_holo_dark.png
new file mode 100644
index 0000000..702379b
--- /dev/null
+++ b/res/drawable-xhdpi/ic_bookmarks_history_holo_dark.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_bookmarks_holo_dark.png b/res/drawable-xhdpi/ic_bookmarks_holo_dark.png
new file mode 100644
index 0000000..68b0a61
--- /dev/null
+++ b/res/drawable-xhdpi/ic_bookmarks_holo_dark.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_close_window_holo_dark.png b/res/drawable-xhdpi/ic_close_window_holo_dark.png
new file mode 100644
index 0000000..dc17740
--- /dev/null
+++ b/res/drawable-xhdpi/ic_close_window_holo_dark.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_dialog_browser_certificate_partially_secure.png b/res/drawable-xhdpi/ic_dialog_browser_certificate_partially_secure.png
new file mode 100644
index 0000000..37c0b91
--- /dev/null
+++ b/res/drawable-xhdpi/ic_dialog_browser_certificate_partially_secure.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_dialog_browser_certificate_secure.png b/res/drawable-xhdpi/ic_dialog_browser_certificate_secure.png
new file mode 100644
index 0000000..036eba6
--- /dev/null
+++ b/res/drawable-xhdpi/ic_dialog_browser_certificate_secure.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_dialog_browser_security_bad.png b/res/drawable-xhdpi/ic_dialog_browser_security_bad.png
new file mode 100644
index 0000000..1e3068b
--- /dev/null
+++ b/res/drawable-xhdpi/ic_dialog_browser_security_bad.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_dialog_browser_security_good.png b/res/drawable-xhdpi/ic_dialog_browser_security_good.png
new file mode 100644
index 0000000..e8badf6
--- /dev/null
+++ b/res/drawable-xhdpi/ic_dialog_browser_security_good.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_downloads_holo_dark.png b/res/drawable-xhdpi/ic_downloads_holo_dark.png
new file mode 100644
index 0000000..0681bd2
--- /dev/null
+++ b/res/drawable-xhdpi/ic_downloads_holo_dark.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_folder_holo_dark.png b/res/drawable-xhdpi/ic_folder_holo_dark.png
new file mode 100644
index 0000000..6bdb7d0
--- /dev/null
+++ b/res/drawable-xhdpi/ic_folder_holo_dark.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_forward_disabled_holo_dark.png b/res/drawable-xhdpi/ic_forward_disabled_holo_dark.png
new file mode 100644
index 0000000..bbe6571
--- /dev/null
+++ b/res/drawable-xhdpi/ic_forward_disabled_holo_dark.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_forward_holo_dark.png b/res/drawable-xhdpi/ic_forward_holo_dark.png
new file mode 100644
index 0000000..c0e8371
--- /dev/null
+++ b/res/drawable-xhdpi/ic_forward_holo_dark.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_go_holo_dark.png b/res/drawable-xhdpi/ic_go_holo_dark.png
new file mode 100644
index 0000000..e4b59b3
--- /dev/null
+++ b/res/drawable-xhdpi/ic_go_holo_dark.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_gps_denied_holo_dark.png b/res/drawable-xhdpi/ic_gps_denied_holo_dark.png
new file mode 100644
index 0000000..a695cda
--- /dev/null
+++ b/res/drawable-xhdpi/ic_gps_denied_holo_dark.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_gps_on_holo_dark.png b/res/drawable-xhdpi/ic_gps_on_holo_dark.png
new file mode 100644
index 0000000..38c1892
--- /dev/null
+++ b/res/drawable-xhdpi/ic_gps_on_holo_dark.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_home_holo_dark.png b/res/drawable-xhdpi/ic_home_holo_dark.png
new file mode 100644
index 0000000..177abe9
--- /dev/null
+++ b/res/drawable-xhdpi/ic_home_holo_dark.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_home_info_holo_dark.png b/res/drawable-xhdpi/ic_home_info_holo_dark.png
new file mode 100644
index 0000000..6f43ba5
--- /dev/null
+++ b/res/drawable-xhdpi/ic_home_info_holo_dark.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_incognito_holo_dark.png b/res/drawable-xhdpi/ic_incognito_holo_dark.png
new file mode 100644
index 0000000..50009e9
--- /dev/null
+++ b/res/drawable-xhdpi/ic_incognito_holo_dark.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_launcher_shortcut_browser_bookmark.png b/res/drawable-xhdpi/ic_launcher_shortcut_browser_bookmark.png
new file mode 100644
index 0000000..0711f92
--- /dev/null
+++ b/res/drawable-xhdpi/ic_launcher_shortcut_browser_bookmark.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_list_data_large.png b/res/drawable-xhdpi/ic_list_data_large.png
new file mode 100644
index 0000000..4047c4d
--- /dev/null
+++ b/res/drawable-xhdpi/ic_list_data_large.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_list_data_off.png b/res/drawable-xhdpi/ic_list_data_off.png
new file mode 100644
index 0000000..b508b6b
--- /dev/null
+++ b/res/drawable-xhdpi/ic_list_data_off.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_list_data_small.png b/res/drawable-xhdpi/ic_list_data_small.png
new file mode 100644
index 0000000..680e69c
--- /dev/null
+++ b/res/drawable-xhdpi/ic_list_data_small.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_list_view_holo_dark.png b/res/drawable-xhdpi/ic_list_view_holo_dark.png
new file mode 100644
index 0000000..30270da
--- /dev/null
+++ b/res/drawable-xhdpi/ic_list_view_holo_dark.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_menu_findonpage_normal.png b/res/drawable-xhdpi/ic_menu_findonpage_normal.png
new file mode 100644
index 0000000..287b029
--- /dev/null
+++ b/res/drawable-xhdpi/ic_menu_findonpage_normal.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_menu_new_window.png b/res/drawable-xhdpi/ic_menu_new_window.png
new file mode 100644
index 0000000..6caa148
--- /dev/null
+++ b/res/drawable-xhdpi/ic_menu_new_window.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_new_incognito_holo_dark.png b/res/drawable-xhdpi/ic_new_incognito_holo_dark.png
new file mode 100644
index 0000000..2f21240
--- /dev/null
+++ b/res/drawable-xhdpi/ic_new_incognito_holo_dark.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_new_window_holo_dark.png b/res/drawable-xhdpi/ic_new_window_holo_dark.png
new file mode 100644
index 0000000..4f2e240
--- /dev/null
+++ b/res/drawable-xhdpi/ic_new_window_holo_dark.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_pageinfo_holo_dark.png b/res/drawable-xhdpi/ic_pageinfo_holo_dark.png
new file mode 100644
index 0000000..23e948a
--- /dev/null
+++ b/res/drawable-xhdpi/ic_pageinfo_holo_dark.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_partial_secure.png b/res/drawable-xhdpi/ic_partial_secure.png
new file mode 100644
index 0000000..82ff296
--- /dev/null
+++ b/res/drawable-xhdpi/ic_partial_secure.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_querybuilder_disabled.png b/res/drawable-xhdpi/ic_querybuilder_disabled.png
new file mode 100644
index 0000000..79fb478
--- /dev/null
+++ b/res/drawable-xhdpi/ic_querybuilder_disabled.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_querybuilder_normal.png b/res/drawable-xhdpi/ic_querybuilder_normal.png
new file mode 100644
index 0000000..cc3ce59
--- /dev/null
+++ b/res/drawable-xhdpi/ic_querybuilder_normal.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_querybuilder_pressed.png b/res/drawable-xhdpi/ic_querybuilder_pressed.png
new file mode 100644
index 0000000..0693fa3
--- /dev/null
+++ b/res/drawable-xhdpi/ic_querybuilder_pressed.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_refresh_holo_dark.png b/res/drawable-xhdpi/ic_refresh_holo_dark.png
new file mode 100644
index 0000000..716dd53
--- /dev/null
+++ b/res/drawable-xhdpi/ic_refresh_holo_dark.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_search_category_bookmark.png b/res/drawable-xhdpi/ic_search_category_bookmark.png
new file mode 100644
index 0000000..8b5ffa1
--- /dev/null
+++ b/res/drawable-xhdpi/ic_search_category_bookmark.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_search_category_browser.png b/res/drawable-xhdpi/ic_search_category_browser.png
new file mode 100644
index 0000000..8b195c1
--- /dev/null
+++ b/res/drawable-xhdpi/ic_search_category_browser.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_search_category_history.png b/res/drawable-xhdpi/ic_search_category_history.png
new file mode 100644
index 0000000..8a0e828
--- /dev/null
+++ b/res/drawable-xhdpi/ic_search_category_history.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_search_category_suggest.png b/res/drawable-xhdpi/ic_search_category_suggest.png
new file mode 100644
index 0000000..985a201
--- /dev/null
+++ b/res/drawable-xhdpi/ic_search_category_suggest.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_search_holo_dark.png b/res/drawable-xhdpi/ic_search_holo_dark.png
new file mode 100644
index 0000000..e94096f
--- /dev/null
+++ b/res/drawable-xhdpi/ic_search_holo_dark.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_secure_holo_dark.png b/res/drawable-xhdpi/ic_secure_holo_dark.png
new file mode 100644
index 0000000..0842acc
--- /dev/null
+++ b/res/drawable-xhdpi/ic_secure_holo_dark.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_settings_holo_dark.png b/res/drawable-xhdpi/ic_settings_holo_dark.png
new file mode 100644
index 0000000..0541407
--- /dev/null
+++ b/res/drawable-xhdpi/ic_settings_holo_dark.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_share_holo_dark.png b/res/drawable-xhdpi/ic_share_holo_dark.png
new file mode 100644
index 0000000..5c3047a
--- /dev/null
+++ b/res/drawable-xhdpi/ic_share_holo_dark.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_stop_holo_dark.png b/res/drawable-xhdpi/ic_stop_holo_dark.png
new file mode 100644
index 0000000..11cd91f
--- /dev/null
+++ b/res/drawable-xhdpi/ic_stop_holo_dark.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_tab_close.png b/res/drawable-xhdpi/ic_tab_close.png
new file mode 100644
index 0000000..fa63021
--- /dev/null
+++ b/res/drawable-xhdpi/ic_tab_close.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_thumbnail_view_holo_dark.png b/res/drawable-xhdpi/ic_thumbnail_view_holo_dark.png
new file mode 100644
index 0000000..d03787b
--- /dev/null
+++ b/res/drawable-xhdpi/ic_thumbnail_view_holo_dark.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_voice_search_holo_dark.png b/res/drawable-xhdpi/ic_voice_search_holo_dark.png
new file mode 100644
index 0000000..bfeb7aa
--- /dev/null
+++ b/res/drawable-xhdpi/ic_voice_search_holo_dark.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_web_holo_dark.png b/res/drawable-xhdpi/ic_web_holo_dark.png
new file mode 100644
index 0000000..7271169
--- /dev/null
+++ b/res/drawable-xhdpi/ic_web_holo_dark.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_windows_holo_dark.png b/res/drawable-xhdpi/ic_windows_holo_dark.png
new file mode 100644
index 0000000..f57eb68
--- /dev/null
+++ b/res/drawable-xhdpi/ic_windows_holo_dark.png
Binary files differ
diff --git a/res/drawable-xhdpi/magnifying_glass.png b/res/drawable-xhdpi/magnifying_glass.png
new file mode 100644
index 0000000..62742b7
--- /dev/null
+++ b/res/drawable-xhdpi/magnifying_glass.png
Binary files differ
diff --git a/res/drawable-xhdpi/nav_tab_bg.9.png b/res/drawable-xhdpi/nav_tab_bg.9.png
new file mode 100644
index 0000000..816bbe7
--- /dev/null
+++ b/res/drawable-xhdpi/nav_tab_bg.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/overlay_url_bookmark_widget_holo.9.png b/res/drawable-xhdpi/overlay_url_bookmark_widget_holo.9.png
new file mode 100644
index 0000000..829ea7f
--- /dev/null
+++ b/res/drawable-xhdpi/overlay_url_bookmark_widget_holo.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/progress.9.png b/res/drawable-xhdpi/progress.9.png
new file mode 100644
index 0000000..72a71cb
--- /dev/null
+++ b/res/drawable-xhdpi/progress.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/qc_background_normal.png b/res/drawable-xhdpi/qc_background_normal.png
new file mode 100644
index 0000000..bea09ca
--- /dev/null
+++ b/res/drawable-xhdpi/qc_background_normal.png
Binary files differ
diff --git a/res/drawable-xhdpi/row_activated_bookmark_widget_holo.9.png b/res/drawable-xhdpi/row_activated_bookmark_widget_holo.9.png
new file mode 100644
index 0000000..c4b1ab3
--- /dev/null
+++ b/res/drawable-xhdpi/row_activated_bookmark_widget_holo.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/tab_nr.png b/res/drawable-xhdpi/tab_nr.png
new file mode 100644
index 0000000..abc2937
--- /dev/null
+++ b/res/drawable-xhdpi/tab_nr.png
Binary files differ
diff --git a/res/drawable-xhdpi/textfield_active_holo_dark.9.png b/res/drawable-xhdpi/textfield_active_holo_dark.9.png
new file mode 100644
index 0000000..b0c52d5
--- /dev/null
+++ b/res/drawable-xhdpi/textfield_active_holo_dark.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/textfield_default_holo_dark.9.png b/res/drawable-xhdpi/textfield_default_holo_dark.9.png
new file mode 100644
index 0000000..c08ed41
--- /dev/null
+++ b/res/drawable-xhdpi/textfield_default_holo_dark.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/thumb_bookmark_widget_folder_back_holo.png b/res/drawable-xhdpi/thumb_bookmark_widget_folder_back_holo.png
new file mode 100644
index 0000000..6216ef1
--- /dev/null
+++ b/res/drawable-xhdpi/thumb_bookmark_widget_folder_back_holo.png
Binary files differ
diff --git a/res/drawable-xhdpi/thumb_bookmark_widget_folder_holo.png b/res/drawable-xhdpi/thumb_bookmark_widget_folder_holo.png
new file mode 100644
index 0000000..7e56f0f
--- /dev/null
+++ b/res/drawable-xhdpi/thumb_bookmark_widget_folder_holo.png
Binary files differ
diff --git a/res/drawable-xhdpi/thumbnail_bookmarks_widget_no_bookmark_holo.png b/res/drawable-xhdpi/thumbnail_bookmarks_widget_no_bookmark_holo.png
new file mode 100644
index 0000000..7d24d4a
--- /dev/null
+++ b/res/drawable-xhdpi/thumbnail_bookmarks_widget_no_bookmark_holo.png
Binary files differ
diff --git a/res/drawable-xhdpi/trashcan.png b/res/drawable-xhdpi/trashcan.png
new file mode 100644
index 0000000..8b9982c
--- /dev/null
+++ b/res/drawable-xhdpi/trashcan.png
Binary files differ
diff --git a/res/drawable/nav_tab_bg.9.png b/res/drawable/nav_tab_bg.9.png
deleted file mode 100644
index 9e0a23d..0000000
--- a/res/drawable/nav_tab_bg.9.png
+++ /dev/null
Binary files differ
diff --git a/res/mipmap-hdpi/ic_launcher_browser.png b/res/mipmap-hdpi/ic_launcher_browser.png
index 1f3e584..ef42d38 100644
--- a/res/mipmap-hdpi/ic_launcher_browser.png
+++ b/res/mipmap-hdpi/ic_launcher_browser.png
Binary files differ
diff --git a/res/mipmap-mdpi/ic_launcher_browser.png b/res/mipmap-mdpi/ic_launcher_browser.png
index 93c83d4..588d9af 100644
--- a/res/mipmap-mdpi/ic_launcher_browser.png
+++ b/res/mipmap-mdpi/ic_launcher_browser.png
Binary files differ
diff --git a/res/mipmap-xhdpi/ic_launcher_browser.png b/res/mipmap-xhdpi/ic_launcher_browser.png
new file mode 100644
index 0000000..19e045b
--- /dev/null
+++ b/res/mipmap-xhdpi/ic_launcher_browser.png
Binary files differ
diff --git a/res/mipmap-xhdpi/ic_launcher_shortcut_browser_bookmark.png b/res/mipmap-xhdpi/ic_launcher_shortcut_browser_bookmark.png
new file mode 100644
index 0000000..3ef819f
--- /dev/null
+++ b/res/mipmap-xhdpi/ic_launcher_shortcut_browser_bookmark.png
Binary files differ
diff --git a/src/com/android/browser/BrowserActivity.java b/src/com/android/browser/BrowserActivity.java
index b2a83e1..0df2e94 100644
--- a/src/com/android/browser/BrowserActivity.java
+++ b/src/com/android/browser/BrowserActivity.java
@@ -57,6 +57,13 @@
         }
         super.onCreate(icicle);
 
+        // If this was a web search request, pass it on to the default web
+        // search provider and finish this activity.
+        if (IntentHandler.handleWebSearchIntent(this, null, getIntent())) {
+            finish();
+            return;
+        }
+
         BrowserSettings settings = BrowserSettings.getInstance();
 
         // render the browser in OpenGL
@@ -69,20 +76,13 @@
             this.getWindow().setFlags(0, WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED);
         }
 
-        // If this was a web search request, pass it on to the default web
-        // search provider and finish this activity.
-        if (IntentHandler.handleWebSearchIntent(this, null, getIntent())) {
-            finish();
-            return;
-        }
-
         AccessibilityManager accessibilityManager = (AccessibilityManager)
                 getSystemService(ACCESSIBILITY_SERVICE);
         if (accessibilityManager != null && accessibilityManager.isEnabled()) {
             setDefaultKeyMode(DEFAULT_KEYS_DISABLE);
         }
 
-        mController = new Controller(this);
+        mController = new Controller(this, icicle == null);
         boolean xlarge = isTablet(this);
         if (xlarge) {
             mUi = new XLargeUi(this, mController);
diff --git a/src/com/android/browser/BrowserSettings.java b/src/com/android/browser/BrowserSettings.java
index 97769fc..a4f0f04 100644
--- a/src/com/android/browser/BrowserSettings.java
+++ b/src/com/android/browser/BrowserSettings.java
@@ -22,6 +22,7 @@
 import android.content.SharedPreferences;
 import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
 import android.os.Build;
+import android.os.Looper;
 import android.os.Message;
 import android.preference.PreferenceManager;
 import android.provider.Browser;
@@ -103,6 +104,10 @@
     private AutofillHandler mAutofillHandler;
     private WeakHashMap<WebSettings, String> mCustomUserAgents;
     private boolean mInitialized = false;
+    // Looper shared between some lightweight background operations
+    // Specifically, this is created on the thread that initializes browser settings
+    // and is then reused by CrashRecoveryHandler
+    private Looper mBackgroundLooper;
 
     // Cached values
     private int mPageCacheCapacity = 1;
@@ -127,7 +132,7 @@
         mCustomUserAgents = new WeakHashMap<WebSettings, String>();
         mPrefs.registerOnSharedPreferenceChangeListener(this);
         mAutofillHandler.asyncLoadFromDb();
-        new Thread(mInitialization, "BrowserSettingsInitialization").start();
+        new Thread(mSetupAndLoop, "BackgroundLooper").start();
     }
 
     public void setController(Controller controller) {
@@ -139,6 +144,11 @@
         }
     }
 
+    public Looper getBackgroundLooper() {
+        requireInitialization();
+        return mBackgroundLooper;
+    }
+
     public void startManagingSettings(WebSettings settings) {
         synchronized (mManagedSettings) {
             syncStaticSettings(settings);
@@ -147,7 +157,7 @@
         }
     }
 
-    private Runnable mInitialization = new Runnable() {
+    private Runnable mSetupAndLoop = new Runnable() {
 
         @Override
         public void run() {
@@ -189,10 +199,13 @@
                 }
                 mPrefs.edit().remove(PREF_TEXT_SIZE).apply();
             }
+            Looper.prepare();
+            mBackgroundLooper = Looper.myLooper();
             synchronized (BrowserSettings.this) {
                 mInitialized = true;
                 BrowserSettings.this.notifyAll();
             }
+            Looper.loop();
         }
     };
 
diff --git a/src/com/android/browser/Controller.java b/src/com/android/browser/Controller.java
index 03e2d8b..cf5df9e 100644
--- a/src/com/android/browser/Controller.java
+++ b/src/com/android/browser/Controller.java
@@ -206,7 +206,6 @@
     // Checks to see when the bookmarks database has changed, and updates the
     // Tabs' notion of whether they represent bookmarked sites.
     private ContentObserver mBookmarksObserver;
-    private DataController mDataController;
     private CrashRecoveryHandler mCrashRecoveryHandler;
 
     private boolean mSimulateActionBarOverlayMode;
@@ -225,13 +224,15 @@
         }
     }
 
-    public Controller(Activity browser) {
+    public Controller(Activity browser, boolean preloadCrashState) {
         mActivity = browser;
         mSettings = BrowserSettings.getInstance();
-        mDataController = DataController.getInstance(mActivity);
         mTabControl = new TabControl(this);
         mSettings.setController(this);
         mCrashRecoveryHandler = CrashRecoveryHandler.initialize(this);
+        if (preloadCrashState) {
+            mCrashRecoveryHandler.preloadCrashState();
+        }
         mFactory = new BrowserWebViewFactory(browser);
 
         mUrlHandler = new UrlHandler(this);
@@ -239,10 +240,6 @@
         mPageDialogsHandler = new PageDialogsHandler(mActivity, this);
         mNfcHandler = new NfcHandler(mActivity, this);
 
-        PowerManager pm = (PowerManager) mActivity
-                .getSystemService(Context.POWER_SERVICE);
-        mWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "Browser");
-
         startHandler();
         mBookmarksObserver = new ContentObserver(mHandler) {
             @Override
@@ -518,7 +515,7 @@
                         break;
 
                     case RELEASE_WAKELOCK:
-                        if (mWakeLock.isHeld()) {
+                        if (mWakeLock != null && mWakeLock.isHeld()) {
                             mWakeLock.release();
                             // if we reach here, Browser should be still in the
                             // background loading after WAKELOCK_TIMEOUT (5-min).
@@ -622,6 +619,11 @@
         if (tab != null) {
             tab.pause();
             if (!pauseWebViewTimers(tab)) {
+                if (mWakeLock == null) {
+                    PowerManager pm = (PowerManager) mActivity
+                            .getSystemService(Context.POWER_SERVICE);
+                    mWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "Browser");
+                }
                 mWakeLock.acquire();
                 mHandler.sendMessageDelayed(mHandler
                         .obtainMessage(RELEASE_WAKELOCK), WAKELOCK_TIMEOUT);
@@ -644,7 +646,7 @@
         // focused view XXX has no id".
 
         // Save all the tabs
-        mTabControl.saveState(outState, saveImages);
+        mTabControl.saveState(outState, false);
         if (!outState.isEmpty()) {
             // Save time so that we know how old incognito tabs (if any) are.
             outState.putSerializable("lastActiveDate", Calendar.getInstance());
@@ -662,10 +664,7 @@
             current.resume();
             resumeWebViewTimers(current);
         }
-        if (mWakeLock.isHeld()) {
-            mHandler.removeMessages(RELEASE_WAKELOCK);
-            mWakeLock.release();
-        }
+        releaseWakeLock();
 
         mUi.onResume();
         mNetworkHandler.onResume();
@@ -673,6 +672,13 @@
         WebView.enablePlatformNotifications();
     }
 
+    private void releaseWakeLock() {
+        if (mWakeLock != null && mWakeLock.isHeld()) {
+            mHandler.removeMessages(RELEASE_WAKELOCK);
+            mWakeLock.release();
+        }
+    }
+
     /**
      * resume all WebView timers using the WebView instance of the given tab
      * @param tab guaranteed non-null
@@ -832,10 +838,7 @@
         // pause the WebView timer and release the wake lock if it is finished
         // while BrowserActivity is in pause state.
         if (mActivityPaused && pauseWebViewTimers(tab)) {
-            if (mWakeLock.isHeld()) {
-                mHandler.removeMessages(RELEASE_WAKELOCK);
-                mWakeLock.release();
-            }
+            releaseWakeLock();
         }
 
         // Performance probe
@@ -890,7 +893,7 @@
         }
         // Update the title in the history database if not in private browsing mode
         if (!tab.isPrivateBrowsingEnabled()) {
-            mDataController.updateHistoryTitle(pageUrl, title);
+            DataController.getInstance(mActivity).updateHistoryTitle(pageUrl, title);
         }
     }
 
@@ -937,7 +940,7 @@
                 || url.regionMatches(true, 0, "about:", 0, 6)) {
             return;
         }
-        mDataController.updateVisitedHistory(url);
+        DataController.getInstance(mActivity).updateVisitedHistory(url);
         WebIconDatabase.getInstance().retainIconForPageUrl(url);
         if (!mActivityPaused) {
             // Since we clear the state in onPause, don't backup the current
@@ -2298,7 +2301,7 @@
     @Override
     public void closeCurrentTab() {
         if (mTabControl.getTabCount() == 1) {
-            CrashRecoveryHandler.clearState(mActivity);
+            mCrashRecoveryHandler.clearState();
             mActivity.finish();
             return;
         }
diff --git a/src/com/android/browser/CrashRecoveryHandler.java b/src/com/android/browser/CrashRecoveryHandler.java
index 8d7f243..995d119 100644
--- a/src/com/android/browser/CrashRecoveryHandler.java
+++ b/src/com/android/browser/CrashRecoveryHandler.java
@@ -25,9 +25,9 @@
 import android.content.SharedPreferences;
 import android.os.Bundle;
 import android.os.Handler;
-import android.os.HandlerThread;
+import android.os.Looper;
+import android.os.Message;
 import android.os.Parcel;
-import android.os.Process;
 import android.util.Log;
 
 import java.io.ByteArrayOutputStream;
@@ -51,11 +51,20 @@
      */
     private static final long PROMPT_INTERVAL = 30 * 60 * 1000; // 30 minutes
 
+    private static final int MSG_WRITE_STATE = 1;
+    private static final int MSG_CLEAR_STATE = 2;
+    private static final int MSG_PRELOAD_STATE = 3;
+
     private static CrashRecoveryHandler sInstance;
 
     private Controller mController;
+    private Context mContext;
     private Handler mForegroundHandler;
     private Handler mBackgroundHandler;
+    private boolean mIsPreloading = false;
+    private boolean mDidPreload = false;
+    private boolean mShouldPrompt = false;
+    private Bundle mRecoveryState = null;
 
     public static CrashRecoveryHandler initialize(Controller controller) {
         if (sInstance == null) {
@@ -72,11 +81,47 @@
 
     private CrashRecoveryHandler(Controller controller) {
         mController = controller;
+        mContext = mController.getActivity().getApplicationContext();
         mForegroundHandler = new Handler();
-        HandlerThread thread = new HandlerThread(LOGTAG,
-                Process.THREAD_PRIORITY_BACKGROUND);
-        thread.start();
-        mBackgroundHandler = new Handler(thread.getLooper());
+        Looper looper = BrowserSettings.getInstance().getBackgroundLooper();
+        mBackgroundHandler = new Handler(looper) {
+
+            @Override
+            public void handleMessage(Message msg) {
+                switch (msg.what) {
+                case MSG_WRITE_STATE:
+                    Parcel p = Parcel.obtain();
+                    try {
+                        Bundle state = (Bundle) msg.obj;
+                        state.writeToParcel(p, 0);
+                        File stateFile = new File(mContext.getCacheDir(), STATE_FILE);
+                        FileOutputStream fout = new FileOutputStream(stateFile);
+                        fout.write(p.marshall());
+                        fout.close();
+                    } catch (Throwable e) {
+                        Log.i(LOGTAG, "Failed to save persistent state", e);
+                    } finally {
+                        p.recycle();
+                    }
+                    break;
+                case MSG_CLEAR_STATE:
+                    File state = new File(mContext.getCacheDir(), STATE_FILE);
+                    if (state.exists()) {
+                        state.delete();
+                    }
+                    break;
+                case MSG_PRELOAD_STATE:
+                    mRecoveryState = loadCrashState();
+                    mShouldPrompt = shouldPrompt();
+                    synchronized (CrashRecoveryHandler.this) {
+                        mIsPreloading = false;
+                        mDidPreload = true;
+                        CrashRecoveryHandler.this.notifyAll();
+                    }
+                    break;
+                }
+            }
+        };
     }
 
     public void backupState() {
@@ -90,9 +135,8 @@
             try {
                 final Bundle state = new Bundle();
                 mController.onSaveInstanceState(state, false);
-                Context context = mController.getActivity()
-                        .getApplicationContext();
-                mBackgroundHandler.post(new WriteState(context, state));
+                Message.obtain(mBackgroundHandler, MSG_WRITE_STATE, state)
+                        .sendToTarget();
                 // Remove any queued up saves
                 mForegroundHandler.removeCallbacks(mCreateState);
             } catch (Throwable t) {
@@ -103,42 +147,8 @@
 
     };
 
-    static class WriteState implements Runnable {
-        private Context mContext;
-        private Bundle mState;
-
-        WriteState(Context context, Bundle state) {
-            mContext = context;
-            mState = state;
-        }
-
-        @Override
-        public void run() {
-            if (mState.isEmpty()) {
-                clearState(mContext);
-                return;
-            }
-            Parcel p = Parcel.obtain();
-            try {
-                mState.writeToParcel(p, 0);
-                File state = new File(mContext.getCacheDir(), STATE_FILE);
-                FileOutputStream fout = new FileOutputStream(state);
-                fout.write(p.marshall());
-                fout.close();
-            } catch (Throwable e) {
-                Log.i(LOGTAG, "Failed to save persistent state", e);
-            } finally {
-                p.recycle();
-            }
-        }
-
-    }
-
-    public static void clearState(Context context) {
-        File state = new File(context.getCacheDir(), STATE_FILE);
-        if (state.exists()) {
-            state.delete();
-        }
+    public void clearState() {
+        mBackgroundHandler.sendEmptyMessage(MSG_CLEAR_STATE);
     }
 
     public void promptToRecover(final Bundle state, final Intent intent) {
@@ -162,7 +172,7 @@
                 .setOnCancelListener(new OnCancelListener() {
                     @Override
                     public void onCancel(DialogInterface dialog) {
-                        clearState(mController.getActivity());
+                        clearState();
                         mController.doStart(null, intent);
                     }
                 })
@@ -170,11 +180,9 @@
     }
 
     private boolean shouldPrompt() {
-        Context context = mController.getActivity();
-        SharedPreferences prefs = context.getSharedPreferences(
+        SharedPreferences prefs = mContext.getSharedPreferences(
                 RECOVERY_PREFERENCES, Context.MODE_PRIVATE);
-        long lastRecovered = prefs.getLong(KEY_LAST_RECOVERED,
-                System.currentTimeMillis());
+        long lastRecovered = prefs.getLong(KEY_LAST_RECOVERED, 0);
         long timeSinceLastRecover = System.currentTimeMillis() - lastRecovered;
         if (timeSinceLastRecover > PROMPT_INTERVAL) {
             return false;
@@ -183,20 +191,18 @@
     }
 
     private void updateLastRecovered() {
-        Context context = mController.getActivity();
-        SharedPreferences prefs = context.getSharedPreferences(
+        SharedPreferences prefs = mContext.getSharedPreferences(
                 RECOVERY_PREFERENCES, Context.MODE_PRIVATE);
         prefs.edit()
             .putLong(KEY_LAST_RECOVERED, System.currentTimeMillis())
             .commit();
     }
 
-    public void startRecovery(Intent intent) {
+    private Bundle loadCrashState() {
         Bundle state = null;
         Parcel parcel = Parcel.obtain();
         try {
-            Context context = mController.getActivity();
-            File stateFile = new File(context.getCacheDir(), STATE_FILE);
+            File stateFile = new File(mContext.getCacheDir(), STATE_FILE);
             FileInputStream fin = new FileInputStream(stateFile);
             ByteArrayOutputStream dataStream = new ByteArrayOutputStream();
             byte[] buffer = new byte[BUFFER_SIZE];
@@ -208,21 +214,48 @@
             parcel.unmarshall(data, 0, data.length);
             parcel.setDataPosition(0);
             state = parcel.readBundle();
-            if (shouldPrompt()) {
-                promptToRecover(state, intent);
-                return;
-            } else {
-                updateLastRecovered();
-            }
         } catch (FileNotFoundException e) {
             // No state to recover
             state = null;
-        } catch (Exception e) {
+        } catch (Throwable e) {
             Log.w(LOGTAG, "Failed to recover state!", e);
             state = null;
         } finally {
             parcel.recycle();
         }
-        mController.doStart(state, intent);
+        return state;
     }
+
+    public void startRecovery(Intent intent) {
+        synchronized (CrashRecoveryHandler.this) {
+            while (mIsPreloading) {
+                try {
+                    CrashRecoveryHandler.this.wait();
+                } catch (InterruptedException e) {}
+            }
+        }
+        if (!mDidPreload) {
+            mRecoveryState = loadCrashState();
+            mShouldPrompt = shouldPrompt();
+        }
+        if (mShouldPrompt) {
+            promptToRecover(mRecoveryState, intent);
+            return;
+        } else {
+            updateLastRecovered();
+        }
+        mController.doStart(mRecoveryState, intent);
+        mRecoveryState = null;
+    }
+
+    public void preloadCrashState() {
+        synchronized (CrashRecoveryHandler.this) {
+            if (mIsPreloading) {
+                return;
+            }
+            mIsPreloading = true;
+        }
+        mBackgroundHandler.sendEmptyMessage(MSG_PRELOAD_STATE);
+    }
+
 }
diff --git a/src/com/android/browser/GoogleAccountLogin.java b/src/com/android/browser/GoogleAccountLogin.java
index 3b4f2aa..93996cd 100644
--- a/src/com/android/browser/GoogleAccountLogin.java
+++ b/src/com/android/browser/GoogleAccountLogin.java
@@ -281,16 +281,7 @@
             Log.d(LOGTAG, "Finished login attempt for " + mAccount.name);
             mActivity.runOnUiThread(mRunnable);
 
-            // Post a delayed message to dismiss the dialog in order to avoid a
-            // flash of the progress dialog.
-                mHandler.postDelayed(new Runnable() {
-                    @Override
-                    public void run() {
-                        if (mProgressDialog.isShowing()) {
-                            mProgressDialog.dismiss();
-                        }
-                    }
-                }, 2000);
+            mProgressDialog.dismiss();
             mRunnable = null;
             mActivity.runOnUiThread(new Runnable() {
                 @Override