aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNauval Rizky <enuma.alrizky@gmail.com>2021-11-11 10:25:15 +0700
committernebrassy <nebras30@gmail.com>2022-06-12 16:30:58 +0200
commit546791601f9e01b8afef768c36aca7aeab2fabb5 (patch)
tree36dd9b0c8c1e2c37d197a14df958c8d3e08239db
parent691e0af67767603a23176f64a2a5d5ad8b4409f0 (diff)
vayu: parts: Update Haptic Feedback Level layout
- Add Footer for warning message - Remove SeekBar icon to match A12 style Signed-off-by: Nauval Rizky <enuma.alrizky@gmail.com> Change-Id: I9dea4143675906c3b098fb0b742a82175141844a
-rw-r--r--parts/res/drawable/ic_phone_vibrate.xml21
-rw-r--r--parts/res/values/strings.xml13
-rw-r--r--parts/res/xml/haptic_settings.xml7
3 files changed, 13 insertions, 28 deletions
diff --git a/parts/res/drawable/ic_phone_vibrate.xml b/parts/res/drawable/ic_phone_vibrate.xml
deleted file mode 100644
index e7bbdee..0000000
--- a/parts/res/drawable/ic_phone_vibrate.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-Copyright (C) 2019 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" xmlns:aapt="http://schemas.android.com/aapt" android:tint="?android:attr/colorControlNormal" android:height="24dp" android:width="24dp" android:viewportWidth="24" android:viewportHeight="24">
- <path android:fillColor="#000000" android:pathData="M7.98301409 3.77875261C7.8449429 3.77875261 7.73301409 3.89068143 7.73301409 4.02875261L7.73301409 20.0287526C7.73301409 20.1668238 7.8449429 20.2787526 7.98301409 20.2787526L15.9830141 20.2787526C16.1210853 20.2787526 16.2330141 20.1668238 16.2330141 20.0287526L16.2330141 4.02875261C16.2330141 3.89068143 16.1210853 3.77875261 15.9830141 3.77875261L7.98301409 3.77875261ZM7.98301409 2.27875261L15.9830141 2.27875261C16.9495124 2.27875261 17.7330141 3.0622543 17.7330141 4.02875261L17.7330141 20.0287526C17.7330141 20.9952509 16.9495124 21.7787526 15.9830141 21.7787526L7.98301409 21.7787526C7.01651578 21.7787526 6.23301409 20.9952509 6.23301409 20.0287526L6.23301409 4.02875261C6.23301409 3.0622543 7.01651578 2.27875261 7.98301409 2.27875261Z"/>
- <path android:fillColor="#000000" android:pathData="M1.14999998 6.48048572L2.30175251 5.51951428L4.3420422 7.9648617C4.85382092 8.57899616 4.85382092 9.42100384 4.34174239 10.0354978L2.7650422 11.9251383C2.71682092 11.9830038 2.71682092 12.0169962 2.76474239 12.0745022L4.3420422 13.9648617C4.85382092 14.5789962 4.85382092 15.4210038 4.34175251 16.0354857L2.30175251 18.4804857L1.14999998 17.5195143L3.18971028 15.0748617C3.23793156 15.0169962 3.23793156 14.9830038 3.19001009 14.9254978L1.61271028 13.0351383C1.10093156 12.4210038 1.10093156 11.5789962 1.61301009 10.9645022L3.18971028 9.0748617C3.23793156 9.01699616 3.23793156 8.98300384 3.18999998 8.92548572L1.14999998 6.48048572Z"/>
- <path android:fillColor="#000000" android:pathData="M22.8160282 17.5195143L21.6642757 18.4804857L19.623986 16.0351383C19.1122073 15.4210038 19.1122073 14.5789962 19.6242858 13.9645022L21.200986 12.0748617C21.2492073 12.0169962 21.2492073 11.9830038 21.2012858 11.9254978L19.623986 10.0351383C19.1122073 9.42100384 19.1122073 8.57899616 19.6242757 7.96451428L21.6642757 5.51951428L22.8160282 6.48048572L20.7763179 8.9251383C20.7280966 8.98300384 20.7280966 9.01699616 20.7760181 9.07450216L22.3533179 10.9648617C22.8650966 11.5789962 22.8650966 12.4210038 22.3530181 13.0354978L20.7763179 14.9251383C20.7280966 14.9830038 20.7280966 15.0169962 20.7760282 15.0745143L22.8160282 17.5195143Z"/>
-</vector>
diff --git a/parts/res/values/strings.xml b/parts/res/values/strings.xml
index 3462b99..831fbd3 100644
--- a/parts/res/values/strings.xml
+++ b/parts/res/values/strings.xml
@@ -87,12 +87,13 @@
<string name="raise_to_wake_gesture_title">Raise to wake</string>
<string name="raise_to_wake_gesture_summary">Wake up the device instead of pulsing notification</string>
- <!-- Haptic Level Settings -->
- <string name="haptic_title">Haptic feedback</string>
- <string name="haptic_summary">Customize vibration intensity</string>
- <string name="haptic_level_title">Level</string>
- <string name="haptic_level_summary">The amount of vibration intensity</string>
- <string name="haptic_level_summary_incompatible">Kernel did not support this feature</string>
+ <!-- Haptic Feedback Level -->
+ <string name="haptic_title">Haptic Feedback Level</string>
+ <string name="haptic_warning">Setting-up haptic level too high may cause permanent hardware damage, use at your own risk</string>
+ <string name="haptic_summary">Customize vibration intensity</string>
+ <string name="haptic_level_title">Level</string>
+ <string name="haptic_level_summary">The amount of vibration intensity</string>
+ <string name="haptic_level_summary_incompatible">Kernel did not support this feature</string>
<!-- Refresh Rate tile -->
<string name="refresh_rate_tile_title">Refresh Rate</string>
diff --git a/parts/res/xml/haptic_settings.xml b/parts/res/xml/haptic_settings.xml
index 0dca54c..6fb51b5 100644
--- a/parts/res/xml/haptic_settings.xml
+++ b/parts/res/xml/haptic_settings.xml
@@ -20,9 +20,14 @@
android:key="haptic_level_pref"
android:title="@string/haptic_level_title"
android:summary="@string/haptic_level_summary"
- android:icon="@drawable/ic_phone_vibrate"
android:layout="@layout/preference_slider"
android:defaultValue="@integer/haptic_level_default"
android:max="@integer/haptic_level_max" />
+ <com.android.settingslib.widget.FooterPreference
+ android:key="haptic_footer_preference"
+ android:title="@string/haptic_warning"
+ android:selectable="false"
+ android:layout="@layout/preference_footer" />
+
</PreferenceScreen>