This repository has been archived by the owner on Jan 29, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathrepo_18.diff
1879 lines (1723 loc) · 77.1 KB
/
repo_18.diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
project build/make/
diff --git a/core/Makefile b/core/Makefile
index b418946..cb767a4 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -2113,8 +2113,7 @@ ifeq (,$(filter true, $(BOARD_USES_FULL_RECOVERY_IMAGE) $(BOARD_USES_RECOVERY_AS
$(BOARD_BUILD_SYSTEM_ROOT_IMAGE) $(BOARD_INCLUDE_RECOVERY_DTBO) $(BOARD_INCLUDE_RECOVERY_ACPIO) \
$(BOARD_RAMDISK_USE_LZ4) $(BOARD_RAMDISK_USE_XZ)))
# Named '.dat' so we don't attempt to use imgdiff for patching it.
-RECOVERY_RESOURCE_ZIP := $(TARGET_OUT_VENDOR)/etc/recovery-resource.dat
-ALL_DEFAULT_INSTALLED_MODULES += $(RECOVERY_RESOURCE_ZIP)
+RECOVERY_RESOURCE_ZIP :=
else
RECOVERY_RESOURCE_ZIP :=
endif
@@ -4998,7 +4997,7 @@ INTERNAL_OTA_PACKAGE_TARGET := $(PRODUCT_OUT)/$(name).zip
INTERNAL_OTA_METADATA := $(PRODUCT_OUT)/ota_metadata
ifeq ($(TARGET_BUILD_VARIANT),user)
- $(INTERNAL_OTA_PACKAGE_TARGET): backuptool := false
+ $(INTERNAL_OTA_PACKAGE_TARGET): backuptool := true
else
ifneq ($(LINEAGE_BUILD),)
$(INTERNAL_OTA_PACKAGE_TARGET): backuptool := true
diff --git a/core/java.mk b/core/java.mk
index a041321..ac665b3 100644
--- a/core/java.mk
+++ b/core/java.mk
@@ -225,7 +225,7 @@ $(full_classes_compiled_jar): PRIVATE_WARNINGS_ENABLE := $(LOCAL_WARNINGS_ENABLE
# available via JDWP.
ifneq (,$(PRODUCT_MINIMIZE_JAVA_DEBUG_INFO))
ifneq (,$(filter userdebug user,$(TARGET_BUILD_VARIANT)))
-LOCAL_JAVACFLAGS+= -g:source,lines
+LOCAL_JAVACFLAGS+= -g:none
endif
endif
diff --git a/core/product.mk b/core/product.mk
index 13a182a..32e80d7 100644
--- a/core/product.mk
+++ b/core/product.mk
@@ -560,7 +560,12 @@ _readonly_late_variables += \
PRODUCT_COPY_FILES \
PRODUCT_DEX_PREOPT_NEVER_ALLOW_STRIPPING \
PRODUCT_DEX_PREOPT_BOOT_FLAGS \
- PRODUCT_SOONG_NAMESPACES
+ PRODUCT_SOONG_NAMESPACES \
+ PRODUCT_DEX_PREOPT_DEFAULT_COMPILER_FILTER \
+ PRODUCT_DEX_PREOPT_DEFAULT_FLAGS \
+ PRODUCT_OTHER_JAVA_DEBUG_INFO \
+ PRODUCT_SYSTEM_SERVER_COMPILER_FILTER \
+ PRODUCT_SYSTEM_SERVER_DEBUG_INFO
_readonly_early_variables := $(filter-out $(_readonly_late_variables),$(_product_var_list))
diff --git a/target/product/base_system.mk b/target/product/base_system.mk
index 5b118ee..34498b4 100644
--- a/target/product/base_system.mk
+++ b/target/product/base_system.mk
@@ -31,9 +31,7 @@ PRODUCT_PACKAGES += \
appops \
app_process \
appwidget \
- atrace \
audioserver \
- BackupRestoreConfirmation \
bcc \
blank_screen \
blkid \
@@ -44,8 +42,6 @@ PRODUCT_PACKAGES += \
boringssl_self_test \
bpfloader \
bu \
- bugreport \
- bugreportz \
cgroups.json \
charger \
cmd \
@@ -68,10 +64,6 @@ PRODUCT_PACKAGES += \
com.android.wifi \
ContactsProvider \
content \
- crash_dump \
- CtsShimPrebuilt \
- CtsShimPrivPrebuilt \
- debuggerd\
device_config \
dmctl \
dnsmasq \
@@ -79,7 +71,6 @@ PRODUCT_PACKAGES += \
dpm \
dumpstate \
dumpsys \
- DynamicSystemInstallationService \
e2fsck \
ExtShared \
flags_health_check \
@@ -93,8 +84,6 @@ PRODUCT_PACKAGES += \
group_system \
gsid \
gsi_tool \
- heapprofd \
- heapprofd_client \
gatekeeperd \
gpuservice \
hid \
@@ -149,6 +138,7 @@ PRODUCT_PACKAGES += \
libgui \
libhardware \
libhardware_legacy \
+ libincident \
libinput \
libinputflinger \
libiprouteutil \
@@ -256,9 +246,6 @@ PRODUCT_PACKAGES += \
tc \
telecom \
telephony-common \
- tombstoned \
- traced \
- traced_probes \
tune2fs \
tzdatacheck \
uiautomator \
@@ -268,7 +255,6 @@ PRODUCT_PACKAGES += \
viewcompiler \
voip-common \
vold \
- WallpaperBackup \
watchdogd \
wificond \
wifi.rc \
@@ -356,9 +342,6 @@ endif
PRODUCT_COPY_FILES += system/core/rootdir/init.zygote32.rc:system/etc/init/hw/init.zygote32.rc
PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.zygote=zygote32
-PRODUCT_SYSTEM_DEFAULT_PROPERTIES += debug.atrace.tags.enableflags=0
-PRODUCT_SYSTEM_DEFAULT_PROPERTIES += persist.traced.enable=1
-
# Packages included only for eng or userdebug builds, previously debug tagged
PRODUCT_PACKAGES_DEBUG := \
adb_keys \
@@ -394,7 +377,6 @@ endif
# The set of packages whose code can be loaded by the system server.
PRODUCT_SYSTEM_SERVER_APPS += \
SettingsProvider \
- WallpaperBackup
# Packages included only for eng/userdebug builds, when building with SANITIZE_TARGET=address
PRODUCT_PACKAGES_DEBUG_ASAN := \
diff --git a/target/product/full_base.mk b/target/product/full_base.mk
index 267859a..31bfedf 100644
--- a/target/product/full_base.mk
+++ b/target/product/full_base.mk
@@ -25,7 +25,6 @@ PRODUCT_PACKAGES := \
PRODUCT_PACKAGES += \
LiveWallpapersPicker \
- PhotoTable \
preinstalled-packages-platform-full-base.xml
# Bluetooth:
diff --git a/target/product/handheld_product.mk b/target/product/handheld_product.mk
index 968d150..bffcad7 100644
--- a/target/product/handheld_product.mk
+++ b/target/product/handheld_product.mk
@@ -33,7 +33,6 @@ PRODUCT_PACKAGES += \
preinstalled-packages-platform-handheld-product.xml \
QuickSearchBox \
SettingsIntelligence \
- frameworks-base-overlays
ifeq ($(LINEAGE_BUILD),)
PRODUCT_PACKAGES += \
diff --git a/target/product/handheld_system.mk b/target/product/handheld_system.mk
index f6c92b5..7c71711 100644
--- a/target/product/handheld_system.mk
+++ b/target/product/handheld_system.mk
@@ -32,12 +32,9 @@ $(call inherit-product-if-exists, frameworks/base/data/keyboards/keyboards.mk)
$(call inherit-product-if-exists, frameworks/webview/chromium/chromium.mk)
PRODUCT_PACKAGES += \
- BasicDreams \
BlockedNumberProvider \
Bluetooth \
BluetoothMidiService \
- BookmarkProvider \
- BuiltInPrintService \
CalendarProvider \
cameraserver \
CaptivePortalLogin \
@@ -46,7 +43,6 @@ PRODUCT_PACKAGES += \
clatd.conf \
DocumentsUI \
DownloadProviderUi \
- EasterEgg \
ExternalStorageProvider \
FusedLocation \
InputDevices \
@@ -57,17 +53,13 @@ PRODUCT_PACKAGES += \
MtpService \
MusicFX \
PacProcessor \
- PrintRecommendationService \
PrintSpooler \
ProxyHandler \
screenrecord \
SecureElement \
- SharedStorageBackup \
- SimAppDialog \
Telecom \
TelephonyProvider \
TeleService \
- Traceur \
UserDictionaryProvider \
VpnDialogs \
vr \
diff --git a/target/product/handheld_system_ext.mk b/target/product/handheld_system_ext.mk
index d935fbf..8406fee 100644
--- a/target/product/handheld_system_ext.mk
+++ b/target/product/handheld_system_ext.mk
@@ -27,4 +27,3 @@ PRODUCT_PACKAGES += \
Settings \
StorageManager \
SystemUI \
- WallpaperCropper \
diff --git a/target/product/media_system.mk b/target/product/media_system.mk
index f42491e..ab41631 100644
--- a/target/product/media_system.mk
+++ b/target/product/media_system.mk
@@ -78,10 +78,6 @@ PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
tombstoned.max_tombstone_count=50
endif
-PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \
- ro.logd.size.stats=64K \
- log.tag.stats_log=I
-
# Enable CFI for security-sensitive components
$(call inherit-product, $(SRC_TARGET_DIR)/product/cfi-common.mk)
$(call inherit-product-if-exists, vendor/google/products/cfi-vendor.mk)
diff --git a/target/product/runtime_libart.mk b/target/product/runtime_libart.mk
index 693b686..0fe5c98 100644
--- a/target/product/runtime_libart.mk
+++ b/target/product/runtime_libart.mk
@@ -61,19 +61,19 @@ ifeq (eng,$(TARGET_BUILD_VARIANT))
pm.dexopt.boot=extract
else
PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
- pm.dexopt.first-boot=quicken \
- pm.dexopt.boot=verify
+ pm.dexopt.first-boot=everything \
+ pm.dexopt.boot=everything
endif
# The install filter is speed-profile in order to enable the use of
# profiles from the dex metadata files. Note that if a profile is not provided
# or if it is empty speed-profile is equivalent to (quicken + empty app image).
PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
- pm.dexopt.install=speed-profile \
- pm.dexopt.bg-dexopt=speed-profile \
- pm.dexopt.ab-ota=speed-profile \
- pm.dexopt.inactive=verify \
- pm.dexopt.shared=speed
+ pm.dexopt.install=everything \
+ pm.dexopt.bg-dexopt=everything \
+ pm.dexopt.ab-ota=everything \
+ pm.dexopt.inactive=everything \
+ pm.dexopt.shared=everything
# Pass file with the list of updatable boot class path packages to dex2oat.
PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
@@ -87,14 +87,8 @@ PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
dalvik.vm.dex2oat-max-image-block-size=524288
-# Enable minidebuginfo generation unless overridden.
-PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
- dalvik.vm.minidebuginfo=true \
- dalvik.vm.dex2oat-minidebuginfo=true
-
PRODUCT_USES_DEFAULT_ART_CONFIG := true
# Disable iorapd by default
PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
ro.iorapd.enable=false
-
diff --git a/target/product/telephony_system.mk b/target/product/telephony_system.mk
index ef48719..4b76ad5 100644
--- a/target/product/telephony_system.mk
+++ b/target/product/telephony_system.mk
@@ -20,8 +20,5 @@
PRODUCT_PACKAGES := \
ONS \
CarrierDefaultApp \
- CallLogBackup \
- com.android.cellbroadcast \
- CellBroadcastLegacyApp \
PRODUCT_COPY_FILES := \
diff --git a/tools/releasetools/common.py b/tools/releasetools/common.py
index c5758c7..ad459da 100644
--- a/tools/releasetools/common.py
+++ b/tools/releasetools/common.py
@@ -3086,7 +3086,6 @@ def MakeRecoveryPatch(input_dir, output_sink, recovery_img, boot_img,
d = Difference(recovery_img, boot_img, diff_program=diff_program)
_, _, patch = d.ComputePatch()
- output_sink("recovery-from-boot.p", patch)
try:
# The following GetTypeAndDevice()s need to use the path in the target
@@ -3141,10 +3140,6 @@ fi
'recovery_device': recovery_device + '$(getprop ro.boot.slot_suffix)',
'bonus_args': bonus_args}
- # The install script location moved from /system/etc to /system/bin in the L
- # release. In the R release it is in VENDOR/bin or SYSTEM/vendor/bin.
- output_sink("bin/install-recovery.sh", sh.encode())
-
class DynamicPartitionUpdate(object):
def __init__(self, src_group=None, tgt_group=None, progress=None,
diff --git a/tools/releasetools/ota_from_target_files.py b/tools/releasetools/ota_from_target_files.py
index 479a898..63bf826 100755
--- a/tools/releasetools/ota_from_target_files.py
+++ b/tools/releasetools/ota_from_target_files.py
@@ -758,8 +758,6 @@ def WriteFullOTAPackage(input_zip, output_file):
metadata=metadata,
info_dict=OPTIONS.info_dict)
- assert HasRecoveryPatch(input_zip, info_dict=OPTIONS.info_dict)
-
# Assertions (e.g. downgrade check, device properties check).
#ts = target_info.GetBuildProp("ro.build.date.utc")
#ts_text = target_info.GetBuildProp("ro.build.date")
project external/bash/
diff --git a/Android.mk b/Android.mk
deleted file mode 100644
index 69b2a11..0000000
--- a/Android.mk
+++ /dev/null
project external/nano/
diff --git a/Android.mk b/Android.mk
deleted file mode 100644
index 4fcd436..0000000
--- a/Android.mk
+++ /dev/null
project external/noto-fonts/
diff --git a/cjk/Android.bp b/cjk/Android.bp
index 5ff7204..77d4f0b 100644
--- a/cjk/Android.bp
+++ b/cjk/Android.bp
@@ -13,8 +13,13 @@
// limitations under the License.
prebuilt_font {
- name: "NotoSansCJK-Regular.ttc",
- src: "NotoSansCJK-Regular.ttc",
+ name: "NotoSansCJK.ttc",
+ src: "NotoSansCJK.ttc",
+}
+
+prebuilt_font {
+ name: "NotoSerifCJK-Bold.ttc",
+ src: "NotoSerifCJK-Bold.ttc",
}
prebuilt_font {
diff --git a/cjk/NotoSansCJK-Regular.ttc b/cjk/NotoSansCJK-Regular.ttc
index 7fc3586..a2033d0 100644
Binary files a/cjk/NotoSansCJK-Regular.ttc and b/cjk/NotoSansCJK-Regular.ttc differ
diff --git a/cjk/NotoSerifCJK-Regular.ttc b/cjk/NotoSerifCJK-Regular.ttc
index f4ee450..3269d9e 100644
Binary files a/cjk/NotoSerifCJK-Regular.ttc and b/cjk/NotoSerifCJK-Regular.ttc differ
diff --git a/cjk/subset_noto_cjk.py b/cjk/subset_noto_cjk.py
index 5a324bf..be4b8fa 100755
--- a/cjk/subset_noto_cjk.py
+++ b/cjk/subset_noto_cjk.py
@@ -100,4 +100,6 @@ def remove_codepoints_from_ttc(ttc_name):
remove_codepoints_from_ttc('NotoSansCJK-Regular.ttc')
+remove_codepoints_from_ttc('NotoSansCJK.ttc')
+remove_codepoints_from_ttc('NotoSerifCJK-Bold.ttc')
remove_codepoints_from_ttc('NotoSerifCJK-Regular.ttc')
diff --git a/fonts.mk b/fonts.mk
index 13bfbfb..c5d3e29 100644
--- a/fonts.mk
+++ b/fonts.mk
@@ -49,7 +49,7 @@ PRODUCT_PACKAGES := \
NotoSansCham-Bold.ttf \
NotoSansCham-Regular.ttf \
NotoSansCherokee-Regular.ttf \
- NotoSansCJK-Regular.ttc \
+ NotoSansCJK.ttc \
NotoSansCoptic-Regular.ttf \
NotoSansCuneiform-Regular.ttf \
NotoSansCypriot-Regular.ttf \
@@ -209,6 +209,7 @@ PRODUCT_PACKAGES := \
NotoSerifArmenian-Regular.otf \
NotoSerifBengali-Bold.ttf \
NotoSerifBengali-Regular.ttf \
+ NotoSerifCJK-Bold.ttc \
NotoSerifCJK-Regular.ttc \
NotoSerifDevanagari-Bold.ttf \
NotoSerifDevanagari-Regular.ttf \
project external/vim/
diff --git a/Android.mk b/Android.mk
deleted file mode 100644
index c7e2f3c..0000000
--- a/Android.mk
+++ /dev/null
project frameworks/base/
diff --git a/api/current.txt b/api/current.txt
index 952ccdad..1c199adb 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -77,6 +77,7 @@ package android {
field public static final String DIAGNOSTIC = "android.permission.DIAGNOSTIC";
field public static final String DISABLE_KEYGUARD = "android.permission.DISABLE_KEYGUARD";
field public static final String DUMP = "android.permission.DUMP";
+ field public static final String FAKE_PACKAGE_SIGNATURE = "android.permission.FAKE_PACKAGE_SIGNATURE";
field public static final String EXPAND_STATUS_BAR = "android.permission.EXPAND_STATUS_BAR";
field public static final String FACTORY_TEST = "android.permission.FACTORY_TEST";
field public static final String FOREGROUND_SERVICE = "android.permission.FOREGROUND_SERVICE";
@@ -182,6 +183,7 @@ package android {
field public static final String CALL_LOG = "android.permission-group.CALL_LOG";
field public static final String CAMERA = "android.permission-group.CAMERA";
field public static final String CONTACTS = "android.permission-group.CONTACTS";
+ field public static final String FAKE_PACKAGE = "android.permission-group.FAKE_PACKAGE";
field public static final String LOCATION = "android.permission-group.LOCATION";
field public static final String MICROPHONE = "android.permission-group.MICROPHONE";
field public static final String PHONE = "android.permission-group.PHONE";
@@ -82224,4 +82226,3 @@ package org.xmlpull.v1.sax2 {
}
}
-
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index 9bb5aecd..43c095a7 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -2853,6 +2853,20 @@
android:description="@string/permdesc_getPackageSize"
android:protectionLevel="normal" />
+ <!-- Dummy user-facing group for faking package signature -->
+ <permission-group android:name="android.permission-group.FAKE_PACKAGE"
+ android:label="@string/permgrouplab_fake_package_signature"
+ android:description="@string/permgroupdesc_fake_package_signature"
+ android:request="@string/permgrouprequest_fake_package_signature"
+ android:priority="100" />
+
+ <!-- Allows an application to change the package signature as seen by applications -->
+ <permission android:name="android.permission.FAKE_PACKAGE_SIGNATURE"
+ android:permissionGroup="android.permission-group.UNDEFINED"
+ android:protectionLevel="dangerous"
+ android:label="@string/permlab_fakePackageSignature"
+ android:description="@string/permdesc_fakePackageSignature" />
+
<!-- @deprecated No longer useful, see
{@link android.content.pm.PackageManager#addPackageToPreferred}
for details. -->
diff --git a/core/res/res/values-zh-rCN/strings.xml b/core/res/res/values-zh-rCN/strings.xml
index 74dde0ec..b1c6fb4c 100644
--- a/core/res/res/values-zh-rCN/strings.xml
+++ b/core/res/res/values-zh-rCN/strings.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!--
+<!--
/* //device/apps/common/assets/res/any/strings.xml
**
** Copyright 2006, The Android Open Source Project
@@ -2177,6 +2177,11 @@
<string name="PERSOSUBSTATE_SIM_ICCID_SUCCESS" msgid="8058678548991999545">"ICCID 解锁成功。"</string>
<string name="PERSOSUBSTATE_SIM_IMPI_SUCCESS" msgid="2545608067978550571">"IMPI 解锁成功。"</string>
<string name="PERSOSUBSTATE_SIM_NS_SP_SUCCESS" msgid="4352382949744625007">"网络子集服务提供商解锁成功。"</string>
+ <string name="permlab_fakePackageSignature">模拟软件包签名</string>
+ <string name="permdesc_fakePackageSignature">允许当前应用伪装成为其他应用</string>
+ <string name="permgrouplab_fake_package_signature">模拟软件包签名</string>
+ <string name="permgroupdesc_fake_package_signature">伪装成为其他应用</string>
+ <string name="permgrouprequest_fake_package_signature">允许 <b><xliff:g id="app_name" example="Gmail">%1$s</xliff:g></b> 模拟软件包签名?</string>
<string name="config_pdp_reject_dialog_title" msgid="4072057179246785727"></string>
<string name="config_pdp_reject_user_authentication_failed" msgid="4531693033885744689"></string>
<string name="config_pdp_reject_service_not_subscribed" msgid="8190338397128671588"></string>
diff --git a/core/res/res/values-zh-rHK/strings.xml b/core/res/res/values-zh-rHK/strings.xml
index 6cae6439..458fefce 100644
--- a/core/res/res/values-zh-rHK/strings.xml
+++ b/core/res/res/values-zh-rHK/strings.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!--
+<!--
/* //device/apps/common/assets/res/any/strings.xml
**
** Copyright 2006, The Android Open Source Project
@@ -2177,6 +2177,11 @@
<string name="PERSOSUBSTATE_SIM_ICCID_SUCCESS" msgid="8058678548991999545">"ICCID 解鎖成功。"</string>
<string name="PERSOSUBSTATE_SIM_IMPI_SUCCESS" msgid="2545608067978550571">"IMPI 解鎖成功。"</string>
<string name="PERSOSUBSTATE_SIM_NS_SP_SUCCESS" msgid="4352382949744625007">"網絡子集服務供應商解鎖成功。"</string>
+ <string name="permlab_fakePackageSignature">僞造應用程式封裝簽章</string>
+ <string name="permdesc_fakePackageSignature">允許當前應用程式偽裝成為其他應用程式</string>
+ <string name="permgrouplab_fake_package_signature">僞造應用程式封裝簽章</string>
+ <string name="permgroupdesc_fake_package_signature">偽裝成為其他應用程式</string>
+ <string name="permgrouprequest_fake_package_signature">允許 <b><xliff:g id="app_name" example="Gmail">%1$s</xliff:g></b> 僞造應用程式封裝簽章?</string>
<string name="config_pdp_reject_dialog_title" msgid="4072057179246785727"></string>
<string name="config_pdp_reject_user_authentication_failed" msgid="4531693033885744689"></string>
<string name="config_pdp_reject_service_not_subscribed" msgid="8190338397128671588"></string>
diff --git a/core/res/res/values-zh-rTW/strings.xml b/core/res/res/values-zh-rTW/strings.xml
index 58af46e6..69d9a101 100644
--- a/core/res/res/values-zh-rTW/strings.xml
+++ b/core/res/res/values-zh-rTW/strings.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!--
+<!--
/* //device/apps/common/assets/res/any/strings.xml
**
** Copyright 2006, The Android Open Source Project
@@ -2177,6 +2177,11 @@
<string name="PERSOSUBSTATE_SIM_ICCID_SUCCESS" msgid="8058678548991999545">"ICCID 解鎖成功。"</string>
<string name="PERSOSUBSTATE_SIM_IMPI_SUCCESS" msgid="2545608067978550571">"IMPI 解鎖成功。"</string>
<string name="PERSOSUBSTATE_SIM_NS_SP_SUCCESS" msgid="4352382949744625007">"網路子集服務供應商解鎖成功。"</string>
+ <string name="permlab_fakePackageSignature">僞造應用程式封裝簽章</string>
+ <string name="permdesc_fakePackageSignature">允許當前應用程式偽裝成為其他應用程式</string>
+ <string name="permgrouplab_fake_package_signature">僞造應用程式封裝簽章</string>
+ <string name="permgroupdesc_fake_package_signature">偽裝成為其他應用程式</string>
+ <string name="permgrouprequest_fake_package_signature">允許 <b><xliff:g id="app_name" example="Gmail">%1$s</xliff:g></b> 僞造應用程式封裝簽章?</string>
<string name="config_pdp_reject_dialog_title" msgid="4072057179246785727"></string>
<string name="config_pdp_reject_user_authentication_failed" msgid="4531693033885744689"></string>
<string name="config_pdp_reject_service_not_subscribed" msgid="8190338397128671588"></string>
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index f4efcc7e..51b461e7 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -1654,6 +1654,8 @@
<string-array name="config_locationProviderPackageNames" translatable="false">
<!-- The standard AOSP fused location provider -->
<item>com.android.location.fused</item>
+ <!-- Google Play Services or microG (free reimplementation) location provider -->
+ <item>com.google.android.gms</item>
</string-array>
<!-- This string array can be overriden to enable test location providers initially. -->
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
index 5c659123..c2ab0d54 100644
--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -847,6 +847,17 @@
<!-- Permissions -->
+ <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
+ <string name="permlab_fakePackageSignature">Spoof package signature</string>
+ <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
+ <string name="permdesc_fakePackageSignature">Allows the app to pretend to be a different app.</string>
+ <!-- Title of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
+ <string name="permgrouplab_fake_package_signature">Spoof package signature</string>
+ <!-- Description of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
+ <string name="permgroupdesc_fake_package_signature">pretend to be a different app</string>
+ <!-- Message shown to the user when the apps requests permission from this group. If ever possible this should stay below 80 characters (assuming the parameters takes 20 characters). Don't abbreviate until the message reaches 120 characters though. [CHAR LIMIT=120] -->
+ <string name="permgrouprequest_fake_package_signature">Allow <b><xliff:g id="app_name" example="Gmail">%1$s</xliff:g></b> to spoof package signature?</string>
+
<!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
<string name="permlab_statusBar">disable or modify status bar</string>
<!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
diff --git a/data/fonts/fonts.xml b/data/fonts/fonts.xml
index a678f715..a3463c48 100644
--- a/data/fonts/fonts.xml
+++ b/data/fonts/fonts.xml
@@ -576,20 +576,48 @@
<font weight="400" style="normal">NotoSansSymbols-Regular-Subsetted.ttf</font>
</family>
<family lang="zh-Hans">
- <font weight="400" style="normal" index="2">NotoSansCJK-Regular.ttc</font>
+ <font weight="100" style="normal" index="2">NotoSansCJK.ttc</font>
+ <font weight="300" style="normal" index="7">NotoSansCJK.ttc</font>
+ <font weight="350" style="normal" index="12">NotoSansCJK.ttc</font>
+ <font weight="400" style="normal" index="27">NotoSansCJK.ttc</font>
+ <font weight="500" style="normal" index="17">NotoSansCJK.ttc</font>
+ <font weight="700" style="normal" index="37">NotoSansCJK.ttc</font>
+ <font weight="900" style="normal" index="22">NotoSansCJK.ttc</font>
<font weight="400" style="normal" index="2" fallbackFor="serif">NotoSerifCJK-Regular.ttc</font>
+ <font weight="700" style="normal" index="2" fallbackFor="serif">NotoSerifCJK-Bold.ttc</font>
</family>
<family lang="zh-Hant,zh-Bopo">
- <font weight="400" style="normal" index="3">NotoSansCJK-Regular.ttc</font>
+ <font weight="100" style="normal" index="3">NotoSansCJK.ttc</font>
+ <font weight="300" style="normal" index="8">NotoSansCJK.ttc</font>
+ <font weight="350" style="normal" index="13">NotoSansCJK.ttc</font>
+ <font weight="400" style="normal" index="28">NotoSansCJK.ttc</font>
+ <font weight="500" style="normal" index="18">NotoSansCJK.ttc</font>
+ <font weight="700" style="normal" index="38">NotoSansCJK.ttc</font>
+ <font weight="900" style="normal" index="23">NotoSansCJK.ttc</font>
<font weight="400" style="normal" index="3" fallbackFor="serif">NotoSerifCJK-Regular.ttc</font>
+ <font weight="700" style="normal" index="3" fallbackFor="serif">NotoSerifCJK-Bold.ttc</font>
</family>
<family lang="ja">
- <font weight="400" style="normal" index="0">NotoSansCJK-Regular.ttc</font>
+ <font weight="100" style="normal" index="0">NotoSansCJK.ttc</font>
+ <font weight="300" style="normal" index="5">NotoSansCJK.ttc</font>
+ <font weight="350" style="normal" index="10">NotoSansCJK.ttc</font>
+ <font weight="400" style="normal" index="25">NotoSansCJK.ttc</font>
+ <font weight="500" style="normal" index="15">NotoSansCJK.ttc</font>
+ <font weight="700" style="normal" index="35">NotoSansCJK.ttc</font>
+ <font weight="900" style="normal" index="20">NotoSansCJK.ttc</font>
<font weight="400" style="normal" index="0" fallbackFor="serif">NotoSerifCJK-Regular.ttc</font>
+ <font weight="700" style="normal" index="0" fallbackFor="serif">NotoSerifCJK-Bold.ttc</font>
</family>
<family lang="ko">
- <font weight="400" style="normal" index="1">NotoSansCJK-Regular.ttc</font>
+ <font weight="100" style="normal" index="1">NotoSansCJK.ttc</font>
+ <font weight="300" style="normal" index="6">NotoSansCJK.ttc</font>
+ <font weight="350" style="normal" index="11">NotoSansCJK.ttc</font>
+ <font weight="400" style="normal" index="26">NotoSansCJK.ttc</font>
+ <font weight="500" style="normal" index="16">NotoSansCJK.ttc</font>
+ <font weight="700" style="normal" index="36">NotoSansCJK.ttc</font>
+ <font weight="900" style="normal" index="21">NotoSansCJK.ttc</font>
<font weight="400" style="normal" index="1" fallbackFor="serif">NotoSerifCJK-Regular.ttc</font>
+ <font weight="700" style="normal" index="1" fallbackFor="serif">NotoSerifCJK-Bold.ttc</font>
</family>
<family lang="und-Zsye">
<font weight="400" style="normal">NotoColorEmoji.ttf</font>
diff --git a/non-updatable-api/current.txt b/non-updatable-api/current.txt
index 5f15216e..6851cf14 100644
--- a/non-updatable-api/current.txt
+++ b/non-updatable-api/current.txt
@@ -79,6 +79,7 @@ package android {
field public static final String DUMP = "android.permission.DUMP";
field public static final String EXPAND_STATUS_BAR = "android.permission.EXPAND_STATUS_BAR";
field public static final String FACTORY_TEST = "android.permission.FACTORY_TEST";
+ field public static final String FAKE_PACKAGE_SIGNATURE = "android.permission.FAKE_PACKAGE_SIGNATURE";
field public static final String FOREGROUND_SERVICE = "android.permission.FOREGROUND_SERVICE";
field public static final String GET_ACCOUNTS = "android.permission.GET_ACCOUNTS";
field public static final String GET_ACCOUNTS_PRIVILEGED = "android.permission.GET_ACCOUNTS_PRIVILEGED";
@@ -182,6 +183,7 @@ package android {
field public static final String CALL_LOG = "android.permission-group.CALL_LOG";
field public static final String CAMERA = "android.permission-group.CAMERA";
field public static final String CONTACTS = "android.permission-group.CONTACTS";
+ field public static final String FAKE_PACKAGE = "android.permission-group.FAKE_PACKAGE";
field public static final String LOCATION = "android.permission-group.LOCATION";
field public static final String MICROPHONE = "android.permission-group.MICROPHONE";
field public static final String PHONE = "android.permission-group.PHONE";
@@ -80385,4 +80387,3 @@ package org.xmlpull.v1.sax2 {
}
}
-
diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java
index ca9d1c6f..a562b918 100644
--- a/services/core/java/com/android/server/pm/PackageManagerService.java
+++ b/services/core/java/com/android/server/pm/PackageManagerService.java
@@ -4465,8 +4465,8 @@ public class PackageManagerService extends IPackageManager.Stub
});
}
- PackageInfo packageInfo = PackageInfoUtils.generate(p, gids, flags,
- ps.firstInstallTime, ps.lastUpdateTime, permissions, state, userId, ps);
+ PackageInfo packageInfo = mayFakeSignature(p, PackageInfoUtils.generate(p, gids, flags,
+ ps.firstInstallTime, ps.lastUpdateTime, permissions, state, userId, ps), permissions);
if (packageInfo == null) {
return null;
@@ -4502,6 +4502,23 @@ public class PackageManagerService extends IPackageManager.Stub
}
}
+ private PackageInfo mayFakeSignature(AndroidPackage p, PackageInfo pi, Set<String> permissions) {
+ try {
+ if (permissions.contains("android.permission.FAKE_PACKAGE_SIGNATURE")
+ && p.getTargetSdkVersion() > Build.VERSION_CODES.LOLLIPOP_MR1
+ && p.getMetaData() != null) {
+ String sig = p.getMetaData().getString("fake-signature");
+ if (sig != null) {
+ pi.signatures = new Signature[] {new Signature(sig)};
+ }
+ }
+ } catch (Throwable t) {
+ // We should never die because of any failures, this is system code!
+ Log.w("PackageManagerService.FAKE_PACKAGE_SIGNATURE", t);
+ }
+ return pi;
+ }
+
@Override
public void checkPackageStartable(String packageName, int userId) {
final int callingUid = Binder.getCallingUid();
project frameworks/native/
diff --git a/cmds/atrace/Android.bp b/cmds/atrace/Android.bp
deleted file mode 100644
index e7d0ad0..0000000
--- a/cmds/atrace/Android.bp
+++ /dev/null
project packages/apps/LineageParts/
diff --git a/res/values-zh-rCN/strings.xml b/res/values-zh-rCN/strings.xml
index 1a5ff77..0ba8acd 100644
--- a/res/values-zh-rCN/strings.xml
+++ b/res/values-zh-rCN/strings.xml
@@ -181,6 +181,8 @@
<string name="home_answer_call_summary">按 Home 键接听来电</string>
<string name="extras_title">附加功能</string>
<string name="additional_buttons_title">附加按钮</string>
+ <string name="edge_gesture_title">边缘触控</string>
+ <string name="edge_gesture_summary">双击手机侧边可触发返回操作</string>
<string name="click_partial_screenshot_title">点击以进行局部截图</string>
<string name="click_partial_screenshot_summary">同时按音量下和电源键以截取局部截图</string>
<string name="button_backlight_title">背光</string>
@@ -463,6 +465,8 @@
<string name="auto_power_save_summary_on">电量 %s 时自动启用省电</string>
<string name="auto_power_save_summary_off">不要自动启用省电</string>
<string name="auto_power_save_never">永不</string>
+ <string name="cpu_overclock_title">高性能模式</string>
+ <string name="cpu_overclock_summary">提升处理器最大功率以改善性能,但可能缩短续航时间</string>
<string name="long_screen_settings_title">全屏应用</string>
<string name="long_screen_settings_summary">强制旧式应用程序使用全屏长宽比</string>
<string name="long_screen_settings_no_apps">无应用</string>
diff --git a/res/values-zh-rTW/strings.xml b/res/values-zh-rTW/strings.xml
index 3a12ffa..c1fd160 100644
--- a/res/values-zh-rTW/strings.xml
+++ b/res/values-zh-rTW/strings.xml
@@ -181,6 +181,8 @@
<string name="home_answer_call_summary">按主畫面鍵接聽來電</string>
<string name="extras_title">附加功能</string>
<string name="additional_buttons_title">附加按鍵</string>
+ <string name="edge_gesture_title">邊緣觸控</string>
+ <string name="edge_gesture_summary">雙擊手機側面以返回</string>
<string name="click_partial_screenshot_title">點擊以局部螢幕截圖</string>
<string name="click_partial_screenshot_summary">短按音量下鍵與電源鍵以局部螢幕截圖</string>
<string name="button_backlight_title">背光</string>
@@ -461,6 +463,8 @@
<string name="auto_power_save_summary_on">在 %s 電量時自動啟用省電模式</string>
<string name="auto_power_save_summary_off">不要自動啟用省電模式</string>
<string name="auto_power_save_never">永不</string>
+ <string name="cpu_overclock_title">高效能模式</string>
+ <string name="cpu_overclock_summary">提高處理器功耗上限以增進性能,但可能縮短續航時間</string>
<string name="long_screen_settings_title">全螢幕應用程式</string>
<string name="long_screen_settings_summary">強制舊型應用程式使用全螢幕的比例</string>
<string name="long_screen_settings_no_apps">沒有應用程式</string>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 8fe201e..afbde60 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -215,6 +215,8 @@
<string name="home_answer_call_summary">Answer incoming calls by pressing the home button</string>
<string name="extras_title">Extras</string>
<string name="additional_buttons_title">Additional buttons</string>
+ <string name="edge_gesture_title">Edge gesture</string>
+ <string name="edge_gesture_summary">Double tap the phone\'s edge causes back</string>
<string name="click_partial_screenshot_title">Click to partial screenshot</string>
<string name="click_partial_screenshot_summary">Short click Volume Down and Power to take partial screenshot</string>
@@ -596,6 +598,8 @@
<string name="auto_power_save_summary_on">Automatically enable power save mode at %s battery</string>
<string name="auto_power_save_summary_off">Do not enable power save mode automatically</string>
<string name="auto_power_save_never">Never</string>
+ <string name="cpu_overclock_title">High performance mode</string>
+ <string name="cpu_overclock_summary">Increase maximum CPU power to improve performance, at the cost of battery life</string>
<!-- Applications: Long screen -->
<string name="long_screen_settings_title">Full screen apps</string>
diff --git a/res/xml/button_settings.xml b/res/xml/button_settings.xml
index 5234a96..236947f 100644
--- a/res/xml/button_settings.xml
+++ b/res/xml/button_settings.xml
@@ -336,6 +336,12 @@
android:action="org.lineageos.settings.device.ADDITIONAL_BUTTONS_SETTINGS" />
</lineageos.preference.RemotePreference>
+ <SwitchPreference
+ android:key="edge_gesture"
+ android:title="@string/edge_gesture_title"
+ android:summary="@string/edge_gesture_summary"
+ android:persistent="false" />
+
<lineageos.preference.LineageSystemSettingSwitchPreference
android:key="click_partial_screenshot"
android:title="@string/click_partial_screenshot_title"
diff --git a/res/xml/perf_profile_settings.xml b/res/xml/perf_profile_settings.xml
index 0b301a9..7a129d5 100644
--- a/res/xml/perf_profile_settings.xml
+++ b/res/xml/perf_profile_settings.xml
@@ -37,6 +37,18 @@
</PreferenceCategory>
+ <PreferenceCategory
+ android:key="cpu_overclock_category"
+ android:title="@string/advanced">
+
+ <SwitchPreference
+ android:key="cpu_overclock"
+ android:title="@string/cpu_overclock_title"
+ android:summary="@string/cpu_overclock_summary"
+ android:persistent="false" />
+
+ </PreferenceCategory>
+
<PreferenceCategory
android:key="perf_profile_category"
android:title="@string/perf_profile_category_title">
diff --git a/src/org/lineageos/lineageparts/input/ButtonSettings.java b/src/org/lineageos/lineageparts/input/ButtonSettings.java
index 613e847..28455bd 100644
--- a/src/org/lineageos/lineageparts/input/ButtonSettings.java
+++ b/src/org/lineageos/lineageparts/input/ButtonSettings.java
@@ -29,6 +29,7 @@ import android.content.SharedPreferences;
import android.os.Bundle;
import android.os.Handler;
import android.os.RemoteException;
+import android.os.SystemProperties;
import android.os.UserHandle;
import android.provider.Settings;
import android.util.ArraySet;
@@ -103,6 +104,7 @@ public class ButtonSettings extends SettingsPreferenceFragment
"torch_long_press_power_gesture";
private static final String KEY_TORCH_LONG_PRESS_POWER_TIMEOUT =
"torch_long_press_power_timeout";
+ private static final String KEY_EDGE_GESTURE = "edge_gesture";
private static final String KEY_CLICK_PARTIAL_SCREENSHOT =
"click_partial_screenshot";
private static final String KEY_SWAP_CAPACITIVE_KEYS = "swap_capacitive_keys";
@@ -118,6 +120,7 @@ public class ButtonSettings extends SettingsPreferenceFragment
private static final String CATEGORY_BACKLIGHT = "key_backlight";
private static final String CATEGORY_NAVBAR = "navigation_bar_category";
private static final String CATEGORY_EXTRAS = "extras_category";
+ private static final String PRODUCT = SystemProperties.get("ro.build.product", "");
private ListPreference mBackLongPressAction;
private ListPreference mHomeLongPressAction;
@@ -147,6 +150,7 @@ public class ButtonSettings extends SettingsPreferenceFragment
private SwitchPreference mHomeAnswerCall;
private SwitchPreference mTorchLongPressPowerGesture;
private ListPreference mTorchLongPressPowerTimeout;
+ private SwitchPreference mEdgeGesture;
private SwitchPreference mSwapCapacitiveKeys;
private PreferenceCategory mNavigationPreferencesCat;
@@ -470,6 +474,17 @@ public class ButtonSettings extends SettingsPreferenceFragment
mSwapCapacitiveKeys.setDependency(KEY_DISABLE_NAV_KEYS);
}
+ // Edge gesture controller
+ mEdgeGesture = findPreference(KEY_EDGE_GESTURE);
+
+ if (mEdgeGesture != null) {
+ if (PRODUCT.equals("libra")) {
+ mEdgeGesture.setChecked(SystemProperties.getBoolean("persist.vendor.edge_touch_mode", false));
+ } else {
+ extrasCategory.removePreference(mEdgeGesture);
+ }
+ }
+
// Override key actions on Go devices in order to hide any unsupported features
if (ActivityManager.isLowRamDeviceStatic()) {
String[] actionEntriesGo = res.getStringArray(R.array.hardware_keys_action_entries_go);
@@ -552,6 +567,13 @@ public class ButtonSettings extends SettingsPreferenceFragment
(incallHomeBehavior == LineageSettings.Secure.RING_HOME_BUTTON_BEHAVIOR_ANSWER);
mHomeAnswerCall.setChecked(homeButtonAnswersCall);
}
+
+ // Get edge gesture status.
+ if (mEdgeGesture != null) {
+ if (PRODUCT.equals("libra")) {
+ mEdgeGesture.setChecked(SystemProperties.getBoolean("persist.vendor.edge_touch_mode", false));
+ }
+ }
}
private ListPreference initList(String key, Action value) {
@@ -837,6 +859,11 @@ public class ButtonSettings extends SettingsPreferenceFragment
} else if (preference == mHomeAnswerCall) {
handleToggleHomeButtonAnswersCallPreferenceClick();
return true;
+ } else if (preference == mEdgeGesture) {
+ if (PRODUCT.equals("libra")) {
+ SystemProperties.set("persist.vendor.edge_touch_mode", mEdgeGesture.isChecked() ? "true" : "false");
+ }
+ return true;
}
return super.onPreferenceTreeClick(preference);
diff --git a/src/org/lineageos/lineageparts/power/PerfProfileSettings.java b/src/org/lineageos/lineageparts/power/PerfProfileSettings.java
index 949562f..d3ba3d6 100644
--- a/src/org/lineageos/lineageparts/power/PerfProfileSettings.java
+++ b/src/org/lineageos/lineageparts/power/PerfProfileSettings.java
@@ -28,6 +28,7 @@ import android.graphics.drawable.AnimatedVectorDrawable;
import android.net.Uri;
import android.os.Bundle;
import android.os.PowerManager;
+import android.os.SystemProperties;
import android.provider.Settings.Global;
import android.util.ArraySet;
import android.util.TypedValue;
@@ -65,9 +66,13 @@ public class PerfProfileSettings extends SettingsPreferenceFragment
private static final String KEY_AUTO_POWER_SAVE = "auto_power_save";
private static final String KEY_POWER_SAVE = "power_save";
private static final String KEY_PERF_SEEKBAR = "perf_seekbar";
+ private static final String KEY_CPU_OVERCLOCK_CATEGORY = "cpu_overclock_category";
+ private static final String KEY_CPU_OVERCLOCK = "cpu_overclock";
+ private static final String PRODUCT = SystemProperties.get("ro.build.product", "");
private ListPreference mAutoPowerSavePref;
private SwitchPreference mPowerSavePref;
+ private SwitchPreference mCPUOverclockPref;
private SeekBarPreference mPerfSeekBar;
private StopMotionVectorDrawable mPerfDrawable;
@@ -96,6 +101,7 @@ public class PerfProfileSettings extends SettingsPreferenceFragment
mPerfSeekBar = findPreference(KEY_PERF_SEEKBAR);
mAutoPowerSavePref = findPreference(KEY_AUTO_POWER_SAVE);
mPowerSavePref = findPreference(KEY_POWER_SAVE);
+ mCPUOverclockPref = findPreference(KEY_CPU_OVERCLOCK);
mPowerManager = getActivity().getSystemService(PowerManager.class);
mPerf = PerformanceManager.getInstance(getActivity());
@@ -126,6 +132,13 @@ public class PerfProfileSettings extends SettingsPreferenceFragment
updateAutoPowerSaveValue();
mAutoPowerSavePref.setOnPreferenceChangeListener(this);
mPowerSavePref.setOnPreferenceChangeListener(this);
+
+ if (PRODUCT.equals("aqua") || PRODUCT.equals("libra")) {
+ mCPUOverclockPref.setChecked(SystemProperties.getBoolean("persist.sys.cpu_overclock", false));
+ mCPUOverclockPref.setOnPreferenceChangeListener(this);
+ } else {
+ removePreference(KEY_CPU_OVERCLOCK_CATEGORY);
+ }
}
@@ -212,6 +225,12 @@ public class PerfProfileSettings extends SettingsPreferenceFragment
getActivity().registerReceiver(mPowerSaveReceiver,
new IntentFilter(PowerManager.ACTION_POWER_SAVE_MODE_CHANGING));
}
+
+ if (mCPUOverclockPref != null) {
+ if (PRODUCT.equals("aqua") || PRODUCT.equals("libra")) {
+ mCPUOverclockPref.setChecked(SystemProperties.getBoolean("persist.sys.cpu_overclock", false));
+ }
+ }
}
@Override
@@ -246,6 +265,10 @@ public class PerfProfileSettings extends SettingsPreferenceFragment
final int level = Integer.parseInt((String) newValue);
Global.putInt(getContentResolver(), Global.LOW_POWER_MODE_TRIGGER_LEVEL, level);
updateAutoPowerSaveSummary(level);
+ } else if (preference == mCPUOverclockPref) {
+ if (PRODUCT.equals("aqua") || PRODUCT.equals("libra")) {
+ SystemProperties.set("persist.sys.cpu_overclock", mCPUOverclockPref.isChecked() ? "false" : "true");
+ }
}
return true;
}
project packages/apps/PermissionController/
diff --git a/src/com/android/permissioncontroller/permission/utils/Utils.java b/src/com/android/permissioncontroller/permission/utils/Utils.java
index 65fdd59..fdd71e2 100644
--- a/src/com/android/permissioncontroller/permission/utils/Utils.java
+++ b/src/com/android/permissioncontroller/permission/utils/Utils.java
@@ -23,6 +23,7 @@ import static android.Manifest.permission_group.CALENDAR;
import static android.Manifest.permission_group.CALL_LOG;
import static android.Manifest.permission_group.CAMERA;
import static android.Manifest.permission_group.CONTACTS;