import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.net.ConnectivityManager;
+import android.net.DownloadManager;
import android.net.NetworkInfo;
import android.net.Uri;
import android.net.WebAddress;
mResolver = getContentResolver();
+ // Keep a settings instance handy.
+ mSettings = BrowserSettings.getInstance();
+
// If this was a web search request, pass it on to the default web
// search provider and finish this activity.
if (handleWebSearchIntent(getIntent())) {
// Open the icon database and retain all the bookmark urls for favicons
retainIconsOnStartup();
- // Keep a settings instance handy.
- mSettings = BrowserSettings.getInstance();
mSettings.setTabControl(mTabControl);
PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE);
}
private WebView showDialog(WebDialog dialog) {
- // Need to do something special for Tablet
Tab tab = mTabControl.getCurrentTab();
if (tab.getSubWebView() == null) {
// If the find or select is being performed on the main webview,
break;
case R.id.select_text_id:
- showSelectDialog();
+ if (true) {
+ Tab currentTab = mTabControl.getCurrentTab();
+ if (currentTab != null) {
+ currentTab.getWebView().setUpSelect();
+ }
+ } else {
+ showSelectDialog();
+ }
break;
case R.id.page_info_menu_id:
break;
case R.id.view_downloads_menu_id:
- viewDownloads(null);
+ viewDownloads();
break;
case R.id.window_one_menu_id:
* menu to see the download window. It shows the download window on top of
* the current window.
*/
- private void viewDownloads(Uri downloadRecord) {
- Intent intent = new Intent(this,
- BrowserDownloadPage.class);
- intent.setData(downloadRecord);
- startActivityForResult(intent, BrowserActivity.DOWNLOAD_PAGE);
-
+ private void viewDownloads() {
+ Intent intent = new Intent(DownloadManager.ACTION_VIEW_DOWNLOADS);
+ startActivity(intent);
}
/**
// Nothing to do.
return;
}
+ Tab t = mTabControl.getCurrentTab();
+ if (t == null) {
+ // There is no current tab so we cannot toggle the error console
+ return;
+ }
mShouldShowErrorConsole = flag;
- ErrorConsoleView errorConsole = mTabControl.getCurrentTab()
- .getErrorConsole(true);
+ ErrorConsoleView errorConsole = t.getErrorConsole(true);
if (flag) {
// Setting the show state of the console will cause it's the layout to be inflated.
// activity requestCode
final static int COMBO_PAGE = 1;
- final static int DOWNLOAD_PAGE = 2;
final static int PREFERENCES_PAGE = 3;
final static int FILE_SELECTED = 4;