498 Commits
bq1 ... vic

Author SHA1 Message Date
400389796d fixup! Remove /dev/lirc0 from sepolicy
Signed-off-by: nhansp <nhan.094.vn@gmail.com>
2025-09-18 05:56:40 +00:00
72d1f3834b Revert "Compile with default clang"
This reverts commit dad742db3e.

gives us a fat ass kernel
2025-07-25 01:56:55 +07:00
d197870aeb Remove /dev/lirc0 from sepolicy
Signed-off-by: nhansp <nhan.094.vn@gmail.com>
2025-07-10 13:58:30 +07:00
nhansp
0042f4cc3d Remove NfcNci 2025-07-10 11:09:26 +07:00
nhansp
c4e8a099e9 fixup! Lazy update kernel branch
Signed-off-by: nhansp <nhan.094.vn@gmail.com>
2025-07-08 14:39:37 +07:00
nhansp
2f0d4a8cd4 Lazy update kernel branch
Signed-off-by: nhansp <k63.2412960019@ftu.edu.vn>
2025-07-08 14:39:37 +07:00
26b27c3aa6 Update dimens
Signed-off-by: nhansp <nhan.094.vn@gmail.com>
2025-07-08 14:39:37 +07:00
ecd677427f Fix QS lags
Signed-off-by: nhansp <nhan.094.vn@gmail.com>
2025-07-08 14:39:37 +07:00
48e53eab03 fixup! cepheus: enable blurs 2025-07-08 14:39:37 +07:00
dad742db3e Compile with default clang
Signed-off-by: nhansp <nhan.094.vn@gmail.com>
2025-07-08 14:39:37 +07:00
f7cfbefd0f Cleanup proprietary files list
Signed-off-by: nhansp <nhan.094.vn@gmail.com>
2025-07-08 14:39:37 +07:00
4bfb1cd72e cepheus: enable blurs
Signed-off-by: nhansp <nhan.094.vn@gmail.com>
2025-06-25 22:22:13 +07:00
446df5d00d BoardConfig: just include BoardConfigReservedSize
Signed-off-by: nhansp <nhan.094.vn@gmail.com>
2025-06-25 22:22:13 +07:00
nhansp
a1b2ad52a5 cepheus: update releasetools.py
Signed-off-by: nhansp <k63.2412960019@ftu.edu.vn>
2025-06-25 22:22:13 +07:00
nhansp
6cf426988a cepheus: thank you @chematelegram!
a big thanks to @chematelegram for maintaining this device. as
he's now busy and unable to continue, I'll be Mi 9 next
maintainer. hope you guys enjoy the upcoming builds!

Signed-off-by: nhansp <k63.2412960019@ftu.edu.vn>
2025-06-25 22:22:13 +07:00
nhansp
caf4a86569 cepheus: migrate some flags to select()
Signed-off-by: nhansp <k63.2412960019@ftu.edu.vn>
2025-06-25 22:22:13 +07:00
nhansp
a474e0a0ec cepheus: BoardConfig: code cleanup
Signed-off-by: nhansp <k63.2412960019@ftu.edu.vn>
2025-06-25 22:22:13 +07:00
nhansp
9fc5959cd6 cepheus: nuke flash_super_dummy
no longer required after releasetools update:
98549f6893

Signed-off-by: nhansp <k63.2412960019@ftu.edu.vn>
2025-06-25 22:22:13 +07:00
Bruno Martins
41089f765c cepheus: parts: Move thermal profiles to system category
Icon taken from google/material-design-icons.

Change-Id: Iefc5ea0426b7aefac7b75a1d72878e4b826f7f33
2025-06-25 22:22:13 +07:00
chematelegram
52b5422b8d cepheus: Switch to XiaomiDolby 2025-02-27 23:16:19 +01:00
Pranav Vashi
c5be6143d6 cepheus: libstagefright_foundation-v33 moved to lineage compat 2025-02-27 23:16:19 +01:00
chematelegram
fb788347c7 cepheus: Compile kernel with clang 20.0.0 2025-02-27 23:16:09 +01:00
chematelegram
6f230c1c64 cepheus: Do not include Accord 2025-02-26 16:01:11 +01:00
Michael Bestas
8b225c8c03 cepheus: Drop libvulkan target that is built by default
Change-Id: Ic5d73508b850fac7c7427caf12eb4a8e87e3deca
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2025-02-26 15:50:32 +01:00
LuK1337
8db4fdedd0 cepheus: Switch to common lights HAL 2025-02-26 15:50:32 +01:00
John Galt
6e343daeb6 cepheus: CameraProvider: set saner values
500 is WAAAAY too high on op7 series. Set max to a saner of 200.

Also prior to this change, 80 was default for torch, so set 80 as
default.
2025-02-26 15:50:32 +01:00
Cyber Knight
f0c6917574 cepheus: rootdir: Label brightness node correctly
- We only utilize switch_2/brightness as a toggle switch so explicitly label it.
2025-02-26 15:50:32 +01:00
Cyber Knight
7c0ab5e736 cepheus: sepolicy: Allow cameraserver to search directories in sysfs_leds
- This fixes a SEPolicy denial.
2025-02-26 15:50:32 +01:00
John Galt
68017c885d cepheus: camera: add enabled bool for finished workarounds 2025-02-26 15:50:32 +01:00
bengris32
92d97077aa cepheus: camera: Implement setTorchModeExt
Change-Id: Id61420be75b7efd1d13a4b0ee1d103ebd3835516
Signed-off-by: electimon <electimon@gmail.com>
2025-02-26 15:50:32 +01:00
bengris32
b1986fe4f0 cepheus: camera: Implement supportsSetTorchModeExt
Change-Id: I2ec2f4a30723763e6123a1b742468752f38e3d2f
Signed-off-by: bengris32 <bengris32@protonmail.ch>
2025-02-26 15:50:32 +01:00
Dhina17
0981e7e832 cepheus: Impl torch light control
Change-Id: Icd32d1f6aedb55462c9df4d7cc63a2a4c4e4263e

[RealJohnGalt:] modify for oneplus usage, add toggle switch
2025-02-26 15:50:32 +01:00
Michael Bestas
0c6a1b7749 cepheus: Remove OMX audio codecs
* OMX HW audio codecs won't work without QCOM A/V enhancements, which
   we don't have on Lineage.

Change-Id: I940be6716b603e848c44839bb87ad690eb55e86f
2025-02-26 15:50:32 +01:00
chematelegram
21107c0060 cepheus: Move c2_manifest to manifest 2025-02-26 15:50:17 +01:00
LuK1337
09218a8de7 cepheus: Update WFD system stack from OOS 14.0.0.602(EX01)
Change-Id: Idec435e0b1645016620e5cdd094ed3fb1ae8b832
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2025-02-03 07:45:02 +01:00
Nick Reuter
617f330b87 cepheus: Address missing libbinder symbols in libwfdnative
_ZN7android6binder12atrace_beginEmPKc
_ZN7android6binder10atrace_endEm

Change-Id: I942d51721461dbbf9c8d0f2f32128529bb7480c3
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2025-02-03 07:37:00 +01:00
Nick Reuter
083fcb9319 cepheus: Bump libwfdservice to android.media.audio.common.types-V4
Change-Id: I81060d8c73430a9598c676e18dc04e31a2f31c0c
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2025-02-03 07:35:12 +01:00
LuK1337
714142838f cepheus: Shim WFD with libgui_shim/libinput_shim
Change-Id: I42bf06bc6b19942303031ef0147dafa6df127fe5
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2025-02-03 07:29:51 +01:00
chematelegram
8426710e6b cepheus: Enable FPS info
We kept part of the support but the config and some of the sepolicy was missing
2025-02-01 13:41:15 +01:00
chematelegram
5297207168 cepheus: overlay: Adjust the CPU temp divider 2025-02-01 13:28:49 +01:00
chematelegram
9ed67422aa cepheus: overlay: Enable PowerOffAlarmService 2025-02-01 13:26:14 +01:00
chematelegram
cf9026c4f8 cepheus: overlay: Support Smart Pixels 2025-01-23 08:53:50 +01:00
LuK1337
03786290f4 cepheus: Build gralloc.qcom
Camera HAL wants it and crashes if it loads default gralloc
implementation instead.

Fixes: https://gitlab.com/LineageOS/issues/android/-/issues/8059
Change-Id: I47965713c822cfdfc369975f8975f21f70133608
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2025-01-22 23:03:01 +01:00
chematelegram
b899960505 cepheus: overlay: Disable Smart Pixels on UDFPS 2025-01-22 21:04:17 +01:00
Michael Bestas
6870d1099e cepheus: Update display flags & packages
Required after display HAL blueprint conversion

Change-Id: Ifc4e10703d3424607b9dc8bcc8e417d1c88cc2f3
2025-01-10 22:17:12 +01:00
chematelegram
29a905d974 cepheus: Switch to clang 19.0.1 2025-01-04 22:42:46 +01:00
chematelegram
555749c4c2 cepheus: overlay: Set properly the color of the UDFPS pressed view 2024-12-19 21:40:55 +01:00
chematelegram
1dd564eef2 cepheus: Enforce Product Packages Exist again 2024-12-19 21:38:16 +01:00
chematelegram
9ef8670d56 Revert "cepheus: Switch to clang 19"
This reverts commit 0c0cc1168f.
2024-11-22 00:08:05 +01:00
Michael Bestas
f133499afc cepheus: Shim widevine with libcrypto_shim
The following change
google/boringssl@e202e51
removed symbols that our libs require.

Change-Id: I1325c34ecec3d339dd68c665010ecb36fa2e6a29
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2024-11-22 00:03:52 +01:00
Aaron Kling
77178b6b8c cepheus: Remove software omx codec references
These are no longer available as of Android 14 QPR3. The C2 codecs
available by default in the swcodec apex will be used instead
2024-11-22 00:03:52 +01:00
Bruno Martins
d0190b0cde cepheus: Remove software OMX blobs
Default to C2 codecs from swcodec apex.
2024-11-22 00:03:52 +01:00
Michael Bestas
183c251cc6 cepheus: Use AOSP default Codec2/OMX ranks
debug.stagefright.ccodec=4
is the default value in frameworks.

debug.stagefright.omx_default_rank=0
was used to rank OMX SW codecs lower than OMX HW codecs
but we have removed all OMX SW codecs now.
2024-11-22 00:03:52 +01:00
Sebastiano Barezzi
92e8e1dfb5 cepheus: Drop libril-qcril-hook-oem.so
Requires libril, we disabled that target, safe to assume only non-qcrild
uses this
2024-11-22 00:03:52 +01:00
clarencelol
a1f9335cf8 cepheus: Fix delimiter error
* Error parsing JSON in file: out/soong/soong.lineage_cepheus.extra.variables. Reason: Expecting ',' delimiter: line 41 column 30 (char 5831)
2024-11-22 00:03:52 +01:00
boedhack99
116b007db8 cepheus: sepolicy: Address mediacodec to access sysfs_msm_subsys
* avc:  denied  { search } for  name="2c00000.qcom,kgsl-3d0" dev="sysfs" ino=40513 scontext=u:r:mediacodec:s0 tcontext=u:object_r:sysfs_msm_subsys:s0 tclass=dir permissive=0
2024-11-22 00:03:52 +01:00
ArianK16a
e219098657 cepheus: Import vndk29 libc++ and provide a module for it
Change-Id: I110257858ab3004b6768fe8a8f0a759cafa4a995
2024-11-22 00:03:52 +01:00
Kelvin Zhang
480c41cb95 cepheus: Explicitly set as an non-AB target
We will be changing AB to be the default, existing non-AB targets
need to explicitly set AB_OTA_UPDATER to false

Test: th
Change-Id: I86a76296937a6abab1b4495cd66a35144348aafd
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: firebird11 <hbgassel@gmail.com>
2024-11-22 00:03:52 +01:00
Kelvin Zhang
27954c4e4a cepheus: Allow to access bootable/deprecated-ota targets
sm8150-common is still using non-AB update.
non-AB code will be moved to a separated namespace, add
deprecated-ota to sm8150-common namespace list ahead of time to avoid
breakage.

Test: th
Bug: 324360816
Change-Id: I909064be36e8febe80492cf010eb6eac3d6bc33d
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: firebird11 <hbgassel@gmail.com>
2024-11-22 00:03:52 +01:00
kondors1995
2869ad9c3b cepheus: overlay: Add pixel_pitch 2024-11-22 00:03:52 +01:00
SGCMarkus
9f0d882d15 cepheus: Unset BOARD_USERDATAIMAGE_PARTITION_SIZE
This not only saves a lot of build time when building with
TARGET_USERIMAGES_SPARSE_EXT_DISABLED and/or
TARGET_USERIMAGES_SPARSE_F2FS_DISABLED which is required
on A14, but also removes the need for the build system to
temporarily create a 40+GB userdata image.
Which means that less free space is required to start the
build.
2024-11-22 00:03:52 +01:00
pjgowtham
7804b4b262 cepheus: fingerprint: Set dim layer zOrder
Requires: I367b2c395aeb8cb7cb9e3cc38eca98477befe007
Change-Id: I881db78186fa9c7b350e79ac4ef90f53ee4cfbcf
2024-11-22 00:03:52 +01:00
basamaryan
d8bfe7a334 cepheus: overlay: Disable turbulence noise 2024-11-22 00:03:52 +01:00
luffitys
0144d76a36 cepheus: Build missing WFD libs
Co-authored-by: Edwin Moquete <edwinmmoquete@gmail.com>
Change-Id: I2cd360cc7fc1260e99111f18f09fefb8231ce01f
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2024-11-22 00:03:52 +01:00
chematelegram
4a5a1f2673 cepheus: Remove extra slash
* It's harmless but let's sanitize and avoid any possible risk in the future
2024-11-22 00:03:52 +01:00
chematelegram
054fec088a cepheus: Adjust reserved size for GApps
* Again hitting the Super partition size. We won't miss that reserved size in System anyway
2024-11-22 00:03:52 +01:00
Yumi Yukimura
c75e0a2968 cepheus: Switch to QTI Memtrack AIDL HAL 2024-11-22 00:03:52 +01:00
chematelegram
702848c8e1 cepheus: Support automated DC dimming 2024-11-22 00:03:52 +01:00
chematelegram
54eaadddde cepheus: Move Soterservice to vendor 2024-11-22 00:03:52 +01:00
chematelegram
5d79ba4da3 cepheus: Drop updatable GPU drivers 2024-11-22 00:03:52 +01:00
chematelegram
5ba7975eca Revert "cepheus: Import sensors.mius.proximity.so"
This reverts commit f2b7a133c5.
2024-11-22 00:03:52 +01:00
¨raystef66¨
63693bb470 cepheus: Switch back to nabu V13.0.3.0.RKXCNXM graphics blobs
* So Magic Eraser/Editor stops crashing.
* Also stop crashes while editing on Google Photos

This reverts following commits:

37941cbdb03469fdefb50fc749e2314c5063704e
ca151b80e89f73aa8a189dbf7227ae3ec3414ef3
610cc43636f3bd4d7b1726a5b22ff6684fcf8d1d
bd485be6dd076641f9bb2a0186ea284a3befcd57

Based on a7c8a40fe6
2024-11-22 00:03:52 +01:00
Dmitry
283c4371f7 fix symlink 2024-08-18 20:50:12 +03:00
chematelegram
3c52c76f0e cepheus: Update dependencies
* Use hardware_xiaomi from EvolutionX
 * Use my fork for the miui camera and use a different target path to avoid problems with other devices using roomservice
2024-08-15 12:08:38 +02:00
chematelegram
a0230da208 cepheus: Include miuicamera in dependencies 2024-07-30 22:22:05 +02:00
chematelegram
80bca5f62f cepheus: Use MINI GApps 2024-07-25 23:57:39 +02:00
chematelegram
3af209eacd Revert "cepheus: Drop MIUI camera support"
This reverts commit eab7db2e5d.
2024-07-25 23:30:31 +02:00
Akash Srivastava
f82f48eed5 cepheus: sepolicy: fix denials for hal_health_default 2024-07-22 03:54:07 +02:00
chematelegram
84503c6717 cepheus: overlay: Support volume steps 2024-07-21 17:41:28 +02:00
chematelegram
a3c8487745 cepheus: overlay: Show double-tap-to-ambient settings 2024-07-21 17:39:59 +02:00
chematelegram
6d0e07853f cepheus: Include Seedvault
* It is optional now in sources
2024-07-19 08:59:17 +02:00
chematelegram
739cb9c880 cepheus: overlay: Remove config_suspendWhenScreenOffDueToProximity
* I don't know if this has something to do with our freezes or black screens but
   definitely proximity is not something we should trust on our device
2024-07-19 08:46:50 +02:00
chematelegram
0c0cc1168f cepheus: Switch to clang 19 2024-07-19 08:46:40 +02:00
chematelegram
a1e79adf81 cepheus: Adjust reserved sizes for GApps 2024-07-13 00:46:37 +02:00
Bruno Martins
3348335f17 cepheus: Mark CNE symlink target as required package
Change-Id: I0bfe65ba61b6aa9916fe6459be2a84d772939a2f
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2024-07-13 00:46:37 +02:00
Bruno Martins
fce0063510 cepheus: Declare WFD lib as symlinks during extraction
Change-Id: I2a035323a483b8b2422b4a54219b2f6268ab4a61
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2024-07-13 00:46:37 +02:00
x0x00044
fdf252599b cepheus: overlay: Remove config_cellBroadcastAppLinks 2024-07-13 00:46:37 +02:00
Michael Bestas
a4ae0e17c7 cepheus: Include lineage FCM 2024-07-13 00:46:37 +02:00
Bruno Martins
faa6a1b30d cepheus: Inherit from QTI FCM 2024-07-13 00:46:37 +02:00
Bruno Martins
c2fb52a337 cepheus: Convert WiFi firmware symlinks to install_symlink targets
* The last bit that was preventing building hermetic images.

Change-Id: I75bb7de4593a7992f6015317cf97e088beeba0cb
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2024-07-13 00:46:37 +02:00
Bruno Martins
8431c2c877 cepheus: Declare EGL libs as symlinks during extraction
Change-Id: I4b2f3e79b5e518889d9771bf8990e27babca8b61
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2024-07-13 00:46:37 +02:00
Bruno Martins
5910f81105 cepheus: Declare IMS libs as symlinks during extraction
Change-Id: Ia1b8097d28dd4888232fe383b830515b1b9bafaa
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2024-07-13 00:46:37 +02:00
Bruno Martins
845b2ce962 cepheus: Move to new RFS install_symlink targets
Change-Id: I9560fd0da00958d9349a0881b5a5f64a2c02e495
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2024-07-13 00:46:37 +02:00
Paul Crowley
9045d28b5c cepheus: Remove wait_for_keymaster and all references
No longer needed now init listens for property changes on a
separate thread.

Bug: 186580823
Test: Cuttlefish boots successfully
Change-Id: Ief3a546d2154231d18957c2f703bd128966d7288
2024-07-13 00:46:37 +02:00
Alex Sarraf
8e3b60efbd cepheus: Disable SF client composition cache
Disable SF client composition cache. Helps with framework
client target fence management.

Change-Id: I73e03e76f51d00fafad38479be00f4005be50665
2024-07-13 00:46:37 +02:00
Josh Wu
9eddb81bd1 cepheus: Switch BtAudio to AIDL
Test: m
Bug: 203490261
Change-Id: I4b8ac40d5ad410b89eb6a0573d740d86471ecfc7
Merged-In: I4b8ac40d5ad410b89eb6a0573d740d86471ecfc7
2024-07-13 00:46:37 +02:00
Master
0436201169 cepheus: Disable sparse for ext/f2fs images
* Sparse images cause kPostInstallMountError

Co-authored-by: yairpatch <yair.zarfati@gmail.com>
Change-Id: Ifdb2fc87d88c9c2139b3e73b6ccad36f09888b75
Signed-off-by: ralph950412 <ralph950412@gmail.com>
Signed-off-by: alternoegraha <noegrahachan@gmail.com>
2024-07-13 00:46:37 +02:00
Bruno Martins
b2affd500c cepheus: Use the common device compatibility matrix from QCOM
Change-Id: I6b58cd68542f5b8b4d66433c0264919100eebde4
2024-07-13 00:46:37 +02:00
Bruno Martins
bb670b3bb0 cepheus: Unset BUILD_BROKEN_INCORRECT_PARTITION_IMAGES 2024-07-13 00:46:37 +02:00
Tim Zimmermann
997ebe1969 cepheus: Set manifest target-level to 5 2024-07-13 00:46:37 +02:00
¨raystef66¨
d3e9aadf30 cepheus: Add device FCM 2024-07-13 00:46:37 +02:00
¨raystef66¨
2191b77895 cepheus: build libpiex 2024-07-13 00:46:37 +02:00
Marc Bourgoin
ca67fb1652 cepheus: Fix audio on QPR3 with alsa audio
As of Android 14 QPR3, our device requires the use of alsa audio,
otherwise audio HAL keeps crashing with error messages of being
unable to route audio and listAudioPorts failed
2024-07-13 00:46:37 +02:00
dataoutputstream
95f9be1670 cepheus: Build audio.primary.default
* Without these modules, logcat gets spammed with:
   AudioSystem-JNI: AudioSystem::listAudioPorts error -19
2024-07-13 00:45:48 +02:00
Michael Bestas
8a8b36da6d cepheus: Build missing libraries for 14 QPR3 2024-07-09 14:27:56 +02:00
chematelegram
d61680872f cepheus: Prove I am human 2024-05-23 19:36:14 +02:00
chematelegram
ac2e58ebe7 cepheus: overlay: Do not include Pocket Mode
* our proximity sensor is one of the biggest shit in the world
2024-05-22 13:25:03 +02:00
chematelegram
666b90a1bf cepheus: sepolicy: Remove duplicates 2024-05-19 16:53:28 +02:00
chematelegram
fac0149fb6 cepheus: overlay: Declare LED capabilities 2024-05-19 16:53:28 +02:00
chematelegram
6fb38dbf51 cepheus: overlay: Update battery info when charging 2024-05-17 10:06:54 +02:00
chematelegram
82ed5dccd4 cepheus: Support screen-off UDFPS 2024-05-17 10:04:01 +02:00
chematelegram
f3cdc1198b cepheus: Support UDFPS icons and animations 2024-05-14 07:33:26 +02:00
chematelegram
a74e83e8cb cepheus: Remove old workflow setup 2024-05-13 22:59:56 +02:00
chematelegram
ac3d4a792e cepheus: Add dependencies 2024-05-13 22:56:58 +02:00
chematelegram
e316771154 cepheus: overlay: Aperture: Fix path to overlay 2024-05-13 01:20:00 +02:00
chematelegram
eab7db2e5d cepheus: Drop MIUI camera support 2024-05-13 01:18:04 +02:00
chematelegram
7387313bdc Revert "Revert "cepheus: overlay: Update camera IDs for aperture""
This reverts commit 6cb462431b.
2024-05-12 22:34:45 +02:00
johnmart19
27907d32a0 cepheus: Set TARGET_CAMERA_PACKAGE_NAME for Miui/Leica Camera 2024-05-12 00:03:02 +02:00
chematelegram
b1305b70fb cepheus: Clean the tree
* Complete the tree adaptation to the lineage-based sources
 * Remove unused flags
 * Remove unused overlays and rename others
2024-05-02 11:47:38 +02:00
chematelegram
5530d72cf7 cepheus: Disable EPPE
* enforce-product-pakages-exist
2024-05-01 14:44:16 +02:00
chematelegram
f859539437 cepheus: Adjust the partitions reserved sizes
* since we are exceeding the super partition size after QPR2
2024-05-01 14:43:12 +02:00
¨raystef66¨
501cf229e9 cepheus: Reserve space for gapps install 2024-05-01 14:43:12 +02:00
Sebastiano Barezzi
dcdce2c343 cepheus: Treat retrofit devices as launching with dynamic
*RuntimeError: Device with retrofit dynamic partitions must use regular (non-Virtual) A/B
2024-05-01 14:43:12 +02:00
chematelegram
e720183e0d cepheus: sepolicy: Switch to '-isolated_app_all' where needed
* From error:
 * Found prohibited permission granted for isolated like types. Please
 * replace your allow statements that involve '-isolated_app' with '-isolated_app_all'.
2024-05-01 14:43:12 +02:00
chematelegram
e1871cfa28 Revert "cepheus: fastcharge: Extend Fastcharge implementation"
This reverts commit 8dea951d2a.
2024-05-01 14:43:12 +02:00
chematelegram
5cc3207d0e cepheus: Stop ignoring neverallows 2024-05-01 14:43:12 +02:00
chematelegram
56ae8bfcd4 cepheus: Initial adaptation for new ROM sources 2024-05-01 14:43:12 +02:00
chematelegram
63e141b17e Revert "cepheus: sepolicy: Suppress system suspend denials spam"
This reverts commit 9b4cd2cc62.
2024-05-01 14:43:12 +02:00
chematelegram
0e381ee495 Revert "cepheus: sepolicy: Silence denials by suspend wakeups"
This reverts commit 8a2052c96f.
2024-05-01 14:43:12 +02:00
chematelegram
3e3f7f364f Revert "cepheus: thermal: Cleanup modules already defined in sources"
This reverts commit 815f241e19.
2024-05-01 14:43:12 +02:00
chematelegram
4ebd9deb90 [TMP] cepheus: Add some flags for jemalloc 2024-05-01 14:43:12 +02:00
chematelegram
5e2130a931 cepheus: Remove dependencies for now 2024-04-17 10:45:22 +02:00
chematelegram
6e0553e34b cepheus: sepolicy: Clean rules about MIUI camera
* this sepolicy is provided by the camera repository
2024-04-17 10:36:36 +02:00
tribual
07320f2185 cepheus: Add build fingerprint 2024-04-17 07:05:15 +02:00
¨raystef66¨
8ea33780de cepheus: update MotoDolby: Add activity to AOSP sound settings 2024-04-17 02:23:03 +02:00
basamaryan
78f09d2e4f cepheus: Don't explicitly include updatable_apex.mk
It is inherited by base_system.mk as of QPR2
2024-04-17 02:23:03 +02:00
Michael Bestas
4255c44104 cepheus: Switch to android.hardware.usb@1.3-service.dual_role_usb 2024-04-17 02:22:43 +02:00
Cole Faust
27ed04ebbe cepheus: Add BUILD_BROKEN_INCORRECT_PARTITION_IMAGES
Qcom has issues that prevent it from working with a hermetic
partition build.
2024-04-17 02:22:20 +02:00
Pranav Vashi
a4f53acd6d cepheus: Update dolby mod from v3.7 module 2024-04-17 02:21:57 +02:00
Chaohui Wang
326dce342c cepheus: parts: Migrate to CompoundButton.OnCheckedChangeListener
Switch and SwitchCompat are both CompoundButton.

Using CompoundButton in Java will helps migration in the future.

Bug: 306658427 | AOSP
Test: manual - check Settings pages
Test: m RunSettingsLibRoboTests
Change-Id: I85a70d4c504d8584030ea4a058f30d74206ab835
2024-03-28 16:17:25 +01:00
Peter Kalauskas
25faeb2c65 cepheus: parts: Enable use_resource_processor for all sysui deps
This will make the build faster

Test: m checkbuild
Bug: 295208392
Change-Id: I0c1bd901429bbe3bf81c1530e156735f8637a96e
2024-03-28 16:17:03 +01:00
Tomasz Wasilczyk
51651efdb9 cepheus: gps: Don't include cutils/threads.h
Bug: 289414897
Test: buildserver
Change-Id: I14b99f42feaae7af00cbd17cfe482eb2e5da71e8
2024-03-28 11:32:34 +01:00
Alessio Balsini
96098ce71d cepheus: Use FUSE passthrough by default 2024-02-24 10:15:28 +01:00
chematelegram
e47f44677c cepheus: Update dependencies 2024-01-26 11:41:24 +01:00
Pranav Vashi
dec89dcb0a cepheus: Set correct manufacturer
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2024-01-20 03:12:08 +01:00
jhenrique09
fe95e995a2 cepheus: overlay: Forcefully disable Now Playing components
Change-Id: I269d7490b55762b2c982d9cedfe9f5e4269c2ce7
Reviewed-on: https://review.statixos.com/c/android_vendor_statix/+/3947
Reviewed-by: Henrique <call190now@statixos.com>
Tested-by: Henrique <call190now@statixos.com>
2024-01-20 02:40:31 +01:00
chematelegram
1bbd6ce794 cepheus: Enable fastbootd 2024-01-20 02:26:17 +01:00
chematelegram
9d60547b8e cepheus: fstab: Make Metadata encryptable again 2024-01-19 14:21:07 +01:00
=?UTF-8?q?=C2=A8raystef66=C2=A8?=
f89d853b2a cepheus: CarrierConfigOverlay: Update CarrierConfig from munch V14.0.3.0.TLMMIXM 2024-01-18 08:55:29 +01:00
chematelegram
5afdf0155f cepheus: Remove unused config 2024-01-18 08:50:44 +01:00
Pranav Vashi
449e446123 cepheus: Add dolby to cloned apps exemption list
Change-Id: I47ab06f7d5152c4c993359ac85d121e41c8df235
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2024-01-17 15:24:33 +01:00
Pranav Vashi
673add438d cepheus: Update dolby mod from v3.0 module
Change-Id: Ia544cb1d0d4cc8e671921452257e624103130c7d
2024-01-17 15:18:29 +01:00
Pranav Vashi
b2f432a700 cepheus: Link dolby blobs with v33 libstagefright_foundation
Change-Id: I592c2f459f37d050dff978db88884cec11faeffb
2024-01-17 15:16:58 +01:00
Pranav Vashi
1369fd51a4 cepheus: Update daxService from A14
Change-Id: I48f3eb7e3b902c9856ee44d7ac7a66e61cdcbed5
2024-01-17 15:07:58 +01:00
chematelegram
1ea0ab5166 Revert "[SQUASH] cepheus: Drop Dolby support"
This reverts commit 4ccff76263.
2024-01-17 15:03:45 +01:00
chematelegram
beb2c4882f cepheus: SystemUIRes: Adjust the faceunlock icon height in lockscreen 2024-01-17 13:28:17 +01:00
chematelegram
c8b48bf8eb cepheus: overlay: Convert overlays to RRO 2024-01-02 13:25:51 +01:00
chematelegram
4a5e20b361 cepheus: rootdir: Add formattable flag for EXT4 /data 2023-12-31 12:14:51 +01:00
chematelegram
405f282ea9 Revert "cepheus: audio: Use AOSP USB v2 audio HAL"
This reverts commit 5a3d21797e.
2023-12-30 13:18:27 +01:00
chematelegram
06f0b22496 cepheus: overlay: Disable Bluetooth by default 2023-12-30 00:44:09 +01:00
Alexander Koskovich
d1109e1cbe cepheus: overlay: Remove obsolete fps location config
Change-Id: I2569c77b4daa84263903f710d421d05d0a491d08
2023-12-30 00:35:14 +01:00
chematelegram
6d0b71907f cepheus: overlay: Remove Pocket Mode setting 2023-12-30 00:25:45 +01:00
chematelegram
6f5e766ca6 cepheus: overlay: Removed unused configs 2023-12-30 00:22:32 +01:00
Alex Sarraf
9193ddefa1 cepheus: Set debug.sf.auto_latch_unsignaled to 0
* Need to explicitly set auto_latch_unsignaled property to disabled state
   to keep latch-unsignaled as the default behaviour

Change-Id: I3856caaf0a68e7e720819f25338d1eb9196f56b0
2023-12-30 00:01:08 +01:00
chematelegram
06547168ba Revert "cepheus: Disable debug.sf.latch_unsignaled"
This reverts commit 7eb4f800e7.
2023-12-30 00:01:08 +01:00
Jake Weinstein
6b3e8c163a cepheus: rootdir: Make less cores available for background tasks
With SurfaceFlinger and HWC on the foreground cpuset,
important rendering tasks are moved off of the background
cpusets, so let's reserve one little core for foreground
and top-app.

Change-Id: I4f0982f3ff4dce756095667df0d08f18817b896a
2023-12-29 17:13:45 +01:00
Fabian Leutenegger
27ca1dfd98 cepheus: overlay: Move FaceUnlock indication above UDFPS icon 2023-12-29 16:29:25 +01:00
Edwin Moquete
adab781b4e cepheus: Disable display refresh rate override
* This got enabled by default on U, and it causes apps like
   Chrome and Youtube to set the refresh rate to 30FPS when
   playing some videos.

Change-Id: I649bf03d550c2b9726c7957d15ed09e455d874ec
2023-12-29 03:51:28 +01:00
chematelegram
d76e73c74b Revert "[TMP] cepheus: Disable Quick Tap support"
This reverts commit 778ee287af.
2023-12-26 22:32:57 +01:00
chematelegram
9c67e2cb00 cepheus: overlay: Pin SystemUIGoogle 2023-12-22 14:50:12 +01:00
chematelegram
290b2f69fd Revert "cepheus: Ship Gramophone and ViMusic"
This reverts commit 4cba64077a.
2023-12-22 14:47:41 +01:00
4cba64077a cepheus: Ship Gramophone and ViMusic 2023-12-15 23:48:36 +01:00
778ee287af [TMP] cepheus: Disable Quick Tap support 2023-12-15 23:46:17 +01:00
chematelegram
52677d8b66 cepheus: Update dependencies 2023-12-11 09:01:38 +01:00
chematelegram
ca2767cd8a cepheus: Go with full gapps 2023-12-11 08:46:00 +01:00
chematelegram
c41b69ce94 cepheus: Copy fstab to ramdisk 2023-12-11 08:46:00 +01:00
EcrosoftXiao
fbb0e4de8e fixup! cepheus: Flash dummy super image if needed 2023-12-11 08:46:00 +01:00
Chenyang Zhong
85498e0c83 cepheus: move super_dummy build to Android.mk
Signed-off-by: Chenyang Zhong <zhongcy95@gmail.com>
2023-12-11 08:46:00 +01:00
Tim Zimmermann
37cde22ec9 cepheus: Flash dummy super image if needed
* Needed because stock does not use dynamic partitions so
  there's no existing metadata that could be used

Change-Id: Icbc828389465f3d4681ca8e4c3adec782540752e
Signed-off-by: Chenyang Zhong <zhongcy95@gmail.com>
2023-12-11 08:46:00 +01:00
Martin Liu
36904c52af cepheus: fstab: Set readahead_size_kb=128 2023-12-11 08:46:00 +01:00
Tim Zimmermann
50295c2dfa cepheus: Ensure vbmeta is available during first stage init
* Without this it is no longer accessible in first stage init on T
  breaking DSU
* According to a0b391dd6a
  this must be done if there's no avb=vbmeta anywhere

Change-Id: I5d278f41772086ac90706ae5daa5f0d76bb6e755
2023-12-11 08:46:00 +01:00
EcrosoftXiao
3c389e6090 cepheus: rootdir: fstab: Drop metadata encryption for now
Bootloader reports raw as our metadata partition type in below command

host> fastboot getvar partition-type:metadata
partition-type:metadata: raw
Finished. Total time: 0.005s

Commit [1] causes bootloop issues after doing a factory reset in AOSP
recovery. Fix it by drop metadata encryption for now.

[1]: https://android-review.googlesource.com/c/platform/bootable/recovery/+/1908136

Signed-off-by: EcrosoftXiao <xy19990903@gmail.com>
2023-12-11 08:46:00 +01:00
Jaegeuk Kim
24ff8bdf4d cepheus: fstab: data=journal,commit=1 for /metadata
Since Ext4 doesn't implement "-o sync", it commits metadata at every 5 secs.
This may cause /metadata corruption.

Bug: 162883014
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
Signed-off-by: Randall Huang <huangrandall@google.com>
Change-Id: Icd38754bad1b1529d01165ea8c703c214d20bb4b
2023-12-11 08:46:00 +01:00
David Ng
5830211954 cepheus: rootdir: Mount metadata fs during first stage init per UDC spec
Mount metadata at first stage init.

Change-Id: I51408b0c6b5edb4434d32be803daf3a21beb91e1
2023-12-11 08:46:00 +01:00
Chenyang Zhong
a73fcf5497 cepheus: rootdir: move system & vendor to fstab for dynamic partition
"The device tree and device tree overlays must not contain fstab
entries" [1], so move system & vendor back to fstab and convert
them to early-mounted logical partitions.

[1] https://source.android.com/devices/tech/ota/dynamic_partitions/implement#fstab-changes

Signed-off-by: Chenyang Zhong <zhongcy95@gmail.com>
2023-12-11 08:46:00 +01:00
me-cafebabe
b861a9487c cepheus: Add system_ext product odm partitions 2023-12-11 08:46:00 +01:00
Chenyang Zhong
6ebe42cd8a cepheus: specify androidboot.boot_devices
so that /dev/block/by-name/ symlinks are created.

Signed-off-by: Chenyang Zhong <zhongcy95@gmail.com>
2023-12-11 08:46:00 +01:00
Chenyang Zhong
442d4977ca cepheus: switch to retrofit dynamic partitioning
Signed-off-by: Chenyang Zhong <zhongcy95@gmail.com>
2023-12-11 08:46:00 +01:00
chematelegram
b533da37de cepheus: Import some blobs for DRM
* E QSEECOMD: : Init dlopen(libsecureui.so, RLTD_NOW) is failed.... dlopen failed: library "libsecureui.so" not found
 * Imported fromLA.UM.9.1.r1-12900-SMxxx0.0
2023-12-11 08:46:00 +01:00
chematelegram
975bced273 cepheus: Clean the house 2023-12-11 08:46:00 +01:00
chematelegram
9ac14013f0 cepheus: Build some more telephony packages
* this will be added in the proper commit with proper authorship rebasing
2023-12-11 08:46:00 +01:00
chematelegram
f1efdcca80 cepheus: Import libxlog.so
* from V12.5.6.0.RFACNXM

 * E android.hardware.audio.service: _xog_get_handle DLOPEN failed for vendor/lib/vndk/libxlog.so
2023-12-11 08:46:00 +01:00
chematelegram
f2b7a133c5 cepheus: Import sensors.mius.proximity.so
* from V12.5.6.0.RFACNXM

 * W android.hardware.sensors@1.0-service: dlerror(): dlopen failed: library "sensors.mius.proximity.so" not found
2023-12-11 08:46:00 +01:00
Omkar Chandorkar
8580795993 cepheus: overlay: Move UDFPS enroll radius to settings
- required after LineageOS/android_packages_apps_Settings@af35c7c

Change-Id: I79ecd91513df0d195e1d15d20b4438d1b283743f
Signed-off-by: Omkar Chandorkar <gotenksIN@aospa.co>
2023-12-11 08:46:00 +01:00
Joker-V2
197f8c5396 cepheus: bluetooth: Build android.hardware.bluetooth.audio-impl
* W audiohalservice: Could not register Bluetooth Audio Offload API
 * E audiohalservice: Failed to dlopen android.hardware.bluetooth.audio-impl.so: dlopen failed: library "android.hardware.bluetooth.audio-impl.so" not found
 * W audiohalservice: createIBluetoothAudioProviderFactory() from android.hardware.bluetooth.audio-impl failed

Change-Id: I44fa882ea93cf0e815a022d714dabe2e558031fb
Signed-off-by: Joker-V2 <nipinna0@gmail.com>
2023-12-11 08:46:00 +01:00
Bruno Martins
040330a700 cepheus: Migrate to restructured sepolicy_vndr
The new folder structure now looks like this:

  device/qcom/sepolicy_vndr
  ├─ legacy-um (meant for sdm845 until sm8350)
  ├─ sm8450
  └─ sm8550

SEPolicy.mk placed in the root automatically redirects devices to the
proper subfolder.
2023-12-11 08:46:00 +01:00
chematelegram
1eb610f053 Revert "cepheus: Add Basic Call Recording support"
This reverts commit 80b33c16fb.

 * It's included in the ROM now
2023-12-11 08:46:00 +01:00
chematelegram
64d026cbad cepheus: Build libwifi-hal-ctrl 2023-10-29 23:47:22 +01:00
chematelegram
bb78111b6b cepheus: Build Telephony packages 2023-10-29 23:47:22 +01:00
adi8900
ee0f49f83e cepheus: Update IMS and RIL from qssi-user-14-UKQ1.230804.001-2309192131-release-keys
Signed-off-by: adi8900 <adrianszymanski242@gmail.com>
2023-10-29 23:47:22 +01:00
adi8900
cff4742676 cepheus: Update Power-off Alarm from qssi-user-14-UKQ1.230804.001-2309192131-release-keys
Signed-off-by: adi8900 <adrianszymanski242@gmail.com>
2023-10-29 23:47:22 +01:00
adi8900
5184b89626 cepheus: Update DPM from qssi-user-14-UKQ1.230804.001-2309192131-release-keys
Signed-off-by: adi8900 <adrianszymanski242@gmail.com>
2023-10-29 23:47:22 +01:00
adi8900
ac8d3ca514 cepheus: Update CNE from qssi-user-14-UKQ1.230804.001-2309192131-release-keys
Signed-off-by: adi8900 <adrianszymanski242@gmail.com>
2023-10-29 23:47:22 +01:00
adi8900
347f4f8c50 cepheus: Build system vendor.qti.hardware.display.config-V5-ndk…
… from source for wfd stack

Signed-off-by: adi8900 <adrianszymanski242@gmail.com>
2023-10-29 23:47:22 +01:00
adi8900
199f54cb8e cepheus: Add missing permissions for WFD app
* else it doesnt boot with this error in log

10-09 09:48:30.794  3365  3365 E AndroidRuntime: java.lang.IllegalStateException: Signature|privileged permissions not in privapp-permissions allowlist: {com.qualcomm.wfd.service (/system_ext/priv-app/WfdService): android.permission.START_FOREGROUND_SERVICES_FROM_BACKGROUND}
10-09 09:48:30.794  3365  3365 E AndroidRuntime:   at com.android.server.pm.permission.PermissionManagerServiceImpl.onSystemReady(PermissionManagerServiceImpl.java:4447)
10-09 09:48:30.794  3365  3365 E AndroidRuntime:   at com.android.server.pm.permission.PermissionManagerService$PermissionManagerServiceInternalImpl.onSystemReady(PermissionManagerService.java:743)
10-09 09:48:30.794  3365  3365 E AndroidRuntime:   at com.android.server.pm.PackageManagerService.systemReady(PackageManagerService.java:4253)
10-09 09:48:30.794  3365  3365 E AndroidRuntime:   at com.android.server.SystemServer.startOtherServices(SystemServer.java:2798)
10-09 09:48:30.794  3365  3365 E AndroidRuntime:   at com.android.server.SystemServer.run(SystemServer.java:942)
10-09 09:48:30.794  3365  3365 E AndroidRuntime:   at com.android.server.SystemServer.main(SystemServer.java:664)
10-09 09:48:30.794  3365  3365 E AndroidRuntime:   at java.lang.reflect.Method.invoke(Native Method)
10-09 09:48:30.794  3365  3365 E AndroidRuntime:   at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
10-09 09:48:30.794  3365  3365 E AndroidRuntime:   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:949)
10-09 09:48:30.795  3365  3365 I DropBoxManagerService: add tag=system_server_crash isTagEnabled=true flags=0x2

Signed-off-by: adi8900 <adrianszymanski242@gmail.com>
2023-10-29 23:47:22 +01:00
adi8900
1c44dbe267 cepheus: Update system wfd blobs from pong 14
Signed-off-by: adi8900 <adrianszymanski242@gmail.com>
2023-10-29 23:47:22 +01:00
Pranav Vashi
ebf9a808bc cepheus: Update libstdc++ package name
Change-Id: Ia3255d7823a400bd378e40b02b87c74e40158787
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2023-10-29 23:47:22 +01:00
Pranav Vashi
dc5e653aa1 cepheus: Update netmgr props
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2023-10-29 23:47:02 +01:00
chematelegram
8bd5178ce7 cepheus: Switch to TARGET_CAMERA_OVERRIDE_FORMAT_FROM_RESERVED 2023-10-23 16:11:09 +02:00
chematelegram
5c4d19d76c cepheus: Use MINI gapps 2023-10-23 16:08:28 +02:00
chematelegram
263aa8668c cepheus: Switch to clang r498229b
* 17.0.4
2023-10-23 16:06:36 +02:00
chematelegram
4ccff76263 [SQUASH] cepheus: Drop Dolby support
This is a combination of 5 commits.

Revert "cepheus: Update dax-default profiles"

This reverts commit 60190c1d81.

Revert "cepheus: Import QCOM audio effects blobs"

This reverts commit 94636824a7.

Revert "cepheus: audio: Update dolby config values from oneplus"

This reverts commit 0435e77bd9.

Revert "cepheus: Update dax-default"

This reverts commit 4d672540e1.

Revert "cepheus: Add Moto Dolby support"

This reverts commit e0e49f846d.
2023-10-22 02:12:46 +02:00
Tim Zimmermann
9ffab25984 cepheus: Build libprotobuf-cpp-full-3.9.1 vendorcompat
* Our old blobs depends on this older version of protobuf, instead new 21-7.

Change-Id: I8d1fbc40bebf66abea342780b02cda68d64899b1
Signed-off-by: adi8900 <adrianszymanski242@gmail.com>
2023-10-22 01:19:41 +02:00
adi8900
b8e97d73e9 cepheus: Patch blobs to use full protobuf
grep -r libprotobuf-cpp-lite-3.9.1.so
grep: proprietary/vendor/lib64/libsnsdiaglog.so: binary file matches
grep: proprietary/vendor/lib64/sensors.ssc.so: binary file matches
grep: proprietary/vendor/lib64/libssc.so: binary file matches
grep: proprietary/vendor/lib64/libwvhidl.so: binary file matches
grep: proprietary/vendor/lib64/mediadrm/libwvdrmengine.so: binary file matches
grep: proprietary/vendor/lib64/libsnsapi.so: binary file matches
grep: proprietary/vendor/bin/sensors.qti: binary file matches

Signed-off-by: adi8900 <adrianszymanski242@gmail.com>
2023-10-22 00:45:13 +02:00
Sarthak Roy
6625e4a454 cepheus: Switch to Wifi service AIDL
Change-Id: I5a2864b4159b7815eff4dd2f0de02a3dabbacfa5
Signed-off-by: adi8900 <adrianszymanski242@gmail.com>
2023-10-21 23:22:53 +02:00
wulan17
e5ddd684c3 cepheus: rootdir: Fix KeyError: '/system' 2023-10-21 17:46:47 +02:00
AmeChanRain
c3d707c781 cepheus: gps: Fix misleading indentation
* That makes clang17 happy
* Fix:
  device/xiaomi/violet/gps/android/utils/battery_listener.cpp:191:13: error: misleading indentation; statement is not part of the previous 'if' [-Werror,-Wmisleading-indentation]
            auto r = mHealth->unlinkToDeath(this);
            ^
device/xiaomi/violet/gps/android/utils/battery_listener.cpp:189:9: note: previous statement is here
        if (mHealth != NULL)
        ^
1 warning and 1 error generated.

Change-Id: I3be1e3de45ce184c9d3dbcede57a312375a91498
Signed-off-by: Nanhumly <admin@warbler.cc>
2023-10-21 14:59:41 +02:00
ralph950412
119a1b43c5 cepheus: gps: Fix unqualified-std-cast-call warning
error: unqualified call to std::move [-Werror,-Wunqualified-std-cast-call]
            mIpcRecver(move(ipcRecver)) {}
                       ^
                       std::
2023-10-21 13:37:35 +02:00
Chih-Hung Hsieh
dfc5124488 cepheus: power-libpermgr: Use tidy_checks_as_errors not -warnings-as-errors 2023-10-21 12:44:23 +02:00
chematelegram
9d55e00ed4 cepheus: Drop BOARD_BUILD_SYSTEM_ROOT_IMAGE 2023-10-21 10:54:54 +02:00
kenway214
80b33c16fb cepheus: Add Basic Call Recording support 2023-10-04 20:57:14 +02:00
5993702032 cepheus: overlay: Enable Lineage Health service 2023-09-13 19:35:47 +00:00
chematelegram
c44ada533e Revert "cepheus: textclassifier: Add and ship prebuilt textclassifier"
This reverts commit 5a8933c2b2.
2023-09-12 13:13:35 +00:00
elpaablo
8dea951d2a cepheus: fastcharge: Extend Fastcharge implementation
* Add implementation for setting max current allowed when not fast charging
2023-09-12 10:19:50 +00:00
chematelegram
b53a30ece2 cepheus: Build lineage health HAL
* Support for Charging Control
2023-09-09 23:30:09 +00:00
marshmello61
5a8933c2b2 cepheus: textclassifier: Add and ship prebuilt textclassifier
- Helps fix the delay we have in copying text and that being available in clipboard

Signed-off-by: Mayur <ultramayur123@gmail.com>
2023-09-03 23:23:24 +00:00
chematelegram
65b63d225f cepheus: overlay: Enable Fast Charge toggle 2023-09-03 23:23:24 +00:00
kamikaonashi
42a4f18f58 cepheus: rootdir: Give permission to restricht_chg
Co-Authored-By: Tofu <ralph950412@gmail.com>
2023-09-03 23:23:24 +00:00
FlowerSea0208
79aae32e5c cepheus: rootdir: Add init.xiaomi.rc 2023-09-03 23:23:24 +00:00
johnmart19
1403a2164b cepheus: sepolicy: Fastcharge: Provide needed permissions 2023-09-03 23:23:24 +00:00
johnmart19
9eac76f987 cepheus: sepolicy: Label FastCharge more general 2023-09-03 23:23:24 +00:00
althafvly
107602ff0e cepheus: Build fastcharge implementation 2023-09-03 23:23:24 +00:00
Davide Garberi
593fa44235 cepheus: fastcharge: Migrate to blueprint
Change-Id: I200fd6c685183c98f0815b207adae5aa75a37238
2023-09-03 23:23:24 +00:00
Bruno Martins
dff3ec0576 cepheus: fastcharge: Use pragma once
Change-Id: I9a9e193a6f66f045f41394d059af8b71778e8d72
2023-09-03 23:23:24 +00:00
Bruno Martins
438ffc794c cepheus: fastcharge: Make user setting persistent
Change-Id: I4ff051d6f9685e94022eab32035bfe86a65264b8
Signed-off-by: Davide Garberi <dade.garberi@gmail.com>
2023-09-03 23:23:24 +00:00
Francescodario Cuzzocrea
8b206fbb6c cepheus: Add fastcharge implementation
* Disabling fast charge may be useful for reducing the heat produced by
   the device while charging, or for extending the lifespan of the battery

 * This commit introduces the fastcharge HIDL, which writes in the node

              /sys/class/qcom-battery/restrict_chg

   0 or 1 depeding on user selection.
   0 means that fastcharge is enabled, while 1 means that fastcharge is
     disabled

Change-Id: I369ba9c437b3a83a88c2ce74d603b7d7ddd9cfbb
Signed-off-by: Davide Garberi <dade.garberi@gmail.com>
Signed-off-by: althafvly <althafvly@gmail.com>
2023-09-03 23:23:24 +00:00
Pranav Vashi
60190c1d81 cepheus: Update dax-default profiles
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2023-08-20 07:40:17 +00:00
chematelegram
af8c4b7989 cepheus: Add missing flags for MIUI camera 2023-08-17 18:03:36 +00:00
chematelegram
6e865304e7 cepheus: Switch to Pico GApps 2023-08-17 18:03:36 +00:00
adi8900
555e3c1eb6 cepheus: Switch to QTI WFD 2023-08-17 18:03:36 +00:00
chematelegram
3a5f23c7bf cepheus: Switch to AOSP clang
* clang 17.0.2 based on r487747c
2023-08-17 18:03:36 +00:00
chematelegram
cc2f419c78 cepheus: Add dependencies 2023-08-17 18:03:23 +00:00
kondors1995
94636824a7 cepheus: Import QCOM audio effects blobs 2023-08-04 02:11:09 +00:00
Pranav Vashi
0435e77bd9 cepheus: audio: Update dolby config values from oneplus
Fixes: https://github.com/crdroidandroid/issue_tracker/issues/144

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2023-08-04 02:11:09 +00:00
Pranav Vashi
4d672540e1 cepheus: Update dax-default
* Updated from Moto dubai device. More clarity.

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2023-08-04 02:11:09 +00:00
Pranav Vashi
e0e49f846d cepheus: Add Moto Dolby support 2023-08-04 02:10:54 +00:00
chematelegram
60782fc2be Revert "cepheus: Add Dolby"
This reverts commit d8ac947579.
2023-08-02 10:22:20 +00:00
chematelegram
17a2171339 cepheus: Remove MiSound blob 2023-08-02 10:07:17 +00:00
ade602c508 cepheus: Update maintainer links 2023-07-29 07:18:23 +00:00
chematelegram
17db7007d4 cepheus: Build Aperture camera 2023-07-29 03:56:52 +00:00
chematelegram
6cb462431b Revert "cepheus: overlay: Update camera IDs for aperture"
This reverts commit 5dae5b2c35.
2023-07-20 22:26:27 +00:00
baalgx
586ee76199 cepheus: Import Snapdragon NPE blob from stock
- From cepheus-user-11-RKQ1.200826.002-V12.5.3.0.RFACNXM
- E CamX: [ERROR][UTILS] camxosutilslinux.cpp:874 LibMap() dlopen: dlopen failed: library "libSNPE.so" not found: needed by /vendor/lib64/libcamera_scene.so in namespace (default), on '/vendor/lib64/camera/components/com.mi.node.aiasd.so'

Signed-off-by: baalgx <jose@pixelos.net>
2023-07-19 13:43:00 +00:00
chematelegram
0b1d292cff cepheus: Support the MIUI camera 2023-07-19 13:33:53 +00:00
chematelegram
402d1d2363 cepheus: overlay: Remove unused config
* This config is no longer used in the ROM sources
2023-07-19 13:33:53 +00:00
chematelegram
c345c1d546 cepheus: Support the quick tap gesture 2023-06-21 00:07:13 +00:00
Bruno Martins
95cd5bad3e cepheus: overlay: Use CodeAurora ImsService implementation for RCS 2023-04-23 04:42:08 +00:00
chematelegram
61ffb4fd5f cepheus: overlay: Add config for Smart charge
* after 3604b0437b5481bbb96058592f44cbe37d7063b4
2023-04-23 04:42:08 +00:00
chematelegram
7967131aa9 [SQUASH] cepheus: Switch back to previous UDFPS implementation"
Revert "sensors: udfps: Rename to avoid naming conflict"

This reverts commit c9531164355f10ffd6be4317db84cba0dcd402b2.

Revert "cepheus: fingerprint: Refactor for udfps sensor"

This reverts commit 39db29ed865a278decd9ddea1a44123a95c18b9b.

Revert "cepheus: Switch to udfps sensor impl"

This reverts commit 047fd87f6c7af88d85f6f1f8e493bc430dfcfb7b.

Revert "cepheus: sensors: Implement UDFPS sensors 1.0 sub-HAL"

This reverts commit bcbbc1b941d444ba22eb8a4efd3ea039cfb9f363.
2023-04-23 04:42:08 +00:00
chematelegram
fd6add0574 cepheus: overlay: Increase the radius of the fingerprint enrollment progress bar
* There are people with big hands. If you are one of
   them, do know that you are not alone, I Know how
   it feels having thumbs like f*cking bears. I know
   how it is to enroll your fingerprint while your
   finger is covering the UDFPS reader, the progress
   bar and half of the screen.
   And they made it for people with tiny fingers by
   default but, you know what? Our time has come
   buddies, we have the overlay and nothing's gonna
   stop us. Let's give our thumbs the space that
   they deserve.
2023-04-23 04:42:08 +00:00
EcrosoftXiao
959f103e9f sensors: udfps: Rename to avoid naming conflict 2023-04-23 04:42:08 +00:00
EcrosoftXiao
624de22224 cepheus: fingerprint: Refactor for udfps sensor 2023-04-23 04:42:08 +00:00
EcrosoftXiao
6ac3e53761 cepheus: Switch to udfps sensor impl 2023-04-23 04:42:08 +00:00
Ivan Vecera
f15e8801ca cepheus: sensors: Implement UDFPS sensors 1.0 sub-HAL
* Implement minimalistic UDFPS sensors sub-HAL for Xiaomi devices
  that implement Sensors HAL 1.
* It uses sysfs attribute /sys/devices/virtual/touch/tp_dev exported
  by touchscreen drivers but list of supported paths can be extended.

Change-Id: I5c7653bfbbed20b2f3e00fd8a32cb1277b753b4b
2023-04-23 04:42:08 +00:00
=?UTF-8?q?Jos=C3=A9=20M?=
f2d375b4fd cepheus: overlay: cepheus: Remove 4K video support from front camera
- Not supported
2023-04-23 04:42:08 +00:00
chematelegram
3306a6eef0 Revert "cepheus: Add GCam"
This reverts commit dfa06a5c38.

All lenses are available for video in Aperture now
2023-04-23 04:42:08 +00:00
kdrag0n
14ac894689 cepheus: overlay: Show memory usage in app info
The system tracks memory usage for each app, so we might as well show it
to the user so that users can track down which apps are hogging their
memory. This shouldn't be a developer-only feature that was previously
only exposed in Developer Options.

Signed-off-by: anandhan07 <anandhasayanan007jb@gmail.com>
2023-04-23 04:42:08 +00:00
Arian
ea9a29c410 cepheus: overlay: Remove dsp. prefix from audio and video power profiles
* AOSP power_profile.xml does not include this prefix

Change-Id: I39ee47d4bccfc7eb5454aa64595eaad2a17a1dcf
Signed-off-by: Ahmed Harhash <Lacentix@tutanota.com>
2023-04-23 04:42:08 +00:00
Edwin Moquete
ad690f0a79 cepheus: Remove unused persist.bluetooth.a2dp_offload.cap property
This prop has no effect as of T QPR1.

See: cf25e33147

Change-Id: Ic762812dd59429d344ccc55c01bf96b0ffd6dbab
Signed-off-by: Chenyang Zhong <zhongcy95@gmail.com>
2023-04-23 04:42:08 +00:00
Edwin Moquete
101d3985cc cepheus: Restore vendor bluetooth props
These are read by the BT audio blobs, even without the
QTI BT stack.

Change-Id: Ia2335bedfd7e19899c2cb32c23fcc664f2cfe8ce
Signed-off-by: Chenyang Zhong <zhongcy95@gmail.com>
2023-04-23 04:42:08 +00:00
EcrosoftXiao
ad635494fd cepheus: sepolicy: Drop debugfs related rules 2023-04-23 04:42:08 +00:00
Chenyang Zhong
d8ea756c84 cepheus: drop unnecessary ims system blobs
Everything is fine on AOSP without them.

Signed-off-by: Chenyang Zhong <zhongcy95@gmail.com>
2023-04-23 04:42:08 +00:00
Chenyang Zhong
c888ee3712 cepheus: add the missing vendor.qti.imsrtpservice@3.1
Otherwise, carrier video calling is broken.

Signed-off-by: Chenyang Zhong <zhongcy95@gmail.com>
2023-04-23 04:42:08 +00:00
Chenyang Zhong
396007652a cepheus: clean up aux camera package list
Drop org.codeaurora.snapcam because BSG gcams actually do not rely
on this prop to enable aux lenses.

Drop the dev variant of Aperture because we are not going to debug
this app.

Signed-off-by: Chenyang Zhong <zhongcy95@gmail.com>
2023-04-23 04:42:08 +00:00
Terminator-J
1a9847620d cepheus: overlay: Fix hyper orange night light
With the recent (end of September) changes in android_framework_base to incorporate kdrag0n's modifications
to ColorDisplayManager's color transformation handling, the old
Night Light default config.xml value for maximum color temperature
(which corresponds to the lowest-intensity end of the slider) was
revealed to be rather far from the default hard-coded color temp
value (6500K).

Setting the maximum color temperature available when Night Light
is enabled to equal the default color temperature means that the
effect intensity slider now has an effective intensity range of
0% to 100% (the minimum color temperature value, in degrees Kelvin)
rather than starting from ~4000K max (still very amber compared to
6500K).

Signed-off-by: ImPrashantt <prashant33968@gmail.com>
Signed-off-by: OmarAlCoptan <omarcoptan9@gmail.com>
2023-04-23 04:42:08 +00:00
chematelegram
d2f33edd3a cepheus: overlay: Remove setColorTransform config
* The boolean is 'true' now by default in the ROM sources
2023-04-23 04:42:08 +00:00
chematelegram
14aa809106 cepheus: Build some camera blobs from source
- Inspired from LineageOS sm8150-common [1] and cepheus [2] trees.

 [1]: https://github.com/xiaomi-sm8150-devs/android_device_xiaomi_sm8150-common/
 [2]: https://github.com/xiaomi-sm8150-devs/android_device_xiaomi_cepheus/

Signed-off-by: baalgx <jose@pixelos.net>
2023-04-23 04:41:53 +00:00
Cyber Knight
5e432936c6 cepheus: Fix permissions for poweroffalarm
- This fixes a certain bug regarding poweroffalarm with AOSP clock.

Signed-off-by: Cyber Knight <cyberknight755@gmail.com>
2023-02-17 08:32:52 +00:00
Georg Veichtlbauer
df8a7f325d cepheus: Fix PowerOffAlarm
* The APK is prepared to not run as system user
* Adjust /persist/alarm/data permissions accordingly

Change-Id: Ie24ccb3749d1dda2deb670cdb531e35d153034ed
2023-02-17 08:32:52 +00:00
Qimeng Pan
4aee9fc21a cepheus: rootdir: add power_off_alarm into init.rc
Add power_off_alarm into init.rc on charge mode

Change-Id: I18158cde8b3ae0890a92bd1ced56782fa053230a
CRs-Fixed: 2373093
2023-02-17 08:32:52 +00:00
Mao Jinlong
1d15f90c77 cepheus: rootdir: Add vendor prefix to power_off_alarm service
power_off_alarm is a vendor service. Add vendor prefix to it.

Change-Id: Ib4a988467a54bbe4544960180afeeeb5dd0e85f3
2023-02-17 08:32:52 +00:00
Mao Jinlong
1e5e6076db cepheus: rootdir: Add power off alarm service
Add power off alarm service for power off alarm feature to
reboot device when power off alarm is up in some special
mode like power off charging mode.

CRs-Fixed: 2095984
Change-Id: Ib8d82e63e92a85a7f60d5559064a1f19e0de5a22
2023-02-17 08:32:52 +00:00
Alexander Martinz
86944c2d6e cepheus: Drop aptx blobs
They live within the bluetooth apex now.

Change-Id: I01ef1d665ce05b7ce5b1ee03129ccf3ce6058634
Signed-off-by: Alexander Martinz <amartinz@shiftphones.com>
2023-02-17 08:32:09 +00:00
José M
e77df5c137 cepheus: overlay: Remove 4K video support from (2.0x) telephoto
- Not supported, camera goes black.

Signed-off-by: balgxmr <jose@pixelos.net>
2023-02-17 06:41:59 +00:00
balgxmr
5dae5b2c35 cepheus: overlay: Update camera IDs for aperture
- Since [1], camera IDs changed, hence let's update them.
- Ultra wide (0.7x), and telephoto (2.0x) now shows on video.

[1]: 36db35bca7

Signed-off-by: balgxmr <jose@pixelos.net>
2023-02-17 06:41:41 +00:00
Bruno Martins
862e5ba7dd cepheus: overlay: Unlock additional camera framerates
Signed-off-by: balgxmr <jose@pixelos.net>
2023-02-17 06:39:41 +00:00
Sebastiano Barezzi
5a3d21797e cepheus: audio: Use AOSP USB v2 audio HAL
Change-Id: I579e442a8c41ec62acc1e5be7478889bf5bc24b8
2023-02-17 06:37:31 +00:00
fiirefly24
919fcb016e cepheus: parts: Fix thernal compilation for QPR1 merge
Change-Id: I71ad7db85592ca18e3f0f8155bba5a472bfadbaa
2023-02-06 23:41:24 +00:00
Nauval Rizky
8cf3ee6c3e cepheus: parts: Thermal settings's app list improvement
* Migrate from ListView to RecyclerView for better integration with the
  collapsing toolbar and smoother scrolling
* Several UX improvement over the item's layout

Change-Id: I2a2b566020c9869979cc3f6e8c2be7a92c8d325f
Signed-off-by: Nauval Rizky <enuma.alrizky@gmail.com>
Signed-off-by: PainKiller3 <ninadpatil100@gmail.com>
2023-02-06 23:41:24 +00:00
TheScarastic
2f78a8d178 cepheus: parts: Fix thermal profile build for android-12
bfc9e59361

Change-Id: Idb137239c916f94d0bbef2166bb688f381e4ad28
2023-02-06 23:41:24 +00:00
TheScarastic
9262d08e8f cepheus: parts: Adapt Thermal Parts to S style
Change-Id: Id69636b5356b7a56cb1b6ba74271905f6316e651
2023-02-06 23:41:24 +00:00
TheScarastic
81724c3ebc cepheus: parts: Add dynamic thermal profile implementation
Change-Id: I4667b24a8a29a418796dc51b245ede0aca51eea6

sm8250-common: parts: Make thermal profiles naming completely generic

Drop the reference to YouTube because that's product-specific.
Moreover, the purpose of such thermal profile should be video streaming,
so name it in that generic way.

Change-Id: Ifa8c97a2d231a24fda016a876c06b59825a068a6

sm8250-common: Switch back to default thermal profile when screen off

Change-Id: I72aae3c1fbb13f44ff7a637ba9ad70cf451d71a2

sm8250-common: Set dynamic thermal interval to 5 sec

Change-Id: I96a67297645ad9074045e94fce84e664723aa64c

sm8250-common: parts: Switch to TaskStackListener

Change-Id: I18cb22decddb38420e8137aafdc56810e81d4603

sm8250-common: parts: Refactor whole code

Change-Id: I14303556c66ea6bd3d111b5ce7e176711a676824

sm8250-common: parts: Check if kernel support Thermal Profiles

Change-Id: Ief3911b0c1238ed6e209f7b66dde68d67a69ea88

sm8250-common: parts: Add ACTION_SCREEN_ON intent filter

 * this should fix thermal/touchscreen profiles not
   getting restored after turning screen back on

Change-Id: Idb485fc7f1942f1a2d117025fe5c4237afc3ec81

sm8250-common: parts: Use correct gaming thermal

* thermal-pubg.conf is missing which is selected with 13, instead we have thermal-tgame.conf which is 9.
* thanks amack766 for informing

Change-Id: If2e95fc04b26a1fa87e77f854ec0c325243cd097
2023-02-05 01:14:38 +00:00
Pranav Vashi
4d664f27a7 cepheus: overlay: Add temp divider value for cpu info overlay 2023-01-31 06:20:50 +00:00
redcliff-op
dfa06a5c38 cepheus: Add GCam
* BSG MGC_8.1.101_A9_GV2b_MGC
 * This is an excellent option until we get all the lenses
   to be available in Aperture for video
2023-01-31 06:14:52 +00:00
¨raystef66¨
01c3fb3956 cepheus: sepolicy: Remove duplicate genfs entries 2023-01-24 15:05:28 +00:00
chematelegram
48ce6c81c3 cepheus: Use Mini GApps 2023-01-23 00:09:57 +00:00
AdarshGrewal
ab1cb9493c cepheus: Include MiuiCamera if exists 2023-01-23 00:05:10 +00:00
EcrosoftXiao
12a79850ef cepheus: sepolicy: Label vendor.xiaomi.hardware.campostproc service
Change-Id: If9fe7e6131fff272d6311ca2ea30c3c61ecfee36
2023-01-22 23:57:50 +00:00
AndroidHQ254
808129402a cepheus: sepolicy: miuicamera: Address sepolicy denials
E SELinux : avc:  denied  { find } for interface=vendor.xiaomi.hardware.misys::IMiSys sid=u:r:platform_app:s0:c512,c768 pid=7115 scontext=u:r:platform_app:s0:c512,c768 tcontext=u:object_r:default_android_hwservice:s0 tclass=hwservice_manager permissive=0

E SELinux : avc:  denied  { find } for interface=vendor.xiaomi.hardware.campostproc::IMiPostProcService sid=u:r:platform_app:s0:c512,c768 pid=7115 scontext=u:r:platform_app:s0:c512,c768 tcontext=u:object_r:hal_camerapostproc_xiaomi_hwservice:s0 tclass=hwservice_manager permissive=0

E vndksupport: Could not load /vendor/lib64/libmialgoengine.so from sphal namespace: dlopen failed: library "/vendor/lib64/libmialgoengine.so" not found.
2023-01-22 23:57:50 +00:00
Adithya R
540a9447c4 cepheus: sepolicy: Allow camera HAL to get/set vendor_video_prop
12-08 17:08:40.576   994  4737 E libc    : Access denied finding property "vendor.video.disable.ubwc"
12-08 17:08:40.574   994   994 W HwBinder:994_3: type=1400 audit(0.0:181): avc: denied { read } for uid=1047 name="u:object_r:vendor_video_prop:s0" dev="tmpfs" ino=12913 scontext=u:r:hal_camera_default:s0 tcontext=u:object_r:vendor_video_prop:s0 tclass=file permissive=0
2023-01-22 23:57:50 +00:00
Nolen Johnson
590610023b cepheus: Remove deprecated TARGET_USES_QTI_CAMERA_DEVICE
* Dead as of https://review.lineageos.org/c/LineageOS/android_vendor_lineage/+/331507.
* We already build vendor.qti.hardware.camera.device@1.0
  so we have what we need.

Change-Id: I8ec420d6264fee70a1602eecdbb4f34f2e5db3dc
2023-01-22 23:57:50 +00:00
Albert I
5dc97f4521 cepheus: sepolicy: Allow apps and camera HAL access to secure ADSP domain
Signed-off-by: Albert I <kras@raphielgang.org>
Change-Id: Ibb1071299632ab53726638dbcc134d4bca59fc52

Signed-off-by: Sonal Singh <sonal.singh.19993@gmail.com>
Signed-off-by: Joey Huab <joey@evolution-x.org>
2023-01-22 23:57:50 +00:00
Sebastiano Barezzi
6f044c50d8 cepheus: libqti-perfd-client: Move to C
* Why bothering with C++ mangling when we can just build it as a standard C library?

Change-Id: I45ea977edf7ea7fab6fece76f3049654a8d24c5d
2023-01-22 23:57:50 +00:00
Chenyang Zhong
bba3e42154 cepheus: libqti-perfd-client: Return a dummy value
Return a positive integer for perf lock acquire and release so
that Goodix/FPC fingerprint sensor blobs will not complain.

Goodix:
E [goodixHAL][gf_hal_milan_f_series]: goodix_perf_lock_acquire: Failed to acquire perf lock, err: 0
E [goodixHAL][gf_hal_milan_f_series]: goodix_perf_lock_release: Perf lock release error 0

FPC:
E fpc_tac : fpc_perf_lock_acquire: Incorrect params, Failed to acquire perf lock, err
E fpc_tac : fpc_perf_lock_release: Perf lock release error 0

Signed-off-by: Chenyang Zhong <zhongcy95@gmail.com>
Change-Id: I861672e9a738c2204755d802670f4b28b662f286
2023-01-22 23:57:50 +00:00
Bruno Martins
ba7de287ce cepheus: libqti-perfd-client: Remove namespace declaration
It's pointless when using extern "C".

Change-Id: Ibdf9f06a70aa3a75687b33781c78cf2172bb334d
2023-01-22 23:57:50 +00:00
Lucchetto
2529c7f25c cepheus: Create dummy libqti-perfd-client
* proprietary perfd blobs can finally be nuked without breaking goodix
* we could even map the functions to use libperfmgr powerhints in the future

Signed-off-by: Lucchetto <lucchetto.tie@live.com>
Signed-off-by: Chenyang Zhong <zhongcy95@gmail.com>
Change-Id: I124652f3041761966a3e3bd97c757fecc39cc5fb
2023-01-22 23:57:50 +00:00
Weikai Kong
1003d8db31 cepheus: Add back ro.vendor.extension_library definition
* We aren't using QCOM's perfd but our blobs still check for this.
 * To avoid unnecessary errors, let's just add it back.

Change-Id: Icc44b330f21a658cfa8ded691a6628d8f62c3649
2023-01-22 23:57:50 +00:00
Wei Wang
c793d59925 cepheus: Remove QTI perfd
Bug: 69270928
Test: Build and boot device and test camera

Change-Id: I87b283206f462fb5c8ec9cdd303ae2934fe9bfc4
2023-01-22 23:57:50 +00:00
ghostrider-reborn
d25eb2997b cepheus: Disable QTI perf lock usage in camera HAL
* our dummy qti-perfd-client doesnt play well with our
   camera hal and crashes everytime lens is switched

11-26 00:15:37.902 16507 16507 F DEBUG   : pid: 15967, tid: 16032, name: HwBinder:15967_  >>> /vendor/bin/hw/android.hardware.camera.provider@2.4-service <<<
11-26 00:15:37.902 16507 16507 F DEBUG   : uid: 1047
11-26 00:15:37.902 16507 16507 F DEBUG   : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
11-26 00:15:37.902 16507 16507 F DEBUG   : Cause: null pointer dereference
...
11-26 00:15:37.902 16507 16507 F DEBUG   : backtrace:
11-26 00:15:37.902 16507 16507 F DEBUG   :       #00 pc 0000145e  /vendor/lib/libqti-perfd-client.so (perf_lock_acq+6) (BuildId: b9021283b270fb111fd8dfa2403d21fe)

Signed-off-by: Azure-Helper <azurehelper219@gmail.com>
2023-01-22 23:57:50 +00:00
baalgx
75c4f78b08 cepheus: Remove dead build target
Signed-off-by: baalgx <jose@pixelos.net>
2023-01-22 23:57:50 +00:00
LuK1337
1b380fa6be cepheus: RIP com.dsi.ant.antradio_library
No longer shipped by default with Android 12.

Change-Id: Iae740ef18505b7f2bb01fe54d45810e72fd521e9
2023-01-22 23:57:50 +00:00
Michael Bestas
84de562ef3 cepheus: Remove android.hardware.graphics.composer@2.4-impl
It no longer exists, the service is fully binderized

Change-Id: I06ee402b50216948e0e72a2797c2edfda1c4886a
2023-01-22 23:57:20 +00:00
chematelegram
8a2ca3de09 fixup! cepheus: Disable zram writeback 2023-01-19 08:36:42 +00:00
chematelegram
d7b81d8c40 cepheus: livedisplay: Remove Antiflicker
* since the ROM features DC Dimming now

This is a combination of 2 commits.

This is the 1st commit message:

Revert "cepheus: livedisplay: Fix the node for AntiFlicker"

This reverts commit 0fef7044f1.

This is the commit message #2:

Revert "cepheus: livedisplay: Implement IAntiFlicker interface"

This reverts commit 126df9f150.
2023-01-18 17:48:14 +00:00
chematelegram
69b9c96140 cepheus: overlay: Support automated DC dimming 2023-01-18 09:30:31 +00:00
chematelegram
bfd2a96c09 cepheus: overlay: Switch to charging_enabled for Smart Charging 2023-01-17 19:57:28 +00:00
chematelegram
e92e3eb27c Revert "[DNM] cepheus: overlay: Add dummy udfps sensor"
This reverts commit 579497da8a.
2023-01-17 01:51:22 +00:00
chematelegram
a563f54114 cepheus: overlay: Limit the screen recorder's framerate 2023-01-17 01:46:46 +00:00
chematelegram
ba5ee12493 cepheus: overlay: Fix misspelling in udfpsVendorCode 2023-01-17 01:36:13 +00:00
Sonal Singh
d8ac947579 cepheus: Add Dolby 2023-01-12 10:27:47 +00:00
chematelegram
2bbdc9299d cepheus: parts: Drop Dirac sound enhancer 2023-01-12 10:23:39 +00:00
Chenyang Zhong
ebeed85503 cepheus: update DPM, IMS, and RIL system blobs
from LA.QSSI.13.0.r1-05300-qssi.0

Signed-off-by: Chenyang Zhong <zhongcy95@gmail.com>
2023-01-07 23:58:13 +00:00
EcrosoftXiao
8f050bd917 cepheus: Update keymaster blobs from Xiaomi/nabu/nabu:12/RKQ1.200826.002/V13.1.22.9.5.DEV 2023-01-07 23:58:13 +00:00
chematelegram
69b4d4d0ff cepheus: overlay: Update Build Status info 2023-01-07 23:58:13 +00:00
chematelegram
a783107d3c cepheus: sepolicy: Adress denial for livedisplay sunlight enhancement 2023-01-07 23:58:13 +00:00
baalgx
7b8c9a0833 cepheus: Stop including the firmware 2023-01-07 23:58:13 +00:00
Chenyang Zhong
126e4f0d16 cepheus: sepolicy: allow vendor_init to change watermark_scale_factor
avc: denied { write } for comm="init" name="watermark_scale_factor" dev="proc" ino=56793 scontext=u:r:vendor_init:s0 tcontext=u:object_r:proc_watermark_scale_factor:s0 tclass=file permissive=1

Signed-off-by: Chenyang Zhong <zhongcy95@gmail.com>
2023-01-07 23:58:13 +00:00
Jiyong Park
2736fe6325 cepheus: Remove ndk_platform backend. Use the ndk backend.
The ndk_platform backend will soon be deprecated because the ndk backend
can serve the same purpose. This is to eliminate the confusion about
having two variants (ndk and ndk_platform) for the same ndk backend.

Bug: 161456198
Test: m
Change-Id: I14a1c57bd06f1f2aa52491f779c7030d4de03547
Signed-off-by: Chenyang Zhong <zhongcy95@gmail.com>
2023-01-07 23:58:13 +00:00
chematelegram
9626908367 cepheus: Make it official 2023-01-07 23:58:13 +00:00
chematelegram
48dfc8e4bf cepheus: overlay: Support screen off UDFPS 2023-01-07 23:58:13 +00:00
EcrosoftXiao
579497da8a [DNM] cepheus: overlay: Add dummy udfps sensor
Currently, udfps controller checks udfpsLongPressSensorType [1] to
determine state of screen off udfps. This causes issues on legacy
fod devices. Since we don't have any real udfps press sensor, But
we still uses vendor-code-style screen off udfps, so bypass these
checks by setting a dummy udfps sensor.

[1] https://github.com/PixelExperience/frameworks_base/blob/thirteen/core/java/android/hardware/display/AmbientDisplayConfiguration.java#L143
2023-01-07 23:58:13 +00:00
chematelegram
0fef7044f1 cepheus: livedisplay: Fix the node for AntiFlicker 2023-01-07 23:58:13 +00:00
chematelegram
694f9e6da2 cepheus: sepolicy: Cleanup sepolicy 2023-01-07 23:58:13 +00:00
chematelegram
63bf3084fa Revert "cepheus: Improve boot time and pull in bootanim display time"
This reverts commit 0939cab02d.
2023-01-07 23:58:13 +00:00
9ac2dbf6e7 cepheus: overlay: Enable Build status info 2023-01-07 23:58:13 +00:00
d44b0f5acf cepheus: overlay: Add maintainer info 2023-01-07 23:58:13 +00:00
Chenyang Zhong
f02ee97f52 cepheus: overlay: Enable aux camera for Aperture
Also block unwanted camera ids.

Signed-off-by: Chenyang Zhong <zhongcy95@gmail.com>
2023-01-07 23:58:13 +00:00
Bruno Martins
8c2f0d480b cepheus: Update aux camera package whitelist
LinageOS Snap camera is dead for good.

Change-Id: Ib190174585ee4f7a931b813547861051f754a477
Signed-off-by: Chenyang Zhong <zhongcy95@gmail.com>
2023-01-07 23:58:13 +00:00
Bruno Martins
b34154375f cepheus: Expose aux cams to Aperture
Change-Id: I25cd180d9145b8b3da2385257c6e91e51c2032a2
Signed-off-by: Chenyang Zhong <zhongcy95@gmail.com>
2023-01-07 23:58:13 +00:00
chematelegram
1a7f1228e3 cepheus: overlay: Support Smart Pixels 2023-01-07 23:58:13 +00:00
chematelegram
c3afd12664 cepheus: Switch to sepolicy_vndr-legacy-um 2023-01-07 23:58:13 +00:00
chematelegram
038ad8881b cepheus: Get cepheus back to the Evolution 2023-01-07 23:58:13 +00:00
Bruno Martins
fad95382c1 cepheus: parts: Fix compilation after QPR1 merge
Change-Id: I71ad7db85592ca18e3f0f8155bba5a472bfadbaa
2023-01-07 23:58:13 +00:00
chematelegram
569bad1d98 Revert "cepheus: overlay: Drop config_setColorTransformAccelerated"
* Because no, it's not enabled by default in Spark

This reverts commit 763dc8ef437f504712a6fb88a16d2efd16c7199d.
2023-01-07 23:58:13 +00:00
chematelegram
87bdf12735 cepheus: powerhint: Tune frequencies for expensive rendering 2023-01-07 23:58:13 +00:00
UtsavBalar1231
c30597b0f1 cepheus: overlay: Update multiple vibration intensity levels config for T
Since commit: eaaf5331d6
multiple intensities configuration flag has been changed to an interger
reflect that change in here to allow multiple intensity vibration pattern in settings.

Change-Id: I13f9dbf6280623ad1c954ce96ceecbe363140062
Signed-off-by: UtsavBalar1231 <utsavbalar1231@gmail.com>
Signed-off-by: anandhan07 <anandhasayanan007jb@gmail.com>
2023-01-07 23:58:13 +00:00
OnlyTomInSecond
2e0a262f74 cepheus: Set block_binder_thread_on_incoming_calls prop
In order to fix incoming calls.

Change-Id: Id474622f3e08b88f1d099e3d6507fd1d84de4d88
Signed-off-by: Chenyang Zhong <zhongcy95@gmail.com>
2023-01-07 23:58:13 +00:00
Michael Bestas
0a436bc832 cepheus: Move qti_whitelist.xml to /system_ext
Change-Id: Id8617513cfd686b3f6888a89c1b1db196acfb476
Signed-off-by: Chenyang Zhong <zhongcy95@gmail.com>
2023-01-07 23:58:13 +00:00
Michael Bestas
c1f159949a cepheus: Remove bdroid_buildcfg.h
As of I3c7aed1bdb45db728d319f7d757400e44d232283 the Bluetooth stack
defaults to reasonable defaults that should work for all devices.

Change-Id: I056d63c4c8a2727e384172e964dc0000b6773504
Signed-off-by: Chenyang Zhong <zhongcy95@gmail.com>
2023-01-07 23:58:13 +00:00
Bruno Martins
82c3c37eea cepheus: Revise and update audio feature flags and props
So to match what is shipped with stock because prebuilt a-HAL
and extensions are being used.

Change-Id: I74d5bd1de5ea87984ace38076cb5a0bd54736ca6
Signed-off-by: Chenyang Zhong <zhongcy95@gmail.com>
2023-01-07 23:58:13 +00:00
Bruno Martins
fb36fe0182 cepheus: Drop custom APM flag along with no-op audio flags
Custom audio policy manager is hard disabled by CAF
for 2 years now. Remove as well the audio feature flags
that were used to configure it.

Change-Id: Idd34d1cbbdb735d6cf0de3b159c2670bf7ddd1e3
Signed-off-by: Chenyang Zhong <zhongcy95@gmail.com>
2023-01-07 23:58:13 +00:00
Mohammed Mirza Mandayappurath Manzoor
fe7bf2081c cepheus: ueventd: Set permissions for KGSL sysfs node
Some KGSL sysfs nodes need to be access controlled. Set proper
permissions for the same.

Change-Id: Idc7e2447d02742074873901c6539f2c6d9d25862
Signed-off-by: Chenyang Zhong <zhongcy95@gmail.com>
2023-01-07 23:58:13 +00:00
Alexander Koskovich
7be9894cfc cepheus: Move Bluetooth power overlays to sysprops
* These were moved to sysprops in Android 13 [1] and while
   frameworks reads the values directly from power_profile.xml
   Bluetooth app reads from the properties.

 [1] 976d33062b%5E%21/#F0

Change-Id: I5bff67a15c537e8a47a19f30776fca6bf2c9fbe5
Signed-off-by: Chenyang Zhong <zhongcy95@gmail.com>
2023-01-07 23:58:13 +00:00
Bruno Martins
9beeaea123 cepheus: Migrate to AIDL ClearKey DRM HAL
Change-Id: Iad5cc1176978137c647069197b33f49fb4d98ab2
Signed-off-by: Chenyang Zhong <zhongcy95@gmail.com>
2023-01-07 23:58:13 +00:00
LuK1337
fb8cf1356b cepheus: Pull appropriate USB props from vendor_product.mk
Change-Id: I93b25c5d0989c83d1c8d7b7946a083771febdddd
Signed-off-by: Chenyang Zhong <zhongcy95@gmail.com>
2023-01-07 23:58:13 +00:00
Alexander Koskovich
d632a87814 cepheus: Move BT profiles props to vendor
* Makes it GSI compatible

Change-Id: I8f7caf241d508af59c16482e6185c42f23f8a460
Signed-off-by: Chenyang Zhong <zhongcy95@gmail.com>
2023-01-07 23:58:13 +00:00
Woody Lin
d77c07339d cepheus: Enable zygote critical window
Bug: 141948707
Change-Id: I5dc57312118b0f6d95fc9fe164363ec7e15f1b51
Signed-off-by: Chenyang Zhong <zhongcy95@gmail.com>
2023-01-07 23:58:13 +00:00
Alexander Koskovich
e6c8131434 cepheus: Set USB product string to 'Xiaomi Mi 9'
Change-Id: Idda062aaa38e16d7ba65356dbca8b467fbff14c1
Signed-off-by: Chenyang Zhong <zhongcy95@gmail.com>
2023-01-07 23:58:13 +00:00
Sal Savage
c3510c1e21 cepheus: Replace BTM_DEF_LOCAL_NAME with a sysprop
Change-Id: I2c90efac01e61500eb1be23bb0ae6f96c2acdc53
Signed-off-by: Chenyang Zhong <zhongcy95@gmail.com>
2023-01-07 23:58:13 +00:00
Glen Kuhne
2ee07a0d3c cepheus: Set default hotspot ssid
Added a device specific overlay that changes the default name
from "AndroidAp" to customized name

Test: Builds, manually verified name change
Bug: 36368950
Change-Id: I38a5f6fb950d6a45342080bae186a8ed276d94bf
Signed-off-by: Chenyang Zhong <zhongcy95@gmail.com>
2023-01-07 23:58:13 +00:00
LuK1337
88a58c710e cepheus: Set a default Settings.Global.DEVICE_NAME
Change-Id: I310c1ffc581b72653783d1093d9e7ebde544bb16
Signed-off-by: Chenyang Zhong <zhongcy95@gmail.com>
2023-01-07 23:58:13 +00:00
chematelegram
815f241e19 cepheus: thermal: Cleanup modules already defined in sources 2023-01-07 23:58:13 +00:00
Ali B
390d53e2e4 cepheus: move to ueventd to $(TARGET_OUT_VENDOR_ETC)
* https://android-review.googlesource.com/c/platform/system/core/+/1526382.

Signed-off-by: Francescodario Cuzzocrea <bosconovic@gmail.com>
Change-Id: I95e7aa2428c5c396bdd01e55b8fb7f8fb9bb5699
2023-01-07 23:58:13 +00:00
Ralf Luther
8a2052c96f cepheus: sepolicy: Silence denials by suspend wakeups
Grant wakeup38 and wakeup39 accress to the sysfs directory

Signed-off-by: Pranav Temkar <pranavtemkar@gmail.com>
2023-01-07 23:58:13 +00:00
Pig
9b4cd2cc62 cepheus: sepolicy: Suppress system suspend denials spam
Change-Id: I4175b738819049cd351220ed6bd9be32101585f6
Signed-off-by: Joey Huab <joey@evolution-x.org>
2023-01-07 23:58:13 +00:00
EcrosoftXiao
4ebbf71120 Revert "cepheus: parts: Implement dc dimming"
This reverts commit d79388d581.
2023-01-07 23:58:13 +00:00
chematelegram
49afe076ab cepheus: sepolicy: Remove duplicated wakeup labels 2023-01-07 23:58:13 +00:00
penglezos
e86d24c653 overlay: 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
2023-01-07 23:58:13 +00:00
Andrzej Perczak
efc085180e cepheus: Disable redir_party_num
Caused incoming caller number not being parsed correctly by Phone app on
VoLTE and VoWiFi. No idea why Xiaomi enabled this ancient prop.

Signed-off-by: Andrzej Perczak <linux@andrzejperczak.com>
Change-Id: I4d3d19b80bedd7410e638c78909a8a910bc10be8
2023-01-07 23:58:13 +00:00
Ziqi Chen
13ca10c5a4 cepheus: init.qcom.rc: Tuning UFS clkgate and ah8 during boot time
Disabling UFS clkgate and ah8 during boot time helps in reducing
IO delays, which helps in reducing the total boot time. This change
will disable UFS clkgate and ah8 during early-init and then enable
it back after boot completion.

Change-Id: I6a10cd57a30fe3bdc4fba72a0d84cdfa3b1fd513
Signed-off-by: Ahmed Harhash <email@lacentix.me>
2023-01-07 23:58:13 +00:00
SebaUbuntu
d1335acb25 cepheus: overlay: Drop MMS user agent overlays
* Current profile URL points to a 404 page

Change-Id: I92f3ded52dda04f6cec5709d51c84b32f39d8095
2023-01-07 23:58:13 +00:00
Georg Veichtlbauer
aac1932593 cepheus: overlay: Drop config_setColorTransformAccelerated
* It's now enabled by default
2023-01-07 23:58:13 +00:00
baalgx
7619d65a6f cepheus: sepolicy: Delete duplicated wakeup label
* ERROR 'duplicate entry for genfs entry (sysfs, /devices/platform/soc/a600000.ssusb/wakeup)'
2023-01-07 23:58:13 +00:00
kondors1995
926580df4e cepheus: sepolicy: Sync wakeup sources with sm8150-development
HEAD: xiaomi-sm8150-devs/android_device_xiaomi_sm8150-common@b25b10a
2023-01-07 23:58:13 +00:00
SamarV-121
4c3b73f759 cepheus: overlay: Remove config_gpsParameters
* 404

Change-Id: I8290597fa4938c3e93f81b5d013769f4ef6eaabe
2023-01-07 23:58:13 +00:00
LuK1337
126df9f150 cepheus: livedisplay: Implement IAntiFlicker interface
Change-Id: I1dbc6d8989a80fe7b06d4356aeb717417997a793
2023-01-07 23:58:13 +00:00
LuK1337
dada1de252 cepheus: livedisplay: Uprev to 2.1
Change-Id: I98b2ea16ed342339ee652d5cb79dcfd22f8c0a0d
2023-01-07 23:58:13 +00:00
Felix
0b663341a6 cepheus: Add interface info to .rc files
Signed-off-by: Felix <google@ix5.org>
Change-Id: I6d70bbdb66c3dce280bf6908c3750316a6f6cf70
2023-01-07 23:58:13 +00:00
LuK1337
24f6512bb4 cepheus: livedisplay: Drop unnecessary nullptr checks
* new operator would never return a nullptr.

Change-Id: I3a34770d70b2da53ba3099fb7647991e5bde33b8
2023-01-07 23:58:13 +00:00
dianlujitao
4c61eb6d97 cepheus: livedisplay: Use modules from common implementation
Change-Id: Iafb9f6a56187beb574ca2eb9a97fb9c7e72893ce
2023-01-07 23:58:13 +00:00
EcrosoftXiao
3ebf2f217d cepheus: Bring back LiveDisplay HAL
This reverts commit 5ebfa970a1d8ff131e0a3c0713d4a0cae3dcb224.
2023-01-07 23:58:13 +00:00
Lucas Dupin
798a1ac5be cepheus: Disable blurs during app launch 2023-01-07 23:58:13 +00:00
chematelegram
599611037c Revert "cepheus: Enable Smooth Display"
This reverts commit 5c8294178fd5f0d058dac91892474a7207545a02.
2023-01-07 23:58:13 +00:00
Alice Kuo
a7f90d805e cepheus: Disable LE audio related profiles
Bug: 231671426
Test: build
Change-Id: I85b7f023c03a7a2e603af94e88196c10a16fe4ec
Merged-In: I85b7f023c03a7a2e603af94e88196c10a16fe4ec
(cherry picked from commit 9b57be4d7f57e1d117c65fac1e2dc60dbc59cb4b)
2023-01-07 23:58:13 +00:00
Sal Savage
648577bdeb cepheus: Use the ?= operator so BT properties can be overridden
System properties set with the "=" operator cannot be overriden. This
device is used elsewhere in the system and some of the properties need
to be overridden. The "?=" operator will use the assigned value if no
other values are assigned elsewhere, allowing for overrides.

Bug: 230638462
Test: adb shell getprop | grep bluetooth
Change-Id: I12dfdf4830e041b2c4e50eb8136ac0fb7146cc8e
Signed-off-by: Chenyang Zhong <zhongcy95@gmail.com>
2023-01-07 23:58:13 +00:00
Sal Savage
4ed30b0aed cepheus: Set default the Bluetooth class of device
The class of device is a string with a list of uint8t values:
90,2,12

The meaning is as follows:
{Service Field, Major class, Minor class}

Service Field: 0x5A -> 90
    Bit 17: Networking
    Bit 19: Capturing
    Bit 20: Object Transfer
    Bit 22: Telephony
MAJOR_CLASS: 0x02 -> 2 (Phone)
MINOR_CLASS: 0x0C -> 12 (Smart Phone)

Bug: 217452259
Test: make -j; -- check that bluetooth.device.class_of_device is
correct

Change-Id: I07e83ca352ff969be0e53a0f63b6c940b6c34dfb
Signed-off-by: Chenyang Zhong <zhongcy95@gmail.com>
2023-01-07 23:58:13 +00:00
Sal Savage
5e7e8396ac cepheus: Update LE Audio profile properties to match spec and implementation
Bug: 217448211
Test: atest BluetoothInstrumentationTests
Change-Id: I1260e95d357bd86099f75b910e0d744f97513fbc
Signed-off-by: Chenyang Zhong <zhongcy95@gmail.com>
2023-01-07 23:58:13 +00:00
Sal Savage
2faaec4587 cepheus: Enable bluetooth profiles with product.prop
Bug: 217448211
Test: make -j
Change-Id: I0d06b46910e42346653bea3484636f4129592ce3
Signed-off-by: Chenyang Zhong <zhongcy95@gmail.com>
2023-01-07 23:58:13 +00:00
Kujou Yuko
1ca689482d cepheus: Enable Audio Support for Hearing Aids central support 2023-01-07 23:58:13 +00:00
Etienne Ruffieux
ea009d759c cepheus: Added new vendors for Bluetooth config migration
Tag: #feature
Test: manual
Bug: 211570675
Change-Id: Id74ec5e1b30f21c534c35b212a2fb297e9d591fb
2023-01-07 23:58:13 +00:00
Jiakai Zhang
38ec87acf1 cepheus: Add a system property for System UI compiler filter.
Bug: 227310505
Test: m
Change-Id: Ieaa417a5024fd367543ff9879e5d57f0eb41aa94
Signed-off-by: Chenyang Zhong <zhongcy95@gmail.com>
2023-01-07 23:58:13 +00:00
Jun Wang
949a48f1f9 cepheus: props: Enable the pre-rendering feature
* Pre-rendering feature can improve FPS and reduce the janks in scrolling cases
2023-01-07 23:58:13 +00:00
johnmart19
84d62c5b1a cepheus: Set renderengine to SkiaGL Threaded 2023-01-07 23:58:13 +00:00
chematelegram
1346069694 cepheus: Build kernel with trb clang 2023-01-07 23:58:13 +00:00
Logan-Developer
ce03014533 Revert "Switch to QTI Bluetooth stack"
This reverts commit 0380db4a67c5f4eda48f6ad89029b4979866e241.
2023-01-07 23:58:13 +00:00
tribual
92d4603964 cepheus: Support Battery Health 2023-01-07 23:58:13 +00:00
chematelegram
85d4b86aeb cepheus: Specify path for kernel toolchain 2023-01-07 23:58:13 +00:00
tribual
f7056727d4 cepheus: nuke IFAA 2023-01-07 23:58:13 +00:00
adi8900
b63e0a1970 cepheus: Update Adreno stack from LA.UM.9.14.r1-20200-LAHAINA.QSSI13.0.
Signed-off-by: adi8900 <adrianszymanski242@gmail.com>
2023-01-07 23:58:13 +00:00
Pranav
44ebee8d5f cepheus: Update adreno stack from from LA.UM.9.14.r1-19300.01-LAHAINA.QSSI12.0
Signed-off-by: adi8900 <adrianszymanski242@gmail.com>
2023-01-07 23:58:13 +00:00
John Galt
9637365d00 cepheus: Update adreno blobs from LA.UM.9.14.r1-19300-LAHAINA.QSSI12.0 2023-01-07 23:58:13 +00:00
EcrosoftXiao
2b396f6430 cepheus: Support Smart Charching 2023-01-07 23:58:13 +00:00
Nauval Rizky
c8d7e64df0 cepheus: Update mi thermald patching method
* hotplug data will be parsed but not applied to the node.

Change-Id: I7f4d71e446c7230364b920d0d0af766e4329af8c
2023-01-07 23:58:13 +00:00
Nauval Rizky
372d6f70ae cepheus: Disable CPU hotplug data parsing on mi_thermald
Throttling the frequencies down is more than enough and will not cause
any issues like what hotplugging does.

Signed-off-by: Nauval Rizky <enuma.alrizky@gmail.com>
Signed-off-by: David Setiawan <fryevia@foxmail.com>
2023-01-07 23:58:13 +00:00
SamarV-121
33ff01c44e cepheus: Remove obsolete debug.sf.disable_backpressure property
* It has been removed in Android S
 * 2ec5391acf

Change-Id: I23a210a37ad257f0c8b7a3c5e1d59b2ac20cde9a
Signed-off-by: SamarV-121 <samarvispute121@pm.me>
2023-01-07 23:58:13 +00:00
TH779
605f15ad2f cepheus: Switch to prebuilt IFAAService
Change-Id: Ib1640e5cae6dcbb09e53af6037ddf966ed988d23
2023-01-07 23:58:13 +00:00
althafvly
05e95555fc cepheus: sepolicy: Remove debugfs related rules
- Removed from sepolicy_vndr

Change-Id: Ifd65abd0292577ec050904265310f17b86e10899
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2023-01-07 23:58:13 +00:00
tarsin
d96cda7b4c cepheus: Make shim for com.qti.node.watermark.so
Signed-off-by: Kujou Yuko <i@779.moe>
Change-Id: I47fea33432692a7a76d71db91676cb3a58ac19c7
2023-01-07 23:58:13 +00:00
tribual
5566e8e00e cepheus: Remove ndk_platform backend. Use the ndk backend.
The ndk_platform backend will soon be deprecated because the ndk backend
can serve the same purpose. This is to eliminate the confusion about
having two variants (ndk and ndk_platform) for the same ndk backend.

Bug: 161456198
Test: m
Change-Id: I14a1c57bd06f1f2aa52491f779c7030d4de03547
Signed-off-by: Chenyang Zhong <zhongcy95@gmail.com>
2023-01-07 14:00:11 +00:00
tribual
300f47b9e6 cepheus: Switch BtAudio to AIDL
Test: m
Bug: 203490261

Signed-off-by: Pranav Temkar <pranavtemkar@gmail.com>
Change-Id: I4b8ac40d5ad410b89eb6a0573d740d86471ecfc7
Merged-In: I4b8ac40d5ad410b89eb6a0573d740d86471ecfc7
2023-01-07 14:00:11 +00:00
rds-007
192b567357 cepheus: Drop iorap_large_memory_config.mk 2023-01-07 14:00:10 +00:00
Pirama Arumuga Nainar
40de13af71 cepheus: gps: Fix Wbitwise-instead-of-logical introduced by clang-r445002
Bug: http://b/215753485

This warning is introduced in clang-r445002.  In code where the bitwise
operation was used to avoid short-ciruit evaluation, make that explicit
by introducing temporary variables.

Test: build with clang-r445002.
Change-Id: Ia7ccf1d48922d926313f691888d26c3e314c1056
2023-01-07 14:00:10 +00:00
88eb4e6a6f cepheus: Remove gsi_keys
* Removed in b30a23cca2.
2023-01-07 14:00:10 +00:00
2b5a02fda0 cepheus: Drop a2dp 2023-01-07 14:00:10 +00:00
tribual
d407527cd4 cepheus: switch to prelude clang 2023-01-07 14:00:10 +00:00
Thierry Strudel
5b3a3cbf41 cepheus: rootdir: Adjust charger state CPUs
Bug: 74771887
Change-Id: Ifd5d2ac499866ce897cfa99a655da592248e7bbd
Signed-off-by: Thierry Strudel <tstrudel@google.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2023-01-07 14:00:10 +00:00
Wei Wang
6cd86183e9 cepheus: rootdir: Powersaving in charger mode
Bug: 72445880
Test: boot to charger
Change-Id: I154304deabf219a0428d68d0c59cb64c143b7de6
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2023-01-07 14:00:10 +00:00
Pranav Vashi
c8d3c8ee6b cepheus: Disable zram writeback
* Disabled on many devices with reports to lagginess in long term and random reboot in some instances.

Revert "raphael: rootdir: fstab.zram: Set max_comp_streams to 4"

This reverts commit 748a8ebe822b1daa23c9b7345be52e36242eb839.

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Change-Id: I73985159766da08cd35b0288db29cfafc7db62b0
2023-01-07 14:00:10 +00:00
Jabiyeff
f508be78b0 cepheus: prop: Force disable iorapd
* Its eating more RAM and slow down device
* Thanks for CAFEBABE find this

Signed-off-by: Jabiyeff <cebiyevanar@gmail.com>
Signed-off-by: Pranav Temkar <pranavtemkar@gmail.com>
2023-01-07 14:00:10 +00:00
d480beccc3 cepheus: wifi: Update config from sm8150-common tree
* https://github.com/crdroidandroid/android_device_xiaomi_sm8150-common/commits/12.1/wifi/WCNSS_qcom_cfg.ini
2023-01-07 14:00:10 +00:00
Andrzej Perczak
ab8d739a18 cepheus: rootdir: Don't tune sde partition on boot
It doesn't make sense to boost firmware partition during boot as not
much is being read from it. Google isn't doing it either.
2023-01-07 14:00:10 +00:00
Luca Stefani
fb9ec3b7c6 cepheus: overlay: Enable IWLAN assisted mode
Change-Id: I9bf9a4a2bc36867dd87ae43652bb5ebb84cc9bc3
2023-01-07 14:00:10 +00:00
kondors1995
1fe465f3a3 cepheus: Enable Smooth Display
72hz seams to pretty okei oc for now but lets limit max SF threshold tp 81hz
Since its seams to be oeki but more risky some users migth want to use it
2023-01-07 14:00:10 +00:00
Ujjwal Kirorimal
6dedbdd5bf cepheus: overlay: Disable Adaptive Connectivity preference
* We neither ship CTPM and nor have 5G
2023-01-07 14:00:10 +00:00
iusmac
815dff8049 cepheus: rootdir: fstab.zram: Set max_comp_streams to 4
* more results in battery drain and lags

[someone5678] adapt to fstab

Original commit:
[1] eca73828b9

Signed-off-by: iusmac <iusico.maxim@libero.it>
Signed-off-by: someone5678 <nemui3353@gmail.com>
Signed-off-by: Pranav Temkar <pranavtemkar@gmail.com>
2023-01-07 14:00:10 +00:00
Dyneteve
4ab0f06464 cepheus: Don't build renderscript and move renderengine to threaded skia
* Also remove it from VINTF
2023-01-07 14:00:10 +00:00
Santiago Seifert
85cc613f01 cepheus: overlay: Unpin updatable-media from memory
Bug: 214499288
Change-Id: If523b95d295feba8f0de0ae85a1b3c2985dbbfbc
Test: Presubmit
2023-01-07 14:00:10 +00:00
Danny Lin
0a4f15df35 cepheus: overlay: Don't pin launcher app in memory
Similar to what we did for the camera app, unpin the launcher app from
memory as well. While the default launcher (Launcher3) isn't
particularly big, it doesn't make much sense to pin because the launcher
does not typically load new resources much. Most of its resources should
already be loaded in memory after it starts, so pinning the APK is
redundant.

Change-Id: I6b82f2facb1bf4aee393af3f0bc3e0bce2538222
2023-01-07 14:00:10 +00:00
Jaegeuk Kim
187f518e93 cepheus: rootdir: Set readahead to system, vendor and data
This can avoid memory pressure.

Bug: 181567573
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
Change-Id: I654c4d3bf24fa741c3fb0255431a26d8dcf5f153
2023-01-07 14:00:10 +00:00
orges
ebdaa4a88e cepheus: overlay: fix deprecated power profile items
* PowerProfile: screen.on is deprecated! Use screen.on.display0 instead.
 * PowerProfile: screen.full is deprecated! Use screen.full.display0 instead.
2023-01-07 14:00:10 +00:00
KenHV
3d864c0de6 cepheus: Fix screen recorder lag
Former-commit-id: ed529f3c23b28a5e73c0e34ed659787767707bc3
Signed-off-by: Joey Huab <joey@evolution-x.org>
2023-01-07 14:00:10 +00:00
Yo Chiang
129b9fafd7 cepheus: Enable mainline artifact path enforcement
Bug: 138706293
Test: TH / Forrest build pass
Change-Id: Ife32e2308f54817e7fd0393a9e9c6e8b02ed8f92
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2023-01-07 14:00:10 +00:00
Jeongik Cha
11e4174e66 cepheus: Turn on PRODUCT_ENFORCE_PRODUCT_PARTITION_INTERFACE
After turning it on, every app and library cannot use hidden API anymore.

Bug: 143581698
Test: lunch coral && m
Test: flash and check if it can boot
Change-Id: I41c29b23beea75e0656fa449e4a0d91d0b23d110
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2023-01-07 14:00:10 +00:00
Justin Yun
a3218ea2d8 cepheus: Enforce native interfaces of product partition as VNDK
By setting PRODUCT_PRODUCT_VNDK_VERSION := current, native modules in
product partition are not allowed to use any libs in system partition
excepted VNDK.
Enforcing it for coral devices.

Bug: 145580164
Test: Build and check boot
Change-Id: Icb818c3c6e74a1211881671d87d205d949209b92
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2023-01-07 14:00:10 +00:00
Etan Cohen
94c8ede04c cepheus: Declare WiFi Aware support to WiFi HAL
* The Wi-Fi Aware feature added in Android 8.0 enables
   supporting devices to discover, connect, and range
   (added in Android 9) to one another directly using
   the Wi-Fi Aware protocol without internet or cellular
   network access.

 * This feature, built upon the Wi-Fi Alliance (WFA) Wi-Fi
   Aware specification (versions 2.0 and 3.0), allows easy
   sharing of high-throughput data among trusted devices
   and apps that are otherwise off-network.

   https://source.android.com/devices/tech/connect/wifi-aware

Change-Id: I18ff20e7466b8e8fd598381b730fb7db391e9ad4
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2023-01-07 14:00:10 +00:00
chenpaul
38161a3ae3 cepheus: wifi: Extend gInterfaceChangeWait to 2 seconds for avoid crash when "adb reboot"
Bug: 131123423
Test: "adb reboot" test more than 4000 times and not hit crash as b/131123423
      Wifi work normally after the same test.
Change-Id: Ibbe1fce889e78f4685a02043c43793deb9e43e8f
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2023-01-07 14:00:10 +00:00
Roger Wang
3a51f7d936 cepheus: wifi: set inactivity time
Wait for 1 second to let wifi driver do
complete clean reset of SW/HW.

Bug: 121391366
Test: perform watchdog recovery and success
Test: check value by iwpriv wlan0 getConfig
Change-Id: I84674970d4b3c16876c4ebaf71043062d1867c87
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2023-01-07 14:00:10 +00:00
Adithya R
2319e63458 cepheus: releasetools: Print a better message while flashing
Signed-off-by: Pranav Temkar <pranavtemkar@gmail.com>
Signed-off-by: Joey Huab <joey@evolution-x.org>
2023-01-06 01:29:41 +00:00
ZVNexus
7d40407a93 cepheus: rootdir: Don't mount TraceFS twice.
* AOSP already mounts TraceFS in system init, so mounting it twice
   causes SEPolicy denials. See the comments in this change.

   https://android-review.googlesource.com/c/platform/system/sepolicy/+/1294195

Signed-off-by: Joey Huab <joey@evolution-x.org>
2023-01-06 01:29:41 +00:00
naveenjohnsonv
09665e0ce0 cepheus: Support FPS info 2023-01-06 01:29:41 +00:00
Chris Fries
7fbfec88f4 cepheus: Set VENDOR_SECURITY_PATCH to platform
Set the VENDOR_SECURITY_PATCH level to match the platform
security patch level.  These are functionally the same.

Bug: 125914443
Change-Id: Ib77ab115d6faabd21958c34e2dae49ec96421fdd
Signed-off-by: Genkzsz11 <Genkzsz11@gmail.com>

Former-commit-id: 4a81d41415f1f6e7c87fca4d7eb7263b1d9bb711
Signed-off-by: Joey Huab <joey@evolution-x.org>
2023-01-06 01:29:41 +00:00
Bruno Martins
2775fe65b2 cepheus: Set UDFPS properties for IFAAService
Change-Id: Id013fe7d6d3d529a5d41f5d0eecd8178712fd651
2023-01-06 01:29:41 +00:00
SebaUbuntu
66866d5131 cepheus: Move to source built IFAAService 2023-01-06 01:29:41 +00:00
Lisa Liu
77cf259404 cepheus: Enable LZ4 compression for ramdisks
* This shortens the time to unpack initramfs.

Change-Id: Id23daba43ae7a6003cbde29480d2f433f344df73
2023-01-06 01:29:41 +00:00
tribual
c9b1d3661b cepheus: Switch to Proton clang 2023-01-06 01:29:41 +00:00
tribual
6685d59506 cepheus: Support Battery Health 2023-01-06 01:29:41 +00:00
Pranav
2b2be9d55d cepheus: Update graphics blobs from from LA.UM.9.14.r1-18900-LAHAINA.QSSI12.0 2023-01-06 01:29:41 +00:00
tribual
b5317697fe cepheus: Fit to stock launcher 2022-10-09 16:46:35 +00:00
EcrosoftXiao
1ba14ac444 cepheus: sepolicy: Cleanup deprecated rules 2022-10-09 16:46:35 +00:00
tribual
fc55a98d03 cepheus: overlay: Support mulptiple vibration intensities 2022-10-09 16:46:26 +00:00
Sungmin Choi
36f3b6e9de cepheus: overlay: Remove Manage Mobile Plan
Set config_show_mobile_plan false to remove "Manage mobile plan"

Bug: 14418915
Change-Id: I1ef4eb755937cffe7f556b96a5ee1a6ec7b7131c
2022-10-09 16:44:15 +00:00
dianlujitao
5045404382 cepheus: overlay: Fix status bar height for certain apps on 12L
* 12L introduced new API to fetch status bar height based on cutout, to
  handle multi-display devices. However, some apps directly read the
  height from overlay so the layout is broken for them.
* Since our device is not a multi-display one, set the expected height
  in overlay directly as the old way to make these apps look good.

Change-Id: I38fae2cdd20b947998766b35920d28bebcf547cf
2022-10-09 16:41:07 +00:00
TH779
b720f928da cepheus: overlay: Drop deprecated SystemUI overlays
Signed-off-by: TH779 <i@779.moe>
Change-Id: Ic66ffa74e6745db4c252a1fbef67d094ff7c9c90
2022-10-05 23:59:00 +00:00
Chenyang Zhong
5f51b1f7dc cepheus: sepolicy: allow apps to get aux camera prop
Signed-off-by: Chenyang Zhong <zhongcy95@gmail.com>
2022-10-05 23:59:00 +00:00
tribual
e7c5a15ad2 cepheus: overlay: Update UDFPS overlays 2022-10-05 23:59:00 +00:00
tribual
7f31b9a5e3 cepheus: set correct size of system partition 2022-10-05 23:59:00 +00:00
tribual
01e40248d6 cepheus: overlay: Adjust UDFPS animation offset 2022-10-05 23:59:00 +00:00
Sven
1ad552e1ba cepheus: overlay: clean the house 2022-10-05 23:59:00 +00:00
tribual
fed73a7f79 cepheus: enable Quick tap 2022-10-05 23:59:00 +00:00
Akash Srivastava
54247d1f89 cepheus: sepolicy: Drop unused rules 2022-10-05 23:59:00 +00:00
tribual
057c199550 cepheus: fingerprint: Nuke onShow\HideUdfpsOverlay 2022-10-05 23:59:00 +00:00
Henrique Silva
046a8da3b9 cepheus: overlay: Don't warn user about FC in Google TTS
* This happens on almost all FDE devices, I don't see any workaround other than hiding these dialogs
2022-10-05 23:59:00 +00:00
Sven
12a97484d6 cepheus: go back home to evasion kernel 2022-10-05 23:59:00 +00:00
tribual
2c8570f2b6 cepheus: Nuke some hardcoded flags 2022-10-05 23:59:00 +00:00
tribual
54d395cabb cepheus: libperfmgr: Add back some frequencies 2022-10-05 23:59:00 +00:00
tribual
6c3022183a cepheus: Update dependencies 2022-10-05 23:59:00 +00:00
Giammarco Senatore
2e7bf12599 cepheus: overlay: Enable statusbar burn-in protection 2022-10-05 23:59:00 +00:00
UtsavBalar1231
f3497b4375 cepheus: wifi: Ignore tracking if any NUD failure occurs
Change-Id: I3031143fa634a0505045ccb00809fe4dd40f16c1
Signed-off-by: Joey Huab <joey@evolution-x.org>
2022-10-05 23:59:00 +00:00
Venkata Sharath Chandra Manchala
4b1863f7ed cepheus: wifi: Enable nl broadcast logging and disable packet logging
In Display ON DTIM power experiment it was found
that we have power saving with gMulticastHostFwMsgs=0
and gEnablePacketLog=0.

CRs-Fixed: 2506878
Change-Id: Ia4ea66c85c6ea3fd84f8f651de9db2c26fc134ed
Signed-off-by: Joey Huab <joey@evolution-x.org>
2022-10-05 23:59:00 +00:00
Akash Srivastava
21a10b317b cepheus: wifi: Update wifi config
Signed-off-by: Joey Huab <joey@evolution-x.org>
2022-10-05 23:59:00 +00:00
Ecco Park
b6ebde1280 cepheus: wifi: add parameters for Hotspot 2.0
Those parameters need to set for Hotspot 2.0 network

hs20=1: Enable Hotspot 2.0
auto_interworking=0 : Do not automatically go through Interworking
                      network selection in wpa_supplicant

Bug: 118633353
Test: live test with Passpoint AP
Change-Id: I56f25f13b86f45cdb165f20d753703322df97813
Signed-off-by: Ecco Park <eccopark@google.com>
Signed-off-by: Joey Huab <joey@evolution-x.org>
2022-10-05 23:59:00 +00:00
Panchajanya1999
53366cbfbe cepheus: wifi: Disable WLAN Firmware loggings
firmware loggings are not at all necessary for general development.

Change-Id: I111943a641670ea052f68148103e377771297d77
Signed-off-by: Sherif Rahim <sherifrahim2001@gmail.com>
Signed-off-by: Joey Huab <joey@evolution-x.org>
2022-10-05 23:59:00 +00:00
kerneltoast
77161c34c8 cepheus: wifi: Relax WiFi re-association RSSI thresholds
Change-Id: I073f08eed69b2454e1fd2350c8f7e8bb8983641b
Signed-off-by: Joey Huab <joey@evolution-x.org>
2022-10-05 23:59:00 +00:00
Alex Naidis
afbdec9bfc cepheus: wifi: smarter decisions on whether to use a 2- or 5Ghz AP
Implement a smarter system on whether to connect
to the provided 2Ghz or 5Ghz network.

Signed-off-by: Joey Huab <joey@evolution-x.org>
2022-10-05 23:59:00 +00:00
TheCrazyLex
c52ea4d89b cepheus: wifi: Enable QPower and Deep sleep at the same time
* This enables Deep Sleep mode, additionally to QPower
* With this configuration, QPower manages the new Deep sleep mode
 -> Leads to amazing power savings

Change-Id: Ic4c23583cb008a5cfb14af15236f5aeba32f0f80
Signed-off-by: Joey Huab <joey@evolution-x.org>
2022-10-05 23:59:00 +00:00
Luk1337
baba637d8e cepheus: wifi: Disable RX wakelock feature
Change-Id: If79e1512a83f5162444683e1fa8f5560f98b6c9a
Signed-off-by: Joey Huab <joey@evolution-x.org>
2022-10-05 23:59:00 +00:00
EcrosoftXiao
6bbc4dd95e Revert "cepheus: drop updatable_apex.mk for now"
This reverts commit 0f20ed57e6.
2022-10-05 23:59:00 +00:00
Chenyang Zhong
85b1bee1c4 cepheus: Use Vulkan for UI rendering
Looks like the hwui renderthread with OpenGL is a little broken on
android 12. It triggers the following Scudo error when scrolling
quickly in certain apps:

F DEBUG   : Abort message: 'Scudo ERROR: corrupted chunk header at address 0x200006fc78920a0
F DEBUG   : '
F DEBUG   :     x0  0000000000000000  x1  00000000000025fd  x2  0000000000000006  x3  0000006df7c0b8b0
F DEBUG   :     x4  0080808080808080  x5  0080808080808080  x6  0080808080808080  x7  8080808080808080
F DEBUG   :     x8  00000000000000f0  x9  494ac435077451cb  x10 0000000000000000  x11 ffffff80fffffbdf
F DEBUG   :     x12 0000000000000001  x13 00000000dc94e9a5  x14 001176d2f9e6b000  x15 0000000000000010
F DEBUG   :     x16 000000713c299050  x17 000000713c2769b0  x18 0000006df5e2e000  x19 000000000000258b
F DEBUG   :     x20 00000000000025fd  x21 00000000ffffffff  x22 0000000000000000  x23 0000006eb78da910
F DEBUG   :     x24 000000713de01d88  x25 0000006ee7882a00  x26 0000000000000040  x27 0000000000000040
F DEBUG   :     x28 0000006df7b13000  x29 0000006df7c0b930
F DEBUG   :     lr  000000713c2297a4  sp  0000006df7c0b890  pc  000000713c2297d0  pst 0000000000000000
F DEBUG   : backtrace:
F DEBUG   :       #00 pc 000000000004f7d0  /apex/com.android.runtime/lib64/bionic/libc.so (abort+164) (BuildId: 75c8be16f616c1bbff9f4199f75a87af)
F DEBUG   :       #01 pc 0000000000040224  /apex/com.android.runtime/lib64/bionic/libc.so (scudo::die()+8) (BuildId: 75c8be16f616c1bbff9f4199f75a87af)
F DEBUG   :       #02 pc 000000000004097c  /apex/com.android.runtime/lib64/bionic/libc.so (scudo::ScopedErrorReport::~ScopedErrorReport()+32) (BuildId: 75c8be16f616c1bbff9f4199f75a87af)
F DEBUG   :       #03 pc 0000000000040a44  /apex/com.android.runtime/lib64/bionic/libc.so (scudo::reportHeaderCorruption(void*)+60) (BuildId: 75c8be16f616c1bbff9f4199f75a87af)
F DEBUG   :       #04 pc 00000000000421a4  /apex/com.android.runtime/lib64/bionic/libc.so (scudo::Allocator<scudo::AndroidConfig, &(scudo_malloc_postinit)>::deallocate(void*, scudo::Chunk::Origin, unsigned long, unsigned long)+296) (BuildId: 75c8be16f616c1bbff9f4199f75a87af)
F DEBUG   :       #05 pc 000000000041535c  /system/lib64/libhwui.so (android::uirenderer::renderthread::CanvasContext::~CanvasContext()+1020) (BuildId: 196cd621979b48671bd0aab714b2c1bd)
F DEBUG   :       #06 pc 0000000000414f4c  /system/lib64/libhwui.so (android::uirenderer::renderthread::CanvasContext::~CanvasContext()+16) (BuildId: 196cd621979b48671bd0aab714b2c1bd)
F DEBUG   :       #07 pc 000000000020c690  /system/lib64/libhwui.so (_ZNSt3__110__function6__funcIZN7android10uirenderer9WorkQueue7runSyncIZNS3_12renderthread11RenderProxy14destroyContextEvE3$_1EEDTclfp_EEOT_EUlvE_NS_9allocatorISC_EEFvvEEclEv$34d70ca82a4a2946342a621a4c655d1c+88) (BuildId: 196cd621979b48671bd0aab714b2c1bd)
F DEBUG   :       #08 pc 00000000003c8ef4  /system/lib64/libhwui.so (android::uirenderer::WorkQueue::process()+156) (BuildId: 196cd621979b48671bd0aab714b2c1bd)
F DEBUG   :       #09 pc 00000000003c8c60  /system/lib64/libhwui.so (android::uirenderer::renderthread::RenderThread::threadLoop()+84) (BuildId: 196cd621979b48671bd0aab714b2c1bd)
F DEBUG   :       #10 pc 0000000000011f9c  /system/lib64/libutils.so (android::Thread::_threadLoop(void*)+260) (BuildId: d9d3222cb4e074a3a09934b924844959)

Meanwhile, Skia Vulkan is totally fine, so let's give Vulkan another
try.

Test: scrolling quickly through Twitter feed when images and videos
      are still loading
Test: scrolling quickly through a Spotify playlist with lots of
      album pictures

Signed-off-by: Chenyang Zhong <zhongcy95@gmail.com>
2022-10-05 23:59:00 +00:00
Chenyang Zhong
c43dffcff1 cepheus: build kernel with Prelude Clang
Signed-off-by: Chenyang Zhong <zhongcy95@gmail.com>
2022-10-05 23:59:00 +00:00
tribual
9d79df53d3 cepheus: add spark.dependencies 2022-10-05 23:59:00 +00:00
Minchan Kim
06ae14b16c cepheus: Enable Zram Writeback 2022-10-05 23:59:00 +00:00
EcrosoftXiao
2481767652 cepheus: rootdir: Tune ZRAM size 2022-10-05 23:59:00 +00:00
Volodymyr Zhdanov
a506c49a7e cepheus: rootdir: Don't configure zram in init.qcom.post_boot.sh 2022-10-05 23:59:00 +00:00
EcrosoftXiao
3e5be82e42 Revert "cepheus: parts: Enable doze_status on screen off"
This reverts commit 8d187f1424.
2022-10-05 23:59:00 +00:00
EcrosoftXiao
1897034d33 cepheus: Update graphic blobs from Xiaomi/nabu/nabu:11/RKQ1.200826.002/V13.0.3.0.RKXCNXM:user/release-keys 2022-10-05 23:59:00 +00:00
tribual
f69024db3d cepheus: overlay: Add Spark maintainer 2022-10-05 23:59:00 +00:00
tribual
b979062660 cepheus: Add and build Udfps Animation resources 2022-10-05 23:59:00 +00:00
tribual
ac1835a0ba cepheus: parts: Update Xiaomi parts 2022-10-05 23:59:00 +00:00
Dobsgw
55cbf0612a rootdir: Fix PowerHAL nodes
Fix for:
W/libperfmgr(  670): Failed to write to node: /dev/stune/top-app/schedtune.boost with value: 10, fd: -1
W libperfmgr: Failed to write to node: /dev/cpu_dma_latency with value: 61, fd: -1

Change-Id: Ieb385110f236ab12549aea198639708068fb6156
2022-10-05 23:59:00 +00:00
tribual
3ebcd10f37 cepheus: Spark bring up 2022-10-05 23:57:55 +00:00
tribual
35a123d246 cepheus: kill some more logspam
W/libperfmgr(  670): Failed to write to node: /dev/stune/top-app/schedtune.boost with value: 10, fd: -1
2022-10-05 22:56:02 +00:00
Dobsgw
fdd21ae797 cepheus: rootdir: Fix power hals nodes permission
* Fix for:
     W/libperfmgr(  670): Failed to write to node: /dev/stune/top-app/schedtune.boost with value: 10, fd: -1
     W libperfmgr: Failed to write to node: /dev/cpu_dma_latency with value: 61, fd: -1

Signed-off-by: Zinadin Zidan <zidan.roking@gmail.com>
Change-Id: I7117b2a0ce2f21de3a07dac366a0993eafcce47d
2022-10-05 22:56:02 +00:00
Sven
471bab5861 cepheus: Add spark props 2022-10-05 22:55:33 +00:00
Stephen Thomas-Dorin
0d6f8104ed cepheus: overlay: Update config_ims_rcs_package to use new ImsService
Change-Id: I77fcd2a3451c99df5fa47136fa0cd36a5abab9fe
Signed-off-by: Chenyang Zhong <zhongcy95@gmail.com>
2022-10-05 22:54:28 +00:00
Chenyang Zhong
376d12ccac cepheus: update DPM, IMS, and RIL system blobs
* from Xiaomi/haydn/haydn:12/RKQ1.210810.001/V12.5.1.0.SKKMIXM:user/release-keys

Note that ims factory jars are added for the new ImsRcsService.apk.

Signed-off-by: Chenyang Zhong <zhongcy95@gmail.com>
2022-10-05 22:54:28 +00:00
EcrosoftXiao
de061f5aee cepheus: sepolicy: Label vendor_fp_prop as vendor_public_prop
* Mlipay needs to read it for fingerprint payment
2022-10-05 22:54:28 +00:00
Chenyang Zhong
e6d50ff751 cepheus: sepolicy: specify the owner of vendor props
vendor_fp_prop is public because apps like Alipay may access it
to enable biometrics payment authentication.

Signed-off-by: Chenyang Zhong <zhongcy95@gmail.com>
2021-12-25 13:19:38 +08:00
Chenyang Zhong
15f737380f cepheus: turn off compressed apex
Google introduced compressed apex on android 12 [1], and the flag is
enabled by default in updatable_apex.mk [2]. Cepheus cannot boot
compressed apex with encryption, so disable it.

ref:
[1] https://source.android.com/devices/tech/ota/apex#compressed-apex
[2] 4a1240de8a

Signed-off-by: Chenyang Zhong <zhongcy95@gmail.com>
2021-12-23 14:14:09 +08:00
EcrosoftXiao
4721acef11 Revert "cepheus: drop updatable_apex.mk for now"
This reverts commit 0f20ed57e6.
2021-12-23 14:10:16 +08:00
216 changed files with 11253 additions and 5000 deletions

12
.github/FUNDING.yml vendored
View File

@@ -1,12 +0,0 @@
# These are supported funding model platforms
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: https://www.paypal.me/Evasi0nXiao

View File

@@ -1,31 +0,0 @@
name: Build via SSH
on:
push:
tags:
- "*"
jobs:
build:
runs-on: self-hosted
steps:
- name: Sync
run: zsh ~/sync.sh
- name: Clean
run: |
cd /Android/rr
make clobber
- name: Build
run: |
zsh ~/build.sh
- name: Release
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
files: |
/Android/rr/out/target/product/cepheus/RROS*

2
.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
out/
extract-files.py

View File

@@ -4,3 +4,17 @@ soong_namespace {
"hardware/xiaomi",
],
}
install_symlink {
name: "firmware_wlan_mac.bin_symlink",
vendor: true,
installed_location: "firmware/wlan/qca_cld/wlan_mac.bin",
symlink_target: "/mnt/vendor/persist/wlan_mac.bin",
}
install_symlink {
name: "firmware_WCNSS_qcom_cfg.ini_symlink",
vendor: true,
installed_location: "firmware/wlan/qca_cld/WCNSS_qcom_cfg.ini",
symlink_target: "/vendor/etc/wifi/WCNSS_qcom_cfg.ini",
}

View File

@@ -41,97 +41,4 @@ $(DSP_MOUNT_POINT): $(LOCAL_INSTALLED_MODULE)
ALL_DEFAULT_INSTALLED_MODULES += $(FIRMWARE_MOUNT_POINT) $(BT_FIRMWARE_MOUNT_POINT) $(DSP_MOUNT_POINT)
IMS_LIBS := libimscamera_jni.so libimsmedia_jni.so
IMS_SYMLINKS := $(addprefix $(TARGET_OUT_SYSTEM_EXT_APPS_PRIVILEGED)/ims/lib/arm64/,$(notdir $(IMS_LIBS)))
$(IMS_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
@echo "IMS lib link: $@"
@mkdir -p $(dir $@)
@rm -rf $@
$(hide) ln -sf /system/system_ext/lib64/$(notdir $@) $@
ALL_DEFAULT_INSTALLED_MODULES += $(IMS_SYMLINKS)
RFS_MSM_ADSP_SYMLINKS := $(TARGET_OUT_VENDOR)/rfs/msm/adsp/
$(RFS_MSM_ADSP_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
@echo "Creating RFS MSM ADSP folder structure: $@"
@rm -rf $@/*
@mkdir -p $(dir $@)/readonly/vendor
$(hide) ln -sf /data/vendor/tombstones/rfs/lpass $@/ramdumps
$(hide) ln -sf /mnt/vendor/persist/rfs/msm/adsp $@/readwrite
$(hide) ln -sf /mnt/vendor/persist/rfs/shared $@/shared
$(hide) ln -sf /mnt/vendor/persist/hlos_rfs/shared $@/hlos
$(hide) ln -sf /vendor/firmware_mnt $@/readonly/firmware
$(hide) ln -sf /vendor/firmware $@/readonly/vendor/firmware
RFS_MSM_CDSP_SYMLINKS := $(TARGET_OUT_VENDOR)/rfs/msm/cdsp/
$(RFS_MSM_CDSP_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
@echo "Creating RFS MSM CDSP folder structure: $@"
@rm -rf $@/*
@mkdir -p $(dir $@)/readonly/vendor
$(hide) ln -sf /data/vendor/tombstones/rfs/cdsp $@/ramdumps
$(hide) ln -sf /mnt/vendor/persist/rfs/msm/cdsp $@/readwrite
$(hide) ln -sf /mnt/vendor/persist/rfs/shared $@/shared
$(hide) ln -sf /mnt/vendor/persist/hlos_rfs/shared $@/hlos
$(hide) ln -sf /vendor/firmware_mnt $@/readonly/firmware
$(hide) ln -sf /vendor/firmware $@/readonly/vendor/firmware
RFS_MSM_MPSS_SYMLINKS := $(TARGET_OUT_VENDOR)/rfs/msm/mpss/
$(RFS_MSM_MPSS_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
@echo "Creating RFS MSM MPSS folder structure: $@"
@rm -rf $@/*
@mkdir -p $(dir $@)/readonly/vendor
$(hide) ln -sf /data/vendor/tombstones/rfs/modem $@/ramdumps
$(hide) ln -sf /mnt/vendor/persist/rfs/msm/mpss $@/readwrite
$(hide) ln -sf /mnt/vendor/persist/rfs/shared $@/shared
$(hide) ln -sf /mnt/vendor/persist/hlos_rfs/shared $@/hlos
$(hide) ln -sf /vendor/firmware_mnt $@/readonly/firmware
$(hide) ln -sf /vendor/firmware $@/readonly/vendor/firmware
RFS_MSM_SLPI_SYMLINKS := $(TARGET_OUT_VENDOR)/rfs/msm/slpi/
$(RFS_MSM_SLPI_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
@echo "Creating RFS MSM SLPI folder structure: $@"
@rm -rf $@/*
@mkdir -p $(dir $@)/readonly/vendor
$(hide) ln -sf /data/vendor/tombstones/rfs/slpi $@/ramdumps
$(hide) ln -sf /mnt/vendor/persist/rfs/msm/slpi $@/readwrite
$(hide) ln -sf /mnt/vendor/persist/rfs/shared $@/shared
$(hide) ln -sf /mnt/vendor/persist/hlos_rfs/shared $@/hlos
$(hide) ln -sf /vendor/firmware_mnt $@/readonly/firmware
$(hide) ln -sf /vendor/firmware $@/readonly/vendor/firmware
ALL_DEFAULT_INSTALLED_MODULES += $(RFS_MSM_ADSP_SYMLINKS) $(RFS_MSM_CDSP_SYMLINKS) $(RFS_MSM_MPSS_SYMLINKS) $(RFS_MSM_SLPI_SYMLINKS)
WIFI_FIRMWARE_SYMLINKS := $(TARGET_OUT_VENDOR)/firmware/wlan/qca_cld/
$(WIFI_FIRMWARE_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
@echo "Creating wifi firmware symlinks: $@"
mkdir -p $@
$(hide) ln -sf /vendor/etc/wifi/WCNSS_qcom_cfg.ini $@/WCNSS_qcom_cfg.ini
$(hide) ln -sf /mnt/vendor/persist/wlan_mac.bin $@/wlan_mac.bin
WCNSS_MAC_SYMLINK := $(TARGET_OUT_VENDOR)/firmware/wlan/qca_cld/wlan_mac.bin
$(WCNSS_MAC_SYMLINK): $(LOCAL_INSTALLED_MODULE)
@echo "WCNSS MAC bin link: $@"
@mkdir -p $(dir $@)
@rm -rf $@
$(hide) ln -sf /mnt/vendor/persist/$(notdir $@) $@
ALL_DEFAULT_INSTALLED_MODULES += $(WIFI_FIRMWARE_SYMLINKS)
EGL_LIBS := libEGL_adreno.so libGLESv2_adreno.so libq3dtools_adreno.so
EGL_32_SYMLINKS := $(addprefix $(TARGET_OUT_VENDOR)/lib/,$(notdir $(EGL_LIBS)))
$(EGL_32_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
@echo "EGL 32 lib link: $@"
@mkdir -p $(dir $@)
@rm -rf $@
$(hide) ln -sf egl/$(notdir $@) $@
EGL_64_SYMLINKS := $(addprefix $(TARGET_OUT_VENDOR)/lib64/,$(notdir $(EGL_LIBS)))
$(EGL_64_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
@echo "EGL lib link: $@"
@mkdir -p $(dir $@)
@rm -rf $@
$(hide) ln -sf egl/$(notdir $@) $@
ALL_DEFAULT_INSTALLED_MODULES += $(EGL_32_SYMLINKS) $(EGL_64_SYMLINKS)
endif

View File

@@ -15,9 +15,9 @@
#
PRODUCT_MAKEFILES := \
$(LOCAL_DIR)/aosp_cepheus.mk
$(LOCAL_DIR)/lineage_cepheus.mk
COMMON_LUNCH_CHOICES := \
aosp_cepheus-user \
aosp_cepheus-userdebug \
aosp_cepheus-eng
lineage_cepheus-user \
lineage_cepheus-userdebug \
lineage_cepheus-eng

View File

@@ -51,41 +51,26 @@ TARGET_2ND_CPU_VARIANT_RUNTIME := cortex-a76
TARGET_OTA_ASSERT_DEVICE := cepheus
# Audio
AUDIO_FEATURE_ENABLED_CON_THREAD := true
AUDIO_FEATURE_ENABLED_AAC_ADTS_OFFLOAD := true
AUDIO_FEATURE_ENABLED_AUDIOSPHERE := true
AUDIO_FEATURE_ENABLED_EXTN_FORMATS := true
AUDIO_FEATURE_ENABLED_HDMI_SPK := true
AUDIO_FEATURE_ENABLED_INSTANCE_ID := true
AUDIO_FEATURE_ENABLED_PCM_OFFLOAD := true
AUDIO_FEATURE_ENABLED_PCM_OFFLOAD_24 := true
AUDIO_FEATURE_ENABLED_PROXY_DEVICE := true
USE_CUSTOM_AUDIO_POLICY := 1
USE_XML_AUDIO_POLICY_CONF := 1
BOARD_SUPPORTS_SOUND_TRIGGER := true
TARGET_PROVIDES_AUDIO_EXTNS := true
BOARD_USES_ALSA_AUDIO := true
# Bluetooth
BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := $(DEVICE_PATH)/bluetooth/include
TARGET_FWK_SUPPORTS_FULL_VALUEADDS := true
TARGET_USE_QTI_BT_STACK := true
BOARD_HAVE_BLUETOOTH_QCOM := true
# Bootloader
TARGET_BOOTLOADER_BOARD_NAME := cepheus
TARGET_NO_BOOTLOADER := true
# Camera
TARGET_USES_QTI_CAMERA_DEVICE := true
USE_DEVICE_SPECIFIC_CAMERA := true
TARGET_CAMERA_SERVICE_EXT_LIB := //$(DEVICE_PATH):libcameraservice_extension.cepheus
# Display
TARGET_HAS_HDR_DISPLAY := true
TARGET_HAS_WIDE_COLOR_DISPLAY := true
TARGET_USES_COLOR_METADATA := true
TARGET_USES_DISPLAY_RENDER_INTENTS := true
TARGET_USES_DRM_PP := true
TARGET_USES_GRALLOC4 := true
TARGET_USES_HWC2 := true
USE_OPENGL_RENDERER := true
# Graphics
BOARD_USES_ADRENO := true
@@ -97,7 +82,7 @@ TARGET_ENABLE_MEDIADRM_64 := true
TARGET_FS_CONFIG_GEN := $(DEVICE_PATH)/configs/config.fs
# FOD
TARGET_SURFACEFLINGER_UDFPS_LIB := //$(DEVICE_PATH):libudfps_extension.cepheus
$(call soong_config_set,surfaceflinger,udfps_lib,//$(DEVICE_PATH):libudfps_extension.cepheus)
TARGET_USES_FOD_ZPOS := true
# GPS
@@ -106,11 +91,15 @@ LOC_HIDL_VERSION := 4.0
# HIDL
DEVICE_MANIFEST_FILE := $(DEVICE_PATH)/configs/hidl/manifest.xml
DEVICE_MANIFEST_FILE += $(DEVICE_PATH)/configs/hidl/c2_manifest.xml
DEVICE_MATRIX_FILE := $(DEVICE_PATH)/configs/hidl/compatibility_matrix.xml
DEVICE_MATRIX_FILE := hardware/qcom-caf/common/compatibility_matrix.xml
DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE := \
$(DEVICE_PATH)/configs/hidl/framework_compatibility_matrix.xml \
hardware/qcom-caf/common/vendor_framework_compatibility_matrix.xml \
hardware/xiaomi/vintf/xiaomi_framework_compatibility_matrix.xml \
vendor/lineage/config/device_framework_matrix.xml
# Init
TARGET_INIT_VENDOR_LIB := //$(DEVICE_PATH):libinit_cepheus
$(call soong_config_set,libinit,vendor_init_lib,//$(DEVICE_PATH):libinit_cepheus)
TARGET_RECOVERY_DEVICE_MODULES := libinit_cepheus
# Kernel
@@ -118,21 +107,32 @@ BOARD_KERNEL_BASE := 0x00000000
BOARD_KERNEL_IMAGE_NAME := Image-dtb
BOARD_KERNEL_PAGESIZE := 4096
BOARD_KERNEL_SEPARATED_DTBO := true
BOARD_RAMDISK_USE_LZ4 := true
BOARD_KERNEL_TAGS_OFFSET := 0x00000100
BOARD_RAMDISK_OFFSET := 0x01000000
TARGET_KERNEL_CLANG_COMPILE := true
TARGET_KERNEL_CONFIG := cepheus_defconfig
TARGET_KERNEL_SOURCE := kernel/xiaomi/cepheus
TARGET_KERNEL_CLANG_VERSION := r547379
KERNEL_TOOLCHAIN := $(shell pwd)/prebuilts/clang/host/linux-x86/clang-r536225/bin
KERNEL_SUPPORTS_LLVM_TOOLS := true
TARGET_KERNEL_ADDITIONAL_FLAGS := AS=llvm-as AR=llvm-ar NM=llvm-nm OBJCOPY=llvm-objcopy OBJDUMP=llvm-objdump STRIP=llvm-strip LD=ld.lld
TARGET_KERNEL_ADDITIONAL_FLAGS += \
HOSTCFLAGS="-fuse-ld=lld -Wno-unused-command-line-argument"
BOARD_KERNEL_CMDLINE := console=ttyMSM0,115200n8 earlycon=msm_geni_serial,0xa90000
BOARD_KERNEL_CMDLINE += androidboot.hardware=qcom androidboot.console=ttyMSM0
BOARD_KERNEL_CMDLINE += androidboot.usbcontroller=a600000.dwc3
#BOARD_KERNEL_CMDLINE += androidboot.selinux=permissive
BOARD_KERNEL_CMDLINE += service_locator.enable=1
BOARD_KERNEL_CMDLINE += loop.max_part=7
BOARD_KERNEL_CMDLINE += androidboot.init_fatal_reboot_target=recovery
BOARD_KERNEL_CMDLINE += kpti=off
BOARD_KERNEL_CMDLINE += androidboot.boot_devices=soc/1d84000.ufshc
# Lineage Health
$(call soong_config_set,lineage_health,charging_control_supports_bypass,false)
$(call soong_config_set,lineage_health,charging_control_charging_path,/sys/class/power_supply/battery/charging_enabled)
# Media
TARGET_USES_ION := true
@@ -143,20 +143,42 @@ BOARD_BOOTIMAGE_PARTITION_SIZE := 134217728
BOARD_CACHEIMAGE_PARTITION_SIZE := 268435456
BOARD_DTBOIMG_PARTITION_SIZE := 33554432
BOARD_RECOVERYIMAGE_PARTITION_SIZE := 67108864
BOARD_SYSTEMIMAGE_PARTITION_SIZE := 3221225472
BOARD_USERDATAIMAGE_PARTITION_SIZE := 57453555712
BOARD_VENDORIMAGE_PARTITION_SIZE := 1610612736
BOARD_FLASH_BLOCK_SIZE := 262144 # (BOARD_KERNEL_PAGESIZE * 64)
BOARD_BUILD_SYSTEM_ROOT_IMAGE := true
# BOARD_SYSTEMIMAGE_PARTITION_SIZE := 3758096384
# BOARD_VENDORIMAGE_PARTITION_SIZE := 1610612736
BOARD_SUPER_PARTITION_GROUPS := cepheus_dynamic_partitions
BOARD_CEPHEUS_DYNAMIC_PARTITIONS_PARTITION_LIST := system vendor system_ext odm product
BOARD_SUPER_PARTITION_SIZE := 5368709120
BOARD_SUPER_PARTITION_METADATA_DEVICE := system
BOARD_SUPER_PARTITION_BLOCK_DEVICES := system vendor
BOARD_SUPER_PARTITION_SYSTEM_DEVICE_SIZE := 3758096384
BOARD_SUPER_PARTITION_VENDOR_DEVICE_SIZE := 1610612736
BOARD_CEPHEUS_DYNAMIC_PARTITIONS_SIZE := 5364514816 # BOARD_SUPER_PARTITION_SIZE - 4MB
-include vendor/lineage/config/BoardConfigReservedSize.mk
BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4
BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4
BOARD_ODMIMAGE_FILE_SYSTEM_TYPE := ext4
BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE := ext4
BOARD_SYSTEM_EXTIMAGE_FILE_SYSTEM_TYPE := ext4
BOARD_SYSTEMIMAGE_FILE_SYSTEM_TYPE := ext4
BOARD_USES_METADATA_PARTITION := true
TARGET_USERIMAGES_USE_EXT4 := true
TARGET_USERIMAGES_USE_F2FS := true
TARGET_COPY_OUT_ODM := odm
TARGET_COPY_OUT_PRODUCT := product
TARGET_COPY_OUT_SYSTEM_EXT := system_ext
TARGET_COPY_OUT_VENDOR := vendor
# Disable sparse for ext/f2fs images
TARGET_USERIMAGES_SPARSE_EXT_DISABLED := true
TARGET_USERIMAGES_SPARSE_F2FS_DISABLED := true
# Platform
TARGET_BOARD_PLATFORM := msmnile
@@ -164,13 +186,14 @@ TARGET_BOARD_PLATFORM := msmnile
TARGET_ODM_PROP += $(DEVICE_PATH)/odm.prop
TARGET_PRODUCT_PROP += $(DEVICE_PATH)/product.prop
TARGET_VENDOR_PROP += $(DEVICE_PATH)/vendor.prop
TARGET_SYSTEM_PROP += $(DEVICE_PATH)/system.prop
# QCOM
BOARD_USES_QCOM_HARDWARE := true
# Recovery
TARGET_RECOVERY_FSTAB := $(DEVICE_PATH)/rootdir/etc/fstab.qcom
TARGET_RECOVERY_PIXEL_FORMAT := "BGRA_8888"
TARGET_RECOVERY_PIXEL_FORMAT := BGRA_8888
# Releasetools
TARGET_RELEASETOOLS_EXTENSIONS := $(DEVICE_PATH)
@@ -179,7 +202,7 @@ TARGET_RELEASETOOLS_EXTENSIONS := $(DEVICE_PATH)
ENABLE_VENDOR_RIL_SERVICE := true
# Security patch level
VENDOR_SECURITY_PATCH := 2021-10-01
VENDOR_SECURITY_PATCH := $(PLATFORM_SECURITY_PATCH)
# Sepolicy
TARGET_SEPOLICY_DIR := msmnile
@@ -211,6 +234,7 @@ WIFI_DRIVER_DEFAULT := qca_cld3
WIFI_DRIVER_STATE_CTRL_PARAM := "/dev/wlan"
WIFI_DRIVER_STATE_OFF := "OFF"
WIFI_DRIVER_STATE_ON := "ON"
WIFI_HIDL_FEATURE_AWARE := true
WIFI_HIDL_FEATURE_DUAL_INTERFACE := true
WIFI_HIDL_UNIFIED_SUPPLICANT_SERVICE_RC_ENTRY := true
WPA_SUPPLICANT_VERSION := VER_0_8_X

View File

@@ -1,31 +0,0 @@
[
{
"repository" : "vendor_xiaomi_cepheus",
"target_path": "vendor/xiaomi/cepheus",
"remote" : "pixel-devices-blobs",
"branch" : "twelve"
},
{
"repository" : "vendor_xiaomi_sdm845-common-extra",
"target_path": "vendor/xiaomi/sdm845-common-extra",
"branch" : "twelve",
"remote" : "pixel-devices-blobs"
},
{
"repository" : "kernel_xiaomi_cepheus",
"target_path": "kernel/xiaomi/cepheus",
"branch" : "twelve"
},
{
"repository" : "PixelExperience/hardware_xiaomi",
"target_path": "hardware/xiaomi",
"branch" : "twelve"
},
{
"repository" : "vendor_xiaomi-firmware",
"target_path": "vendor/xiaomi-firmware",
"remote" : "pixel-devices-blobs",
"clone-depth": "1",
"branch" : "twelve"
}
]

View File

@@ -1,30 +0,0 @@
/*
* Copyright (c) 2013, The Linux Foundation. All rights reserved.
* Not a Contribution.
*
* Copyright (C) 2012 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.
*/
#ifndef _BDROID_BUILDCFG_H
#define _BDROID_BUILDCFG_H
// Disables read remote device feature
#define MAX_ACL_CONNECTIONS 16
#define MAX_L2CAP_CHANNELS 32
#define BLE_VND_INCLUDED TRUE
#define GATT_MAX_PHY_CHANNEL 10
#define AVDT_NUM_SEPS 35
#endif

View File

@@ -19,3 +19,11 @@ cc_library_shared {
proprietary: true,
srcs: ["megvii_shim.cpp"],
}
cc_library_static {
name: "libcameraservice_extension.cepheus",
srcs: ["CameraProviderExtension.cpp"],
include_dirs: [
"frameworks/av/services/camera/libcameraservice/common"
],
}

View File

@@ -0,0 +1,78 @@
/*
* Copyright (C) 2024 LibreMobileOS Foundation
*
* SPDX-License-Identifier: Apache-2.0
*/
#include "CameraProviderExtension.h"
#include <fstream>
#define TORCH_BRIGHTNESS "brightness"
#define TORCH_MAX_BRIGHTNESS "max_brightness"
#define TOGGLE_SWITCH "/sys/devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-05/c440000.qcom,spmi:qcom,pm8150l@5:qcom,leds@d300/leds/led:switch_2/brightness"
static std::string kTorchLedPaths[] = {
"/sys/devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-05/c440000.qcom,spmi:qcom,pm8150l@5:qcom,leds@d300/leds/led:torch_0",
"/sys/devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-05/c440000.qcom,spmi:qcom,pm8150l@5:qcom,leds@d300/leds/led:torch_1",
};
/**
* Write value to path and close file.
*/
template <typename T>
static void set(const std::string& path, const T& value) {
std::ofstream file(path);
file << value;
}
/**
* Read value from the path and close file.
*/
template <typename T>
static T get(const std::string& path, const T& def) {
std::ifstream file(path);
T result;
file >> result;
return file.fail() ? def : result;
}
bool supportsTorchStrengthControlExt() {
return true;
}
bool supportsSetTorchModeExt() {
return false;
}
int32_t getTorchDefaultStrengthLevelExt() {
return 80;
}
int32_t getTorchMaxStrengthLevelExt() {
// 200 (out of 500) is a sane max brightness
return 200;
}
int32_t getTorchStrengthLevelExt() {
// We write same value in the both LEDs,
// so get from one.
auto node = kTorchLedPaths[0] + "/" + TORCH_BRIGHTNESS;
return get(node, 0);
}
void setTorchStrengthLevelExt(int32_t torchStrength, bool enabled) {
set(TOGGLE_SWITCH, 0);
for (auto& path : kTorchLedPaths) {
auto node = path + "/" + TORCH_BRIGHTNESS;
set(node, torchStrength);
}
if (enabled)
set(TOGGLE_SWITCH, 255);
}
void setTorchModeExt(bool enabled) {
int32_t strength = getTorchDefaultStrengthLevelExt();
setTorchStrengthLevelExt(enabled ? strength : 0, enabled);
}

View File

@@ -145,6 +145,15 @@
<profile name="" format="AUDIO_FORMAT_AAC_ADTS_HE_V2"
samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000 64000 88200 96000"
channelMasks="AUDIO_CHANNEL_OUT_STEREO AUDIO_CHANNEL_OUT_MONO"/>
<profile name="" format="AUDIO_FORMAT_AC3"
samplingRates="32000,44100,48000"
channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_2POINT1,AUDIO_CHANNEL_OUT_QUAD,AUDIO_CHANNEL_OUT_PENTA,AUDIO_CHANNEL_OUT_5POINT1"/>
<profile name="" format="AUDIO_FORMAT_E_AC3"
samplingRates="32000,44100,48000"
channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_2POINT1,AUDIO_CHANNEL_OUT_QUAD,AUDIO_CHANNEL_OUT_PENTA,AUDIO_CHANNEL_OUT_5POINT1,AUDIO_CHANNEL_OUT_6POINT1,AUDIO_CHANNEL_OUT_7POINT1"/>
<profile name="" format="AUDIO_FORMAT_E_AC3_JOC"
samplingRates="32000,44100,48000"
channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_2POINT1,AUDIO_CHANNEL_OUT_QUAD,AUDIO_CHANNEL_OUT_PENTA,AUDIO_CHANNEL_OUT_5POINT1,AUDIO_CHANNEL_OUT_6POINT1,AUDIO_CHANNEL_OUT_7POINT1"/>
</mixPort>
<mixPort name="dsd_compress_passthrough" role="source"
flags="AUDIO_OUTPUT_FLAG_DIRECT AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD AUDIO_OUTPUT_FLAG_NON_BLOCKING">
@@ -268,21 +277,6 @@
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_MONO AUDIO_CHANNEL_OUT_STEREO"/>
</devicePort>
<devicePort tagName="BT A2DP Out" type="AUDIO_DEVICE_OUT_BLUETOOTH_A2DP" role="sink"
encodedFormats="AUDIO_FORMAT_SBC AUDIO_FORMAT_AAC AUDIO_FORMAT_APTX AUDIO_FORMAT_APTX_HD AUDIO_FORMAT_LDAC AUDIO_FORMAT_CELT AUDIO_FORMAT_APTX_ADAPTIVE AUDIO_FORMAT_APTX_TWSP">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
</devicePort>
<devicePort tagName="BT A2DP Headphones" type="AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES" role="sink"
encodedFormats="AUDIO_FORMAT_SBC AUDIO_FORMAT_AAC AUDIO_FORMAT_APTX AUDIO_FORMAT_APTX_HD AUDIO_FORMAT_LDAC AUDIO_FORMAT_CELT AUDIO_FORMAT_APTX_ADAPTIVE AUDIO_FORMAT_APTX_TWSP">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
</devicePort>
<devicePort tagName="BT A2DP Speaker" type="AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER" role="sink"
encodedFormats="AUDIO_FORMAT_SBC AUDIO_FORMAT_AAC AUDIO_FORMAT_APTX AUDIO_FORMAT_APTX_HD AUDIO_FORMAT_LDAC AUDIO_FORMAT_CELT AUDIO_FORMAT_APTX_ADAPTIVE AUDIO_FORMAT_APTX_TWSP">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
</devicePort>
<devicePort tagName="USB Device Out" type="AUDIO_DEVICE_OUT_USB_DEVICE" role="sink">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="44100 48000 64000 88200 96000 128000 176400 192000" channelMasks="dynamic"/>
@@ -371,12 +365,6 @@
sources="Built-In Mic,Built-In Back Mic,Wired Headset Mic,USB Device In,USB Headset In"/>
<route type="mix" sink="hifi_input" sources="USB Device In,USB Headset In" />
<route type="mix" sink="voip record" sources="Built-In Mic,Built-In Back Mic,Wired Headset Mic,BT SCO Headset Mic,FM Tuner,USB Device In,USB Headset In,Telephony Rx"/>
<route type="mix" sink="BT A2DP Out"
sources="primary output,deep_buffer,direct_pcm,compressed_offload,voip_rx"/>
<route type="mix" sink="BT A2DP Headphones"
sources="primary output,deep_buffer,direct_pcm,compressed_offload,voip_rx"/>
<route type="mix" sink="BT A2DP Speaker"
sources="primary output,deep_buffer,direct_pcm,compressed_offload,voip_rx"/>
</routes>
</module>
@@ -410,6 +398,9 @@
<!-- Bluetooth Audio HAL for Hearing aid -->
<xi:include href="/vendor/etc/bluetooth_hearing_aid_audio_policy_configuration.xml"/>
<!-- Bluetooth Audio HAL -->
<xi:include href="/vendor/etc/bluetooth_audio_policy_configuration.xml"/>
</modules>
<!-- End of Modules section -->

File diff suppressed because it is too large Load Diff

View File

@@ -1,39 +0,0 @@
<!-- Copyright (c) 2018, The Linux Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* Neither the name of The Linux Foundation nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
<manifest version="1.0" type="device">
<!-- Codec2 HAl service -->
<hal format="hidl">
<name>android.hardware.media.c2</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IComponentStore</name>
<instance>default</instance>
</interface>
</hal>
</manifest>

View File

@@ -1,58 +0,0 @@
<compatibility-matrix version="1.0" type="device">
<hal format="hidl" optional="false">
<name>android.frameworks.schedulerservice</name>
<version>1.0</version>
<interface>
<name>ISchedulingPolicyService</name>
<instance>default</instance>
</interface>
</hal>
<hal format="hidl" optional="false">
<name>android.frameworks.sensorservice</name>
<version>1.0</version>
<interface>
<name>ISensorManager</name>
<instance>default</instance>
</interface>
</hal>
<hal format="hidl" optional="false">
<name>android.hidl.allocator</name>
<version>1.0</version>
<interface>
<name>IAllocator</name>
<instance>ashmem</instance>
</interface>
</hal>
<hal format="hidl" optional="false">
<name>android.hidl.manager</name>
<version>1.0</version>
<interface>
<name>IServiceManager</name>
<instance>default</instance>
</interface>
</hal>
<hal format="hidl" optional="false">
<name>android.hidl.memory</name>
<version>1.0</version>
<interface>
<name>IMapper</name>
<instance>ashmem</instance>
</interface>
</hal>
<hal format="hidl" optional="false">
<name>android.hidl.token</name>
<version>1.0</version>
<interface>
<name>ITokenManager</name>
<instance>default</instance>
</interface>
</hal>
<hal format="hidl" optional="false">
<name>android.system.wifi.keystore</name>
<version>1.0</version>
<interface>
<name>IKeystore</name>
<instance>default</instance>
</interface>
</hal>
</compatibility-matrix>

View File

@@ -0,0 +1,55 @@
<!--
Copyright (C) 2024 The LineageOS Project
SPDX-License-Identifier: Apache-2.0
-->
<compatibility-matrix version="2.0" type="framework" target-level="5">
<hal format="hidl" optional="true">
<name>com.qualcomm.qti.ant</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IAntHci</name>
<instance>default</instance>
</interface>
</hal>
<hal format="hidl" optional="true">
<name>vendor.goodix.hardware.biometrics.fingerprint</name>
<version>2.0-1</version>
<interface>
<name>IGoodixFingerprintDaemon</name>
<instance>default</instance>
</interface>
</hal>
<hal format="hidl" optional="true">
<name>vendor.nxp.nxpnfc</name>
<version>1.0</version>
<interface>
<name>INxpNfc</name>
<instance>default</instance>
</interface>
</hal>
<hal format="hidl" optional="true">
<name>vendor.xiaomi.hardware.fingerprintextension</name>
<version>1.0</version>
<interface>
<name>IXiaomiFingerprint</name>
<instance>default</instance>
</interface>
</hal>
<hal format="hidl" optional="true">
<name>vendor.xiaomi.hardware.mlipay</name>
<version>1.0-1</version>
<interface>
<name>IMlipayService</name>
<instance>default</instance>
</interface>
</hal>
<hal format="hidl" optional="true">
<name>vendor.lineage.fastcharge</name>
<version>1.0</version>
<interface>
<name>IFastCharge</name>
<instance>default</instance>
</interface>
</hal>
</compatibility-matrix>

View File

@@ -1,4 +1,4 @@
<manifest version="1.0" type="device" target-level="4">
<manifest version="1.0" type="device" target-level="5">
<hal format="hidl">
<name>android.hardware.audio</name>
<transport>hwbinder</transport>
@@ -29,16 +29,6 @@
</interface>
<fqname>@1.0::IBluetoothHci/default</fqname>
</hal>
<hal format="hidl">
<name>android.hardware.bluetooth.audio</name>
<transport>hwbinder</transport>
<version>2.0</version>
<interface>
<name>IBluetoothAudioProvidersFactory</name>
<instance>default</instance>
</interface>
<fqname>@2.0::IBluetoothAudioProvidersFactory/default</fqname>
</hal>
<hal format="hidl">
<name>android.hardware.camera.provider</name>
<transport>hwbinder</transport>
@@ -49,6 +39,12 @@
</interface>
<fqname>@2.4::ICameraProvider/legacy/0</fqname>
</hal>
<hal format="hidl">
<name>android.hardware.drm</name>
<transport>hwbinder</transport>
<fqname>@1.3::ICryptoFactory/wfdhdcp</fqname>
<fqname>@1.3::IDrmFactory/wfdhdcp</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.hardware.cacert</name>
<transport>hwbinder</transport>
@@ -82,22 +78,22 @@
<hal format="hidl">
<name>android.hardware.keymaster</name>
<transport>hwbinder</transport>
<version>4.0</version>
<version>4.1</version>
<interface>
<name>IKeymasterDevice</name>
<instance>default</instance>
</interface>
<fqname>@4.0::IKeymasterDevice/default</fqname>
<fqname>@4.1::IKeymasterDevice/default</fqname>
</hal>
<hal format="hidl">
<name>android.hardware.light</name>
<name>android.hardware.media.c2</name>
<transport>hwbinder</transport>
<version>2.0</version>
<version>1.0</version>
<interface>
<name>ILight</name>
<name>IComponentStore</name>
<instance>default</instance>
</interface>
<fqname>@2.0::ILight/default</fqname>
<fqname>@1.0::IComponentStore/default</fqname>
</hal>
<hal format="hidl">
<name>android.hardware.media.omx</name>
@@ -114,16 +110,6 @@
<fqname>@1.0::IOmx/default</fqname>
<fqname>@1.0::IOmxStore/default</fqname>
</hal>
<hal format="hidl">
<name>android.hardware.memtrack</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IMemtrack</name>
<instance>default</instance>
</interface>
<fqname>@1.0::IMemtrack/default</fqname>
</hal>
<hal format="hidl">
<name>android.hardware.neuralnetworks</name>
<transport>hwbinder</transport>
@@ -167,16 +153,6 @@
</interface>
<fqname>@1.1::IRadioConfig/default</fqname>
</hal>
<hal format="hidl">
<name>android.hardware.renderscript</name>
<transport arch="32+64">passthrough</transport>
<version>1.0</version>
<interface>
<name>IDevice</name>
<instance>default</instance>
</interface>
<fqname>@1.0::IDevice/default</fqname>
</hal>
<hal format="hidl">
<name>android.hardware.sensors</name>
<transport>hwbinder</transport>
@@ -387,16 +363,6 @@
</interface>
<fqname>@2.0::IIop/default</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.hardware.perf</name>
<transport>hwbinder</transport>
<version>2.0</version>
<interface>
<name>IPerf</name>
<instance>default</instance>
</interface>
<fqname>@2.0::IPerf/default</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.hardware.radio.am</name>
<transport>hwbinder</transport>
@@ -561,6 +527,27 @@
</interface>
<fqname>@1.3::IHidlVppService/vppService</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.hardware.wifidisplaysession</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IWifiDisplaySession</name>
<instance>wifidisplaysession</instance>
</interface>
<interface>
<name>IWifiDisplaySessionAudioTrack</name>
<instance>wifidisplaysessionaudiotrack</instance>
</interface>
<interface>
<name>IWifiDisplaySessionImageTrack</name>
<instance>wifidisplaysessionimagetrack</instance>
</interface>
<interface>
<name>IWifiDisplaySessionVideoTrack</name>
<instance>wifidisplaysessionvideotrack</instance>
</interface>
</hal>
<hal format="hidl">
<name>vendor.qti.ims.callinfo</name>
<transport>hwbinder</transport>

View File

@@ -1,19 +0,0 @@
#############################################
# init.insmod.cfg #
# This file contains kernel modules to load #
# at init time by init.insmod.sh script #
#############################################
# Load kernel modules
modprobe|adsp_loader_dlkm apr_dlkm cs35l41_dlkm hdmi_dlkm machine_dlkm mbhc_dlkm native_dlkm pinctrl_wcd_dlkm platform_dlkm q6_dlkm q6_notifier_dlkm q6_pdr_dlkm stub_dlkm swr_ctrl_dlkm swr_dlkm tas2557_dlkm usf_dlkm wcd934x_dlkm wcd9360_dlkm wcd9xxx_dlkm wcd_core_dlkm wcd_cpe_dlkm wcd_spi_dlkm wglink_dlkm wsa881x_dlkm
# All modules loaded
setprop|vendor.all.modules.ready
# Boot devices
enable|/sys/kernel/boot_adsp/boot
enable|/sys/kernel/boot_cdsp/boot
enable|/sys/kernel/boot_slpi/boot
# All devices enabled
setprop|vendor.all.devices.ready

View File

@@ -98,7 +98,6 @@ Only the three quirks included above are recognized at this point:
| | 4096 2304 60 220 2211840 |
| | 7680 4320 30 220 3888000 |
| | 8192 4320 24 220 3317760 |
| mpeg4-sw | 1920 1088 30 40 244800 244800 |
| vp8 | 1280 720 240 100 864000 1036800 |
| | 1920 1088 120 100 979200 |
| | 3840 2160 30 100 972000 |
@@ -110,7 +109,6 @@ Only the three quirks included above are recognized at this point:
| | 4096 2304 60 220 2211840 |
| | 7680 4320 30 220 3888000 |
| | 8192 4320 24 220 3317760 |
| h263-sw | 864 480 30 16 48600 48600 |
| mpeg2 | 1920 1088 30 40 244800 244800 |
|_____________|_____________________________________________________|
@@ -152,19 +150,16 @@ Only the three quirks included above are recognized at this point:
| | 3840 2160 60 160 1944000 |
| | 4096 2160 48 160 1658880 |
| | 4096 2304 30 160 1105920 |
| mpeg4-sw | 1280 720 30 4 108000 108000 |
| vp8 | 1280 720 240 40 864000 1036800 |
| | 1920 1088 120 40 979200 |
| | 3840 2160 30 40 972000 |
| | 4096 2160 30 40 1036800 |
| | 4096 2304 24 40 884736 |
| h263-sw | 864 480 30 2 48600 48600 |
|__________|_____________________________________________________|
-->
<MediaCodecs>
<Include href="media_codecs_google_audio.xml" />
<Include href="media_codecs_google_telephony.xml" />
<Include href="media_codecs_dolby_audio.xml" />
<Settings>
<Setting name="max-video-encoder-input-buffers" value="11" />
</Settings>
@@ -234,33 +229,6 @@ Only the three quirks included above are recognized at this point:
<Limit name="performance-point-512x512" value="480" />
<Feature name="bitrate-modes" value="CQ" />
</MediaCodec>
<!-- Video Software -->
<MediaCodec name="OMX.qcom.video.encoder.h263sw" type="video/3gpp" >
<Quirk name="requires-allocate-on-input-ports" />
<Quirk name="requires-allocate-on-output-ports" />
<Quirk name="requires-loaded-to-idle-after-allocation" />
<Limit name="size" min="96x96" max="864x480" />
<Limit name="alignment" value="4x4" />
<Limit name="block-size" value="16x16" />
<Limit name="blocks-per-second" min="36" max="48600" />
<Limit name="bitrate" range="1-2000000" />
<Limit name="frame-rate" range="1-30" />
<Limit name="concurrent-instances" max="16" />
<Limit name="performance-point-720x480" value="30" />
</MediaCodec>
<MediaCodec name="OMX.qcom.video.encoder.mpeg4sw" type="video/mp4v-es" >
<Quirk name="requires-allocate-on-input-ports" />
<Quirk name="requires-allocate-on-output-ports" />
<Quirk name="requires-loaded-to-idle-after-allocation" />
<Limit name="size" min="96x96" max="1280x720" />
<Limit name="alignment" value="2x2" />
<Limit name="block-size" value="16x16" />
<Limit name="blocks-per-second" min="36" max="108000" />
<Limit name="bitrate" range="1-4000000" />
<Limit name="frame-rate" range="1-30" />
<Limit name="concurrent-instances" max="16" />
<Limit name="performance-point-1280x720" value="30" />
</MediaCodec>
</Encoders>
<Decoders>
<!-- Video Hardware -->
@@ -410,33 +378,5 @@ Only the three quirks included above are recognized at this point:
<Limit name="performance-point-4096x2160" value="60" />
<Limit name="performance-point-3840x2160" value="60" />
</MediaCodec>
<!-- Video Software -->
<MediaCodec name="OMX.qti.video.decoder.h263sw" type="video/3gpp" >
<Quirk name="requires-allocate-on-input-ports" />
<Quirk name="requires-allocate-on-output-ports" />
<Limit name="size" min="96x96" max="864x480" />
<Limit name="alignment" value="4x4" />
<Limit name="block-size" value="16x16" />
<Limit name="blocks-per-second" min="36" max="48600" />
<Limit name="bitrate" range="1-16000000" />
<Limit name="frame-rate" range="1-30" />
<Feature name="adaptive-playback" />
<Limit name="concurrent-instances" max="16" />
<Limit name="performance-point-720x480" value="30" />
</MediaCodec>
<MediaCodec name="OMX.qti.video.decoder.mpeg4sw" type="video/mp4v-es">
<Quirk name="requires-allocate-on-input-ports" />
<Quirk name="requires-allocate-on-output-ports" />
<Limit name="size" min="96x96" max="1920x1088" />
<Limit name="alignment" value="2x2" />
<Limit name="block-size" value="16x16" />
<Limit name="blocks-per-second" min="36" max="244800" />
<Limit name="bitrate" range="1-40000000" />
<Limit name="frame-rate" range="1-30" />
<Limit name="concurrent-instances" max="16" />
<Limit name="performance-point-1920x1080" value="30" />
</MediaCodec>
<MediaCodec name="OMX.google.opus.decoder" type="audio/opus" update="true" rank="100"/>
</Decoders>
<Include href="media_codecs_google_video.xml" />
</MediaCodecs>

View File

@@ -0,0 +1,51 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2016 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.
This file was modified by Dolby Laboratories, Inc. The portions of the
code that are surrounded by "DOLBY..." are copyrighted and
licensed separately, as follows:
(C) 2018 Dolby Laboratories, Inc.
All rights reserved.
This program is protected under international and U.S. Copyright laws as
an unpublished work. This program is confidential and proprietary to the
copyright owners. Reproduction or disclosure, in whole or in part, or the
production of derivative works therefrom without the express permission of
the copyright owners is prohibited.
-->
<Included>
<Decoders>
<!-- DOLBY_UDC -->
<MediaCodec name="OMX.dolby.ac3.decoder" type="audio/ac3">
<Limit name="channel-count" max="6" />
<Limit name="sample-rate" ranges="32000,44100,48000" />
<Limit name="bitrate" range="32000-640000" />
</MediaCodec>
<MediaCodec name="OMX.dolby.eac3.decoder" type="audio/eac3">
<Limit name="channel-count" max="8" />
<Limit name="sample-rate" ranges="32000,44100,48000" />
<Limit name="bitrate" range="32000-6144000" />
</MediaCodec>
<MediaCodec name="OMX.dolby.eac3-joc.decoder" type="audio/eac3-joc">
<Limit name="channel-count" max="8" />
<Limit name="sample-rate" ranges="48000" />
<Limit name="bitrate" range="32000-6144000" />
</MediaCodec>
<!-- DOLBY_UDC END -->
<!-- DOLBY_AC4 -->
<MediaCodec name="OMX.dolby.ac4.decoder" type="audio/ac4">
<Limit name="channel-count" max="2" />
<Limit name="sample-rate" ranges="48000" />
<Limit name="bitrate" range="16000-2688000" />
</MediaCodec>
<!-- DOLBY_AC4 END -->
</Decoders>
</Included>

View File

@@ -90,6 +90,9 @@
"Name": "GPUMaxFreq",
"Path": "/sys/class/kgsl/kgsl-3d0/devfreq/max_freq",
"Values": [
"810000000",
"765000000",
"675000000",
"585000000",
"427000000",
"257000000"
@@ -101,6 +104,9 @@
"Name": "GPUMinFreq",
"Path": "/sys/class/kgsl/kgsl-3d0/devfreq/min_freq",
"Values": [
"810000000",
"765000000",
"675000000",
"585000000",
"427000000",
"345000000",
@@ -391,7 +397,7 @@
"PowerHint": "SUSTAINED_PERFORMANCE",
"Node": "GPUMaxFreq",
"Duration": 0,
"Value": "427000000"
"Value": "675000000"
},
{
"PowerHint": "INTERACTION",
@@ -613,7 +619,7 @@
"PowerHint": "EXPENSIVE_RENDERING",
"Node": "GPUMaxFreq",
"Duration": 0,
"Value": "585000000"
"Value": "675000000"
},
{
"PowerHint": "ML_ACC",

View File

@@ -1,4 +1,3 @@
libqti-perfd-client.so
libadsprpc.so
libcdsprpc.so
libsdsprpc.so

View File

@@ -1,9 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2015 The CyanogenMod Project
2018-2019 The LineageOS Project
Copyright (C) 2024 crDroid Android Project
Licensed under the Apache License, Version 2.0 (the "License"
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
@@ -15,16 +14,12 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
<PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android"
android:title="@string/dc_dimming_enable_title">
<config>
<com.android.settingslib.widget.TopIntroPreference
android:key="dc_dimming_top_intro"
android:title="@string/dc_dimming_enable_summary" />
<com.android.settingslib.widget.MainSwitchPreference
android:key="dc_dimming"
android:defaultValue="false"
android:title="@string/dc_dimming_enable_title" />
</PreferenceScreen>
<!-- Dolby -->
<install-in-user-type package="com.motorola.dolby.dolbyui">
<install-in user-type="FULL" />
<install-in user-type="PROFILE" />
<do-not-install-in user-type="android.os.usertype.profile.CLONE" />
</install-in-user-type>
</config>

View File

@@ -85,7 +85,7 @@ EseEnabled=0
ImplicitQosIsEnabled=0
gNeighborScanTimerPeriod=200
gNeighborLookupThreshold=76
gNeighborLookupThreshold=85
gNeighborScanChannelMinTime=20
gNeighborScanChannelMaxTime=30
gMaxNeighborReqTries=3
@@ -104,8 +104,15 @@ RoamRssiDiff=5
# To enable, set gRoamIntraBand=1 (Roaming within band)
# To disable, set gRoamIntraBand=0 (Roaming across band)
gRoamIntraBand=0
# Sets RSSI preference for 5GHz over 2.4GHz AP
gSelect5GHzMargin=5
# Prefer connecting to 5Ghz AP even if
# its RSSI is lower by 3dBm than the 2.4Ghz AP
gRoamPrefer5GHz=1
gSelect5GHzMargin=3
# Disable rx wakelock
rx_wakelock_timeout=0
# RSSI threshold offset for 2G to 5G roam
roam_bad_rssi_thresh_offset_2g=0
@@ -238,7 +245,7 @@ gMaxMediumTime = 6000
gRrmEnable=1
#Enable Power Save offload
gEnablePowerSaveOffload=1
gEnablePowerSaveOffload=4
#Enable firmware uart print
gEnablefwprint=0
@@ -246,7 +253,7 @@ gEnablefwprint=0
# Firmware log mode
# Valid values are 0,1,2
# 0=Disable, 1=WMI, 2=DIAG
gEnablefwlog=1
gEnablefwlog=0
# Maximum Receive AMPDU size (VHT only. Valid values:
# 0->8k 1->16k 2->32k 3->64k 4->128k)
@@ -340,6 +347,19 @@ gSapSccChanAvoidance=0
# Inactivity time (in ms) to end TX Service Period while in IBSS power save mode
gIbssTxSpEndInactivityTime=10
# Enable support for TDLS
# 0 - disable
# 1 - enable
gEnableTDLSSupport=1
# Enable support for Implicit Trigger of TDLS. That is, wlan driver shall
# initiate TDLS Discovery towards a peer whenever setup criteria (throughput
# and RSSI) is met and then will initiate teardown when teardown criteria
# (idle packet count and RSSI) is met.
# 0 - disable
# 1 - enable
gEnableTDLSImplicitTrigger=1
# Enable TDLS External Control. That is, user space application has to
# first configure a peer MAC in wlan driver towards which TDLS is desired.
# Device will establish TDLS only towards those configured peers whenever
@@ -444,8 +464,8 @@ ce_service_max_rx_ind_flush=1
maxMSDUsPerRxInd=8
# Enable NUD tracking feature
# 1 - enable 0 - disable(default)
gEnableNUDTracking=1
# 1 - enable 0 - disable(default) 3 - Driver will try to roam to a new AP but if roam fails, disconnect.
gEnableNUDTracking=3
# Enable PEER UNMAP CONF SUPPORT
# 1 - enable 0 - disable(default)
@@ -474,9 +494,11 @@ adapt_dwell_lpf_weight=80
adapt_dwell_wifi_act_threshold=10
# Enable broadcast logging to the userspace entities
gMulticastHostFwMsgs=0
# Enable pkt log
# 1 - enable, 0 - disable
gEnablePacketLog=1
gEnablePacketLog=0
# Force 1x1 for 2.4g SAP, P2P-GC/GO, 2x2 for STA
# gVdevTypeNss_2g=21846
@@ -568,6 +590,9 @@ gcmp_enabled=1
# Enable/Disable rtt sta mac randomization
enable_rtt_mac_randomization=1
# Create another interface during driver load
gEnableConcurrentSTA=wlan1
#Enable/Disable SNR monitoring
gEnableSNRMonitoring=1
@@ -577,6 +602,9 @@ wlm_latency_enable=1
# WLM flags setting for ultralow level, bit9 for BMPS disabled
wlm_latency_flags_ultralow=0xe03
# Timer waiting for interface up from the upper layer
gInterfaceChangeWait=2000
#Enable ETSI SRD channels by Xiaomi. Qualcom default value is disable
etsi13_srd_chan_in_master_mode=1
@@ -598,6 +626,22 @@ gIPAHighBandwidthMbps=800
gIPAForceVotingEnable=1
spectral_disable=1
gEnableSARV1toSARV2=1
gStaPrefer80MHzOver160MHz=1
# Timer waiting for interface up from the upper layer
gInterfaceChangeWait=2000
# Reduce the expiry time for avoid list and black list in drv.
avoid_list_expiry_time=3
black_list_expiry_time=3
# Improve threshold to move the Ap from avoid to blacklist
bad_bssid_counter_thresh=7
# Enable SoftAP on indoor channel, but Xiaomi's patch in driver only
# allow this when STA was connected on the same indoor channel.
gindoor_channel_support=1
END
# Note: Configuration parser would not read anything past the END marker

View File

@@ -5,4 +5,6 @@ wowlan_triggers=magic_pkt
bss_max_count=400
interworking=1
config_methods=virtual_display virtual_push_button keypad
driver_param="no_rrm=1"
driver_param="no_rrm=1 use_p2p_group_interface=1"
hs20=1
auto_interworking=0

251
device.mk
View File

@@ -14,8 +14,8 @@
# limitations under the License.
#
# Installs gsi keys into ramdisk, to boot a GSI with verified boot.
$(call inherit-product, $(SRC_TARGET_DIR)/product/gsi_keys.mk)
# Add common definitions for Qualcomm
$(call inherit-product, hardware/qcom-caf/common/common.mk)
# Product launched with 9.0
$(call inherit-product, $(SRC_TARGET_DIR)/product/product_launched_with_p.mk)
@@ -26,8 +26,6 @@ $(call inherit-product, frameworks/native/build/phone-xhdpi-6144-dalvik-heap.mk)
# Call the proprietary setup
$(call inherit-product, vendor/xiaomi/cepheus/cepheus-vendor.mk)
include build/make/target/product/iorap_large_memory_config.mk
# Additional native libraries
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/public.libraries.txt:$(TARGET_COPY_OUT_VENDOR)/etc/public.libraries.txt
@@ -39,7 +37,6 @@ PRODUCT_PACKAGES += \
# ANT+
PRODUCT_PACKAGES += \
AntHalService-Soong \
com.dsi.ant.antradio_library \
com.dsi.ant@1.0
# Audio
@@ -47,13 +44,13 @@ PRODUCT_PACKAGES += \
android.hardware.audio@7.0-impl \
android.hardware.audio.effect@7.0-impl \
android.hardware.audio.service \
android.hardware.bluetooth.audio@2.0-impl \
android.hardware.bluetooth.audio-impl \
android.hardware.soundtrigger@2.2-impl \
android.hardware.soundtrigger@2.3-impl
PRODUCT_PACKAGES += \
audio.a2dp.default \
audio.bluetooth.default \
audio.primary.default \
audio.usb.default \
audio.r_submix.default
@@ -61,7 +58,6 @@ PRODUCT_PACKAGES += \
libqcompostprocbundle \
libqcomvisualizer \
libqcomvoiceprocessing \
libqcomvoiceprocessingdescriptors \
libvolumelistener
PRODUCT_PACKAGES += \
@@ -73,6 +69,7 @@ PRODUCT_COPY_FILES += \
PRODUCT_COPY_FILES += \
frameworks/av/services/audiopolicy/config/a2dp_in_audio_policy_configuration_7_0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/a2dp_in_audio_policy_configuration_7_0.xml \
frameworks/av/services/audiopolicy/config/bluetooth_audio_policy_configuration.xml:/$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_audio_policy_configuration.xml \
frameworks/av/services/audiopolicy/config/default_volume_tables.xml:$(TARGET_COPY_OUT_VENDOR)/etc/default_volume_tables.xml \
frameworks/av/services/audiopolicy/config/r_submix_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/r_submix_audio_policy_configuration.xml \
frameworks/av/services/audiopolicy/config/usb_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/usb_audio_policy_configuration.xml
@@ -89,9 +86,6 @@ PRODUCT_PACKAGES += \
# Bluetooth
PRODUCT_PACKAGES += \
BluetoothQti \
libbthost_if \
vendor.qti.hardware.bluetooth_audio@2.0.vendor \
android.hardware.bluetooth@1.0.vendor \
vendor.qti.hardware.btconfigstore@1.0.vendor \
vendor.qti.hardware.btconfigstore@2.0.vendor
@@ -106,7 +100,19 @@ TARGET_SCREEN_WIDTH := 1080
# Camera
PRODUCT_PACKAGES += \
libdng_sdk.vendor
android.hardware.camera.provider@2.4-impl \
android.hardware.camera.provider@2.4-service_64
PRODUCT_PACKAGES += \
libc29.vendor \
libcamera2ndk_vendor \
libdng_sdk.vendor \
libgui_vendor \
libpiex \
libpng.vendor \
libstdc++_vendor \
vendor.qti.hardware.camera.device@1.0.vendor \
vendor.qti.hardware.camera.postproc@1.0.vendor
PRODUCT_PACKAGES += \
libshim_megvii
@@ -117,8 +123,9 @@ PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.camera.full.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.full.xml \
frameworks/native/data/etc/android.hardware.camera.raw.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.raw.xml
# Clone apps exemption
PRODUCT_COPY_FILES += \
prebuilts/vndk/v29/arm64/arch-arm64-armv8-a/shared/vndk-sp/libc++.so:$(TARGET_COPY_OUT_VENDOR)/lib64/libc++.so
$(LOCAL_PATH)/configs/sysconfig/preinstalled-packages-platform-xiaomi-product.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/sysconfig/preinstalled-packages-platform-xiaomi-product.xml
# Device-specific settings
PRODUCT_PACKAGES += \
@@ -129,35 +136,36 @@ PRODUCT_PACKAGES += \
disable_configstore
PRODUCT_PACKAGES += \
android.hardware.graphics.composer@2.4-impl \
android.hardware.graphics.composer@2.4-service \
android.hardware.memtrack@1.0-impl \
android.hardware.memtrack@1.0-service \
vendor.qti.hardware.display.allocator-service
PRODUCT_PACKAGES += \
android.hardware.graphics.mapper@3.0-impl-qti-display \
android.hardware.graphics.mapper@4.0-impl-qti-display
PRODUCT_PACKAGES += \
android.hardware.graphics.mapper@4.0-impl-qti-display \
gralloc.qcom \
hwcomposer.qcom \
libdisplayconfig.qti \
libdisplayconfig.system.qti \
libqdMetaData \
libqdMetaData.system \
libqdutils \
libtinyxml \
vendor.display.config@2.0 \
vendor.display.config@2.0.vendor \
vendor.qti.hardware.display.allocator-service \
vendor.qti.hardware.display.mapper@2.0.vendor \
vendor.qti.hardware.display.mapper@3.0.vendor \
vendor.qti.hardware.display.mapper@4.0.vendor
PRODUCT_PACKAGES += \
vendor.display.config@2.0 \
vendor.display.config@2.0.vendor
PRODUCT_PACKAGES += \
gralloc.msmnile \
hwcomposer.msmnile \
memtrack.msmnile
vendor.qti.hardware.display.mapper@4.0.vendor \
vendor.qti.hardware.memtrack-service
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.opengles.aep.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.opengles.aep.xml
# Dolby
PRODUCT_PACKAGES += \
libtinyxml
libstagefright_foundation-v33 \
XiaomiDolby
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/dolby/dax-default.xml:$(TARGET_COPY_OUT_VENDOR)/etc/dolby/dax-default.xml \
$(LOCAL_PATH)/configs/media/media_codecs_dolby_audio.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_dolby_audio.xml
# DRM
PRODUCT_PACKAGES += \
@@ -165,30 +173,44 @@ PRODUCT_PACKAGES += \
android.hardware.drm@1.1.vendor \
android.hardware.drm@1.2.vendor \
android.hardware.drm@1.3.vendor \
android.hardware.drm@1.4-service.clearkey
android.hardware.drm-service.clearkey \
libcrypto_shim.vendor
# Enable incremental FS feature
PRODUCT_PROPERTY_OVERRIDES += ro.incremental.enable=1
# Enable blurs, hidden under dev option
PRODUCT_PRODUCT_PROPERTIES += \
ro.launcher.blur.appLaunch=1 \
ro.surface_flinger.supports_background_blur=1 \
persist.sys.sf.disable_blurs=1 \
persist.sys.sf.disable_blurs=0 \
ro.sf.blurs_are_expensive=1
# Fastbootd
PRODUCT_PACKAGES += \
fastbootd
# Fastcharge
PRODUCT_PACKAGES += \
vendor.lineage.fastcharge@1.0-service.xiaomi_cepheus
# Fingerprint
PRODUCT_PACKAGES += \
android.hardware.biometrics.fingerprint@2.3-service.cepheus \
android.hardware.biometrics.fingerprint@2.3.vendor \
vendor.goodix.hardware.biometrics.fingerprint@2.1.vendor
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.fingerprint.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.fingerprint.xml \
# Fstab
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/rootdir/etc/fstab.qcom:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.qcom
$(LOCAL_PATH)/rootdir/etc/fstab.qcom:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.qcom \
$(LOCAL_PATH)/rootdir/etc/fstab.qcom:$(TARGET_COPY_OUT_RAMDISK)/fstab.qcom
# FUSE passthrough
PRODUCT_PRODUCT_PROPERTIES += \
persist.sys.fuse.passthrough.enable=true
# Gatekeeper
PRODUCT_PACKAGES += \
@@ -224,32 +246,25 @@ PRODUCT_PACKAGES += \
libhidltransport \
libhidltransport.vendor
# Insmod files
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/init.insmod.cfg:$(TARGET_COPY_OUT_VENDOR)/etc/init.insmod.cfg
# HotwordEnrollment
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/hotword-hiddenapi-package-allowlist.xml:$(TARGET_COPY_OUT_SYSTEM)/etc/sysconfig/hotword-hiddenapi-package-allowlist.xml \
$(LOCAL_PATH)/configs/privapp-permissions-hotword.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/permissions/privapp-permissions-hotword.xml
# IFAA manager
include vendor/xiaomi/sdm845-common-extra/ifaa.mk
# Init scripts
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/rootdir/etc/init.qcom.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.qcom.rc \
$(LOCAL_PATH)/rootdir/etc/init.qcom.usb.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.qcom.usb.rc \
$(LOCAL_PATH)/rootdir/etc/init.recovery.qcom.rc:$(TARGET_COPY_OUT_RECOVERY)/root/init.recovery.qcom.rc \
$(LOCAL_PATH)/rootdir/etc/init.target.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.target.rc
$(LOCAL_PATH)/rootdir/etc/init.target.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.target.rc \
$(LOCAL_PATH)/rootdir/etc/init.xiaomi.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.xiaomi.rc
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/rootdir/bin/init.qcom.post_boot.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.qcom.post_boot.sh \
$(LOCAL_PATH)/rootdir/bin/init.qcom.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.qcom.sh
PRODUCT_PACKAGES += \
init.affinity.sh \
init.insmod.sh
init.affinity.sh
# Input
PRODUCT_COPY_FILES += \
@@ -273,29 +288,32 @@ PRODUCT_PACKAGES += \
# Lights
PRODUCT_PACKAGES += \
android.hardware.lights-service.cepheus
android.hardware.light-service.lineage
# Lineage Health
PRODUCT_PACKAGES += \
vendor.lineage.health-service.default
# LiveDisplay
PRODUCT_PACKAGES += \
vendor.lineage.livedisplay@2.0-service-sdm \
vendor.lineage.livedisplay@2.1-service.cepheus
# Media
PRODUCT_PACKAGES += \
libOmxAacEnc \
libOmxAmrEnc \
libOmxCore \
libOmxEvrcEnc \
libOmxG711Enc \
libOmxQcelp13Enc \
libOmxVdec \
libOmxVenc \
libstagefrighthw \
vendor.qti.hardware.capabilityconfigstore@1.0.vendor
# Media
PRODUCT_PACKAGES += \
libcodec2_vndk.vendor \
libcodec2_hidl@1.0.vendor \
libavservices_minijail \
libavservices_minijail_32 \
libavservices_minijail.vendor \
libavservices_minijail_vendor
libavservices_minijail_vendor \
libcodec2_hidl@1.0.vendor \
libcodec2_soft_common.vendor \
libcodec2_vndk.vendor \
libOmxCore \
libOmxVdec \
libOmxVenc \
libsfplugin_ccodec_utils.vendor \
libstagefrighthw \
vendor.qti.hardware.capabilityconfigstore@1.0.vendor
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/media/media_codecs.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs.xml \
@@ -306,7 +324,6 @@ PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/media/codec2.vendor.base.policy:$(TARGET_COPY_OUT_VENDOR)/etc/seccomp_policy/codec2.vendor.base.policy \
$(LOCAL_PATH)/configs/media/codec2.software.ext.policy:$(TARGET_COPY_OUT)/etc/seccomp_policy/codec2.software.ext.policy \
$(LOCAL_PATH)/configs/media/mediaextractor-seccomp.policy:$(TARGET_COPY_OUT_VENDOR)/etc/seccomp_policy/mediaextractor.policy
PRODUCT_COPY_FILES += \
hardware/qcom-caf/sm8150/media/conf_files/msmnile/codec2.vendor.ext.policy:$(TARGET_COPY_OUT_VENDOR)/etc/seccomp_policy/codec2.vendor.ext.policy \
@@ -315,10 +332,11 @@ PRODUCT_COPY_FILES += \
hardware/qcom-caf/sm8150/media/conf_files/msmnile/mediacodec-seccomp.policy:$(TARGET_COPY_OUT_VENDOR)/etc/seccomp_policy/mediacodec.policy \
hardware/qcom-caf/sm8150/media/conf_files/msmnile/system_properties.xml:$(TARGET_COPY_OUT_VENDOR)/etc/system_properties.xml
PRODUCT_COPY_FILES += \
frameworks/av/media/libstagefright/data/media_codecs_google_audio.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_audio.xml \
frameworks/av/media/libstagefright/data/media_codecs_google_telephony.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_telephony.xml \
frameworks/av/media/libstagefright/data/media_codecs_google_video.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_video.xml
# MiuiCamera
TARGET_CAMERA_PACKAGE_NAME := com.android.camera
$(call soong_config_set,camera,override_format_from_reserved,true)
TARGET_USES_MIUI_CAMERA := true
$(call inherit-product-if-exists, vendor/xiaomi/miuicamera-cepheus/config.mk)
# Network
PRODUCT_PACKAGES += \
@@ -339,7 +357,6 @@ PRODUCT_PACKAGES += \
PRODUCT_PACKAGES += \
android.hardware.nfc@1.2-service \
android.hardware.secure_element@1.2.vendor \
NfcNci \
Tag
PRODUCT_PACKAGES += \
@@ -358,10 +375,30 @@ PRODUCT_COPY_FILES += \
frameworks/native/data/etc/com.android.nfc_extras.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/com.android.nfc_extras.xml \
frameworks/native/data/etc/com.nxp.mifare.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/com.nxp.mifare.xml
# Overlay
DEVICE_PACKAGE_OVERLAYS += \
$(LOCAL_PATH)/overlay \
$(LOCAL_PATH)/overlay-pe
# Overlays
PRODUCT_ENFORCE_RRO_TARGETS := *
PRODUCT_PACKAGES += \
ApertureOverlay \
BluetoothResCepheus \
CarrierConfigOverlay \
DialerConfigOverlay \
FrameworksResCepheus \
LineageSDKOverlay \
SettingsProviderOverlayCepheus \
SettingsResCepheus \
SimpleDeviceConfigResCepheus \
SystemUIResCepheus \
TelephonyResCommon \
TetheringConfigOverlay \
WifiOverlay
# Perf
PRODUCT_PACKAGES += \
libqti-perfd-client
# Partitions
PRODUCT_USE_DYNAMIC_PARTITIONS := true
# Power
PRODUCT_PACKAGES += \
@@ -374,12 +411,17 @@ PRODUCT_COPY_FILES += \
# Product characteristics
PRODUCT_CHARACTERISTICS := nosdcard
# Protobuf
PRODUCT_PACKAGES += \
libprotobuf-cpp-full-3.9.1-vendorcompat
# QTI
PRODUCT_PACKAGES += \
libqti_vndfwk_detect.vendor
libqti_vndfwk_detect.vendor \
libsqlite.vendor
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/permissions/qti_whitelist.xml:$(TARGET_COPY_OUT_SYSTEM)/etc/sysconfig/qti_whitelist.xml \
$(LOCAL_PATH)/configs/permissions/qti_whitelist.xml:$(TARGET_COPY_OUT_SYSTEM_EXT)/etc/sysconfig/qti_whitelist.xml \
$(LOCAL_PATH)/configs/permissions/system_ext-privapp-permissions-qti.xml:$(TARGET_COPY_OUT_SYSTEM_EXT)/etc/permissions/privapp-permissions-qti.xml \
# RCS
@@ -388,10 +430,6 @@ PRODUCT_PACKAGES += \
PresencePolling \
RcsService
# RenderScript
PRODUCT_PACKAGES += \
android.hardware.renderscript@1.0-impl
# RIL
PRODUCT_PACKAGES += \
android.hardware.radio@1.5.vendor \
@@ -429,20 +467,34 @@ PRODUCT_COPY_FILES += \
PRODUCT_PACKAGES += \
SmoothCutoutOverlay
# Shim
PRODUCT_PACKAGES += \
libpiex_shim \
libwatermark_shim
# Soong namespaces
PRODUCT_SOONG_NAMESPACES += \
$(LOCAL_PATH) \
bootable/deprecated-ota \
hardware/google/interfaces \
hardware/xiaomi
# Telephony
PRODUCT_PACKAGES += \
extphonelib \
extphonelib-product \
extphonelib.xml \
extphonelib_product.xml \
ims-ext-common \
ims_ext_common.xml \
qti-telephony-hidl-wrapper \
qti_telephony_hidl_wrapper.xml \
qti-telephony-hidl-wrapper-prd \
qti_telephony_hidl_wrapper_prd.xml \
qti-telephony-utils \
qti_telephony_utils.xml \
qti-telephony-utils-prd \
qti_telephony_utils_prd.xml \
telephony-ext
PRODUCT_BOOT_JARS += \
@@ -468,11 +520,14 @@ PRODUCT_COPY_FILES += \
# Uevent
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/rootdir/etc/ueventd.rc:$(TARGET_COPY_OUT_VENDOR)/ueventd.rc
$(LOCAL_PATH)/rootdir/etc/ueventd.rc:$(TARGET_COPY_OUT_VENDOR)/etc/ueventd.rc
# Update
AB_OTA_UPDATER := false
# USB
PRODUCT_PACKAGES += \
android.hardware.usb@1.0-service
android.hardware.usb@1.3-service.dual_role_usb
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.usb.accessory.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.usb.accessory.xml \
@@ -483,25 +538,26 @@ PRODUCT_PACKAGES += \
vendor.qti.hardware.vibrator.service
# Vulkan
PRODUCT_PACKAGES += \
libvulkan
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.vulkan.compute-0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.compute.xml \
frameworks/native/data/etc/android.hardware.vulkan.level-1.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.level.xml \
frameworks/native/data/etc/android.software.vulkan.deqp.level-2020-03-01.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.vulkan.deqp.level.xml \
frameworks/native/data/etc/android.hardware.vulkan.version-1_1.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.version.xml
# VNDK
PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS := strict
PRODUCT_ENFORCE_PRODUCT_PARTITION_INTERFACE := true
PRODUCT_PRODUCT_VNDK_VERSION := current
# WiFi
PRODUCT_PACKAGES += \
android.hardware.wifi@1.0-service \
android.hardware.wifi-service \
hostapd \
ipacm \
IPACM_cfg.xml \
libwifi-hal-ctrl \
libwifi-hal-qcom \
libwpa_client \
TetheringConfigOverlay \
WifiOverlay \
wpa_cli \
wpa_supplicant \
wpa_supplicant.conf
@@ -513,6 +569,7 @@ PRODUCT_COPY_FILES += \
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.wifi.direct.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.direct.xml \
frameworks/native/data/etc/android.hardware.wifi.aware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.aware.xml \
frameworks/native/data/etc/android.hardware.wifi.passpoint.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.passpoint.xml \
frameworks/native/data/etc/android.hardware.wifi.rtt.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.rtt.xml \
frameworks/native/data/etc/android.hardware.wifi.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.xml
@@ -524,3 +581,21 @@ PRODUCT_PROPERTY_OVERRIDES += \
# Mac Address Generator
PRODUCT_PACKAGES += \
wifi-mac-generator
# WiFi Display
PRODUCT_PACKAGES += \
android.media.audio.common.types-V4-cpp \
libbinder_shim \
libgui_shim \
libinput_shim \
libnl \
libwfdaac_vendor \
vendor.qti.hardware.display.config-V5-ndk
PRODUCT_BOOT_JARS += \
WfdCommon
# WiFi firmware symlinks
PRODUCT_PACKAGES += \
firmware_wlan_mac.bin_symlink \
firmware_WCNSS_qcom_cfg.ini_symlink

27
evolution.dependencies Normal file
View File

@@ -0,0 +1,27 @@
[
{
"repository": "vendor_xiaomi_cepheus",
"target_path": "vendor/xiaomi/cepheus"
},
{
"repository": "kernel_xiaomi_cepheus",
"target_path": "kernel/xiaomi/cepheus",
"branch": "bka"
},
{
"repository": "hardware_xiaomi",
"target_path": "hardware/xiaomi"
},
{
"repository": "nhansp/android_vendor_xiaomi_miuicamera",
"target_path": "vendor/xiaomi/miuicamera-cepheus",
"branch": "leica-5.0-cepheus",
"remote": "gitlab"
},
{
"repository": "crdroidandroid/android_prebuilts_clang_host_linux-x86_clang-r547379",
"target_path": "prebuilts/clang/host/linux-x86/clang-r547379",
"branch": "15.0",
"remote": "gitlab"
}
]

View File

@@ -61,14 +61,45 @@ fi
function blob_fixup() {
case "${1}" in
vendor/lib64/hw/camera.qcom.so)
sed -i "s|libc++.so|libc29.so|g" "${2}"
;;
system_ext/lib/libwfdmmsrc_system.so)
[ "$2" = "" ] && return 0
grep -q "libgui_shim.so" "${2}" || "${PATCHELF}" --add-needed "libgui_shim.so" "${2}"
;;
system_ext/lib/libwfdservice.so)
[ "$2" = "" ] && return 0
"${PATCHELF}" --replace-needed "android.media.audio.common.types-V1-cpp.so" "android.media.audio.common.types-V4-cpp.so" "${2}"
;;
system_ext/lib64/libwfdnative.so)
patchelf --remove-needed "android.hidl.base@1.0.so" "${2}"
[ "$2" = "" ] && return 0
"${PATCHELF}" --replace-needed "android.hidl.base@1.0.so" "libhidlbase.so" "${2}"
grep -q "libbinder_shim.so" "${2}" || "${PATCHELF}" --add-needed "libbinder_shim.so" "${2}"
grep -q "libinput_shim.so" "${2}" || "${PATCHELF}" --add-needed "libinput_shim.so" "${2}"
;;
vendor/bin/mi_thermald)
sed -i 's/%d\/on/%d\/../g' "${2}"
;;
vendor/lib64/hw/camera.qcom.so)
patchelf --remove-needed "libMegviiFacepp-0.5.2.so" "${2}"
patchelf --remove-needed "libmegface.so" "${2}"
patchelf --add-needed "libshim_megvii.so" "${2}"
;;
vendor/lib64/camera/components/com.qti.node.watermark.so)
"${PATCHELF}" --add-needed "libwatermark_shim.so" "${2}"
;;
proprietary/vendor/bin/sensors.qti | proprietary/vendor/lib64/libsnsapi.so | proprietary/vendor/lib64/libsnsdiaglog.so | proprietary/vendor/lib64/libssc.so | proprietary/vendor/lib64/libwvhidl.so | proprietary/vendor/lib64/mediadrm/libwvdrmengine.so | proprietary/vendor/lib64/sensors.ssc.so )
"${PATCHELF}" --replace-needed "libprotobuf-cpp-lite-3.9.1.so" "libprotobuf-cpp-full-3.9.1.so" "${2}"
;;
vendor/lib/libstagefright_soft_ddpdec.so | vendor/lib/libstagefright_soft_ac4dec.so | \
vendor/lib/libstagefrightdolby.so | vendor/lib64/libstagefright_soft_ddpdec.so | \
vendor/lib64/libdlbdsservice.so | vendor/lib64/libstagefright_soft_ac4dec.so | vendor/lib64/libstagefrightdolby.so)
"${PATCHELF}" --replace-needed "libstagefright_foundation.so" "libstagefright_foundation-v33.so" "${2}"
;;
vendor/lib64/libwvhidl.so | vendor/lib64/mediadrm/libwvdrmengine.so)
"${PATCHELF}" --add-needed "libcrypto_shim.so" "${2}"
;;
esac
}

19
fastcharge/Android.bp Normal file
View File

@@ -0,0 +1,19 @@
cc_binary {
name: "vendor.lineage.fastcharge@1.0-service.xiaomi_cepheus",
relative_install_path: "hw",
init_rc: ["vendor.lineage.fastcharge@1.0-service.xiaomi_cepheus.rc"],
vintf_fragments: ["vendor.lineage.fastcharge@1.0-service.xiaomi_cepheus.xml"],
vendor: true,
shared_libs: [
"libbase",
"libbinder",
"libcutils",
"libhidlbase",
"libutils",
"vendor.lineage.fastcharge@1.0",
],
srcs: [
"FastCharge.cpp",
"service.cpp",
],
}

98
fastcharge/FastCharge.cpp Normal file
View File

@@ -0,0 +1,98 @@
/*
* Copyright (C) 2023 The LineageOS 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.
*/
#define LOG_TAG "fastcharge@1.0-service.xiaomi_cepheus"
#define FASTCHARGE_DEFAULT_SETTING true
#define FASTCHARGE_PATH "/sys/class/qcom-battery/restrict_chg"
#include "FastCharge.h"
#include <android-base/logging.h>
#include <cutils/properties.h>
#include <fstream>
#include <iostream>
namespace vendor {
namespace lineage {
namespace fastcharge {
namespace V1_0 {
namespace implementation {
static constexpr const char *kFastChargingProp =
"persist.vendor.sec.fastchg_enabled";
/*
* Write value to path and close file.
*/
template <typename T> static void set(const std::string &path, const T &value) {
std::ofstream file(path);
if (!file) {
PLOG(ERROR) << "Failed to open: " << path;
return;
}
LOG(DEBUG) << "write: " << path << " value: " << value;
file << value << std::endl;
if (!file) {
PLOG(ERROR) << "Failed to write: " << path << " value: " << value;
}
}
template <typename T> static T get(const std::string &path, const T &def) {
std::ifstream file(path);
if (!file) {
PLOG(ERROR) << "Failed to open: " << path;
return def;
}
T result;
file >> result;
if (file.fail()) {
PLOG(ERROR) << "Failed to read: " << path;
return def;
} else {
LOG(DEBUG) << "read: " << path << " value: " << result;
return result;
}
}
FastCharge::FastCharge() {
setEnabled(property_get_bool(kFastChargingProp, FASTCHARGE_DEFAULT_SETTING));
}
Return<bool> FastCharge::isEnabled() { return get(FASTCHARGE_PATH, 0) < 1; }
Return<bool> FastCharge::setEnabled(bool enable) {
set(FASTCHARGE_PATH, enable ? 0 : 1);
bool enabled = isEnabled();
property_set(kFastChargingProp, enabled ? "true" : "false");
return enabled;
}
} // namespace implementation
} // namespace V1_0
} // namespace fastcharge
} // namespace lineage
} // namespace vendor

50
fastcharge/FastCharge.h Normal file
View File

@@ -0,0 +1,50 @@
/*
* Copyright (C) 2023 The LineageOS 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.
*/
#pragma once
#include <hidl/MQDescriptor.h>
#include <hidl/Status.h>
#include <vendor/lineage/fastcharge/1.0/IFastCharge.h>
namespace vendor {
namespace lineage {
namespace fastcharge {
namespace V1_0 {
namespace implementation {
using ::android::sp;
using ::android::hardware::hidl_array;
using ::android::hardware::hidl_memory;
using ::android::hardware::hidl_string;
using ::android::hardware::hidl_vec;
using ::android::hardware::Return;
using ::android::hardware::Void;
using ::vendor::lineage::fastcharge::V1_0::IFastCharge;
struct FastCharge : public IFastCharge {
FastCharge();
Return<bool> isEnabled() override;
Return<bool> setEnabled(bool enable) override;
};
} // namespace implementation
} // namespace V1_0
} // namespace fastcharge
} // namespace lineage
} // namespace vendor

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018 The LineageOS Project
* Copyright (C) 2023 The LineageOS Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,37 +14,37 @@
* limitations under the License.
*/
#define LOG_TAG "android.hardware.light@2.0-service.cepheus"
#define LOG_TAG "fastcharge@1.0-service.xiaomi_cepheus"
#include <android-base/logging.h>
#include <hidl/HidlTransportSupport.h>
#include "Light.h"
#include "FastCharge.h"
using android::hardware::configureRpcThreadpool;
using android::hardware::joinRpcThreadpool;
using android::hardware::light::V2_0::ILight;
using android::hardware::light::V2_0::implementation::Light;
using vendor::lineage::fastcharge::V1_0::IFastCharge;
using vendor::lineage::fastcharge::V1_0::implementation::FastCharge;
using android::OK;
using android::sp;
using android::status_t;
int main() {
sp<ILight> service = new Light();
android::sp<FastCharge> service = new FastCharge();
configureRpcThreadpool(1, true);
configureRpcThreadpool(1, true);
status_t status = service->registerAsService();
if (status != OK) {
ALOGE("Cannot register Light HAL service.");
return 1;
}
ALOGI("Light HAL service ready.");
joinRpcThreadpool();
ALOGI("Light HAL service failed to join thread pool.");
status_t status = service->registerAsService();
if (status != OK) {
LOG(ERROR) << "Cannot register FastCharge HAL service.";
return 1;
}
LOG(INFO) << "FastCharge HAL service ready.";
joinRpcThreadpool();
LOG(ERROR) << "FastCharge HAL service failed to join thread pool.";
return 1;
}

View File

@@ -0,0 +1,4 @@
service vendor.fastcharge-hal-1-0 /vendor/bin/hw/vendor.lineage.fastcharge@1.0-service.xiaomi_cepheus
class hal
user system
group system

View File

@@ -0,0 +1,11 @@
<manifest version="1.0" type="device">
<hal format="hidl">
<name>vendor.lineage.fastcharge</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IFastCharge</name>
<instance>default</instance>
</interface>
</hal>
</manifest>

View File

@@ -18,6 +18,10 @@
#include <drm/sde_drm.h>
#include <compositionengine/UdfpsExtension.h>
uint32_t getUdfpsDimZOrder(uint32_t z) {
return z;
}
uint32_t getUdfpsZOrder(uint32_t z, bool touched) {
if (touched) {
z |= FOD_PRESSED_LAYER_ZORDER;

View File

@@ -649,7 +649,7 @@ void GnssAPIClient::onGnssNmeaCb(GnssNmeaNotification gnssNmeaNotification)
auto gnssCbIface_2_1(mGnssCbIface_2_1);
mMutex.unlock();
if (gnssCbIface != nullptr || gnssCbIface_2_0 != nullptr| gnssCbIface_2_1 != nullptr) {
if (gnssCbIface != nullptr || gnssCbIface_2_0 != nullptr || gnssCbIface_2_1 != nullptr) {
const std::string s(gnssNmeaNotification.nmea);
std::stringstream ss(s);
std::string each;

View File

@@ -186,13 +186,14 @@ BatteryListenerImpl::~BatteryListenerImpl()
{
{
std::lock_guard<std::mutex> _l(mLock);
if (mHealth != NULL)
if (mHealth != NULL) {
mHealth->unregisterCallback(this);
auto r = mHealth->unlinkToDeath(this);
if (!r.isOk() || r == false) {
LOC_LOGe("Transaction error in unregister to HealthHAL death: %s",
r.description().c_str());
}
}
}
mDone = true;
mThread->join();

View File

@@ -40,7 +40,6 @@ extern "C" {
#endif
#include <cutils/properties.h>
#include <cutils/threads.h>
#include <cutils/sched_policy.h>
#include <cutils/android_filesystem_config.h>
#include <string.h>

View File

@@ -312,7 +312,7 @@ public:
inline LocIpcRunnable(LocIpc& locIpc, unique_ptr<LocIpcRecver>& ipcRecver) :
mAbortCalled(false),
mLocIpc(locIpc),
mIpcRecver(move(ipcRecver)) {}
mIpcRecver(std::move(ipcRecver)) {}
inline bool run() override {
if (mIpcRecver != nullptr) {
mLocIpc.startBlockingListening(*(mIpcRecver.get()));

View File

@@ -0,0 +1,17 @@
cc_library_shared {
name: "libqti-perfd-client",
proprietary: true,
defaults: ["hidl_defaults"],
srcs: [
"client.c",
],
cflags: [
"-Werror",
"-Wextra",
"-Wall",
],
shared_libs: [
"libutils",
"liblog",
],
}

View File

@@ -0,0 +1,24 @@
#define LOG_TAG "libqti-perfd-client"
#include <stdint.h>
#include <log/log.h>
void perf_get_feedback() {}
void perf_hint() {}
int perf_lock_acq(int handle, int duration, int arg3[], int arg4) {
ALOGI("perf_lock_acq: handle: %d, duration: %d, arg3[0]: %d, arg4: %d",
handle, duration, arg3[0], arg4);
if (handle > 0)
return handle;
return 233;
}
void perf_lock_cmd() {}
int perf_lock_rel(int handle) {
ALOGI("perf_lock_rel: handle: %d", handle);
if (handle > 0)
return handle;
return 233;
}
void perf_lock_use_profile() {}

11
libshim/Android.bp Normal file
View File

@@ -0,0 +1,11 @@
//
// Copyright (C) 2021 The LineageOS Project
//
// SPDX-License-Identifier: Apache-2.0
//
cc_library_shared {
name: "libwatermark_shim",
srcs: ["libwatermark_shim.c"],
vendor: true,
}

View File

@@ -0,0 +1 @@
void _ZN4piex19GetPreviewImageDataEPNS_15StreamInterfaceEPNS_16PreviewImageDataE() {}

View File

@@ -1,164 +0,0 @@
/*
* Copyright (C) 2019 The Android Open Source Project
* Copyright (C) 2020-2021 The LineageOS 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.
*/
#define LOG_TAG "android.hardware.lights-service_cepheus"
#include "Lights.h"
#include <android-base/file.h>
#include <android-base/logging.h>
namespace {
/* clang-format off */
#define PPCAT_NX(A, B) A/B
#define PPCAT(A, B) PPCAT_NX(A, B)
#define STRINGIFY_INNER(x) #x
#define STRINGIFY(x) STRINGIFY_INNER(x)
#define LEDS(x) PPCAT(/sys/class/leds, x)
#define WHITE_ATTR(x) STRINGIFY(PPCAT(LEDS(white), x))
/* clang-format on */
using ::android::base::ReadFileToString;
using ::android::base::WriteStringToFile;
// Default max brightness
constexpr auto kDefaultMaxLedBrightness = 255;
// Write value to path and close file.
bool WriteToFile(const std::string& path, uint32_t content) {
return WriteStringToFile(std::to_string(content), path);
}
uint32_t RgbaToBrightness(uint32_t color) {
// Extract brightness from AARRGGBB.
uint32_t alpha = (color >> 24) & 0xFF;
// Retrieve each of the RGB colors
uint32_t red = (color >> 16) & 0xFF;
uint32_t green = (color >> 8) & 0xFF;
uint32_t blue = color & 0xFF;
// Scale RGB colors if a brightness has been applied by the user
if (alpha != 0xFF) {
red = red * alpha / 0xFF;
green = green * alpha / 0xFF;
blue = blue * alpha / 0xFF;
}
return (77 * red + 150 * green + 29 * blue) >> 8;
}
inline uint32_t RgbaToBrightness(uint32_t color, uint32_t max_brightness) {
return RgbaToBrightness(color) * max_brightness / 0xFF;
}
inline bool IsLit(uint32_t color) {
return color & 0x00ffffff;
}
} // anonymous namespace
namespace aidl {
namespace android {
namespace hardware {
namespace light {
Lights::Lights() {
std::map<int, std::function<void(int id, const HwLightState&)>> lights_{
{(int)LightType::NOTIFICATIONS,
[this](auto&&... args) { setLightNotification(args...); }},
{(int)LightType::BATTERY, [this](auto&&... args) { setLightNotification(args...); }},
{(int)LightType::BACKLIGHT, {}}};
std::vector<HwLight> availableLights;
for (auto const& pair : lights_) {
int id = pair.first;
HwLight hwLight{};
hwLight.id = id;
availableLights.emplace_back(hwLight);
}
mAvailableLights = availableLights;
mLights = lights_;
std::string buf;
if (ReadFileToString(WHITE_ATTR(max_brightness), &buf)) {
max_led_brightness_ = std::stoi(buf);
} else {
max_led_brightness_ = kDefaultMaxLedBrightness;
LOG(ERROR) << "Failed to read max LED brightness, fallback to " << kDefaultMaxLedBrightness;
}
}
ndk::ScopedAStatus Lights::setLightState(int id, const HwLightState& state) {
auto it = mLights.find(id);
if (it == mLights.end()) {
LOG(ERROR) << "Light not supported";
return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
}
it->second(id, state);
return ndk::ScopedAStatus::ok();
}
ndk::ScopedAStatus Lights::getLights(std::vector<HwLight>* lights) {
for (auto i = mAvailableLights.begin(); i != mAvailableLights.end(); i++) {
lights->push_back(*i);
}
return ndk::ScopedAStatus::ok();
}
void Lights::setLightNotification(int id, const HwLightState& state) {
bool found = false;
for (auto&& [cur_id, cur_state] : notif_states_) {
if (cur_id == id) {
cur_state = state;
}
// Fallback to battery light
if (!found && (cur_id == (int)LightType::BATTERY || IsLit(cur_state.color))) {
found = true;
LOG(DEBUG) << __func__ << ": id=" << id;
applyNotificationState(cur_state);
}
}
}
void Lights::applyNotificationState(const HwLightState& state) {
uint32_t white_brightness = RgbaToBrightness(state.color, max_led_brightness_);
WriteToFile(WHITE_ATTR(breath), 0);
if (state.flashMode == FlashMode::TIMED && state.flashOnMs > 0 && state.flashOffMs > 0) {
LOG(DEBUG) << __func__ << ": color=" << std::hex << state.color << std::dec
<< " onMs=" << state.flashOnMs << " offMs=" << state.flashOffMs;
// White
WriteToFile(WHITE_ATTR(delay_off), static_cast<uint32_t>(state.flashOffMs));
WriteToFile(WHITE_ATTR(delay_on), static_cast<uint32_t>(state.flashOnMs));
WriteToFile(WHITE_ATTR(breath), 1);
} else {
WriteToFile(WHITE_ATTR(brightness), white_brightness);
}
}
} // namespace light
} // namespace hardware
} // namespace android
} // namespace aidl

View File

@@ -1,56 +0,0 @@
/*
* Copyright (C) 2020 The Android Open Source Project
* Copyright (C) 2020-2021 The LineageOS 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.
*/
#pragma once
#include <aidl/android/hardware/light/BnLights.h>
#include <hardware/hardware.h>
#include <hardware/lights.h>
#include <map>
#include <sstream>
namespace aidl {
namespace android {
namespace hardware {
namespace light {
class Lights : public BnLights {
public:
Lights();
ndk::ScopedAStatus setLightState(int id, const HwLightState& state) override;
ndk::ScopedAStatus getLights(std::vector<HwLight>* types) override;
private:
void setLightNotification(int id, const HwLightState& state);
void applyNotificationState(const HwLightState& state);
uint32_t max_led_brightness_;
std::map<int, std::function<void(int id, const HwLightState&)>> mLights;
std::vector<HwLight> mAvailableLights;
// Keep sorted in the order of importance.
std::array<std::pair<int, HwLightState>, 2> notif_states_ = {{
{(int)LightType::NOTIFICATIONS, {}},
{(int)LightType::BATTERY, {}},
}};
};
} // namespace light
} // namespace hardware
} // namespace android
} // namespace aidl

View File

@@ -1,16 +0,0 @@
on boot
chown system system /sys/class/backlight/panel0-backlight/brightness
chown system system /sys/class/backlight/panel0-backlight/max_brightness
chown system system /sys/class/leds/white/brightness
chown system system /sys/class/leds/white/breath
chmod 0644 /sys/class/backlight/panel0-backlight/brightness
chmod 0644 /sys/class/backlight/panel0-backlight/max_brightness
chmod 0644 /sys/class/leds/white/brightness
chmod 0644 /sys/class/leds/white/breath
service vendor.light /vendor/bin/hw/android.hardware.lights-service.cepheus
class hal
user system
group system
shutdown critical

View File

@@ -1,6 +0,0 @@
<manifest version="1.0" type="device">
<hal format="aidl">
<name>android.hardware.light</name>
<fqname>ILights/default</fqname>
</hal>
</manifest>

View File

@@ -1,37 +0,0 @@
/*
* Copyright (C) 2020 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.
*/
#include <android-base/logging.h>
#include <android/binder_manager.h>
#include <android/binder_process.h>
#include "Lights.h"
using ::aidl::android::hardware::light::Lights;
int main() {
ABinderProcess_setThreadPoolMaxThreadCount(0);
std::shared_ptr<Lights> lights = ndk::SharedRefBase::make<Lights>();
if (!lights) {
return EXIT_FAILURE;
}
const std::string instance = std::string() + Lights::descriptor + "/default";
binder_status_t status = AServiceManager_addService(lights->asBinder().get(), instance.c_str());
CHECK(status == STATUS_OK);
ABinderProcess_joinThreadPool();
return EXIT_FAILURE; // should not reached
}

View File

@@ -1,231 +0,0 @@
/*
* Copyright (C) 2018-2019 The LineageOS 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.
*/
#define LOG_TAG "android.hardware.light@2.0-service.cepheus"
#include <log/log.h>
#include "Light.h"
#include <fstream>
#define NOTIFICATION_LED "/sys/class/leds/white/"
#define BREATH "breath"
#define BRIGHTNESS "brightness"
#define MAX_BRIGHTNESS "max_brightness"
namespace {
/*
* Write value to path and close file.
*/
static void set(std::string path, std::string value) {
std::ofstream file(path);
if (!file.is_open()) {
ALOGW("failed to write %s to %s", value.c_str(), path.c_str());
return;
}
file << value;
}
static void set(std::string path, int value) {
set(path, std::to_string(value));
}
/*
* Read max brightness from path and close file.
*/
static int getMaxBrightness(std::string path) {
std::ifstream file(path);
int value;
if (!file.is_open()) {
ALOGW("failed to read from %s", path.c_str());
return 0;
}
file >> value;
return value;
}
static uint32_t getBrightness(const LightState& state) {
uint32_t alpha, red, green, blue;
/*
* Extract brightness from AARRGGBB.
*/
alpha = (state.color >> 24) & 0xFF;
red = (state.color >> 16) & 0xFF;
green = (state.color >> 8) & 0xFF;
blue = state.color & 0xFF;
/*
* Scale RGB brightness using Alpha brightness.
*/
red = red * alpha / 0xFF;
green = green * alpha / 0xFF;
blue = blue * alpha / 0xFF;
return (77 * red + 150 * green + 29 * blue) >> 8;
}
static inline uint32_t scaleBrightness(uint32_t brightness, uint32_t maxBrightness) {
if (brightness == 0) {
return 0;
}
return (brightness - 1) * (maxBrightness - 1) / (0xFF - 1) + 1;
}
static inline uint32_t getScaledBrightness(const LightState& state, uint32_t maxBrightness) {
return scaleBrightness(getBrightness(state), maxBrightness);
}
static void handleNotification(const LightState& state) {
uint32_t whiteBrightness = getScaledBrightness(state, getMaxBrightness(NOTIFICATION_LED MAX_BRIGHTNESS));
/* Disable breathing or blinking */
set(NOTIFICATION_LED BREATH, 0);
set(NOTIFICATION_LED BRIGHTNESS, 0);
if (!whiteBrightness) {
return;
}
switch (state.flashMode) {
case Flash::HARDWARE:
case Flash::TIMED:
/* Breathing */
set(NOTIFICATION_LED BREATH, 1);
break;
case Flash::NONE:
default:
set(NOTIFICATION_LED BRIGHTNESS, whiteBrightness);
}
}
static inline bool isStateLit(const LightState& state) {
return state.color & 0x00ffffff;
}
static inline bool isStateEqual(const LightState& first, const LightState& second) {
if (first.color == second.color && first.flashMode == second.flashMode &&
first.flashOnMs == second.flashOnMs &&
first.flashOffMs == second.flashOffMs &&
first.brightnessMode == second.brightnessMode) {
return true;
}
return false;
}
/* Keep sorted in the order of importance. */
static std::vector<LightBackend> backends = {
{ Type::ATTENTION, handleNotification },
{ Type::NOTIFICATIONS, handleNotification },
{ Type::BATTERY, handleNotification },
};
static LightStateHandler findHandler(Type type) {
for (const LightBackend& backend : backends) {
if (backend.type == type) {
return backend.handler;
}
}
return nullptr;
}
static LightState findLitState(LightStateHandler handler) {
LightState emptyState;
for (const LightBackend& backend : backends) {
if (backend.handler == handler) {
if (isStateLit(backend.state)) {
return backend.state;
}
emptyState = backend.state;
}
}
return emptyState;
}
static void updateState(Type type, const LightState& state) {
for (LightBackend& backend : backends) {
if (backend.type == type) {
backend.state = state;
}
}
}
} // anonymous namespace
namespace android {
namespace hardware {
namespace light {
namespace V2_0 {
namespace implementation {
Return<Status> Light::setLight(Type type, const LightState& state) {
/* Lock global mutex until light state is updated. */
std::lock_guard<std::mutex> lock(globalLock);
LightStateHandler handler = findHandler(type);
if (!handler) {
/* If no handler has been found, then the type is not supported. */
return Status::LIGHT_NOT_SUPPORTED;
}
/* Find the old state of the current handler. */
LightState oldState = findLitState(handler);
/* Update the cached state value for the current type. */
updateState(type, state);
/* Find the new state of the current handler. */
LightState newState = findLitState(handler);
if (isStateEqual(oldState, newState)) {
return Status::SUCCESS;
}
handler(newState);
return Status::SUCCESS;
}
Return<void> Light::getSupportedTypes(getSupportedTypes_cb _hidl_cb) {
std::vector<Type> types;
for (const LightBackend& backend : backends) {
types.push_back(backend.type);
}
_hidl_cb(types);
return Void();
}
} // namespace implementation
} // namespace V2_0
} // namespace light
} // namespace hardware
} // namespace android

View File

@@ -1,68 +0,0 @@
/*
* Copyright (C) 2018 The LineageOS 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.
*/
#ifndef ANDROID_HARDWARE_LIGHT_V2_0_LIGHT_H
#define ANDROID_HARDWARE_LIGHT_V2_0_LIGHT_H
#include <android/hardware/light/2.0/ILight.h>
#include <hardware/lights.h>
#include <hidl/Status.h>
#include <map>
#include <mutex>
#include <vector>
using ::android::hardware::Return;
using ::android::hardware::Void;
using ::android::hardware::light::V2_0::Flash;
using ::android::hardware::light::V2_0::ILight;
using ::android::hardware::light::V2_0::LightState;
using ::android::hardware::light::V2_0::Status;
using ::android::hardware::light::V2_0::Type;
typedef void (*LightStateHandler)(const LightState&);
struct LightBackend {
Type type;
LightState state;
LightStateHandler handler;
LightBackend(Type type, LightStateHandler handler) : type(type), handler(handler) {
this->state.color = 0xff000000;
}
};
namespace android {
namespace hardware {
namespace light {
namespace V2_0 {
namespace implementation {
class Light : public ILight {
public:
Return<Status> setLight(Type type, const LightState& state) override;
Return<void> getSupportedTypes(getSupportedTypes_cb _hidl_cb) override;
private:
std::mutex globalLock;
};
} // namespace implementation
} // namespace V2_0
} // namespace light
} // namespace hardware
} // namespace android
#endif // ANDROID_HARDWARE_LIGHT_V2_0_LIGHT_H

View File

@@ -1,18 +0,0 @@
on boot
chown system system /sys/class/backlight/panel0-backlight/brightness
chown system system /sys/class/backlight/panel0-backlight/max_brightness
chown system system /sys/class/leds/white/brightness
chown system system /sys/class/leds/white/breath
chmod 0644 /sys/class/backlight/panel0-backlight/brightness
chmod 0644 /sys/class/backlight/panel0-backlight/max_brightness
chmod 0644 /sys/class/leds/white/brightness
chmod 0644 /sys/class/leds/white/breath
service vendor.light-hal-2-0 /vendor/bin/hw/android.hardware.light@2.0-service.cepheus
interface android.hardware.light@2.0::ILight default
class hal
user system
group system
# shutting off lights while powering-off
shutdown critical

View File

@@ -21,21 +21,22 @@ $(call inherit-product, $(SRC_TARGET_DIR)/product/full_base_telephony.mk)
# Inherit from cepheus device
$(call inherit-product, device/xiaomi/cepheus/device.mk)
# Inherit some common PE stuff.
$(call inherit-product, vendor/aosp/config/common_full_phone.mk)
# Inherit some common EvolutionX stuff.
$(call inherit-product, vendor/lineage/config/common_full_phone.mk)
# Boot animation
BUILD_SEEDVAULT := true
TARGET_BOOT_ANIMATION_RES := 1080
TARGET_HAS_UDFPS := true
TARGET_INCLUDE_ACCORD = false
TARGET_USES_MINI_GAPPS := true
# Device identifier
PRODUCT_NAME := aosp_cepheus
PRODUCT_NAME := lineage_cepheus
PRODUCT_DEVICE := cepheus
PRODUCT_BRAND := Xiaomi
PRODUCT_MODEL := Mi 9
PRODUCT_MANUFACTURER := Xiaomi
# Recovery
TARGET_USES_AOSP_RECOVERY := true
PRODUCT_GMS_CLIENTID_BASE := android-xiaomi
# Include firmware
$(call inherit-product, vendor/xiaomi-firmware/cepheus/firmware.mk)
BUILD_FINGERPRINT := Xiaomi/cepheus/cepheus:11/RKQ1.200826.002/V12.5.6.0.RFACNXM:user/release-keys

View File

@@ -1,4 +1,5 @@
// Copyright (C) 2019 The LineageOS Project
//
// Copyright (C) 2019-2020 The LineageOS Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -13,40 +14,26 @@
// limitations under the License.
cc_binary {
relative_install_path: "hw",
name: "vendor.lineage.livedisplay@2.1-service.cepheus",
vintf_fragments: ["vendor.lineage.livedisplay@2.1-service.cepheus.xml"],
init_rc: ["vendor.lineage.livedisplay@2.1-service.cepheus.rc"],
defaults: ["hidl_defaults"],
name: "android.hardware.light@2.0-service.cepheus",
init_rc: ["hidl/android.hardware.light@2.0-service.cepheus.rc"],
srcs: [
"hidl/service.cpp",
"hidl/Light.cpp",
],
vendor: true,
shared_libs: [
"android.hardware.light@2.0",
"libbase",
"libhardware",
"libhidlbase",
"liblog",
"libutils",
],
}
cc_binary {
name: "android.hardware.lights-service.cepheus",
relative_install_path: "hw",
init_rc: ["aidl/android.hardware.lights.cepheus.rc"],
vintf_fragments: ["aidl/android.hardware.lights.cepheus.xml"],
srcs: [
":vendor.lineage.livedisplay@2.0-sdm-utils",
"SunlightEnhancement.cpp",
"service.cpp",
],
vendor: true,
shared_libs: [
"libbase",
"liblog",
"libhardware",
"libbinder_ndk",
"android.hardware.light-V1-ndk_platform",
"libbinder",
"libhidlbase",
"libutils",
"vendor.lineage.livedisplay@2.0",
"vendor.lineage.livedisplay@2.1",
],
srcs: [
"aidl/Lights.cpp",
"aidl/main.cpp",
header_libs: [
"vendor.lineage.livedisplay@2.0-sdm-headers",
],
}

View File

@@ -0,0 +1,55 @@
/*
* Copyright (C) 2019-2020 The LineageOS 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.
*/
#define LOG_TAG "SunlightEnhancementService"
#include <android-base/file.h>
#include <android-base/logging.h>
#include <android-base/strings.h>
#include "SunlightEnhancement.h"
namespace vendor {
namespace lineage {
namespace livedisplay {
namespace V2_1 {
namespace implementation {
static constexpr const char* kHbmStatusPath =
"/sys/devices/platform/soc/soc:qcom,dsi-display-primary/hbm";
Return<bool> SunlightEnhancement::isEnabled() {
std::string buf;
if (!android::base::ReadFileToString(kHbmStatusPath, &buf)) {
LOG(ERROR) << "Failed to read " << kHbmStatusPath;
return false;
}
return std::stoi(android::base::Trim(buf)) == 1;
}
Return<bool> SunlightEnhancement::setEnabled(bool enabled) {
if (!android::base::WriteStringToFile((enabled ? "1" : "0"), kHbmStatusPath)) {
LOG(ERROR) << "Failed to write " << kHbmStatusPath;
return false;
}
return true;
}
} // namespace implementation
} // namespace V2_1
} // namespace livedisplay
} // namespace lineage
} // namespace vendor

View File

@@ -0,0 +1,47 @@
/*
* Copyright (C) 2019-2020 The LineageOS 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.
*/
#ifndef VENDOR_LINEAGE_LIVEDISPLAY_V2_1_SUNLIGHTENHANCEMENT_H
#define VENDOR_LINEAGE_LIVEDISPLAY_V2_1_SUNLIGHTENHANCEMENT_H
#include <hidl/MQDescriptor.h>
#include <hidl/Status.h>
#include <vendor/lineage/livedisplay/2.1/ISunlightEnhancement.h>
namespace vendor {
namespace lineage {
namespace livedisplay {
namespace V2_1 {
namespace implementation {
using ::android::hardware::Return;
using ::android::hardware::Void;
using ::android::sp;
class SunlightEnhancement : public ISunlightEnhancement {
public:
// Methods from ::vendor::lineage::livedisplay::V2_1::ISunlightEnhancement follow.
Return<bool> isEnabled() override;
Return<bool> setEnabled(bool enabled) override;
};
} // namespace implementation
} // namespace V2_1
} // namespace livedisplay
} // namespace lineage
} // namespace vendor
#endif // VENDOR_LINEAGE_LIVEDISPLAY_V2_1_SUNLIGHTENHANCEMENT_H

54
livedisplay/service.cpp Normal file
View File

@@ -0,0 +1,54 @@
/*
* Copyright (C) 2019-2020 The LineageOS 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.
*/
#define LOG_TAG "vendor.lineage.livedisplay@2.1-service.cepheus"
#include <android-base/logging.h>
#include <binder/ProcessState.h>
#include <hidl/HidlTransportSupport.h>
#include "SunlightEnhancement.h"
#include "livedisplay/sdm/SDMController.h"
using android::OK;
using android::sp;
using android::status_t;
using ::vendor::lineage::livedisplay::V2_0::sdm::SDMController;
using ::vendor::lineage::livedisplay::V2_1::ISunlightEnhancement;
using ::vendor::lineage::livedisplay::V2_1::implementation::SunlightEnhancement;
int main() {
status_t status = OK;
std::shared_ptr<SDMController> controller = std::make_shared<SDMController>();
sp<SunlightEnhancement> se = new SunlightEnhancement();
android::hardware::configureRpcThreadpool(1, true /*callerWillJoin*/);
// SunlightEnhancement service
status = se->registerAsService();
if (status != OK) {
LOG(ERROR) << "Could not register service for LiveDisplay HAL SunlightEnhancement Iface ("
<< status << ")";
return 1;
}
LOG(INFO) << "LiveDisplay HAL service is ready.";
android::hardware::joinRpcThreadpool();
LOG(ERROR) << "LiveDisplay HAL service failed to join thread pool.";
return 1;
}

View File

@@ -0,0 +1,8 @@
on boot
chown system system /sys/devices/platform/soc/soc:qcom,dsi-display-primary/hbm
chmod 0660 /sys/devices/platform/soc/soc:qcom,dsi-display-primary/hbm
service vendor.livedisplay-hal-2-1 /vendor/bin/hw/vendor.lineage.livedisplay@2.1-service.cepheus
class hal
user system
group system

View File

@@ -0,0 +1,8 @@
<manifest version="1.0" type="device">
<hal format="hidl">
<name>vendor.lineage.livedisplay</name>
<transport>hwbinder</transport>
<fqname>@2.0::IPictureAdjustment/default</fqname>
<fqname>@2.1::ISunlightEnhancement/default</fqname>
</hal>
</manifest>

View File

@@ -1,22 +0,0 @@
<!--
* Copyright (c) 2018, 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.
*/
-->
<resources>
<!-- Radius of the software rounded corners at the bottom of the display in its natural
orientation. If zero, the value of rounded_corner_radius is used. -->
<dimen name="rounded_corner_content_padding">16dp</dimen>
</resources>

File diff suppressed because it is too large Load Diff

View File

@@ -1,21 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
* Copyright (c) 2017, 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.
*/
-->
<resources>
<!-- Defines the custom proximity sensor used by various OEMs like OnePlus-->
<string name="config_custom_tilt">xiaomi.sensor.pickup</string>
</resources>

View File

@@ -6,6 +6,9 @@
android_app {
name: "XiaomiParts",
defaults: [
"SettingsLibDefaults",
],
srcs: ["src/**/*.java"],
resource_dirs: ["res"],
@@ -15,7 +18,10 @@ android_app {
privileged: true,
static_libs: [
"org.pixelexperience.settings.resources",
"androidx.core_core",
"androidx.preference_preference",
"org.lineageos.settings.resources",
"SettingsLib",
],
optimize: {

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2015-2016 The CyanogenMod Project
2017-2018 The LineageOS Project
2017-2021, 2025 The LineageOS Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -42,59 +42,25 @@
</intent-filter>
</receiver>
<activity
android:name=".dirac.DiracActivity"
android:label="@string/dirac_title"
android:theme="@style/Theme.SubSettingsBase">
<intent-filter>
<action android:name="com.android.settings.action.IA_SETTINGS" />
</intent-filter>
<meta-data android:name="com.android.settings.category"
android:value="com.android.settings.category.ia.sound" />
<meta-data
android:name="com.android.settings.summary"
android:resource="@string/dirac_summary" />
</activity>
<service android:name=".doze.DozeService"
android:permission="XiaomiDozeService">
</service>
<service
android:name=".display.DcDimmingTileService"
android:icon="@drawable/ic_dc_tile"
android:label="@string/dc_dimming_enable_title"
android:permission="android.permission.BIND_QUICK_SETTINGS_TILE">
<intent-filter>
<action
android:name="android.service.quicksettings.action.QS_TILE"/>
</intent-filter>
android:name=".thermal.ThermalService"
android:permission="ThermalService">
</service>
<activity
android:name=".doze.DozeSettingsActivity"
android:label="@string/ambient_display_title"
android:theme="@style/Theme.SubSettingsBase">
<intent-filter>
<action android:name="org.lineageos.settings.device.DOZE_SETTINGS" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".display.DcDimmingSettingsActivity"
android:label="@string/dc_dimming_enable_title"
android:theme="@style/Theme.SubSettingsBase">
<intent-filter>
<action android:name="com.android.settings.action.IA_SETTINGS" />
</intent-filter>
<meta-data
android:name="com.android.settings.category"
android:value="com.android.settings.category.ia.display" />
<meta-data
android:name="com.android.settings.summary"
android:resource="@string/dc_dimming_enable_summary" />
</activity>
<activity
@@ -111,5 +77,30 @@
android:resource="@string/clear_speaker_summary" />
</activity>
<activity
android:name=".thermal.ThermalActivity"
android:label="@string/thermal_title"
android:theme="@style/Theme.SubSettingsBase">
<intent-filter>
<action android:name="com.android.settings.action.IA_SETTINGS" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<meta-data
android:name="com.android.settings.category"
android:value="com.android.settings.category.ia.system" />
<meta-data
android:name="com.android.settings.icon"
android:resource="@drawable/ic_settings_thermal" />
<meta-data
android:name="com.android.settings.icon_tintable"
android:value="true" />
<meta-data
android:name="com.android.settings.order"
android:value="-255" />
<meta-data
android:name="com.android.settings.summary"
android:resource="@string/thermal_summary" />
</activity>
</application>
</manifest>

View File

@@ -1,7 +1,3 @@
-keep class org.lineageos.settings.dirac.* {
*;
}
-keep class org.lineageos.settings.doze.* {
*;
}

View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2018 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.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@android:color/black" />
</selector>

View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2018 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.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="#82000000" />
</selector>

View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2019-2020 The LineageOS 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.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@*android:color/material_grey_600" android:state_activated="false" />
<item android:color="?android:attr/colorAccent" android:state_activated="true" />
</selector>

View File

@@ -1,8 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:height="24dp"
android:width="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path android:fillColor="#fff" android:pathData="M14,8.5A1.5,1.5 0 0,0 12.5,10A1.5,1.5 0 0,0 14,11.5A1.5,1.5 0 0,0 15.5,10A1.5,1.5 0 0,0 14,8.5M14,12.5A1.5,1.5 0 0,0 12.5,14A1.5,1.5 0 0,0 14,15.5A1.5,1.5 0 0,0 15.5,14A1.5,1.5 0 0,0 14,12.5M10,17A1,1 0 0,0 9,18A1,1 0 0,0 10,19A1,1 0 0,0 11,18A1,1 0 0,0 10,17M10,8.5A1.5,1.5 0 0,0 8.5,10A1.5,1.5 0 0,0 10,11.5A1.5,1.5 0 0,0 11.5,10A1.5,1.5 0 0,0 10,8.5M14,20.5A0.5,0.5 0 0,0 13.5,21A0.5,0.5 0 0,0 14,21.5A0.5,0.5 0 0,0 14.5,21A0.5,0.5 0 0,0 14,20.5M14,17A1,1 0 0,0 13,18A1,1 0 0,0 14,19A1,1 0 0,0 15,18A1,1 0 0,0 14,17M21,13.5A0.5,0.5 0 0,0 20.5,14A0.5,0.5 0 0,0 21,14.5A0.5,0.5 0 0,0 21.5,14A0.5,0.5 0 0,0 21,13.5M18,5A1,1 0 0,0 17,6A1,1 0 0,0 18,7A1,1 0 0,0 19,6A1,1 0 0,0 18,5M18,9A1,1 0 0,0 17,10A1,1 0 0,0 18,11A1,1 0 0,0 19,10A1,1 0 0,0 18,9M18,17A1,1 0 0,0 17,18A1,1 0 0,0 18,19A1,1 0 0,0 19,18A1,1 0 0,0 18,17M18,13A1,1 0 0,0 17,14A1,1 0 0,0 18,15A1,1 0 0,0 19,14A1,1 0 0,0 18,13M10,12.5A1.5,1.5 0 0,0 8.5,14A1.5,1.5 0 0,0 10,15.5A1.5,1.5 0 0,0 11.5,14A1.5,1.5 0 0,0 10,12.5M10,7A1,1 0 0,0 11,6A1,1 0 0,0 10,5A1,1 0 0,0 9,6A1,1 0 0,0 10,7M10,3.5A0.5,0.5 0 0,0 10.5,3A0.5,0.5 0 0,0 10,2.5A0.5,0.5 0 0,0 9.5,3A0.5,0.5 0 0,0 10,3.5M10,20.5A0.5,0.5 0 0,0 9.5,21A0.5,0.5 0 0,0 10,21.5A0.5,0.5 0 0,0 10.5,21A0.5,0.5 0 0,0 10,20.5M3,13.5A0.5,0.5 0 0,0 2.5,14A0.5,0.5 0 0,0 3,14.5A0.5,0.5 0 0,0 3.5,14A0.5,0.5 0 0,0 3,13.5M14,3.5A0.5,0.5 0 0,0 14.5,3A0.5,0.5 0 0,0 14,2.5A0.5,0.5 0 0,0 13.5,3A0.5,0.5 0 0,0 14,3.5M14,7A1,1 0 0,0 15,6A1,1 0 0,0 14,5A1,1 0 0,0 13,6A1,1 0 0,0 14,7M21,10.5A0.5,0.5 0 0,0 21.5,10A0.5,0.5 0 0,0 21,9.5A0.5,0.5 0 0,0 20.5,10A0.5,0.5 0 0,0 21,10.5M6,5A1,1 0 0,0 5,6A1,1 0 0,0 6,7A1,1 0 0,0 7,6A1,1 0 0,0 6,5M3,9.5A0.5,0.5 0 0,0 2.5,10A0.5,0.5 0 0,0 3,10.5A0.5,0.5 0 0,0 3.5,10A0.5,0.5 0 0,0 3,9.5M6,9A1,1 0 0,0 5,10A1,1 0 0,0 6,11A1,1 0 0,0 7,10A1,1 0 0,0 6,9M6,17A1,1 0 0,0 5,18A1,1 0 0,0 6,19A1,1 0 0,0 7,18A1,1 0 0,0 6,17M6,13A1,1 0 0,0 5,14A1,1 0 0,0 6,15A1,1 0 0,0 7,14A1,1 0 0,0 6,13Z" />
</vector>

View File

@@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M15,13L15,5c0,-1.66 -1.34,-3 -3,-3S9,3.34 9,5v8c-1.21,0.91 -2,2.37 -2,4 0,2.76 2.24,5 5,5s5,-2.24 5,-5c0,-1.63 -0.79,-3.09 -2,-4zM11,5c0,-0.55 0.45,-1 1,-1s1,0.45 1,1h-1v1h1v2h-1v1h1v2h-2L11,5z"/>
</vector>

View File

@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportHeight="24"
android:viewportWidth="24">
<group
android:scaleX="5.50297"
android:scaleY="5.52411"
android:translateX="-59.0634"
android:translateY="-57.934">
<path
android:fillColor="?android:attr/colorAccent"
android:fillType="evenOdd"
android:pathData="M10.961 13.514c0 -1.078 0.874 -1.952 1.953 -1.952 0.555 0 1.057 0.232 1.412 0.604l-0.583 0.141c-0.236 -0.162 -0.522 -0.257 -0.829 -0.257 -0.809 0 -1.465 0.655 -1.465 1.464l0 0c0 0.135 -0.109 0.244 -0.244 0.244 -0.134 0 -0.244 -0.109 -0.244 -0.244l0 0zm3.417 0c0 -0.094 -0.009 -0.185 -0.026 -0.274l0.429 -0.297c0.055 0.181 0.085 0.373 0.085 0.571 0 0.135 -0.109 0.244 -0.244 0.244 -0.135 0 -0.244 -0.109 -0.244 -0.244l0 0zm-0.02 -1.097c0.102 -0.028 0.212 0.022 0.256 0.121 0.045 0.101 0.007 0.219 -0.085 0.275l0 0 -1.313 0.833c-0.011 0.008 -0.023 0.016 -0.035 0.023l-0.001 0 0 0c-0.013 0.008 -0.025 0.014 -0.039 0.02 -0.226 0.101 -0.491 0 -0.592 -0.226 -0.101 -0.225 0 -0.491 0.226 -0.592 0.026 -0.012 0.052 -0.021 0.079 -0.027l1.504 -0.427 0 0z"
android:strokeLineJoin="round"
android:strokeMiterLimit="1.41421" />
</group>
</vector>

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportHeight="24"
android:viewportWidth="24">
<path
android:fillColor="?android:attr/colorAccent"
android:pathData="M2.546,5.862C4.557,2.772 8.042,0.727 12,0.727C15.958,0.727 19.443,2.772 21.454,5.862C21.584,5.947 21.674,6.086 21.694,6.246C22.697,7.931 23.273,9.899 23.273,12C23.273,18.222 18.222,23.273 12,23.273C5.778,23.273 0.727,18.222 0.727,12C0.727,9.899 1.303,7.931 2.306,6.246C2.326,6.086 2.416,5.947 2.546,5.862ZM7.784,18.049L5.229,18.049C6.602,19.585 8.49,20.651 10.62,20.977C9.503,20.219 8.537,19.221 7.784,18.049ZM18.771,18.049L16.31,18.049C15.564,19.211 14.608,20.202 13.503,20.957C15.583,20.61 17.424,19.555 18.771,18.049ZM13.235,18.049L10.86,18.049C11.207,18.703 11.606,19.307 12.047,19.852C12.488,19.307 12.888,18.703 13.235,18.049ZM6.086,13.083L2.983,13.083C3.101,14.074 3.379,15.016 3.79,15.882L6.713,15.882C6.393,15.001 6.178,14.062 6.086,13.083ZM21.017,13.083L18.008,13.083C17.916,14.062 17.702,15.001 17.382,15.882L20.21,15.882C20.621,15.016 20.899,14.074 21.017,13.083ZM14.67,13.083L9.424,13.083C9.503,14.057 9.689,14.997 9.962,15.882L14.132,15.882C14.406,14.997 14.591,14.057 14.67,13.083ZM6.78,7.939L3.877,7.939C3.418,8.854 3.109,9.858 2.983,10.917L6.086,10.917C6.184,9.872 6.422,8.871 6.78,7.939ZM20.123,7.939L17.315,7.939C17.672,8.871 17.91,9.872 18.008,10.917L21.017,10.917C20.891,9.858 20.582,8.854 20.123,7.939ZM14.076,7.939L10.019,7.939C9.714,8.877 9.509,9.877 9.424,10.917L14.67,10.917C14.585,9.877 14.38,8.877 14.076,7.939ZM10.62,3.023C8.574,3.336 6.751,4.333 5.393,5.772L7.901,5.772C8.637,4.677 9.56,3.742 10.62,3.023ZM13.503,3.043C14.551,3.759 15.465,4.687 16.193,5.772L18.607,5.772C17.276,4.361 15.499,3.376 13.503,3.043ZM12.047,4.148C11.647,4.643 11.281,5.187 10.957,5.772L13.138,5.772C12.814,5.187 12.448,4.643 12.047,4.148Z" />
</vector>

View File

@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportHeight="24"
android:viewportWidth="24">
<group
android:scaleX="0.879929"
android:scaleY="0.883309"
android:translateX="1.44085"
android:translateY="0.746289">
<path
android:fillColor="?android:attr/colorAccent"
android:fillType="evenOdd"
android:pathData="M20.764 21.26l-17.528 0c-1.07 0 -1.939 -0.868 -1.939 -1.939l0 -11.324c0 -1.07 0.869 -1.939 1.939 -1.939l4.534 0C7.982 5.01 8.91 4.22 10.02 4.22l3.96 0c1.11 0 2.037 0.79 2.25 1.838l4.534 0c1.07 0 1.939 0.869 1.939 1.939l0 11.324c0 1.071 -0.869 1.939 -1.939 1.939zM12 8.646c2.767 0 5.013 2.246 5.013 5.013 0 2.767 -2.246 5.013 -5.013 5.013 -2.767 0 -5.013 -2.246 -5.013 -5.013 0 -2.767 2.246 -5.013 5.013 -5.013zM3.674 7.257c0.624 0 1.131 0.507 1.131 1.131 0 0.624 -0.507 1.131 -1.131 1.131 -0.624 0 -1.131 -0.507 -1.131 -1.131 0 -0.624 0.507 -1.131 1.131 -1.131z"
android:strokeLineJoin="round"
android:strokeMiterLimit="1.41421" />
</group>
</vector>

View File

@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportHeight="24"
android:viewportWidth="24">
<group
android:scaleX="1.05866"
android:scaleY="1.05866"
android:translateX="-0.652026"
android:translateY="-0.703971">
<path
android:fillColor="?android:attr/colorAccent"
android:fillType="evenOdd"
android:pathData="M11.066 10.383l0 -2.773 -2.033 -2.033c-0.364 -0.365 -0.364 -0.956 0 -1.321 0.365 -0.364 0.956 -0.364 1.321 0l0.712 0.713 0 -1.111c0 -0.515 0.419 -0.934 0.934 -0.934 0.515 0 0.934 0.419 0.934 0.934l0 1.111 0.712 -0.713c0.365 -0.364 0.956 -0.364 1.321 0 0.364 0.365 0.364 0.956 0 1.321l-2.033 2.033 0 2.773 2.401 -1.387 0.744 -2.777c0.134 -0.498 0.646 -0.794 1.144 -0.66 0.498 0.133 0.794 0.646 0.66 1.143L17.622 7.676 18.584 7.12c0.447 -0.257 1.018 -0.104 1.276 0.342 0.258 0.446 0.104 1.018 -0.342 1.276l-0.962 0.555 0.973 0.261c0.498 0.133 0.794 0.646 0.661 1.144 -0.134 0.497 -0.646 0.793 -1.144 0.66L16.269 10.614 13.868 12l2.401 1.386 2.777 -0.744c0.498 -0.133 1.01 0.163 1.144 0.66 0.133 0.498 -0.163 1.011 -0.661 1.144l-0.973 0.261 0.962 0.555c0.446 0.258 0.6 0.83 0.342 1.276 -0.258 0.446 -0.829 0.599 -1.276 0.342l-0.962 -0.556 0.261 0.974c0.134 0.497 -0.162 1.01 -0.66 1.143 -0.498 0.134 -1.01 -0.162 -1.144 -0.66l-0.744 -2.777 -2.401 -1.387 0 2.886 2.033 2.034c0.364 0.364 0.364 0.956 0 1.32 -0.365 0.365 -0.956 0.365 -1.321 0l-0.712 -0.712 0 0.997c0 0.515 -0.419 0.934 -0.934 0.934 -0.515 0 -0.934 -0.419 -0.934 -0.934l0 -0.997 -0.712 0.712c-0.365 0.365 -0.956 0.365 -1.321 0 -0.364 -0.364 -0.364 -0.956 0 -1.32l2.033 -2.034 0 -2.886 -2.499 1.443 -0.744 2.778C7.689 18.335 7.177 18.631 6.679 18.498 6.181 18.365 5.885 17.852 6.019 17.354L6.28 16.381 5.416 16.88C4.969 17.137 4.398 16.984 4.14 16.538 3.882 16.092 4.036 15.52 4.482 15.262L5.346 14.764 4.372 14.503C3.875 14.369 3.579 13.857 3.712 13.359 3.846 12.861 4.358 12.565 4.856 12.699L7.633 13.443 10.132 12 7.633 10.557 4.856 11.301C4.358 11.435 3.846 11.139 3.712 10.641 3.579 10.143 3.875 9.631 4.372 9.497L5.346 9.236 4.482 8.738C4.036 8.48 3.882 7.908 4.14 7.462 4.398 7.016 4.969 6.863 5.416 7.12L6.28 7.619 6.019 6.646C5.885 6.148 6.181 5.635 6.679 5.502 7.177 5.369 7.689 5.665 7.823 6.162l0.744 2.778 2.499 1.443z"
android:strokeLineJoin="round"
android:strokeMiterLimit="1.41421" />
</group>
</vector>

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportHeight="24"
android:viewportWidth="24">
<group
android:scaleX="0.0930942"
android:scaleY="0.0934518"
android:translateX="19.4408"
android:translateY="9.49012">
<path
android:fillColor="?android:attr/colorAccent"
android:pathData="M0 57.121c-22.463 -12.601 -36.159 -9.862 -42.734 0 -6.574 9.862 -20.819 24.106 -42.186 6.574 -10.987 -9.015 -22.91 -21.121 -31.769 -31.918 -17.532 -21.367 -3.287 -35.612 6.575 -42.186 9.861 -6.575 12.601 -20.272 0 -42.734 -12.601 -22.463 -33.421 -16.437 -33.421 -16.437 0 0 -22.462 6.575 -32.324 48.213 -8.889 37.534 35.637 88.416 44.502 98.083 0 0 57.942 56.011 99.581 46.149 41.638 -9.861 48.212 -32.324 48.212 -32.324 0 0 6.027 -20.819 -16.436 -33.42"
android:strokeLineJoin="round"
android:strokeMiterLimit="1.41421" />
</group>
</vector>

View File

@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportHeight="24"
android:viewportWidth="24">
<group
android:scaleX="0.921041"
android:scaleY="0.924579"
android:translateX="0.752324"
android:translateY="0.893459">
<path
android:fillColor="?android:attr/colorAccent"
android:fillType="evenOdd"
android:pathData="M10.228 14.833c-0.006 0 -0.894 0.008 -1.83 1.069 -0.716 0.812 -1.981 2.473 -3.218 3.16 -0.07 0.041 -0.143 0.078 -0.218 0.111 -0.311 0.143 -0.619 0.217 -0.913 0.192l-0.015 0C3.63 19.362 3.252 19.254 2.924 19.066 1.702 18.44 1.782 17.099 1.782 17.099c0 -0.07 0.004 -0.139 0.01 -0.206C1.847 15.696 2.143 9.661 2.563 8.549 3.102 6.316 5.114 4.656 7.51 4.656l9.423 0c2.478 0 4.545 1.775 4.997 4.123 0.383 1.539 0.65 6.984 0.702 8.114 0.006 0.067 0.009 0.136 0.009 0.206 0 0 0.081 1.341 -1.142 1.967 -0.327 0.188 -0.706 0.296 -1.109 0.299l-0.015 0c-0.294 0.025 -0.602 -0.049 -0.914 -0.192 -0.074 -0.033 -0.147 -0.07 -0.218 -0.111 -1.236 -0.687 -2.502 -2.348 -3.217 -3.16 -0.936 -1.061 -1.824 -1.069 -1.83 -1.069l-3.968 0zM8.247 6.379c1.935 0 3.507 1.571 3.507 3.507 0 1.935 -1.572 3.507 -3.507 3.507 -1.936 0 -3.507 -1.572 -3.507 -3.507 0 -1.936 1.571 -3.507 3.507 -3.507zm9.138 4.16c0.454 0 0.823 0.369 0.823 0.823 0 0.454 -0.369 0.823 -0.823 0.823 -0.454 0 -0.823 -0.369 -0.823 -0.823 0 -0.454 0.369 -0.823 0.823 -0.823zm-8.421 0.07l0 0.814c0 0.399 -0.324 0.723 -0.723 0.723 -0.399 0 -0.723 -0.324 -0.723 -0.723l0 -0.814 -0.815 0C6.304 10.609 5.98 10.285 5.98 9.886 5.98 9.487 6.304 9.163 6.703 9.163l0.815 0 0 -0.815c0 -0.399 0.324 -0.723 0.723 -0.723 0.399 0 0.723 0.324 0.723 0.723l0 0.815 0.815 0c0.399 0 0.723 0.324 0.723 0.723 0 0.399 -0.324 0.722 -0.723 0.723l-0.815 0zm10.72 -0.723c0 0.454 -0.369 0.823 -0.823 0.823 -0.454 0 -0.823 -0.369 -0.823 -0.823 0 -0.455 0.369 -0.823 0.823 -0.823 0.454 0 0.823 0.368 0.823 0.823zm-2.952 0c0 0.454 -0.369 0.823 -0.823 0.823 -0.455 0 -0.823 -0.369 -0.823 -0.823 0 -0.455 0.368 -0.823 0.823 -0.823 0.454 0 0.823 0.368 0.823 0.823zm0.653 -2.3c0.454 0 0.823 0.369 0.823 0.824 0 0.454 -0.369 0.823 -0.823 0.823 -0.454 0 -0.823 -0.369 -0.823 -0.823 0 -0.455 0.369 -0.824 0.823 -0.824z"
android:strokeLineJoin="round"
android:strokeMiterLimit="1.41421" />
</group>
</vector>

View File

@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportHeight="24"
android:viewportWidth="24">
<group
android:scaleX="1.20862"
android:scaleY="1.21327"
android:translateX="-0.686496"
android:translateY="-0.544151">
<path
android:fillColor="?android:attr/colorAccent"
android:fillType="evenOdd"
android:pathData="M13.29 18.046l-8.091 0c-1.277 0 -2.315 -1.037 -2.315 -2.315l0 -4.631c0 -1.277 1.038 -2.315 2.315 -2.315l8.091 0c1.272 0 2.305 1.027 2.315 2.296l1.307 -0.754c0.065 -0.038 0.135 -0.067 0.21 -0.086l0.002 0 0 0 0 0 0 0c0.062 -0.015 0.126 -0.023 0.188 -0.023l0.001 0 0.003 0c0.146 0.001 0.283 0.041 0.401 0.11 0.11 0.065 0.205 0.156 0.276 0.272 0.043 0.071 0.076 0.15 0.096 0.233l0 0.002c0.014 0.059 0.02 0.119 0.02 0.178l0 0.001 0 4.803 0 0.001c0 0.059 -0.006 0.119 -0.02 0.178l0 0.001 0 0 0 0 0 0.001c-0.02 0.084 -0.053 0.162 -0.096 0.233 -0.071 0.116 -0.166 0.208 -0.276 0.272 -0.118 0.07 -0.255 0.11 -0.401 0.11l0 0 0 0 -0.003 0 -0.001 0c-0.062 0 -0.126 -0.007 -0.188 -0.023l0 0 0 0 0 0 -0.002 0c-0.075 -0.018 -0.145 -0.047 -0.21 -0.085L15.605 15.75c-0.01 1.269 -1.043 2.296 -2.315 2.296zm-1.773 -4.63c0 -0.107 -0.027 -0.214 -0.083 -0.313l0 0 0 0 -0.001 -0.002 -0.001 0C11.409 13.06 11.381 13.023 11.349 12.988 11.305 12.94 11.254 12.9 11.198 12.869L7.919 10.975C7.867 10.945 7.811 10.922 7.752 10.908l-0.001 -0.001 0 0 0 0 0 0C7.702 10.895 7.652 10.889 7.602 10.889l0 0 -0.002 0 -0.001 0 0 0C7.484 10.89 7.376 10.921 7.283 10.976 7.196 11.027 7.12 11.099 7.064 11.191 7.03 11.247 7.004 11.309 6.989 11.375l0 0.001 0 0 0 0 0 0.001c-0.011 0.046 -0.016 0.094 -0.016 0.141l0 0 0 3.795 0 0.001c0 0.047 0.005 0.094 0.016 0.141l0 0.001c0.015 0.066 0.041 0.128 0.075 0.185 0.056 0.091 0.132 0.163 0.219 0.214 0.093 0.055 0.201 0.087 0.316 0.087l0.003 0 0 0c0.05 0 0.1 -0.006 0.149 -0.018l0 0 0 0 0 0 0.001 0c0.059 -0.015 0.115 -0.038 0.167 -0.068l3.279 -1.893c0.056 -0.032 0.107 -0.072 0.151 -0.119 0.032 -0.035 0.06 -0.073 0.083 -0.113l0.001 -0.001 0.001 -0.001 0 -0.001 0 0c0.056 -0.098 0.083 -0.206 0.083 -0.312zM6.026 4.848c0.955 0 1.731 0.776 1.731 1.731C7.757 7.535 6.981 8.31 6.026 8.31 5.07 8.31 4.295 7.535 4.295 6.579 4.295 5.624 5.07 4.848 6.026 4.848Zm4.986 -2.216c1.567 0 2.839 1.272 2.839 2.839 0 1.567 -1.272 2.839 -2.839 2.839 -1.567 0 -2.839 -1.272 -2.839 -2.839 0 -1.567 1.272 -2.839 2.839 -2.839z"
android:strokeLineJoin="round"
android:strokeMiterLimit="1.41421" />
</group>
</vector>

View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2019 The LineageOS 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.
-->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/switch_bar_bg" />
</shape>

View File

@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2016 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.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/switch_bar"
android:layout_width="match_parent"
android:layout_height="?android:attr/actionBarSize"
android:background="@drawable/switchbar_background"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:clickable="true"
android:gravity="center"
android:theme="@*android:style/ThemeOverlay.DeviceDefault.Accent">
<TextView android:id="@+id/switch_text"
android:layout_height="wrap_content"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_gravity="center_vertical"
android:paddingStart="56dp"
android:ellipsize="end"
android:maxLines="2"
android:textAlignment="viewStart"
android:textAppearance="@android:style/TextAppearance.DeviceDefault.Widget.ActionBar.Title"
android:textColor="?android:attr/textColorPrimaryInverse"
android:textSize="16sp" />
<Switch
android:id="@android:id/switch_widget"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:background="@null"
android:theme="@style/Theme.Main.SwitchBar.Switch" />
</LinearLayout>

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2020 The LineageOS 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.
-->
<androidx.recyclerview.widget.RecyclerView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/thermal_rv_view"
android:layout_width="match_parent"
android:layout_height="wrap_content" />

View File

@@ -0,0 +1,63 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2020 The LineageOS 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.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="?android:attr/listPreferredItemHeight"
android:paddingBottom="4dp"
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
android:paddingStart="?android:attr/listPreferredItemPaddingStart"
android:paddingTop="4dp">
<ImageView
android:id="@+id/app_icon"
android:layout_width="@android:dimen/app_icon_size"
android:layout_height="@android:dimen/app_icon_size"
android:layout_marginEnd="8dp"
android:contentDescription="@null"
android:scaleType="centerInside" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:id="@+id/app_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="2dp"
android:ellipsize="marquee"
android:singleLine="true"
android:textAlignment="viewStart"
android:textAppearance="@android:style/TextAppearance.Material.Medium"
android:textColor="?android:attr/textColorPrimary" />
<Spinner
android:id="@+id/app_mode"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
<ImageView
android:id="@+id/state"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:padding="8dp"
android:scaleType="centerInside"
android:src="@drawable/ic_thermal_default" />
</LinearLayout>

View File

@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Pick-up to wake gesture-->
<string name="wake_gesture_title">Aufwecken</string>
<string name="wake_gesture_summary">Wecke das Gerät auf, anstatt Benachrichtigungen anzuzeigen</string>
<!-- DC dimming settings -->
<string name="dc_dimming_title">DC Dimming</string>
<string name="dc_dimming_enable">DC Dimming verwenden</string>
<string name="dc_dimming_text">Vermindert Überanstrengung der Augen bei schlechten Lichtverhältnissen</string>
<string name="dc_dimming_text_not_supported">DC Dimming wird durch den Kernel zurzeit nicht unterstützt</string>
<!-- Device specific settings -->
<string name="device_settings_app_name">Erweiterte Einstellungen</string>
<!-- Clear Speaker -->
<string name="clear_speaker_title">Lautsprecher reinigen</string>
<string name="clear_speaker_enable">Lautsprecherreinigung aktivieren</string>
<string name="clear_speaker_summary">Spielen Sie einen 30-sekündigen Ton ab, um den Lautsprecher zu reinigen.</string>
<string name="clear_speaker_text">Führen Sie diese Funktion ein- oder zweimal aus, wenn Sie feststellen, dass Ihr Lautsprecher leicht durch Staub blockiert ist. Stellen Sie die Medienlautstärke auf Maximum ein.\n\nWenn der Lautsprecher stark blockiert ist, führen Sie diese Funktion 2-5 Mal aus, während Sie Ihr Gerät schütteln, wobei der Lautsprecher nach unten zeigt.</string>
<!-- Ambient settings -->
<string name="ambient_enable">Inaktivitätsdisplay verwenden</string>
<string name="ambient_display_title">Inaktivitätsdisplay</string>
<!-- Doze -->
<string name="doze_brightness_title">Immer aktiviert-Helligkeit</string>
<string name="doze_brightness_summary">%s ist aktiv</string>
</resources>

View File

@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<!--Generated by crowdin.com-->
<!--
Copyright (C) 2018 The LineageOS 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.
-->
<resources>
<!-- Pick-up to wake gesture-->
<string name="wake_gesture_title">Risveglia</string>
<string name="wake_gesture_summary">Risveglia il dispositivo invece di mostrare Ambient Display</string>
</resources>

View File

@@ -1,16 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2009 The Android Open Source Project
<!-- Copyright (C) 2020 The LineageOS 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.
-->
<resources>
<!-- Use only if devices have variable intensity support for haptics-->
<bool name="config_vibration_supports_multiple_intensities">true</bool>
<color name="switchbar_switch_track_tint">#82000000</color>
<color name="switchbar_switch_thumb_tint">@android:color/black</color>
</resources>

View File

@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<!--Generated by crowdin.com-->
<!--
Copyright (C) 2018 The LineageOS 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.
-->
<resources>
<!-- Pick-up to wake gesture-->
<string name="wake_gesture_title">Просыпаться от жестов</string>
<string name="wake_gesture_summary">Будить устройство вместо пульсирующих уведомлений при использовании жестов</string>
<!-- Clear Speaker -->
<string name="clear_speaker_title">Очистка динамика</string>
<string name="clear_speaker_summary">Воспроизвести 30-и секундный звук для очистки динамика</string>
<string name="clear_speaker_text">Включите этот параметр 1-2 раз, если динамик немного загрязнен. Также поставьте звук на максимальную громкость.\n\nЕсли динамик сильно загрязнен, запустите этот параметр 2-5 раз и потрясите телефон. Динамик должен смотреть вниз</string>
</resources>

View File

@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2020 The LineageOS 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.
-->
<resources>
<!-- Pick-up to wake gesture-->
<string name="wake_gesture_title">抬手唤醒</string>
<string name="wake_gesture_summary">抬手直接唤醒屏幕不使用息屏显示</string>
<!-- DC Dimming settings -->
<string name="dc_dimming_title">防闪烁模式</string>
<string name="dc_dimming_text">全局直流调光,低亮度下防闪烁护眼</string>
<string name="dc_dimming_text_not_supported">当前内核不支持防闪烁模式</string>
<!-- Device specific settings -->
<string name="device_settings_app_name">高级设置</string>
<!-- Ambient display settings -->
<string name="ambient_display_title">环境显示</string>
<!-- Clear Speaker -->
<string name="clear_speaker_title">清理扬声器</string>
<string name="clear_speaker_summary">播放一段约30秒的音频来清理扬声器</string>
<string name="clear_speaker_text">当扬声器被少量灰尘覆盖时将音量调至最大运行1-2次。\n\n当扬声器充满灰尘时运行2-5次, 同时将扬声器朝下轻轻摇晃您的设备。</string>
</resources>

View File

@@ -15,91 +15,11 @@
limitations under the License.
-->
<resources>
<!-- Values for Dirac headset pref -->
<string-array name="dirac_headset_pref_entries" translatable="false">
<item>@string/dirac_headset_default</item>
<item>@string/dirac_headset_earbuds</item>
<item>@string/dirac_headset_in_ear_2013</item>
<item>@string/dirac_headset_piston_1</item>
<item>@string/dirac_headset_general</item>
<item>@string/dirac_headset_general_inear</item>
<item>@string/dirac_headset_piston_basic</item>
<item>@string/dirac_headset_piston_2</item>
<item>@string/dirac_headset_piston_standard</item>
<item>@string/dirac_headset_headphone</item>
<item>@string/dirac_headset_piston_youth</item>
<item>@string/dirac_headset_piston_color</item>
<item>@string/dirac_headset_in_ear</item>
<item>@string/dirac_headset_capsule</item>
<item>@string/dirac_headset_in_ear_pro</item>
<item>@string/dirac_headset_comfort</item>
<item>@string/dirac_headset_reduction_noise</item>
<item>@string/dirac_headset_cancelling</item>
<item>@string/dirac_headset_half_in_ear</item>
<item>@string/dirac_headset_in_ear2</item>
<item>@string/dirac_headset_earphone_basic</item>
<item>@string/dirac_headset_earphone</item>
</string-array>
<string-array name="dirac_headset_pref_values" translatable="false">
<item>0</item>
<item>1</item>
<item>2</item>
<item>3</item>
<item>5</item>
<item>6</item>
<item>7</item>
<item>8</item>
<item>9</item>
<item>10</item>
<item>11</item>
<item>12</item>
<item>13</item>
<item>14</item>
<item>15</item>
<item>16</item>
<item>17</item>
<item>18</item>
<item>19</item>
<item>20</item>
<item>21</item>
<item>22</item>
<item>23</item>
</string-array>
<!-- Values for Dirac preset pref -->
<string-array name="dirac_preset_pref_entries" translatable="false">
<item>@string/dirac_preset_default</item>
<item>@string/dirac_preset_rock</item>
<item>@string/dirac_preset_jazz</item>
<item>@string/dirac_preset_pop</item>
<item>@string/dirac_preset_classical</item>
<item>@string/dirac_preset_hiphop</item>
<item>@string/dirac_preset_blues</item>
<item>@string/dirac_preset_electronic</item>
<item>@string/dirac_preset_country</item>
<item>@string/dirac_preset_dance</item>
<item>@string/dirac_preset_metal</item>
</string-array>
<string-array name="dirac_preset_pref_values" translatable="false">
<item>"0,0,0,0,0,0,0"</item>
<item>"4,2,-2,0,-2,-2,4"</item>
<item>"0,0,0,-2,-3,0,0"</item>
<item>"0,-3,-5,0,0,-3,0"</item>
<item>"0,0,0,0,3,6,6"</item>
<item>"3,3,-3,0,-3,0,2"</item>
<item>"2,4,-6,4,0,1,2"</item>
<item>"3,3,-1,0,-3,0,0"</item>
<item>"0,0,-2,-2,2,2,0"</item>
<item>"0,4,2,0,-2,-2,4"</item>
<item>"2,0,0,-2,-4,0,0"</item>
</string-array>
<!-- Values for doze brightness -->
<string-array name="doze_brightness_level">
<item>@string/doze_brightness_low</item>
<item>@string/doze_brightness_high</item>
<item>@string/doze_brightness_adaptive</item>
<item>Low brightness</item>
<item>High brightness</item>
<item>Adaptive brightness</item>
</string-array>
<string-array name="doze_brightness_level_mode">
<item>0</item>

View File

@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2020 The LineageOS 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.
-->
<resources>
<color name="switchbar_background_color">@*android:color/material_grey_600</color>
<color name="switchbar_switch_track_tint">#BFFFFFFF</color>
<color name="switchbar_switch_thumb_tint">@android:color/white</color>
</resources>

View File

@@ -0,0 +1,55 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2020-2022 The LineageOS 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.
-->
<resources>
<!-- Pick-up to wake gesture-->
<string name="wake_gesture_title">Wake up</string>
<string name="wake_gesture_summary">Wake up the device instead of pulsing notifications</string>
<!-- DC dimming settings -->
<string name="dc_dimming_title">DC Dimming</string>
<string name="dc_dimming_enable">Use DC Dimming</string>
<string name="dc_dimming_text">Reduces eye strain in low light conditions</string>
<string name="dc_dimming_text_not_supported">DC Dimming is currently not supported by the kernel</string>
<!-- Device specific settings -->
<string name="device_settings_app_name">Advanced settings</string>
<!-- Clear Speaker -->
<string name="clear_speaker_title">Clear speaker</string>
<string name="clear_speaker_enable">Enable clear speaker mode</string>
<string name="clear_speaker_summary">Play a 30-second audio to clear the speaker</string>
<string name="clear_speaker_text">Run this feature once or twice if you find that your speaker is lightly blocked by dust. Set media volume to maximum.\n\nIf the speaker is blocked heavily, run this feature 2-5 times while shaking your device with the speaker facing downwards.</string>
<!-- Ambient settings -->
<string name="ambient_enable">Use ambient display</string>
<string name="ambient_display_title">Ambient display</string>
<!-- Doze brightness -->
<string name="doze_brightness_title">Always on brightness</string>
<string name="doze_brightness_summary">%s mode is enabled</string>
<!-- Thermal Profiles -->
<string name="thermal_title">Thermal Profiles</string>
<string name="thermal_summary">Adjust per-app thermal profiles for optimum performance</string>
<string name="thermal_default">Default</string>
<string name="thermal_benchmark">Benchmark</string>
<string name="thermal_browser">Browser</string>
<string name="thermal_camera">Camera</string>
<string name="thermal_dialer">Dialer</string>
<string name="thermal_gaming">Gaming</string>
<string name="thermal_streaming">Streaming</string>
</resources>

View File

@@ -0,0 +1,74 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2015-2016 The CyanogenMod Project
2017-2020 The LineageOS 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.
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<style name="Theme.Main" parent="@android:style/Theme.DeviceDefault.Settings">
<item name="dialogPreferenceStyle">@style/Theme.Main.DialogPreferenceStyle</item>
<item name="preferenceCategoryStyle">@style/Theme.Main.PreferenceCategoryStyle</item>
<item name="preferenceFragmentStyle">@style/Theme.Main.PreferenceFragmentStyle</item>
<item name="preferenceStyle">@style/Theme.Main.PreferenceStyle</item>
<item name="preferenceTheme">@style/Theme.Main.PreferenceTheme</item>
<item name="switchPreferenceStyle">@style/Theme.Main.SwitchPreferenceStyle</item>
</style>
<style name="Theme.Main.DialogPreferenceStyle" parent="@style/Theme.Main.PreferenceStyle">
</style>
<style name="Theme.Main.PreferenceCategoryStyle" parent="@*android:style/Preference.DeviceDefault.Category">
<item name="allowDividerAbove">true</item>
<item name="allowDividerBelow">true</item>
<item name="android:layout">@layout/preference_category_material_settings</item>
</style>
<style name="Theme.Main.PreferenceFragmentStyle" parent="@*android:style/PreferenceFragment.Material">
<item name="allowDividerAfterLastItem">false</item>
</style>
<style name="Theme.Main.PreferenceStyle" parent="@*android:style/Preference.DeviceDefault">
<item name="allowDividerAbove">false</item>
<item name="allowDividerBelow">true</item>
<item name="singleLineTitle">false</item>
<item name="android:layout">@layout/preference_material_settings</item>
</style>
<style name="Theme.Main.PreferenceTheme" parent="@style/PreferenceThemeOverlay.SettingsBase">
<item name="preferenceCategoryTitleTextAppearance">
@style/Theme.Main.TextAppearance.CategoryTitle
</item>
</style>
<style name="Theme.Main.SwitchPreferenceStyle" parent="@style/Theme.Main.PreferenceStyle">
<item name="widgetLayout">@*android:layout/preference_widget_switch</item>
</style>
<style name="Theme.Main.SwitchBar" parent="@android:style/ThemeOverlay.Material.ActionBar">
</style>
<style name="Theme.Main.SwitchBar.Switch">
<item name="android:trackTint">@color/switchbar_switch_track_tint</item>
<item name="android:thumbTint">@color/switchbar_switch_thumb_tint</item>
</style>
<style name="Theme.Main.TextAppearance.CategoryTitle"
parent="@*android:style/TextAppearance.DeviceDefault.Body2">
<item name="android:textAllCaps">true</item>
<item name="android:textSize">11sp</item>
<!-- 0.8 Spacing, 0.8/11 = 0.072727273 -->
<item name="android:letterSpacing">0.072727273</item>
</style>
<style name="TextAppearance.Medium" parent="@android:style/TextAppearance.Material.Medium" />
</resources>

View File

@@ -5,11 +5,11 @@
<com.android.settingslib.widget.TopIntroPreference
android:key="clear_speaker_intro"
android:title="@string/clear_speaker_description" />
android:title="@string/clear_speaker_text" />
<com.android.settingslib.widget.MainSwitchPreference
android:key="clear_speaker_pref"
android:defaultValue="false"
android:title="@string/clear_speaker_title" />
android:title="@string/clear_speaker_enable" />
</PreferenceScreen>

View File

@@ -1,54 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2018 The LineageOS 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.
-->
<PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android"
android:title="@string/dirac_title">
<com.android.settingslib.widget.MainSwitchPreference
android:defaultValue="false"
android:key="dirac_enable"
android:title="@string/dirac_title" />
<ListPreference
android:key="dirac_headset_pref"
android:entries="@array/dirac_headset_pref_entries"
android:entryValues="@array/dirac_headset_pref_values"
android:defaultValue="0"
android:title="@string/dirac_headset_title"
android:summary="%s" />
<ListPreference
android:key="dirac_preset_pref"
android:entries="@array/dirac_preset_pref_entries"
android:entryValues="@array/dirac_preset_pref_values"
android:defaultValue="0,0,0,0,0,0,0"
android:title="@string/dirac_preset_title"
android:summary="%s" />
<PreferenceCategory
android:key="dirac_hifi"
android:title="@string/dirac_hifi_title">
<SwitchPreference
android:key="dirac_hifi_pref"
android:defaultValue="false"
android:title="@string/dirac_hifi_enable_title"
android:summary="@string/dirac_hifi_summary"/>
</PreferenceCategory>
</PreferenceScreen>

View File

@@ -22,7 +22,7 @@
<com.android.settingslib.widget.MainSwitchPreference
android:defaultValue="false"
android:key="doze_enable"
android:title="@string/ambient_display_enable_title" />
android:title="@string/ambient_enable" />
<SwitchPreference
android:key="always_on_display"
@@ -44,8 +44,8 @@
android:key="gesture_raise_to_wake"
android:defaultValue="false"
android:icon="@drawable/ic_doze_wake"
android:title="@string/pick_up_gesture_title"
android:summary="@string/pick_up_wake_gesture_summary" />
android:title="@string/wake_gesture_title"
android:summary="@string/wake_gesture_summary" />
<PreferenceCategory
android:key="pickup_sensor"

View File

@@ -1,6 +1,6 @@
/*
* Copyright (C) 2015 The CyanogenMod Project
* 2017-2020 The LineageOS Project
* 2017-2019 The LineageOS Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -21,34 +21,23 @@ import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.os.AsyncTask;
import android.content.SharedPreferences;
import android.os.SystemProperties;
import android.util.Log;
import androidx.preference.PreferenceManager;
import org.lineageos.settings.dirac.DiracUtils;
import org.lineageos.settings.doze.DozeUtils;
import org.lineageos.settings.utils.FileUtils;
import org.lineageos.settings.thermal.ThermalUtils;
public class BootCompletedReceiver extends BroadcastReceiver {
private static final boolean DEBUG = false;
private static final String TAG = "XiaomiParts";
private static final String DC_DIMMING_KEY = "dc_dimming";
private static final String DC_DIMMING_NODE = "/sys/devices/platform/soc/soc:qcom,dsi-display-primary/dimlayer_bl";
@Override
public void onReceive(final Context context, Intent intent) {
SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(context);
if (DEBUG)
Log.d(TAG, "Received boot completed intent");
PendingResult pendingResult = goAsync();
DiracUtils.initialize(context);
DozeUtils.onBootCompleted(context);
boolean dcDimmingEnabled = sharedPrefs.getBoolean(DC_DIMMING_KEY, false);
FileUtils.writeLine(DC_DIMMING_NODE, dcDimmingEnabled ? "1" : "0");
ThermalUtils.startService(context);
pendingResult.finish();
}

View File

@@ -1,109 +0,0 @@
/*
* Copyright (C) 2018,2020 The LineageOS 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.
*/
package org.lineageos.settings.dirac;
import android.app.ActionBar;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.CompoundButton;
import android.widget.Switch;
import android.widget.TextView;
import androidx.preference.ListPreference;
import androidx.preference.Preference;
import androidx.preference.Preference.OnPreferenceChangeListener;
import androidx.preference.PreferenceFragment;
import androidx.preference.SwitchPreference;
import com.android.settingslib.widget.MainSwitchPreference;
import com.android.settingslib.widget.OnMainSwitchChangeListener;
import org.lineageos.settings.R;
public class DiracSettingsFragment extends PreferenceFragment
implements OnPreferenceChangeListener, OnMainSwitchChangeListener {
private static final String PREF_HEADSET = "dirac_headset_pref";
private static final String PREF_HIFI = "dirac_hifi_pref";
private static final String PREF_PRESET = "dirac_preset_pref";
private TextView mTextView;
private MainSwitchPreference mSwitchBar;
private ListPreference mHeadsetType;
private ListPreference mPreset;
private SwitchPreference mHifi;
@Override
public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
addPreferencesFromResource(R.xml.dirac_settings);
DiracUtils.initialize(getActivity());
boolean enhancerEnabled = DiracUtils.isDiracEnabled();
mSwitchBar = (MainSwitchPreference) findPreference("dirac_enable");
mSwitchBar.addOnSwitchChangeListener(this);
mSwitchBar.setChecked(enhancerEnabled);
mHeadsetType = (ListPreference) findPreference(PREF_HEADSET);
mHeadsetType.setOnPreferenceChangeListener(this);
mPreset = (ListPreference) findPreference(PREF_PRESET);
mPreset.setOnPreferenceChangeListener(this);
mHifi = (SwitchPreference) findPreference(PREF_HIFI);
mHifi.setOnPreferenceChangeListener(this);
boolean hifiEnabled = DiracUtils.getHifiMode();
mHeadsetType.setEnabled(!hifiEnabled && enhancerEnabled);
mPreset.setEnabled(!hifiEnabled && enhancerEnabled);
}
@Override
public boolean onPreferenceChange(Preference preference, Object newValue) {
switch (preference.getKey()) {
case PREF_HEADSET:
DiracUtils.setHeadsetType(Integer.parseInt(newValue.toString()));
return true;
case PREF_HIFI:
DiracUtils.setHifiMode((Boolean) newValue ? 1 : 0);
if (DiracUtils.isDiracEnabled()) {
mHeadsetType.setEnabled(!(Boolean) newValue);
mPreset.setEnabled(!(Boolean) newValue);
}
return true;
case PREF_PRESET:
DiracUtils.setLevel((String) newValue);
return true;
default:
return false;
}
}
@Override
public void onSwitchChanged(Switch switchView, boolean isChecked) {
DiracUtils.setMusic(isChecked);
if (!DiracUtils.getHifiMode()) {
mHeadsetType.setEnabled(isChecked);
mPreset.setEnabled(isChecked);
}
}
}

View File

@@ -1,65 +0,0 @@
/*
* Copyright (C) 2018 The LineageOS 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.
*/
package org.lineageos.settings.dirac;
import android.media.audiofx.AudioEffect;
import java.util.UUID;
public class DiracSound extends AudioEffect {
private static final int DIRACSOUND_PARAM_HEADSET_TYPE = 1;
private static final int DIRACSOUND_PARAM_EQ_LEVEL = 2;
private static final int DIRACSOUND_PARAM_MUSIC = 4;
private static final int DIRACSOUND_PARAM_HIFI = 8;
private static final UUID EFFECT_TYPE_DIRACSOUND =
UUID.fromString("5b8e36a5-144a-4c38-b1d7-0002a5d5c51b");
private static final String TAG = "DiracSound";
public DiracSound(int priority, int audioSession) {
super(EFFECT_TYPE_NULL, EFFECT_TYPE_DIRACSOUND, priority, audioSession);
}
public int getMusic() throws IllegalStateException,
IllegalArgumentException, UnsupportedOperationException {
int[] value = new int[1];
checkStatus(getParameter(DIRACSOUND_PARAM_MUSIC, value));
return value[0];
}
public void setMusic(int enable) throws IllegalStateException,
IllegalArgumentException, UnsupportedOperationException {
checkStatus(setParameter(DIRACSOUND_PARAM_MUSIC, enable));
}
public void setHeadsetType(int type) throws IllegalStateException,
IllegalArgumentException, UnsupportedOperationException {
checkStatus(setParameter(DIRACSOUND_PARAM_HEADSET_TYPE, type));
}
public void setLevel(int band, float level) throws IllegalStateException,
IllegalArgumentException, UnsupportedOperationException {
checkStatus(setParameter(new int[]{DIRACSOUND_PARAM_EQ_LEVEL, band},
String.valueOf(level).getBytes()));
}
public void setHifiMode(int mode) throws IllegalStateException,
IllegalArgumentException, UnsupportedOperationException {
checkStatus(setParameter(DIRACSOUND_PARAM_HIFI, mode));
}
}

View File

@@ -1,67 +0,0 @@
/*
* Copyright (C) 2018,2020 The LineageOS 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.
*/
package org.lineageos.settings.dirac;
import android.content.Context;
import android.media.AudioManager;
public final class DiracUtils {
protected static DiracSound mDiracSound;
private static boolean mInitialized;
private static Context mContext;
public static void initialize(Context context) {
if (!mInitialized) {
mContext = context;
mDiracSound = new DiracSound(0, 0);
mInitialized = true;
}
}
protected static void setMusic(boolean enable) {
mDiracSound.setMusic(enable ? 1 : 0);
}
protected static boolean isDiracEnabled() {
return mDiracSound != null && mDiracSound.getMusic() == 1;
}
protected static void setLevel(String preset) {
String[] level = preset.split("\\s*,\\s*");
for (int band = 0; band <= level.length - 1; band++) {
mDiracSound.setLevel(band, Float.valueOf(level[band]));
}
}
protected static void setHeadsetType(int paramInt) {
mDiracSound.setHeadsetType(paramInt);
}
protected static boolean getHifiMode() {
AudioManager audioManager = mContext.getSystemService(AudioManager.class);
return audioManager.getParameters("hifi_mode").contains("true");
}
protected static void setHifiMode(int paramInt) {
AudioManager audioManager = mContext.getSystemService(AudioManager.class);
audioManager.setParameters("hifi_mode=" + (paramInt == 1 ? true : false));
mDiracSound.setHifiMode(paramInt);
}
}

View File

@@ -1,35 +0,0 @@
/*
* Copyright (C) 2015-2016 The CyanogenMod Project
* 2017 The LineageOS 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.
*/
package org.lineageos.settings.display;
import android.os.Bundle;
import com.android.settingslib.collapsingtoolbar.CollapsingToolbarBaseActivity;
import com.android.settingslib.collapsingtoolbar.R;
public class DcDimmingSettingsActivity extends CollapsingToolbarBaseActivity {
private static final String TAG = "dcdimming";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getFragmentManager().beginTransaction().replace(R.id.content_frame,
new DcDimmingSettingsFragment(), TAG).commit();
}
}

View File

@@ -1,61 +0,0 @@
/*
* Copyright (C) 2018 The LineageOS 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.
*/
package org.lineageos.settings.display;
import android.os.Bundle;
import android.widget.Switch;
import androidx.preference.Preference;
import androidx.preference.PreferenceFragment;
import com.android.settingslib.widget.TopIntroPreference;
import com.android.settingslib.widget.MainSwitchPreference;
import com.android.settingslib.widget.OnMainSwitchChangeListener;
import org.lineageos.settings.R;
import org.lineageos.settings.utils.FileUtils;
public class DcDimmingSettingsFragment extends PreferenceFragment implements
OnMainSwitchChangeListener {
private TopIntroPreference mIntroText;
private MainSwitchPreference mDcDimmingSwitchBar;
private static final String DC_DIMMING_INTRO_KEY = "dc_dimming_top_intro";
private static final String DC_DIMMING_KEY = "dc_dimming";
private static final String DC_DIMMING_NODE = "/sys/devices/platform/soc/soc:qcom,dsi-display-primary/dimlayer_bl";
@Override
public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
addPreferencesFromResource(R.xml.dcdimming_settings);
mIntroText = (TopIntroPreference) findPreference(DC_DIMMING_INTRO_KEY);
mDcDimmingSwitchBar = (MainSwitchPreference) findPreference(DC_DIMMING_KEY);
if (FileUtils.fileExists(DC_DIMMING_NODE)) {
mDcDimmingSwitchBar.setEnabled(true);
mDcDimmingSwitchBar.addOnSwitchChangeListener(this);
} else {
mIntroText.setSummary(R.string.dc_dimming_enable_summary_not_supported);
mDcDimmingSwitchBar.setEnabled(false);
}
}
@Override
public void onSwitchChanged(Switch switchView, boolean isChecked) {
FileUtils.writeLine(DC_DIMMING_NODE, isChecked ? "1":"0");
}
}

View File

@@ -1,61 +0,0 @@
/*
* Copyright (C) 2018 The OmniROM Project
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package org.lineageos.settings.display;
import android.annotation.TargetApi;
import android.content.Intent;
import android.content.SharedPreferences;
import android.service.quicksettings.Tile;
import android.service.quicksettings.TileService;
import androidx.preference.PreferenceManager;
import org.lineageos.settings.utils.FileUtils;
public class DcDimmingTileService extends TileService {
private static final String DC_DIMMING_KEY = "dc_dimming";
private static final String DC_DIMMING_NODE = "/sys/devices/platform/soc/soc:qcom,dsi-display-primary/dimlayer_bl";
private void updateUI(boolean enabled) {
final Tile tile = getQsTile();
tile.setState(enabled ? Tile.STATE_ACTIVE : Tile.STATE_INACTIVE);
tile.updateTile();
}
@Override
public void onStartListening() {
super.onStartListening();
SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this);
updateUI(sharedPrefs.getBoolean(DC_DIMMING_KEY, false));
}
@Override
public void onStopListening() {
super.onStopListening();
}
@Override
public void onClick() {
super.onClick();
SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this);
final boolean enabled = !(sharedPrefs.getBoolean(DC_DIMMING_KEY, false));
FileUtils.writeLine(DC_DIMMING_NODE, enabled ? "1" : "0");
sharedPrefs.edit().putBoolean(DC_DIMMING_KEY, enabled).commit();
updateUI(enabled);
}
}

View File

@@ -72,9 +72,6 @@ public class DozeService extends Service {
private void onDisplayOn() {
if (DEBUG)
Log.d(TAG, "Display on");
if (DozeUtils.isAlwaysOnEnabled(this)) {
DozeUtils.setDozeStatus(DozeUtils.DOZE_STATUS_DISABLED);
}
if (DozeUtils.isPickUpEnabled(this)) {
mPickupSensor.disable();
}
@@ -89,9 +86,6 @@ public class DozeService extends Service {
private void onDisplayOff() {
if (DEBUG)
Log.d(TAG, "Display off");
if (DozeUtils.isAlwaysOnEnabled(this)) {
DozeUtils.setDozeStatus(DozeUtils.DOZE_STATUS_ENABLED);
}
if (DozeUtils.isPickUpEnabled(this)) {
mPickupSensor.enable();
}

Some files were not shown because too many files have changed in this diff Show More