Add sound settings icon

Bug: 140069125
Test: Manual
Change-Id: I2be36f98a5894c918471555e8e0d6d5d99ac2f70
diff --git a/car-ui-lib/res/drawable/car_ui_icon_sound_settings.xml b/car-ui-lib/res/drawable/car_ui_icon_sound_settings.xml
new file mode 100644
index 0000000..d3af406
--- /dev/null
+++ b/car-ui-lib/res/drawable/car_ui_icon_sound_settings.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2016 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.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+        android:width="36dp"
+        android:height="36dp"
+        android:viewportWidth="48.0"
+        android:viewportHeight="48.0">
+    <path
+        android:fillColor="#fffafafa"
+        android:pathData="M20,40h8L28,8h-8v32zM8,40h8L16,24L8,24v16zM32,18v22h8L40,18h-8z" />
+</vector>
diff --git a/car-ui-lib/res/values/strings.xml b/car-ui-lib/res/values/strings.xml
index 229c8b2..b66f0bd 100644
--- a/car-ui-lib/res/values/strings.xml
+++ b/car-ui-lib/res/values/strings.xml
@@ -33,6 +33,8 @@
     <string name="car_ui_toolbar_menu_item_search_title">Search</string>
     <!-- Title of the settings menu item. Will be displayed if the button is in the overflow menu. [CHAR_LIMIT=50] -->
     <string name="car_ui_toolbar_menu_item_settings_title">Settings</string>
+    <!-- Title of the sound settings menu item. Will be displayed if the button is in the overflow menu. [CHAR_LIMIT=50] -->
+    <string name="car_ui_toolbar_menu_item_sound_settings_title">Sound Settings</string>
     <!-- Title of the overflow menu item. Only used for content descriptions. [CHAR_LIMIT=50] -->
     <string name="car_ui_toolbar_menu_item_overflow_title">Overflow</string>
 
diff --git a/car-ui-lib/src/com/android/car/ui/toolbar/MenuItem.java b/car-ui-lib/src/com/android/car/ui/toolbar/MenuItem.java
index fc27679..d6e6312 100644
--- a/car-ui-lib/src/com/android/car/ui/toolbar/MenuItem.java
+++ b/car-ui-lib/src/com/android/car/ui/toolbar/MenuItem.java
@@ -500,6 +500,20 @@
         }
 
         /**
+         * Creates an equalizer MenuItem.
+         *
+         * <p>The advantage of using this over creating your own is getting an OEM-styled
+         * sound settings icon.
+         */
+        public static MenuItem createSoundSettings(Context c, OnClickListener listener) {
+            return new Builder(c)
+                .setTitle(R.string.car_ui_toolbar_menu_item_sound_settings_title)
+                .setIcon(R.drawable.car_ui_icon_sound_settings)
+                .setOnClickListener(listener)
+                .build();
+        }
+
+        /**
          * Creates a settings MenuItem.
          *
          * <p>The advantage of this over creating your own is getting an OEM-styled settings icon,
diff --git a/car-ui-lib/tests/apitest/current.xml b/car-ui-lib/tests/apitest/current.xml
index 9bd897a..b0b9577 100644
--- a/car-ui-lib/tests/apitest/current.xml
+++ b/car-ui-lib/tests/apitest/current.xml
@@ -144,6 +144,7 @@
   <public type="drawable" name="car_ui_icon_overflow_menu"/>
   <public type="drawable" name="car_ui_icon_search"/>
   <public type="drawable" name="car_ui_icon_settings"/>
+  <public type="drawable" name="car_ui_icon_sound_settings"/>
   <public type="drawable" name="car_ui_list_item_divider"/>
   <public type="drawable" name="car_ui_preference_icon_chevron"/>
   <public type="drawable" name="car_ui_recyclerview_button_ripple_background"/>
@@ -176,6 +177,7 @@
   <public type="string" name="car_ui_toolbar_menu_item_overflow_title"/>
   <public type="string" name="car_ui_toolbar_menu_item_search_title"/>
   <public type="string" name="car_ui_toolbar_menu_item_settings_title"/>
+  <public type="string" name="car_ui_toolbar_menu_item_sound_settings_title"/>
   <public type="style" name="CarUiPreferenceTheme"/>
   <public type="style" name="Preference.CarUi"/>
   <public type="style" name="Preference.CarUi.Category"/>