Incorporate save to home screen with add bookmark dialog.

Bug:2953515

Remove the initial popup menu when pressing the star that
selects between saving to home screen and saving to bookmarks.
Instead, once the add bookmark dialog is open, the user can
select between bookmarks and saving to home screen.

Change-Id: I35e8590ff6a2a7c2058e45e4f77ec6b5d209b0f9
diff --git a/res/layout/browser_add_bookmark_const_url.xml b/res/layout/browser_add_bookmark_const_url.xml
deleted file mode 100644
index 6a6d78f..0000000
--- a/res/layout/browser_add_bookmark_const_url.xml
+++ /dev/null
@@ -1,85 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2010 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-
-          http://www.apache.org/licenses/LICENSE-2.0
-
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    android:layout_height="wrap_content"
-    android:orientation="vertical"
-    >
-
-    <ImageView android:id="@+id/titleDivider"
-        android:layout_width="match_parent"
-        android:layout_height="1dip"
-        android:scaleType="fitXY"
-        android:gravity="fill_horizontal"
-        android:src="@drawable/dialog_divider_horizontal_light"
-        android:layout_marginLeft="10dip"
-        android:layout_marginRight="10dip"/>
-
-    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_weight="1"
-        android:orientation="vertical"
-        android:paddingTop="5dip"
-        android:paddingBottom="13dip"
-        android:paddingLeft="20dip"
-        android:paddingRight="20dip" >
-
-        <TextView
-            android:id="@+id/titleText"
-            android:layout_height="wrap_content"
-            android:layout_width="wrap_content"
-            android:text="@string/name"
-            android:gravity="left"
-            android:textAppearance="?android:attr/textAppearanceMedium" />
-
-        <EditText
-            android:id="@+id/title"
-            android:layout_height="wrap_content"
-            android:layout_width="250dip"
-            android:gravity="fill_horizontal"
-            android:inputType="textCapSentences"
-            android:selectAllOnFocus="true" />
-
-    </LinearLayout>
-
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:minHeight="54dip"
-        android:orientation="horizontal"
-        android:paddingTop="4dip"
-        android:paddingLeft="2dip"
-        android:paddingRight="2dip" >
-        <Button android:id="@+id/OK"
-            android:text="@string/save"
-            android:layout_width="0dip"
-            android:layout_gravity="left"
-            android:layout_weight="1"
-            android:maxLines="2"
-            android:layout_height="wrap_content" />
-        <Button android:id="@+id/cancel"
-            android:text="@string/do_not_save"
-            android:layout_width="0dip"
-            android:layout_gravity="right"
-            android:layout_weight="1"
-            android:maxLines="2"
-            android:layout_height="wrap_content" />
-    </LinearLayout>
-
-</LinearLayout>
-
diff --git a/res/menu/bookmark_shortcut.xml b/res/menu/folder_choice.xml
similarity index 64%
rename from res/menu/bookmark_shortcut.xml
rename to res/menu/folder_choice.xml
index 67cbddf..068b170 100644
--- a/res/menu/bookmark_shortcut.xml
+++ b/res/menu/folder_choice.xml
@@ -4,9 +4,9 @@
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
      You may obtain a copy of the License at
-  
+
           http://www.apache.org/licenses/LICENSE-2.0
-  
+
      Unless required by applicable law or agreed to in writing, software
      distributed under the License is distributed on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -14,12 +14,11 @@
      limitations under the License.
 -->
 
-<menu
-    xmlns:android="http://schemas.android.com/apk/res/android">
-    <item
-        android:id="@+id/add_bookmark_menu_id"
-        android:title="@string/save_to_bookmarks" />
-    <item
-        android:id="@+id/shortcut_to_home_menu_id"
-        android:title="@string/create_shortcut_bookmark" />
+<menu xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:id="@+id/home_screen"
+        android:title="@string/add_to_homescreen_menu_option"/>
+    <item android:id="@+id/bookmarks"
+        android:title="@string/add_to_bookmarks_menu_option"/>
+    <item android:id="@+id/other"
+        android:title="@string/add_to_other_folder_menu_option"/>
 </menu>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index ca14df6..3a3cab8 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -131,6 +131,12 @@
     <!-- Label stating that the currently open folder has no subfolders
          in the add bookmark dialog [CHAR-LIMIT=none]-->
     <string name="no_subfolders">No subfolders</string>
+    <!-- Menu item to use the top level bookmarks folder to save a bookmark in. [CHAR-LIMIT=30]-->
+    <string name="add_to_bookmarks_menu_option">Bookmarks</string>
+    <!-- Menu item to save the newly created bookmark to the home screen. [CHAR-LIMIT=30]-->
+    <string name="add_to_homescreen_menu_option">Home screen</string>
+    <!-- Menu item to open a picker to determine which folder to save a bookmark in. [CHAR-LIMIT=30]-->
+    <string name="add_to_other_folder_menu_option">Other folder\u2026</string>
     <!-- Field label in Bookmark dialog box: title that the user wishes to use for the bookmark -->
     <string name="name">Label</string>
     <!-- Initial value in Location field in Bookmark dialog box -->