Compare commits
498 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 400389796d | |||
| 72d1f3834b | |||
| d197870aeb | |||
|
|
0042f4cc3d | ||
|
|
c4e8a099e9 | ||
|
|
2f0d4a8cd4 | ||
| 26b27c3aa6 | |||
| ecd677427f | |||
| 48e53eab03 | |||
| dad742db3e | |||
| f7cfbefd0f | |||
| 4bfb1cd72e | |||
| 446df5d00d | |||
|
|
a1b2ad52a5 | ||
|
|
6cf426988a | ||
|
|
caf4a86569 | ||
|
|
a474e0a0ec | ||
|
|
9fc5959cd6 | ||
|
|
41089f765c | ||
|
|
52b5422b8d | ||
|
|
c5be6143d6 | ||
|
|
fb788347c7 | ||
|
|
6f230c1c64 | ||
|
|
8b225c8c03 | ||
|
|
8db4fdedd0 | ||
|
|
6e343daeb6 | ||
|
|
f0c6917574 | ||
|
|
7c0ab5e736 | ||
|
|
68017c885d | ||
|
|
92d97077aa | ||
|
|
b1986fe4f0 | ||
|
|
0981e7e832 | ||
|
|
0c6a1b7749 | ||
|
|
21107c0060 | ||
|
|
09218a8de7 | ||
|
|
617f330b87 | ||
|
|
083fcb9319 | ||
|
|
714142838f | ||
|
|
8426710e6b | ||
|
|
5297207168 | ||
|
|
9ed67422aa | ||
|
|
cf9026c4f8 | ||
|
|
03786290f4 | ||
|
|
b899960505 | ||
|
|
6870d1099e | ||
|
|
29a905d974 | ||
|
|
555749c4c2 | ||
|
|
1dd564eef2 | ||
|
|
9ef8670d56 | ||
|
|
f133499afc | ||
|
|
77178b6b8c | ||
|
|
d0190b0cde | ||
|
|
183c251cc6 | ||
|
|
92e8e1dfb5 | ||
|
|
a1f9335cf8 | ||
|
|
116b007db8 | ||
|
|
e219098657 | ||
|
|
480c41cb95 | ||
|
|
27954c4e4a | ||
|
|
2869ad9c3b | ||
|
|
9f0d882d15 | ||
|
|
7804b4b262 | ||
|
|
d8bfe7a334 | ||
|
|
0144d76a36 | ||
|
|
4a5a1f2673 | ||
|
|
054fec088a | ||
|
|
c75e0a2968 | ||
|
|
702848c8e1 | ||
|
|
54eaadddde | ||
|
|
5d79ba4da3 | ||
|
|
5ba7975eca | ||
|
|
63693bb470 | ||
|
|
283c4371f7 | ||
|
|
3c52c76f0e | ||
|
|
a0230da208 | ||
|
|
80bca5f62f | ||
|
|
3af209eacd | ||
|
|
f82f48eed5 | ||
|
|
84503c6717 | ||
|
|
a3c8487745 | ||
|
|
6d0e07853f | ||
|
|
739cb9c880 | ||
|
|
0c0cc1168f | ||
|
|
a1e79adf81 | ||
|
|
3348335f17 | ||
|
|
fce0063510 | ||
|
|
fdf252599b | ||
|
|
a4ae0e17c7 | ||
|
|
faa6a1b30d | ||
|
|
c2fb52a337 | ||
|
|
8431c2c877 | ||
|
|
5910f81105 | ||
|
|
845b2ce962 | ||
|
|
9045d28b5c | ||
|
|
8e3b60efbd | ||
|
|
9eddb81bd1 | ||
|
|
0436201169 | ||
|
|
b2affd500c | ||
|
|
bb670b3bb0 | ||
|
|
997ebe1969 | ||
|
|
d3e9aadf30 | ||
|
|
2191b77895 | ||
|
|
ca67fb1652 | ||
|
|
95f9be1670 | ||
|
|
8a8b36da6d | ||
|
|
d61680872f | ||
|
|
ac2e58ebe7 | ||
|
|
666b90a1bf | ||
|
|
fac0149fb6 | ||
|
|
6fb38dbf51 | ||
|
|
82ed5dccd4 | ||
|
|
f3cdc1198b | ||
|
|
a74e83e8cb | ||
|
|
ac3d4a792e | ||
|
|
e316771154 | ||
|
|
eab7db2e5d | ||
|
|
7387313bdc | ||
|
|
27907d32a0 | ||
|
|
b1305b70fb | ||
|
|
5530d72cf7 | ||
|
|
f859539437 | ||
|
|
501cf229e9 | ||
|
|
dcdce2c343 | ||
|
|
e720183e0d | ||
|
|
e1871cfa28 | ||
|
|
5cc3207d0e | ||
|
|
56ae8bfcd4 | ||
|
|
63e141b17e | ||
|
|
0e381ee495 | ||
|
|
3e3f7f364f | ||
|
|
4ebd9deb90 | ||
|
|
5e2130a931 | ||
|
|
6e0553e34b | ||
|
|
07320f2185 | ||
|
|
8ea33780de | ||
|
|
78f09d2e4f | ||
|
|
4255c44104 | ||
|
|
27ed04ebbe | ||
|
|
a4f53acd6d | ||
|
|
326dce342c | ||
|
|
25faeb2c65 | ||
|
|
51651efdb9 | ||
|
|
96098ce71d | ||
|
|
e47f44677c | ||
|
|
dec89dcb0a | ||
|
|
fe95e995a2 | ||
|
|
1bbd6ce794 | ||
|
|
9d60547b8e | ||
|
|
f89d853b2a | ||
|
|
5afdf0155f | ||
|
|
449e446123 | ||
|
|
673add438d | ||
|
|
b2f432a700 | ||
|
|
1369fd51a4 | ||
|
|
1ea0ab5166 | ||
|
|
beb2c4882f | ||
|
|
c8b48bf8eb | ||
|
|
4a5e20b361 | ||
|
|
405f282ea9 | ||
|
|
06f0b22496 | ||
|
|
d1109e1cbe | ||
|
|
6d0b71907f | ||
|
|
6f5e766ca6 | ||
|
|
9193ddefa1 | ||
|
|
06547168ba | ||
|
|
6b3e8c163a | ||
|
|
27ca1dfd98 | ||
|
|
adab781b4e | ||
|
|
d76e73c74b | ||
|
|
9c67e2cb00 | ||
|
|
290b2f69fd | ||
| 4cba64077a | |||
| 778ee287af | |||
|
|
52677d8b66 | ||
|
|
ca2767cd8a | ||
|
|
c41b69ce94 | ||
|
|
fbb0e4de8e | ||
|
|
85498e0c83 | ||
|
|
37cde22ec9 | ||
|
|
36904c52af | ||
|
|
50295c2dfa | ||
|
|
3c389e6090 | ||
|
|
24ff8bdf4d | ||
|
|
5830211954 | ||
|
|
a73fcf5497 | ||
|
|
b861a9487c | ||
|
|
6ebe42cd8a | ||
|
|
442d4977ca | ||
|
|
b533da37de | ||
|
|
975bced273 | ||
|
|
9ac14013f0 | ||
|
|
f1efdcca80 | ||
|
|
f2b7a133c5 | ||
|
|
8580795993 | ||
|
|
197f8c5396 | ||
|
|
040330a700 | ||
|
|
1eb610f053 | ||
|
|
64d026cbad | ||
|
|
bb78111b6b | ||
|
|
ee0f49f83e | ||
|
|
cff4742676 | ||
|
|
5184b89626 | ||
|
|
ac8d3ca514 | ||
|
|
347f4f8c50 | ||
|
|
199f54cb8e | ||
|
|
1c44dbe267 | ||
|
|
ebf9a808bc | ||
|
|
dc5e653aa1 | ||
|
|
8bd5178ce7 | ||
|
|
5c4d19d76c | ||
|
|
263aa8668c | ||
|
|
4ccff76263 | ||
|
|
9ffab25984 | ||
|
|
b8e97d73e9 | ||
|
|
6625e4a454 | ||
|
|
e5ddd684c3 | ||
|
|
c3d707c781 | ||
|
|
119a1b43c5 | ||
|
|
dfc5124488 | ||
|
|
9d55e00ed4 | ||
|
|
80b33c16fb | ||
| 5993702032 | |||
|
|
c44ada533e | ||
|
|
8dea951d2a | ||
|
|
b53a30ece2 | ||
|
|
5a8933c2b2 | ||
|
|
65b63d225f | ||
|
|
42a4f18f58 | ||
|
|
79aae32e5c | ||
|
|
1403a2164b | ||
|
|
9eac76f987 | ||
|
|
107602ff0e | ||
|
|
593fa44235 | ||
|
|
dff3ec0576 | ||
|
|
438ffc794c | ||
|
|
8b206fbb6c | ||
|
|
60190c1d81 | ||
|
|
af8c4b7989 | ||
|
|
6e865304e7 | ||
|
|
555e3c1eb6 | ||
|
|
3a5f23c7bf | ||
|
|
cc2f419c78 | ||
|
|
94636824a7 | ||
|
|
0435e77bd9 | ||
|
|
4d672540e1 | ||
|
|
e0e49f846d | ||
|
|
60782fc2be | ||
|
|
17a2171339 | ||
| ade602c508 | |||
|
|
17db7007d4 | ||
|
|
6cb462431b | ||
|
|
586ee76199 | ||
|
|
0b1d292cff | ||
|
|
402d1d2363 | ||
|
|
c345c1d546 | ||
|
|
95cd5bad3e | ||
|
|
61ffb4fd5f | ||
|
|
7967131aa9 | ||
|
|
fd6add0574 | ||
|
|
959f103e9f | ||
|
|
624de22224 | ||
|
|
6ac3e53761 | ||
|
|
f15e8801ca | ||
|
|
f2d375b4fd | ||
|
|
3306a6eef0 | ||
|
|
14ac894689 | ||
|
|
ea9a29c410 | ||
|
|
ad690f0a79 | ||
|
|
101d3985cc | ||
|
|
ad635494fd | ||
|
|
d8ea756c84 | ||
|
|
c888ee3712 | ||
|
|
396007652a | ||
|
|
1a9847620d | ||
|
|
d2f33edd3a | ||
|
|
14aa809106 | ||
|
|
5e432936c6 | ||
|
|
df8a7f325d | ||
|
|
4aee9fc21a | ||
|
|
1d15f90c77 | ||
|
|
1e5e6076db | ||
|
|
86944c2d6e | ||
|
|
e77df5c137 | ||
|
|
5dae5b2c35 | ||
|
|
862e5ba7dd | ||
|
|
5a3d21797e | ||
|
|
919fcb016e | ||
|
|
8cf3ee6c3e | ||
|
|
2f78a8d178 | ||
|
|
9262d08e8f | ||
|
|
81724c3ebc | ||
|
|
4d664f27a7 | ||
|
|
dfa06a5c38 | ||
|
|
01c3fb3956 | ||
|
|
48ce6c81c3 | ||
|
|
ab1cb9493c | ||
|
|
12a79850ef | ||
|
|
808129402a | ||
|
|
540a9447c4 | ||
|
|
590610023b | ||
|
|
5dc97f4521 | ||
|
|
6f044c50d8 | ||
|
|
bba3e42154 | ||
|
|
ba7de287ce | ||
|
|
2529c7f25c | ||
|
|
1003d8db31 | ||
|
|
c793d59925 | ||
|
|
d25eb2997b | ||
|
|
75c4f78b08 | ||
|
|
1b380fa6be | ||
|
|
84de562ef3 | ||
|
|
8a2ca3de09 | ||
|
|
d7b81d8c40 | ||
|
|
69b9c96140 | ||
|
|
bfd2a96c09 | ||
|
|
e92e3eb27c | ||
|
|
a563f54114 | ||
|
|
ba5ee12493 | ||
|
|
d8ac947579 | ||
|
|
2bbdc9299d | ||
|
|
ebeed85503 | ||
|
|
8f050bd917 | ||
|
|
69b4d4d0ff | ||
|
|
a783107d3c | ||
|
|
7b8c9a0833 | ||
|
|
126e4f0d16 | ||
|
|
2736fe6325 | ||
|
|
9626908367 | ||
|
|
48dfc8e4bf | ||
|
|
579497da8a | ||
|
|
0fef7044f1 | ||
|
|
694f9e6da2 | ||
|
|
63bf3084fa | ||
| 9ac2dbf6e7 | |||
| d44b0f5acf | |||
|
|
f02ee97f52 | ||
|
|
8c2f0d480b | ||
|
|
b34154375f | ||
|
|
1a7f1228e3 | ||
|
|
c3afd12664 | ||
|
|
038ad8881b | ||
|
|
fad95382c1 | ||
|
|
569bad1d98 | ||
|
|
87bdf12735 | ||
|
|
c30597b0f1 | ||
|
|
2e0a262f74 | ||
|
|
0a436bc832 | ||
|
|
c1f159949a | ||
|
|
82c3c37eea | ||
|
|
fb36fe0182 | ||
|
|
fe7bf2081c | ||
|
|
7be9894cfc | ||
|
|
9beeaea123 | ||
|
|
fb8cf1356b | ||
|
|
d632a87814 | ||
|
|
d77c07339d | ||
|
|
e6c8131434 | ||
|
|
c3510c1e21 | ||
|
|
2ee07a0d3c | ||
|
|
88a58c710e | ||
|
|
815f241e19 | ||
|
|
390d53e2e4 | ||
|
|
8a2052c96f | ||
|
|
9b4cd2cc62 | ||
|
|
4ebbf71120 | ||
|
|
49afe076ab | ||
|
|
e86d24c653 | ||
|
|
efc085180e | ||
|
|
13ca10c5a4 | ||
|
|
d1335acb25 | ||
|
|
aac1932593 | ||
|
|
7619d65a6f | ||
|
|
926580df4e | ||
|
|
4c3b73f759 | ||
|
|
126df9f150 | ||
|
|
dada1de252 | ||
|
|
0b663341a6 | ||
|
|
24f6512bb4 | ||
|
|
4c61eb6d97 | ||
|
|
3ebf2f217d | ||
|
|
798a1ac5be | ||
|
|
599611037c | ||
|
|
a7f90d805e | ||
|
|
648577bdeb | ||
|
|
4ed30b0aed | ||
|
|
5e7e8396ac | ||
|
|
2faaec4587 | ||
|
|
1ca689482d | ||
|
|
ea009d759c | ||
|
|
38ec87acf1 | ||
|
|
949a48f1f9 | ||
|
|
84d62c5b1a | ||
|
|
1346069694 | ||
|
|
ce03014533 | ||
|
|
92d4603964 | ||
|
|
85d4b86aeb | ||
|
|
f7056727d4 | ||
|
|
b63e0a1970 | ||
|
|
44ebee8d5f | ||
|
|
9637365d00 | ||
|
|
2b396f6430 | ||
|
|
c8d7e64df0 | ||
|
|
372d6f70ae | ||
|
|
33ff01c44e | ||
|
|
605f15ad2f | ||
|
|
05e95555fc | ||
|
|
d96cda7b4c | ||
|
|
5566e8e00e | ||
|
|
300f47b9e6 | ||
|
|
192b567357 | ||
|
|
40de13af71 | ||
| 88eb4e6a6f | |||
| 2b5a02fda0 | |||
|
|
d407527cd4 | ||
|
|
5b3a3cbf41 | ||
|
|
6cd86183e9 | ||
|
|
c8d3c8ee6b | ||
|
|
f508be78b0 | ||
| d480beccc3 | |||
|
|
ab8d739a18 | ||
|
|
fb9ec3b7c6 | ||
|
|
1fe465f3a3 | ||
|
|
6dedbdd5bf | ||
|
|
815dff8049 | ||
|
|
4ab0f06464 | ||
|
|
85cc613f01 | ||
|
|
0a4f15df35 | ||
|
|
187f518e93 | ||
|
|
ebdaa4a88e | ||
|
|
3d864c0de6 | ||
|
|
129b9fafd7 | ||
|
|
11e4174e66 | ||
|
|
a3218ea2d8 | ||
|
|
94c8ede04c | ||
|
|
38161a3ae3 | ||
|
|
3a51f7d936 | ||
|
|
2319e63458 | ||
|
|
7d40407a93 | ||
|
|
09665e0ce0 | ||
|
|
7fbfec88f4 | ||
|
|
2775fe65b2 | ||
|
|
66866d5131 | ||
|
|
77cf259404 | ||
|
|
c9b1d3661b | ||
|
|
6685d59506 | ||
|
|
2b2be9d55d | ||
|
|
b5317697fe | ||
|
|
1ba14ac444 | ||
|
|
fc55a98d03 | ||
|
|
36f3b6e9de | ||
|
|
5045404382 | ||
|
|
b720f928da | ||
|
|
5f51b1f7dc | ||
|
|
e7c5a15ad2 | ||
|
|
7f31b9a5e3 | ||
|
|
01e40248d6 | ||
|
|
1ad552e1ba | ||
|
|
fed73a7f79 | ||
|
|
54247d1f89 | ||
|
|
057c199550 | ||
|
|
046a8da3b9 | ||
|
|
12a97484d6 | ||
|
|
2c8570f2b6 | ||
|
|
54d395cabb | ||
|
|
6c3022183a | ||
|
|
2e7bf12599 | ||
|
|
f3497b4375 | ||
|
|
4b1863f7ed | ||
|
|
21a10b317b | ||
|
|
b6ebde1280 | ||
|
|
53366cbfbe | ||
|
|
77161c34c8 | ||
|
|
afbdec9bfc | ||
|
|
c52ea4d89b | ||
|
|
baba637d8e | ||
|
|
6bbc4dd95e | ||
|
|
85b1bee1c4 | ||
|
|
c43dffcff1 | ||
|
|
9d79df53d3 | ||
|
|
06ae14b16c | ||
|
|
2481767652 | ||
|
|
a506c49a7e | ||
|
|
3e5be82e42 | ||
|
|
1897034d33 | ||
|
|
f69024db3d | ||
|
|
b979062660 | ||
|
|
ac1835a0ba | ||
|
|
55cbf0612a | ||
|
|
3ebcd10f37 | ||
|
|
35a123d246 | ||
|
|
fdd21ae797 | ||
|
|
471bab5861 | ||
|
|
0d6f8104ed | ||
|
|
376d12ccac | ||
|
|
de061f5aee | ||
|
|
e6d50ff751 | ||
|
|
15f737380f | ||
|
|
4721acef11 |
12
.github/FUNDING.yml
vendored
12
.github/FUNDING.yml
vendored
@@ -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
|
||||
31
.github/workflows/build.yml
vendored
31
.github/workflows/build.yml
vendored
@@ -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
2
.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
out/
|
||||
extract-files.py
|
||||
14
Android.bp
14
Android.bp
@@ -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",
|
||||
}
|
||||
|
||||
93
Android.mk
93
Android.mk
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
]
|
||||
@@ -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
|
||||
@@ -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"
|
||||
],
|
||||
}
|
||||
|
||||
78
camera/CameraProviderExtension.cpp
Normal file
78
camera/CameraProviderExtension.cpp
Normal 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);
|
||||
}
|
||||
@@ -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 -->
|
||||
|
||||
|
||||
1857
configs/dolby/dax-default.xml
Normal file
1857
configs/dolby/dax-default.xml
Normal file
File diff suppressed because it is too large
Load Diff
@@ -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>
|
||||
@@ -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>
|
||||
55
configs/hidl/framework_compatibility_matrix.xml
Normal file
55
configs/hidl/framework_compatibility_matrix.xml
Normal 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>
|
||||
@@ -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>
|
||||
|
||||
@@ -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
|
||||
@@ -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>
|
||||
|
||||
51
configs/media/media_codecs_dolby_audio.xml
Normal file
51
configs/media/media_codecs_dolby_audio.xml
Normal 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>
|
||||
@@ -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",
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
libqti-perfd-client.so
|
||||
libadsprpc.so
|
||||
libcdsprpc.so
|
||||
libsdsprpc.so
|
||||
|
||||
@@ -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>
|
||||
@@ -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
|
||||
|
||||
@@ -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
251
device.mk
@@ -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
27
evolution.dependencies
Normal 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"
|
||||
}
|
||||
]
|
||||
@@ -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
19
fastcharge/Android.bp
Normal 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
98
fastcharge/FastCharge.cpp
Normal 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
50
fastcharge/FastCharge.h
Normal 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
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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
|
||||
@@ -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>
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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()));
|
||||
|
||||
17
libqti-perfd-client/Android.bp
Normal file
17
libqti-perfd-client/Android.bp
Normal 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",
|
||||
],
|
||||
}
|
||||
24
libqti-perfd-client/client.c
Normal file
24
libqti-perfd-client/client.c
Normal 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
11
libshim/Android.bp
Normal 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,
|
||||
}
|
||||
1
libshim/libwatermark_shim.c
Normal file
1
libshim/libwatermark_shim.c
Normal file
@@ -0,0 +1 @@
|
||||
void _ZN4piex19GetPreviewImageDataEPNS_15StreamInterfaceEPNS_16PreviewImageDataE() {}
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -1,6 +0,0 @@
|
||||
<manifest version="1.0" type="device">
|
||||
<hal format="aidl">
|
||||
<name>android.hardware.light</name>
|
||||
<fqname>ILights/default</fqname>
|
||||
</hal>
|
||||
</manifest>
|
||||
@@ -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
|
||||
}
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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",
|
||||
],
|
||||
}
|
||||
55
livedisplay/SunlightEnhancement.cpp
Normal file
55
livedisplay/SunlightEnhancement.cpp
Normal 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
|
||||
47
livedisplay/SunlightEnhancement.h
Normal file
47
livedisplay/SunlightEnhancement.h
Normal 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
54
livedisplay/service.cpp
Normal 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;
|
||||
}
|
||||
@@ -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
|
||||
@@ -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>
|
||||
@@ -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
@@ -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>
|
||||
@@ -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: {
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
-keep class org.lineageos.settings.dirac.* {
|
||||
*;
|
||||
}
|
||||
|
||||
-keep class org.lineageos.settings.doze.* {
|
||||
*;
|
||||
}
|
||||
|
||||
20
parts/res/color-night/switchbar_switch_thumb_tint.xml
Normal file
20
parts/res/color-night/switchbar_switch_thumb_tint.xml
Normal 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>
|
||||
20
parts/res/color-night/switchbar_switch_track_tint.xml
Normal file
20
parts/res/color-night/switchbar_switch_track_tint.xml
Normal 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>
|
||||
20
parts/res/color/switch_bar_bg.xml
Normal file
20
parts/res/color/switch_bar_bg.xml
Normal 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>
|
||||
@@ -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>
|
||||
10
parts/res/drawable/ic_settings_thermal.xml
Normal file
10
parts/res/drawable/ic_settings_thermal.xml
Normal 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>
|
||||
19
parts/res/drawable/ic_thermal_benchmark.xml
Normal file
19
parts/res/drawable/ic_thermal_benchmark.xml
Normal 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>
|
||||
11
parts/res/drawable/ic_thermal_browser.xml
Normal file
11
parts/res/drawable/ic_thermal_browser.xml
Normal 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>
|
||||
19
parts/res/drawable/ic_thermal_camera.xml
Normal file
19
parts/res/drawable/ic_thermal_camera.xml
Normal 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>
|
||||
19
parts/res/drawable/ic_thermal_default.xml
Normal file
19
parts/res/drawable/ic_thermal_default.xml
Normal 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>
|
||||
18
parts/res/drawable/ic_thermal_dialer.xml
Normal file
18
parts/res/drawable/ic_thermal_dialer.xml
Normal 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>
|
||||
19
parts/res/drawable/ic_thermal_gaming.xml
Normal file
19
parts/res/drawable/ic_thermal_gaming.xml
Normal 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>
|
||||
19
parts/res/drawable/ic_thermal_streaming.xml
Normal file
19
parts/res/drawable/ic_thermal_streaming.xml
Normal 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>
|
||||
20
parts/res/drawable/switchbar_background.xml
Normal file
20
parts/res/drawable/switchbar_background.xml
Normal 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>
|
||||
49
parts/res/layout/switch_bar.xml
Normal file
49
parts/res/layout/switch_bar.xml
Normal 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>
|
||||
18
parts/res/layout/thermal_layout.xml
Normal file
18
parts/res/layout/thermal_layout.xml
Normal 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" />
|
||||
63
parts/res/layout/thermal_list_item.xml
Normal file
63
parts/res/layout/thermal_list_item.xml
Normal 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>
|
||||
29
parts/res/values-de/strings.xml
Normal file
29
parts/res/values-de/strings.xml
Normal 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>
|
||||
23
parts/res/values-it-rIT/strings.xml
Normal file
23
parts/res/values-it-rIT/strings.xml
Normal 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>
|
||||
@@ -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>
|
||||
27
parts/res/values-ru-rRU/strings.xml
Normal file
27
parts/res/values-ru-rRU/strings.xml
Normal 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>
|
||||
38
parts/res/values-zh-rCN/strings.xml
Normal file
38
parts/res/values-zh-rCN/strings.xml
Normal 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>
|
||||
@@ -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>
|
||||
|
||||
21
parts/res/values/colors.xml
Normal file
21
parts/res/values/colors.xml
Normal 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>
|
||||
55
parts/res/values/strings.xml
Normal file
55
parts/res/values/strings.xml
Normal 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>
|
||||
74
parts/res/values/styles.xml
Normal file
74
parts/res/values/styles.xml
Normal 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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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"
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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));
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
@@ -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");
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -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
Reference in New Issue
Block a user