Settings: Add advanced restart switch

[Linux4: Move it to powermenu options]

Change-Id: I66ee511e43ad36d58cdae8c580ec00cddce11dea
diff --git a/res/values/cm_strings.xml b/res/values/cm_strings.xml
index 22ea2e7..67b8572 100644
--- a/res/values/cm_strings.xml
+++ b/res/values/cm_strings.xml
@@ -30,4 +30,8 @@
     <!-- Black theme for dark mode -->
     <string name="berry_black_theme_title">Pure black</string>
     <string name="berry_black_theme_summary">Pure black background for dark theme</string>
+
+    <!-- Advanced restart options -->
+    <string name="power_menu_advanced_restart_title">Advanced restart</string>
+    <string name="power_menu_advanced_restart_summary">When unlocked, include options in the power menu for restarting into recovery or bootloader</string>
 </resources>
diff --git a/res/xml/power_menu_settings.xml b/res/xml/power_menu_settings.xml
index 48cc40c..765c12b 100644
--- a/res/xml/power_menu_settings.xml
+++ b/res/xml/power_menu_settings.xml
@@ -40,6 +40,12 @@
             settings:controller="com.android.settings.gestures.LongPressPowerForAssistantPreferenceController"/>
     </PreferenceCategory>
 
+    <com.android.settings.support.SystemSettingSwitchPreference
+        android:key="powermenu_advanced"
+        android:title="@string/power_menu_advanced_restart_title"
+        android:summary="@string/power_menu_advanced_restart_summary"
+        android:defaultValue="false" />
+
     <com.android.settings.widget.LabeledSeekBarPreference
         android:key="gesture_power_menu_long_press_for_assist_sensitivity"
         android:title="@string/power_menu_long_press_for_assist_sensitivity_title"