Launch settings directly from combined view
Bug: 3368917
Launch settings directly from combined view rather than letting controller
handle it. Prevents controller from removing the combined view before launching
settings.
Change-Id: I2b78ab0f737337024d8cdb9fc400cda56e4db5ca
diff --git a/src/com/android/browser/CombinedBookmarkHistoryView.java b/src/com/android/browser/CombinedBookmarkHistoryView.java
index 6c03746..734addd 100644
--- a/src/com/android/browser/CombinedBookmarkHistoryView.java
+++ b/src/com/android/browser/CombinedBookmarkHistoryView.java
@@ -23,6 +23,7 @@
import android.app.Activity;
import android.app.FragmentManager;
import android.app.FragmentTransaction;
+import android.content.Intent;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.database.Cursor;
@@ -318,6 +319,12 @@
case R.id.add_bookmark:
mUiController.bookmarkCurrentPage(mBookmarks.getFolderId());
return true;
+ case R.id.preferences_menu_id:
+ Intent intent = new Intent(mActivity, BrowserPreferencesPage.class);
+ intent.putExtra(BrowserPreferencesPage.CURRENT_PAGE,
+ mUiController.getCurrentTopWebView().getUrl());
+ mActivity.startActivityForResult(intent, Controller.PREFERENCES_PAGE);
+ return true;
}
switch (mCurrentFragment) {