Commit Graph

33 Commits

Author SHA1 Message Date
Adithya R
2009bc4016 sweet: Define OEM fast charge sysfs node
* this forces android to display "charging rapidly" whenever our
   proprietary 33w charger is connected, based on the value of
   this node (0/1)

Change-Id: I2a36ccb62621672e480e4b25a335410044fbb372
Signed-off-by: donjohanliebert <donjohanliebert@gmail.com>
2024-11-12 14:06:07 +08:00
Georg Veichtlbauer
23c04f955b sweet: overlay: Update deprecated screen power items
* screen.on -> screen.on.display0
* screen.full -> screen.full.display0

AOSP frameworks/base: 8ac63071a4e6da7e0740f5eb6c6753218efcfd3a

Change-Id: Iad50e6cb63368e2d71e6fa1dbb6997c0f95d321e
Signed-off-by: donjohanliebert <donjohanliebert@gmail.com>
2024-11-12 14:02:45 +08:00
Pulkit077
a0415a1cef sweet: overlay: Fix typo in power_profile
Signed-off-by: Pulkit077 <pulkitagarwal2k1@gmail.com>
Change-Id: Ie99b26e9a352965291d7d984ac00db96860232af
Signed-off-by: donjohanliebert <donjohanliebert@gmail.com>
2024-11-12 14:02:45 +08:00
Chris Fries
89e5fe371c sweet: overlay: Fix typo "volatage"
In the before-times of June 2019, an intrepid AOSP reviewer named
"fbechet45@gmail.com" reported:

> typo error:
> line 311 : "volatage" should be written "voltage"

After a short series of hops, this bug landed in my todo list.

My first thought was, "Easy!  I'll fix this on my internal git,
Lets go, in-and-out, 20 minute adventure."  But, that would deny the
original reporter of seeing the solution for some large number of
months.

So, I decide "I will fix this in AOSP.  But, oh no, Coral has the
same copy-paste error!  Let me just wait until October 2019 when
Coral goes public, then I'll fix those two at the same time."

(Little did I know this would continue to get copied and pasted, and
now there are 20+ instances of this on our internal repository.)

Fast forward to 2020: The pandemic gripped our nation, and I was
busy baking bread and posting pictures of it on Facebook.  I have
some great recipes I can share.  Let me know if you need some of my
artisinal sourdough starter.

Now, in 2021, after multiple automated-and-human reminders, this
has become my #1 priority issue to solve.  I still have the "can't
fix all the errors" on AOSP problem, but if I don't fix crosshatch
now, it will be too late to land it into the 2021 dessert release,
which may be the last supported release for crosshatch.  Oh no!

I am determined not to mark this bug as "Won't Fix / Obsolete"
and yet not so determined to act on it quickly.  So, I will fix
crosshatch internally, and then fix the rest of the projects on our
internal master branch.

I hope this patch finds you well and remember to take care of
yourself in these tough times.

With regards,
Chris

Bug: 132925372
Bug: 135906639
Bug: 77804134
Change-Id: I2d088bcbdfbc758eed5054f0413ab02aa5e57e4c
Signed-off-by: donjohanliebert <donjohanliebert@gmail.com>
2024-11-12 14:02:45 +08:00
jonerlin
7d155cd5f2 sweet: overlay: Add bluetooth power data to power_profile
Bug: 195720809
Test: Manual
Change-Id: I8104c9cd7890ee7968a6e0cbb8f57007c9bd2b42
Signed-off-by: donjohanliebert <donjohanliebert@gmail.com>
2024-11-12 14:02:45 +08:00
Pulkit077
f90f3dc154 sweet: overlay: Update power profile from sunfish
- from device/google/sunfish@441168f
 - correct battery capacity and cpufreq for sweet
 - update Radio related values, gps.on value & wifi.batchedscan values
 - based on stock power profile
 - values taken from resource-overlay

Signed-off-by: Pulkit077 <pulkitagarwal2k1@gmail.com>
Change-Id: Ie393df152ead4ea50327315c57ce1d3a8b540da7
Signed-off-by: donjohanliebert <donjohanliebert@gmail.com>
2024-11-12 14:02:45 +08:00
basamaryan
781db9b734
sweet: overlay: Reduce the padding at the start of the status bar
Change-Id: Ic84ec4f0e070e62d4d76680844ad60eb04c40593
2024-05-24 12:36:21 +05:30
Bruno Martins
513a42af28
sweet: overlay: Remove obsolete config_keyboardTapVibePattern
Change-Id: Ic89566183d2cdc4a20ea83f462c56a14184621ae
2023-12-11 11:37:12 -05:00
basamaryan
d146e191db
sweet: overlay: Reduce rounded corner radius
* Fixes https://imgur.com/a/aMcFkif

Change-Id: I191225bc247e0444e09604b2f707e107dfcde77b
2023-09-04 19:15:34 -04:00
althafvly
778a6b6ccd
sweet: overlay: Configure RefreshRate brightness thresholds
The display uses different gamma curves for different refresh rates.
It's hard for panel vendor to tune the curves to have exact same brightness
for different refresh rate (lazy). To avoid flicker at darker environment,
set threshold for 120Hz, so 120Hz will be default in such conditions.

- values kanged from redfin, it works for our panel fine

Change-Id: Ie2042aa5d7b114c006841e1cd86c3257653242be
2023-06-01 01:30:43 +05:30
AdarshGrewal
1322779828
fixup! sweet: overlay: Set physical power button and fps location
Change-Id: I99e4a12727cbe82d37068b47aaecc156f42ebbbd
2023-06-01 01:30:42 +05:30
basamaryan
400d8f98e5
sweet: overlay: Adjust status bar padding
Change-Id: I3efeeb3a5c9009ef1112f0751c5da3025a2d8dfe
2023-06-01 01:30:42 +05:30
shawnlin
ebe70fba27
sweet: overlay: Fixed status bar glitch for apps that access internal resource dimen
Bring back old usage of status_bar_height, status_bar_height_portrait,
and status_bar_height_landscape by set the size containing cutout size.

Bug: 216782082
Test: make
Change-Id: I0bf97352bc07e45d7694f9512266f08e7139c103
2022-06-25 17:59:48 +05:30
Georg Veichtlbauer
423d055677
sweet: overlay: Update deprecated screen power items
* screen.on -> screen.on.display0
* screen.full -> screen.full.display0

AOSP frameworks/base: 8ac63071a4e6da7e0740f5eb6c6753218efcfd3a

Change-Id: Iad50e6cb63368e2d71e6fa1dbb6997c0f95d321e
2022-05-01 00:16:11 -04:00
AdarshGrewal
8b7207c5a2
sweet: overlay: Increase Statusbar height 2022-05-01 00:16:11 -04:00
LuK1337
22cb9b4e87
sweet: overlay: Configure side fingerprint sensor properties
Change-Id: I75ba312895d18eae8c89db4dbb24a6945bad9860
2022-05-01 00:16:11 -04:00
Bruno Martins
4299839e0e
sweet: overlay: Set physical power button and fps location
This sets config_is_powerbutton_fps, since the device has
fps embedded in the power button. It makes frameworks report that
fingerprint sensor is located on the side of the device, which
can be observed when enrolling a fingerprint for the first time.

Change-Id: Ifa079488db642c8a470e40cb585c08e9c85d7cf4
2022-05-01 00:16:11 -04:00
Erik Müller
2514e80506
sweet: overlay: Disable proximity sensor check before pulsing
* The device's ultrasound proximity sensor is not active
   during standby, thus it can't be used as a check before
   pulsing. This fixes Ambient Display.

Change-Id: I1fc416247ed13cbfba245f37a4aafeae74ddbff7
2022-05-01 00:16:11 -04:00
Arian
7cb1e9f6b8
sweet: overlay: Change default status bar height
AOSP has changed how the status bar height is determined
in commit [1]. Since then status_bar_height_portrait is
ignored in favor of getting the height dynamically based
on display cutouts. Devices are supposed to keep the
default value and let system handle the display cutout.
However, we do not have a display cutout but instead
change the status bar height to match our heavily rounded
corners, which was not taken into consideration in the
commit. Hence change the default status bar height
directly so that the status bar height matches the
rounded corners.

[1]: 16496cb5c1

Change-Id: I9470fbe9058de3b326e12dc092f94e20faab0a47
2022-05-01 00:16:10 -04:00
Alessandro Astone
cd511d7e6d
sweet: overlay: Update power profile to match framework change
* Commit LineageOS/android_frameworks_base@3d422c3 renamed:
   cpu.idle -> cpu.suspend
   cpu.awake -> cpu.idle

Change-Id: Id6b289bf01b117d98a6c334fd36619505e0653ec
2022-05-01 00:16:10 -04:00
Arian
81d4696653
sweet: overlay: Remove dsp. prefix from audio and video power profiles
* AOSP power_profile.xml does not include this prefix
2022-05-01 00:16:10 -04:00
Arian
9603eedcb6
sweet: overlay: Import power_profile 2022-05-01 00:16:10 -04:00
AdarshGrewal
0dbeba1284
sweet: overlay: allow lower Minimum Brightness 2022-05-01 00:16:08 -04:00
Alexey Kuzmin
492abfe3ce sweet: overlay: Change all three default haptic levels to high
Bug:131774557
Test: flash a new C2F2 device with format, open accessibility vibration
settings. The current vibration intensity levels should be High

Change-Id: I0dc6488a4aa10ba3d606ecaa29729d4f0ecb9a1d
(cherry picked from commit 5b34c1ea60d65fc899484b727c5ecf32e47979ff)
2022-04-13 11:38:43 -04:00
Arian
11a58013fe sweet: overlay: Import vibration patterns from AOSP
Change-Id: I87d7cfcc7463daa5e570cebe3018fac2937905ff
2022-04-13 11:38:43 -04:00
AdarshGrewal
644857a7a6 sweet: overlay: Enable front-facing camera protection
* Prevents halo ring/effect on front camera
2022-04-13 11:38:43 -04:00
Danny Lin
e6aac8d339 sweet: Enable refresh rate toggle in Settings
sweet supports switching between 60 and 120 Hz refresh rates, so let's
expose it in Settings -> Display -> Smooth Display for users to save
battery if necessary.

Test: visual confirmation after toggling several times
Change-Id: Ie698ec4d4e738afd2a9055dba2369233103a4f13
2022-04-13 11:38:43 -04:00
Steven Thomas
01ddd1a24b sweet: Add default frame rate setting
Add a new priority PRIORITY_DEVICE_PEAK_REFRESH_RATE, and a new config
setting config_defaultRefreshRate which maps to that priority. This
allows an OEM to easily specify a default frame rate different from the
peak frame rate.

Bug: 148978450
Bug: 154648391

Test: - Added new unit tests to verify DisplayModeDirector handles min,
        peak, and default refresh rate settings correctly.

- Modified a sweet to set config_defaultRefreshRate to 60Hz, confirmed
  we default to 60, but that an app calling setFrameRate(120) switches us
  to 120.

- Confirmed that the "smooth display" and "force 120Hz" options on Razer
  Phone work correctly.

- Confirmed Redfin works as it did before - still constrained to 60Hz.

Change-Id: Ibfc35abed2b67093b8114822d233bf1ca31eebb0
2022-04-13 11:38:43 -04:00
Adrian Salido
eba03e4f1b sweet: enable peak refresh rate (120hz)
Enables default setting to 120hz mode, this can be disabled through
Settings app

Bug: 130249886
Test: wipe user settings and check default peak refresh rate enabled
Change-Id: I205d793dea3f7b971972fa850b0255dcf18db923
2022-04-13 11:38:43 -04:00
AdarshGrewal
42bf168c8d sweet: overlay: Setup fingerprint position 2022-03-24 20:50:00 +05:30
LuK1337
0b3b0b648a sweet: Set default Settings.Global.DEVICE_NAME according to MIUI
MIUI uses ro.product.marketname for default device name.

Change-Id: I310c1ffc581b72653783d1093d9e7ebde544bb16
2022-03-24 20:50:00 +05:30
AdarshGrewal
a8346c1c79 sweet: overlay: setup device overlays 2022-03-24 20:50:00 +05:30
AbhiShek Aggarwal
4d23c197b2 sweet: overlay: Import brightness overlays from MIUI
Change-Id: Ib00b3817eece7bb8ff0acafb3d545e4324d7c26d
2021-07-12 16:28:16 +05:30