Commit Graph

28 Commits

Author SHA1 Message Date
Murtaza@Piplod 7e0b864a1f
sm8150-common: DeviceSettings: Make icon color adaptive
Signed-off-by: Omkar Chandorkar <gotenksIN@aosip.dev>
2021-04-05 07:53:30 +05:30
Ido Ben-Hur 4beb4f6f85
sm8150-common: DeviceSettings: Launch main activity on long QS tile press
Signed-off-by: Omkar Chandorkar <gotenksIN@aosip.dev>
2021-04-05 07:53:29 +05:30
SKULSHADY 04b69b8f8f
sm8150-common: DeviceSettings: Add a scrollable image view layout
- from Havoc-Devices/android_device_oneplus_settings@720debd

Derpfest edits:
- Migrate to androidx

EvoX edits:
- Adapt to DeviceSettings
- Swap display mode preview images 1 & 2

Signed-off-by: NurKeinNeid <mralexman3000@gmail.com>
Signed-off-by: AnierinB <anierinb@evolution-x.org>
2021-04-03 06:57:51 +05:30
Omkar Chandorkar 130b2ee69e
sm8150-common: DeviceSettings: nuke night mode
Signed-off-by: Omkar Chandorkar <gotenksIN@aosip.dev>
2021-04-03 06:57:49 +05:30
Omkar Chandorkar ea7e5816d1
[HAX]sm8150-common: correct string name for V gesture 2021-04-03 06:57:48 +05:30
Ido Ben-Hur 9db79307b9
sm8150-common: Adapt DeviceSettings
* Avoid adding support preferences, using a regular SwitchPreference instead
2021-04-03 06:57:39 +05:30
Omkar Chandorkar b5efdf3edf
Le roi est mort, vive le roi!
(our meme way of saying aosip -> yaap)
2021-04-03 06:57:38 +05:30
Anirudh Gupta c7100d886c sm8150-common: touch: Restore proper gesture actions
This was fixed by the kernel commit: c1244fe4ba

This commit includes a revert of commit 756dd639af.

Change-Id: I7dd248c06864eda5b0ac3269e1ebafd1ce4d43fa
2020-07-25 17:19:34 +05:30
Ashwin R C b9cdf7d563 sm8150-common: DeviceSettings: Use VibrationEffect
* Also update haptic feedback logic

Change-Id: I722022d014d9e88ef267a5563b43fee87ef02b6b
Signed-off-by: Anirudh Gupta <anirudhgupta109@aosip.dev>
2020-07-11 04:13:28 +05:30
Akhil Narang a2580fd24a sm8150-common: DeviceSettings: Automatic translation import
Change-Id: I8b4df29740fba05a2fd9c07d677923277f9f98ed
2020-06-18 07:54:12 +00:00
Akhil Narang 2b31537f48 sm8150-common: DeviceSettings: Automatic translation import
Change-Id: Ib8d3a4e71d7cefc5bc7912b754a1fee15911d8c5
2020-05-29 12:32:03 +00:00
Akhil Narang c1d0839750 sm8150-common: Automatic translation import
Change-Id: If2760efcfba6128499e7ae71669d8411728b99aa
2020-05-05 18:58:33 +00:00
Anirudh Gupta 756dd639af sm8150-common: touch: Switch down arrow gesture node to up arrow
The gesture node seems to be swapped on the OOS 10 source.
Switch to this since up works.

Change-Id: I0b0b994125a90222e9bdebd506e0e3672c13759a
Signed-off-by: Anirudh Gupta <anirudhgupta109@aosip.dev>
2020-05-02 14:28:27 +05:30
Anirudh Gupta 6cc1b95757 sm8150-common: DeviceSettings: Add single tap to touch screen gestures
Change-Id: I853ab1b63d682d01b7bea359111d07cf9e04d8be
Signed-off-by: Anirudh Gupta <anirudhgupta109@aosip.dev>
2020-05-02 14:27:56 +05:30
Akhil Narang 956873f0ec sm8150-common: DeviceSettings: Automatic translation import
Change-Id: Ie84ce5f4c56bb8acd1ce4807c0849188f135814e
Signed-off-by: Anirudh Gupta <anirudhgupta109@aosip.dev>
2020-05-02 14:25:28 +05:30
Anirudh Gupta e3a4d1112a sm8150-common: DeviceSettings: Remove refresh rate conditionally
Some devices don't have a 90Hz display and don't need the preference for this reason

To disable the feature, overlay the config to false in device specific device tree:

  overlay{,-aosip}/device/oneplus/sm8150-common/DeviceSettings/res/values/config.xml:
    <bool name="config_deviceHasHighRefreshRate">false</bool>

Suggestion by Ashwin4RC

Change-Id: I79f46adabf9d7940ca24e7077890447678a8fa8c
Signed-off-by: Anirudh Gupta <anirudhgupta109@aosip.dev>
2020-05-02 14:25:28 +05:30
Anirudh Gupta fe66793ff4 sm8150-common: DeviceSettings: Add left padding to gesture preferences
Signed-off-by: Anirudh Gupta <anirudhgupta109@aosip.dev>
Change-Id: I3c875eba25413a7566ce599aedc726d0d7df944f
Signed-off-by: Anirudh Gupta <anirudhgupta109@aosip.dev>
2020-05-02 14:25:28 +05:30
Anirudh Gupta 9f3ffc06a7 sm8150-common: DeviceSettings: Remove vibrator preference when unsupported
guacamoleb (OnePlus7) doesn't have support for vibration intensity changing
and doesn't have the kernel node for it either, remove the pref for such devices.

Change-Id: I58010f032680c86c27db70e5c91dd99921b1a689
Signed-off-by: Anirudh Gupta <anirudhgupta109@aosip.dev>
2020-05-02 14:25:28 +05:30
Anirudh Gupta 332b826ee2 sm8150-common: DeviceSettings: Add ambient as a gesture action
Change-Id: I10661bf07b2c3c1037beed4ac5ca852b5d6f0522
Signed-off-by: Anirudh Gupta <anirudhgupta109@aosip.dev>
2020-05-02 14:18:38 +05:30
Anirudh Gupta 033bbfadc5 sm8150-common: DeviceSettings: Add Touchscreen Gesture controls
Imported from LineagePart, adapted to LineageHW implementation present in fwb instead of lineage-sdk

Change-Id: I08064ca6c7a7e58783847677843522b818c583de
TouchscreenGestureSettings class written by:
Co-authored-by: Anushek Prasal <anushekprasal@gmail.com>
Signed-off-by: Anirudh Gupta <anirudhgupta109@gmail.com>
Signed-off-by: Anirudh Gupta <anirudhgupta109@aosip.dev>
2020-05-02 14:18:27 +05:30
Anirudh Gupta 7566191266 sm8150-common: DeviceSettings: HBMModeTileService: Fix HBM write value
Signed-off-by: Anirudh Gupta <anirudhgupta109@gmail.com>
Signed-off-by: Anirudh Gupta <anirudhgupta109@aosip.dev>
2020-05-02 14:12:10 +05:30
Anirudh Gupta 0918c7cb71 sm8150-common: DeviceSettings: FPSInfoService: Switch to isDreaming check
The isDozing check was dependend on this commit: https://review.aosip.dev/c/AOSIP/platform_frameworks_base/+/10485
The commit isn't needed on Android 10 (read comments) and switching to the regular AOSP check makes more sense and works the exact same.

Signed-off-by: Anirudh Gupta <anirudhgupta109@gmail.com>
Signed-off-by: Anirudh Gupta <anirudhgupta109@aosip.dev>
2020-05-02 14:12:10 +05:30
Anirudh Gupta 1968e51a04 sm8150-common: DeviceSettings: Show a warning about setting vibration strength too high
This commit has two benefits:
 - Helps us avoid users from complaining incase anything goes wrong with their hardware
 - Having the vibration slider as the last option meant that when trying to move the slider
   you ended up triggering the Q gesture to switch apps, this helps avoid that

Signed-off-by: Anirudh Gupta <anirudhgupta109@gmail.com>
Signed-off-by: Anirudh Gupta <anirudhgupta109@aosip.dev>
2020-05-02 14:12:10 +05:30
maxwen c4f611099a sm8150-common: DeviceSettings: Hide start margin of seek bar preference
Also fix layout of preference

Change-Id: I5758f3f76750d2e817bee003c616384eb575e154
Signed-off-by: Anirudh Gupta <anirudhgupta109@gmail.com>
Signed-off-by: Anirudh Gupta <anirudhgupta109@aosip.dev>
2020-05-02 14:12:10 +05:30
Anirudh Gupta f3c0281b44 sm8150-common: DeviceSettings: VibratorStrengthPreference: Set max to 10
Also modify test pattern

Signed-off-by: Anirudh Gupta <anirudhgupta109@gmail.com>
Signed-off-by: Anirudh Gupta <anirudhgupta109@aosip.dev>
2020-05-02 14:12:09 +05:30
Anirudh Gupta 33c17c59f3 sm8150-common: DeviceSettings: Startup: Restore DC-Dimming on boot
Signed-off-by: Anirudh Gupta <anirudhgupta109@gmail.com>
Signed-off-by: Anirudh Gupta <anirudhgupta109@aosip.dev>
2020-05-02 14:12:09 +05:30
Daniel Solomon 03606f330a sm8150-common: DeviceSettings: change the color mode preview image
Change the color mode preview image to better illustrate the difference
between Natural and Boosted color modes.

Taken from: eb15083e1b

Bug: 138126243
Test: manual testing on Pixel
Change-Id: I367b383f9f2da9b2e2d5960e51c3ec7821d4915b
(cherry picked from commit 56574d5924727ccc95a65c088375ca4b95bd8e79)
Signed-off-by: Anirudh Gupta <anirudhgupta109@gmail.com>
Signed-off-by: Anirudh Gupta <anirudhgupta109@aosip.dev>
2020-05-02 14:12:09 +05:30
Anirudh Gupta aa5a4113c1 sm8150-common: Introduce DeviceSettings
Taken from: 99e6831dc4/DeviceSettings

Edits after:
 - Adapted to AndroidX
 - Includes all translations from pie cycle
 - Remove DisplayModes and Dolby
 - Add DC-Dimming, FPS Info tile, Refresh Rate preferences
 - Change layout to a cleaner look
 - Nuke KeyHandler
 - Change KeyHandler class and lib overlays to DeviceSettings
 - Make DC-Dimming and HBM QS tile reflect active status

Co-authored-by: darkobas <darkobas@gmail.com>
Co-authored-by: Max Weninger <max.weninger@gmail.com>
Co-authored-by: Vachounet <vachounet@live.fr>
Co-authored-by: kldoc <fred.berbigier@gmail.com>
Co-authored-by: Christian Oder <myself5@carbonrom.org>
Co-authored-by: Josh Fox (XlxFoXxlX) <joshfox87@gmail.com>
Co-authored-by: David Sn <divad.nnamtdeis@gmail.com>
Signed-off-by: Anirudh Gupta <anirudhgupta109@gmail.com>
Signed-off-by: Anirudh Gupta <anirudhgupta109@aosip.dev>
2020-05-02 14:12:09 +05:30