Skip to content

Commit

Permalink
Settings: Import settings from pixel-fw
Browse files Browse the repository at this point in the history
mnri: Updated for u qpr2
Signed-off-by: Pranav Vashi <[email protected]>
Signed-off-by: minaripenguin <[email protected]>
Signed-off-by: Alvin Francis <[email protected]>
Signed-off-by: Pranav Vashi <[email protected]>
  • Loading branch information
Pranav Vashi authored and NurKeinNeid committed Dec 1, 2024
1 parent 9950668 commit eb79019
Show file tree
Hide file tree
Showing 16 changed files with 154 additions and 8 deletions.
1 change: 1 addition & 0 deletions Android.bp
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ android_library {
"res",
"res-export", // for external usage
"res-product",
"SettingsGoogle/res",
],
static_libs: [
// External dependencies
Expand Down
1 change: 1 addition & 0 deletions SettingsGoogle
6 changes: 6 additions & 0 deletions res/xml/about_legal.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@
android:title="@string/webview_license_title"
settings:controller="com.android.settings.deviceinfo.legal.WebViewLicensePreferenceController" />

<Preference
android:key="legal_source_code"
android:summary="@string/legal_source_code_description"
android:title="@string/legal_source_code_title"
settings:controller="com.google.android.settings.deviceinfo.legal.SourceCodeController" />

<Preference
android:key="wallpaper_attributions"
android:title="@string/wallpaper_attributions"
Expand Down
8 changes: 8 additions & 0 deletions res/xml/accessibility_vibration_intensity_settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,14 @@
app:keywords="@string/keywords_alarm_vibration"
app:controller="com.android.settings.accessibility.AlarmVibrationIntensityPreferenceController" />

<SwitchPreferenceCompat
android:key="adaptive_alert_vibration"
android:summary="@string/adaptive_alert_vibration_summary"
android:title="@string/adaptive_alert_vibration_title"
app:controller="com.google.android.settings.accessibility.AdaptiveHapticsTogglePreferenceController"
app:keywords="@string/keywords_adaptive_alert_vibration"
app:searchable="@bool/config_adaptive_alert_vibration_enabled" />

</PreferenceCategory>

<PreferenceCategory
Expand Down
17 changes: 16 additions & 1 deletion res/xml/battery_saver_settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,27 @@
android:title="@string/battery_saver_master_switch_title"
settings:controller="com.android.settings.fuelgauge.batterysaver.BatterySaverButtonPreferenceController"/>

<PreferenceCategory android:layout="@layout/preference_category_no_label" android:key="battery_saver_entry" android:order="30" settings:controller="com.google.android.settings.fuelgauge.batterysaver.BatterySaverModePreferenceController">

<com.android.settingslib.widget.SelectorWithWidgetPreference android:title="@string/basic_battery_saver_title" android:key="basic_battery_saver_entry"
android:summary="@string/basic_battery_saver_summary"/>

<com.android.settingslib.widget.SelectorWithWidgetPreference android:title="@string/extreme_battery_saver_title" android:key="extreme_battery_saver_entry" android:summary="@string/extreme_battery_saver_summary"/>
</PreferenceCategory>

<Preference
android:order="50"
android:key="battery_saver_schedule"
android:fragment="com.android.settings.fuelgauge.batterysaver.BatterySaverScheduleSettings"
android:title="@string/battery_saver_schedule_settings_title"
settings:keywords="@string/keywords_battery_saver_schedule"
settings:controller="com.android.settings.fuelgauge.batterysaver.BatterySaverSchedulePreferenceController"/>
settings:controller="com.google.android.settings.fuelgauge.batterysaver.BatterySaverScheduleAndRemindersSettings"/>

<PreferenceCategory android:layout="@layout/preference_category_no_label" android:key="battery_saver_expand_entry" android:order="70" settings:controller="com.google.android.settings.fuelgauge.batterysaver.AdaptiveBatteryExpandController">

<com.android.settingslib.widget.TopIntroPreference android:title="@string/smart_battery_summary" android:key="adaptive_battery_top_intro" android:order="110" settings:searchable="false"/>
<com.android.settingslib.widget.MainSwitchPreference android:title="@string/adaptive_battery_switch_title" android:key="adaptive_battery" android:order="130"/>
</PreferenceCategory>

<SwitchPreferenceCompat
android:order="80"
Expand All @@ -46,5 +60,6 @@
android:order="100"
android:key="battery_saver_footer_preference"
android:title="@*android:string/battery_saver_description"
settings:controller="com.google.android.settings.fuelgauge.batterysaver.BatterySaverFooterPreferenceController"
settings:searchable="false"/>
</PreferenceScreen>
7 changes: 7 additions & 0 deletions res/xml/display_settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,13 @@
android:defaultValue="false"
settings:requiresFeature="lineagehardware:FEATURE_HIGH_TOUCH_POLLING_RATE" />

<SwitchPreferenceCompat
android:key="touch_sensitivity"
android:title="@string/touch_sensitivity_title"
android:summary="@string/touch_sensitivity_summary"
settings:controller="com.google.android.settings.touch.TouchSensitivityPreferenceController"
settings:keywords="@string/keywords_touch_sensitivity" />

<org.derpfest.support.preferences.SystemSettingSwitchPreference
android:key="high_touch_sensitivity_enable"
android:title="@string/high_touch_sensitivity_title"
Expand Down
13 changes: 13 additions & 0 deletions res/xml/gesture_navigation_settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,19 @@
settings:textEnd="@string/back_height_high_label"/>
</PreferenceCategory>

<PreferenceCategory
android:key="search_gesture_category"
android:persistent="false"
android:title="@string/search_gesture_category_title"
settings:controller="com.google.android.settings.gestures.GestureNavigationSettingsGoogleSearchController">
<SwitchPreferenceCompat
android:key="search_gesture_press_hold"
android:summary="@string/search_press_hold_gesture_summary"
android:title="@string/search_press_hold_gesture_title"
settings:controller="com.google.android.settings.gestures.GestureNavigationSettingsGoogleSearchController"
settings:highlightableMenuKey="@string/menu_key_system" />
</PreferenceCategory>

<PreferenceCategory
android:key="back_sensitivity_category"
android:persistent="false"
Expand Down
5 changes: 5 additions & 0 deletions res/xml/mobile_network_settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,11 @@
settings:controller="com.android.settings.network.telephony.CarrierSettingsVersionPreferenceController"
settings:enableCopying="true"/>

<Preference
android:key="speed_boost_settings"
android:title="@string/speed_boost_title"
settings:controller="com.google.android.settings.network.telephony.SpeedBoostPreferenceController" />

<!-- IMEI -->
<Preference
android:key="network_mode_imei_info"
Expand Down
28 changes: 28 additions & 0 deletions res/xml/network_provider_calls_sms.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,32 @@
settings:controller="com.android.settings.network.telephony.NetworkProviderWifiCallingPreferenceController"
settings:allowDividerAbove="true"
/>

<PreferenceCategory
android:key="connectivity_helper_call_quality_category"
android:order="30"
android:title="@string/connectivity_helper_call_quality_category"
settings:allowDividerAbove="true">

<SwitchPreferenceCompat
android:icon="@drawable/ic_connectivity_helper_call_quality"
android:key="connectivity_helper_call_quality"
android:summary="@string/connectivity_helper_call_quality_summary"
android:title="@string/connectivity_helper_call_quality_title"
settings:controller="com.google.android.settings.network.ConnectivityHelperCallQualityPreferenceController" />

<SwitchPreferenceCompat
android:key="connectivity_helper_d2d"
android:order="40"
android:summary="@string/connectivity_helper_d2d_summary"
android:title="@string/connectivity_helper_d2d_title"
settings:controller="com.google.android.settings.network.ConnectivityHelperDeviceToDevicePreferenceController" />

<com.android.settingslib.widget.FooterPreference
android:key="connectivity_helper_footer"
android:selectable="false"
android:title="@string/connectivity_helper_footnote"
settings:searchable="false" />
</PreferenceCategory>

</PreferenceScreen>
24 changes: 22 additions & 2 deletions res/xml/power_usage_summary.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@
android:key="battery_help_message"
android:layout="@layout/preference_battery_error"
android:selectable="false"
settings:searchable="false" />
settings:searchable="false">
<intent
android:action="android.intent.action.VIEW"
android:data="https://support.google.com/pixelphone/?p=p4xl_battery" />
</com.android.settingslib.widget.LayoutPreference>

<com.android.settings.widget.TipCardPreference
android:key="battery_tip"
Expand All @@ -58,7 +62,23 @@
settings:controller="com.android.settings.fuelgauge.batterytip.BatteryManagerPreferenceController"
settings:keywords="@string/keywords_battery_adaptive_preferences" />

<!-- Charging control -->
<Preference
android:key="smart_battery_manager"
android:title="@string/adaptive_charging_title"
android:fragment="com.android.settings.fuelgauge.SmartBatterySettings"
settings:keywords="@string/keywords_battery_adaptive_preferences"
settings:searchable="true"
settings:controller="com.google.android.settings.fuelgauge.adaptivecharging.AdaptiveChargingPreferenceController" />

<Preference
android:key="reverse_charging"
android:title="@string/reverse_charging_title"
android:fragment="com.google.android.settings.fuelgauge.reversecharging.ReverseChargingDashboardFragment"
settings:keywords="@string/keywords_battery_share_settings"
settings:searchable="true"
settings:controller="com.google.android.settings.fuelgauge.reversecharging.ReverseChargingPreferenceController" />

<!-- Charging control -->
<org.derpfest.support.preferences.SelfRemovingPreference
android:key="charging_control"
android:title="@string/charging_control_title"
Expand Down
6 changes: 6 additions & 0 deletions res/xml/security_lockscreen_settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,12 @@
android:summary="@string/lockscreen_double_line_clock_summary"
settings:controller="com.android.settings.display.LockscreenClockPreferenceController" />

<SwitchPreferenceCompat
android:key="lockscreen_show_weather_switch"
android:summary="@string/lockscreen_show_weather_summary"
android:title="@string/lockscreen_show_weather_title"
settings:controller="com.google.android.settings.display.LockscreenWeatherPreferenceController" />

<Preference
android:key="android.theme.customization.lockscreen_clock_font"
android:title="@string/theme_customization_lock_clock_title"
Expand Down
18 changes: 13 additions & 5 deletions res/xml/smart_battery_detail.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,15 @@

<com.android.settingslib.widget.IllustrationPreference
android:key="auto_awesome_battery"
settings:lottie_rawRes="@raw/auto_awesome_battery_lottie" />
android:selectable="false"
settings:lottie_rawRes="@raw/lottie_adaptive_battery"
settings:searchable="false" />

<com.android.settingslib.widget.MainSwitchPreference
android:key="adaptive_charging_switch"
android:title="@string/adaptive_charging_main_switch_title"
settings:controller="com.google.android.settings.fuelgauge.adaptivecharging.AdaptiveChargingMainSwitchPreferenceController"
settings:keywords="@string/keywords_adaptive_charging"/>

<SwitchPreferenceCompat
android:key="smart_battery"
Expand All @@ -43,8 +51,8 @@
android:title="@string/restricted_app_title"/>

<com.android.settingslib.widget.FooterPreference
android:key="smart_battery_detail_footer"
android:title="@string/smart_battery_footer"
android:selectable="false"
settings:searchable="false"/>
android:key="adaptive_charging_footer_preference"
android:title="@string/adaptive_charging_footer"
settings:controller="com.google.android.settings.fuelgauge.adaptivecharging.AdaptiveChargingFooterPreferenceController"
settings:searchable="false" />
</PreferenceScreen>
8 changes: 8 additions & 0 deletions res/xml/sound_settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,14 @@
android:ringtoneType="alarm"
android:order="-60"/>

<Preference
android:key="clear_calling"
android:title="@string/clear_calling_title"
android:summary="@string/clear_calling_topintro"
android:fragment="com.google.android.settings.notification.ClearCallingSettings"
settings:controller="com.google.android.settings.notification.ClearCallingPreferenceController"
android:order="-55"/>

<!-- Other sounds -->
<PreferenceCategory
android:key="other_sounds_category"
Expand Down
6 changes: 6 additions & 0 deletions res/xml/spatial_audio_settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@
android:title="@string/spatial_audio_text"
settings:searchable="false"/>

<com.android.settingslib.widget.ButtonPreference
android:icon="@drawable/ic_lightbulb_tips"
android:key="discover_tips"
android:title="@string/discover_tips_button"
settings:controller="com.google.android.settings.notification.SpatialAudioTipsButtonPreferenceController" />

<SwitchPreferenceCompat
android:key="spatial_audio"
android:title="@string/spatial_audio_speaker"
Expand Down
6 changes: 6 additions & 0 deletions res/xml/special_access.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@
settings:searchable="false"
settings:controller="com.android.settings.enterprise.ManageDeviceAdminPreferenceController" />

<Preference
android:key="debugging_data"
android:order="-1650"
android:title="@string/debugging_data_title"
settings:controller="com.google.android.settings.applications.specialaccess.DebuggingDataPreferenceController" />

<Preference
android:key="system_alert_window_app_list"
android:title="@string/system_alert_window_settings"
Expand Down
8 changes: 8 additions & 0 deletions res/xml/vpn_settings2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,15 @@
-->

<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:settings="http://schemas.android.com/apk/res-auto"
android:title="@string/vpn_title">

<com.android.settingslib.widget.ButtonPreference
android:icon="@drawable/ic_lightbulb_tips"
android:key="discover_tips"
android:title="@string/discover_tips_button"
settings:controller="com.google.android.settings.network.VpnSettings2TipsButtonPreferenceController" />

<PreferenceCategory
android:key="advanced_vpn_group"/>

Expand Down

0 comments on commit eb79019

Please sign in to comment.