72 Commits
vic ... vic-bak

Author SHA1 Message Date
RobertGarciaa
4fd10baeb1 sm8350-common: Address sepolicy for MIUI camera
13202 com.android.camera W .android.camera: type=1400 audit(0.0:137): avc:  denied  { read } for  name="u:object_r:vendor_audio_prop:s0" dev="tmpfs" ino=11770 scontext=u:r:platform_app:s0:c512,c768 tcontext=u:object_r:vendor_audio_prop:s0 tclass=file permissive=0 app=com.android.camera
13202 com.android.camera W libc: Access denied finding property "ro.vendor.audio.us.proximity"​
05-28 18:59:04.807   995 12991 W libc    : Access denied finding property "camera.debug.superlowlight"

Signed-off-by: RobertGarciaa <chae0218@naver.com>
2024-12-31 20:43:25 +09:00
Murat Kozan
31daeaa32d sm8350-common: sepolicy: Label persist.vendor.low.cutoff for Leica Camera
Leica camera
 libc : Access denied finding property "persist.vendor.low.cutoff"

Signed-off-by: RobertGarciaa <chae0218@naver.com>
2024-12-31 20:43:25 +09:00
RobertGarciaa
c24cbaaf75 sm8350-common: Add sepolicy for MIUI camera
1 W /system/bin/init: type=1107 audit(0.0:133): uid=0 auid=4294967295 ses=4294967295 subj=u:r:init:s0 msg='avc:  denied  { set } for property=persist.vendor.aiie_capture_log.debug pid=992 uid=1047 gid=1005 scontext=u:r:hal_camera_default:s0 tcontext=u:object_r:vendor_default_prop:s0 tclass=property_service permissive=0'
7940 W libc    : Access denied finding property "persist.al.cfr.loglevel"
391 E init    : Unable to set property 'persist.vendor.aiie_capture_log.debug' from uid:1047 gid:1005 pid:992: SELinux permission check failed

Signed-off-by: RobertGarciaa <chae0218@naver.com>
2024-12-31 20:43:25 +09:00
AndroidHQ254
7143861df7 sm8350-common: sepolicy: Label ro.hardware.chipname property
W libc    : Access denied finding property "ro.hardware.chipname"

Signed-off-by: RobertGarciaa <chae0218@naver.com>
2024-12-31 20:43:25 +09:00
Davide Garberi
cfbc41b043 sm8350-common: Build libhidltransport and libhwbinder
05-05 15:53:59.961 12354 12354 E MI_Algo_JNI: Open /system/lib64/libmicampostproc_client.so Error :dlopen failed: library "libhidltransport.so" not found: needed by /system/lib64/libmicampostproc_client.so in namespace clns-shared-4

Change-Id: Id87af3af701000734aaa89f1ec98a80dd70a266b
Signed-off-by: RobertGarciaa <chae0218@naver.com>
2024-12-31 20:43:25 +09:00
RobertGarciaa
b1da7def07 sm8350-common: Address some denials
19537 W libc    : Access denied finding property "vendor.camera.sensor.logsystem"
19537 W libc    : Access denied finding property "vendor.panel.display"

Signed-off-by: RobertGarciaa <chae0218@naver.com>
2024-12-31 20:43:25 +09:00
Murat Kozan
1a898531fe sm8350-common: sepolicy: Label ro.miui.build.region
08-28 13:06:16.280   898  7800 W libc    : Access denied finding property "ro.miui.build.region"

Signed-off-by: RobertGarciaa <chae0218@naver.com>
2024-12-31 20:43:25 +09:00
Amit Pundir
f35cdfe07b sm8350-common: sepolicy: Address mediaswcodec denials
- avc: denied { read write } for name="kgsl-3d0" dev="tmpfs" ino=1100 scontext=u:r:mediaswcodec:s0 tcontext=u:object_r:gpu_device:s0 tclass=chr_file permissive=0

Signed-off-by: RobertGarciaa <chae0218@naver.com>
2024-12-31 20:43:25 +09:00
piscesmk2013
5e015c4004 sm8350-common: sepolicy: Allow mediaserver to find native service
Change-Id: I7db098069e7aa4be74935a506c9a3ceacfd755e3
2024-12-31 20:43:25 +09:00
Pig
6d2e043451 sm8350-common: sepolicy: Label ro.product.mod_device
Signed-off-by: RobertGarciaa <chae0218@naver.com>
2024-12-31 20:43:25 +09:00
AdarshGrewal
3de6803009 sm8350-common: sepolicy: Label ro.product.marketname
Signed-off-by: RobertGarciaa <chae0218@naver.com>
2024-12-31 20:43:25 +09:00
bheatleyyy
2d8a79e738 sm8350-common: sepolicy: Allow cameraserver write to property socket
Signed-off-by: RobertGarciaa <chae0218@naver.com>
2024-12-31 20:43:25 +09:00
Kuba Wojciechowski
4f9bb54f7f sm8350-common: sepolicy: Address camera denials
Change-Id: Ie6546e690c5acd6b1f544ec1a110ec5341406481
Signed-off-by: RobertGarciaa <chae0218@naver.com>
2024-12-31 20:43:25 +09:00
Adithya R
9563071efd sm8350-common: sepolicy: Update camera property contexts
Change-Id: I874a71c70b5e7d5e46e68e6109014e2b632a2ea2
Signed-off-by: RobertGarciaa <chae0218@naver.com>
2024-12-31 20:43:25 +09:00
Carlos Arriaga
21bd9a6d99 sm8350-common: sepolicy: Add camera label's
W libc    : Access denied finding property "ro.camera.req.fmq.size"
W libc    : Access denied finding property "ro.camera.res.fmq.size"
Signed-off-by: RobertGarciaa <chae0218@naver.com>
2024-12-31 20:43:25 +09:00
RobertGarciaa
20fe9c122b sm8350-common: Build more soundtrigger packages
W libc    : Unable to set property "ctl.interface_start" to "android.hardware.soundtrigger@2.0::ISoundTriggerHw/default": PROP_ERROR_HANDLE_CONTROL_MESSAGE (0x20)

Signed-off-by: RobertGarciaa <chae0218@naver.com>
2024-12-31 20:42:44 +09:00
RobertGarciaa
a85dda8932 sm8350-common: Link libbinder_shim.so to fix elf check for libwfdnative
Output:
out/soong/.intermediates/vendor/xiaomi/sm8350-common/libwfdnative/android_arm64_armv8-2a_shared/libwfdnative.so: error: Unresolved symbol: _ZN7android6binder10atrace_endEm@LIBBINDER
out/soong/.intermediates/vendor/xiaomi/sm8350-common/libwfdnative/android_arm64_armv8-2a_shared/libwfdnative.so: error: Unresolved symbol: _ZN7android6binder12atrace_beginEmPKc@LIBBINDER
out/soong/.intermediates/vendor/xiaomi/sm8350-common/libwfdnative/android_arm64_armv8-2a_shared/libwfdnative.so: note:
out/soong/.intermediates/vendor/xiaomi/sm8350-common/libwfdnative/android_arm64_armv8-2a_shared/libwfdnative.so: note: Some dependencies might be changed, thus the symbol(s) above cannot be resolved.
out/soong/.intermediates/vendor/xiaomi/sm8350-common/libwfdnative/android_arm64_armv8-2a_shared/libwfdnative.so: note: Please re-build the prebuilt file: "out/soong/.intermediates/vendor/xiaomi/sm8350-common/libwfdnative/android_arm64_armv8-2a_shared/libwfdnative.so".
out/soong/.intermediates/vendor/xiaomi/sm8350-common/libwfdnative/android_arm64_armv8-2a_shared/libwfdnative.so: note:
out/soong/.intermediates/vendor/xiaomi/sm8350-common/libwfdnative/android_arm64_armv8-2a_shared/libwfdnative.so: note: If this is a new prebuilt file and it is designed to have unresolved symbols, add one of the following properties:
out/soong/.intermediates/vendor/xiaomi/sm8350-common/libwfdnative/android_arm64_armv8-2a_shared/libwfdnative.so: note:   Android.bp: allow_undefined_symbols: true,
out/soong/.intermediates/vendor/xiaomi/sm8350-common/libwfdnative/android_arm64_armv8-2a_shared/libwfdnative.so: note:   Android.mk: LOCAL_ALLOW_UNDEFINED_SYMBOLS := true

Signed-off-by: RobertGarciaa <chae0218@naver.com>
2024-12-31 20:42:44 +09:00
COSMIC
8def099c97 sm8350-common: Patch libwfdservice to load android.media.audio.common.types-V4-cpp.so
Fixes:
error: module "libwfdservice" variant "android_arm64_armv8-2a_cortex-a76_static":
depends on multiple versions of the same aidl_interface:
android.media.audio.common.types-V3-cpp-source,
android.media.audio.common.types-V4-cpp-source

Signed-off-by: RobertGarciaa <chae0218@naver.com>
2024-12-31 20:42:36 +09:00
dianlujitao
06a9181b2f sm8350-common: Make fastrpc_shell_3 publicly available
* Used by GCAM for DSP-accelerated HDR processing
 * Arguably we should label /vendor/dsp/cdsp/fastrpc_shell_3 to
   same_process_hal_file like Pixels, but the partition is prebuilt thus
   we're unable to relabel it.
 * Copy the file to writable tmpfs, setup attributes and bind mount back
   to workaround the limitation.

[ghostrider-reborn]:
Allow adsp/cdsprpcd and neuralnetworks HAL to access fastrpc_shell_3

[kras edit:
 1. rename some contexts as per qva/kona
 2. extend to allow camera HAL and VPP service to access it as well]

Co-authored-by: Adithya R <gh0strider.2k18.reborn@gmail.com>
Change-Id: Ide90e5c7307d413db5ece736e859559f06679545
Signed-off-by: RobertGarciaa <chae0218@naver.com>
2024-12-31 20:42:04 +09:00
RobertGarciaa
acfba225c8 sm8350-common: Label more wakeup
for i in $(realpath /sys/class/wakeup/*); do if ! echo "$(ls -dZ $i)" | grep -q sysfs_wakeup; then echo genfscon sysfs $(echo $i | sed -e 's|/sys||g' -e 's|wakeup/wakeup.|wakeup|g' -e 's|wakeup[0-9]*|wakeup|g') u:object_r:sysfs_wakeup:s0; fi; done | sort -u

09-21 10:21:21.407   813   813 W binder:813_7: type=1400 audit(0.0:1684): avc:  denied  { read } for  name="event_count" dev="sysfs" ino=78308 scontext=u:r:system_suspend:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0
09-21 10:21:21.407   813   813 W binder:813_7: type=1400 audit(0.0:1685): avc:  denied  { read } for  name="max_time_ms" dev="sysfs" ino=78313 scontext=u:r:system_suspend:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0
09-21 10:21:21.407   813   813 W binder:813_7: type=1400 audit(0.0:1686): avc:  denied  { read } for  name="wakeup_count" dev="sysfs" ino=78309 scontext=u:r:system_suspend:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0
09-21 10:21:21.407   813   813 W binder:813_7: type=1400 audit(0.0:1687): avc:  denied  { read } for  name="total_time_ms" dev="sysfs" ino=78312 scontext=u:r:system_suspend:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0
09-21 10:21:21.407   813   813 W binder:813_7: type=1400 audit(0.0:1688): avc:  denied  { read } for  name="expire_count" dev="sysfs" ino=78310 scontext=u:r:system_suspend:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0

09-21 10:17:28.575   813  2119 E android.system.suspend-service: Error opening event_count for wakeup32: Permission denied
09-21 10:17:28.575   813  2119 E android.system.suspend-service: Error reading event_count for wakeup32: Bad file descriptor
09-21 10:17:28.575   813  2119 E android.system.suspend-service: Error opening max_time_ms for wakeup32: Permission denied
09-21 10:17:28.575   813  2119 E android.system.suspend-service: Error reading max_time_ms for wakeup32: Bad file descriptor
09-21 10:17:28.576   813  2119 E android.system.suspend-service: Error opening wakeup_count for wakeup32: Permission denied
09-21 10:17:28.576   813  2119 E android.system.suspend-service: Error reading wakeup_count for wakeup32: Bad file descriptor
09-21 10:17:28.576   813  2119 E android.system.suspend-service: Error opening total_time_ms for wakeup32: Permission denied
09-21 10:17:28.576   813  2119 E android.system.suspend-service: Error reading total_time_ms for wakeup32: Bad file descriptor
09-21 10:17:28.576   813  2119 E android.system.suspend-service: Error opening expire_count for wakeup32: Permission denied
09-21 10:17:28.576   813  2119 E android.system.suspend-service: Error reading expire_count for wakeup32: Bad file descriptor
09-21 10:17:28.576   813  2119 E android.system.suspend-service: Error opening active_count for wakeup32: Permission denied
09-21 10:17:28.576   813  2119 E android.system.suspend-service: Error reading active_count for wakeup32: Bad file descriptor
09-21 10:17:28.576   813  2119 E android.system.suspend-service: Error opening last_change_ms for wakeup32: Permission denied
09-21 10:17:28.576   813  2119 E android.system.suspend-service: Error reading last_change_ms for wakeup32: Bad file descriptor
09-21 10:17:28.576   813  2119 E android.system.suspend-service: Error opening waiting_for_supplier for wakeup32: Permission denied
09-21 10:17:28.576   813  2119 E android.system.suspend-service: Error reading waiting_for_supplier for wakeup32: Bad file descriptor
09-21 10:17:28.576   813  2119 E android.system.suspend-service: Error opening prevent_suspend_time_ms for wakeup32: Permission denied
09-21 10:17:28.576   813  2119 E android.system.suspend-service: Error reading prevent_suspend_time_ms for wakeup32: Bad file descriptor
09-21 10:17:28.576   813  2119 E android.system.suspend-service: Error opening name for wakeup32: Permission denied
09-21 10:17:28.576   813  2119 E android.system.suspend-service: Error reading name for wakeup32: Bad file descriptor
09-21 10:17:28.576   813  2119 E android.system.suspend-service: Error opening active_time_ms for wakeup32: Permission denied
09-21 10:17:28.576   813  2119 E android.system.suspend-service: Error reading active_time_ms for wakeup32: Bad file descriptor

Signed-off-by: RobertGarciaa <chae0218@naver.com>
2024-12-31 20:42:04 +09:00
RobertGarciaa
1d42cc1b1e sm8350-common: sepolicy: Fix vendor_hal_perf_default denials
avc:  denied  { set } for property=ctl.vendor.msm_irqbalance pid=1057 uid=0 gid=0 scontext=u:r:vendor_hal_perf_default:s0 tcontext=u:object_r:vendor_msm_irqbalance_prop:s0 tclass=property_service permissive=0
avc:  denied  { set } for property=ctl.stop$vendor.msm_irqbalance pid=1057 uid=0 gid=0 scontext=u:r:vendor_hal_perf_default:s0 tcontext=u:object_r:ctl_stop_prop:s0 tclass=property_service permissive=0
avc:  denied  { set } for property=ctl.start$vendor.msm_irqbalance pid=1057 uid=0 gid=0 scontext=u:r:vendor_hal_perf_default:s0 tcontext=u:object_r:ctl_start_prop:s0 tclass=property_service permissive=0

Signed-off-by: RobertGarciaa <chae0218@naver.com>
2024-12-31 20:42:04 +09:00
RobertGarciaa
2bd970580f sm8350-common: Define missing HALs in FCM
The following HALs in device manifest are not declared in FCM <= level 5:
  android.hardware.biometrics.fingerprint@2.3::IBiometricsFingerprint/default
  android.hardware.power@1.2::IPower/default
  android.hardware.bluetooth.audio.IBluetoothAudioProviderFactory/default (@4)
  android.hardware.boot@1.2::IBootControl/default
  android.hardware.drm.IDrmFactory/clearkey (@1)
  android.hardware.nfc.INfc/default (@1)
  android.hardware.usb.IUsb/default (@1)
  android.hardware.wifi.IWifi/default (@1)
  android.hardware.wifi.IWifi/default (@2)
  android.hardware.wifi.hostapd.IHostapd/default (@2)
  android.hardware.wifi.supplicant.ISupplicant/default (@3)
  android.hardware.power.IPower/default (@4)
  android.hardware.vibrator.IVibrator/default (@2)
  android.hardware.health.IHealth/default (@3)
  android.hardware.ir.IConsumerIr/default (@1)
  android.hardware.sensors.ISensors/default (@2)
  android.hardware.thermal.IThermal/default (@1)
COMPATIBLE

Signed-off-by: RobertGarciaa <chae0218@naver.com>
2024-12-31 20:42:04 +09:00
RobertGarciaa
b88dc315e3 sm8350-common: Shim libwvdrmengine with libcrypto_shim
out/soong/.intermediates/vendor/xiaomi/sm8350-common/libwvdrmengine/android_vendor_arm64_armv8-2a_shared/e560d7b19ebf7276b3e850d3d346dec8/libwvdrmengine.so: error: Unresolved symbol: CBS_init
out/soong/.intermediates/vendor/xiaomi/sm8350-common/libwvdrmengine/android_vendor_arm64_armv8-2a_shared/e560d7b19ebf7276b3e850d3d346dec8/libwvdrmengine.so: note:
out/soong/.intermediates/vendor/xiaomi/sm8350-common/libwvdrmengine/android_vendor_arm64_armv8-2a_shared/e560d7b19ebf7276b3e850d3d346dec8/libwvdrmengine.so: note: Some dependencies might be changed, thus the symbol(s) above cannot be resolved.
out/soong/.intermediates/vendor/xiaomi/sm8350-common/libwvdrmengine/android_vendor_arm64_armv8-2a_shared/e560d7b19ebf7276b3e850d3d346dec8/libwvdrmengine.so: note: Please re-build the prebuilt file: "out/soong/.intermediates/vendor/xiaomi/sm8350-common/libwvdrmengine/android_vendor_arm64_armv8-2a_shared/e560d7b19ebf7276b3e850d3d346dec8/libwvdrmengine.so".
out/soong/.intermediates/vendor/xiaomi/sm8350-common/libwvdrmengine/android_vendor_arm64_armv8-2a_shared/e560d7b19ebf7276b3e850d3d346dec8/libwvdrmengine.so: note:
out/soong/.intermediates/vendor/xiaomi/sm8350-common/libwvdrmengine/android_vendor_arm64_armv8-2a_shared/e560d7b19ebf7276b3e850d3d346dec8/libwvdrmengine.so: note: If this is a new prebuilt file and it is designed to have unresolved symbols, add one of the following properties:
out/soong/.intermediates/vendor/xiaomi/sm8350-common/libwvdrmengine/android_vendor_arm64_armv8-2a_shared/e560d7b19ebf7276b3e850d3d346dec8/libwvdrmengine.so: note:   Android.bp: allow_undefined_symbols: true,
out/soong/.intermediates/vendor/xiaomi/sm8350-common/libwvdrmengine/android_vendor_arm64_armv8-2a_shared/e560d7b19ebf7276b3e850d3d346dec8/libwvdrmengine.so: note:   Android.mk: LOCAL_ALLOW_UNDEFINED_SYMBOLS := true

like this commit
8ccab8a111

Signed-off-by: RobertGarciaa <chae0218@naver.com>
2024-12-31 20:42:04 +09:00
Andrzej Perczak
b7292e3ea9 sm8350-common: Disable redir_party_num
Caused incoming caller number not being parsed correctly by Phone app on
VoLTE and VoWiFi. No idea why Xiaomi enabled this ancient prop.

Signed-off-by: Andrzej Perczak <linux@andrzejperczak.com>
Change-Id: I4d3d19b80bedd7410e638c78909a8a910bc10be8
Signed-off-by: RobertGarciaa <chae0218@naver.com>
2024-12-31 20:39:39 +09:00
Arian
e7c1b91c79 sm8350-common: Import qcril_database and generate the db at build time
Imported from haydn V816.0.6.0.UKKMIXM

Change-Id: I7798bd3c33d3b6f801e8f48a06fe994947715db9
Signed-off-by: RobertGarciaa <chae0218@naver.com>
2024-12-31 20:39:39 +09:00
Xin Li
09185b789c sm8350-common: overlay: Turn on screen on unplug
Signed-off-by: Vaisakh Murali <mvaisakh@statixos.com>
Change-Id: I9d49a6bcdaaf2defa4d8c9c3528110b25e266653
Signed-off-by: RobertGarciaa <chae0218@naver.com>
2024-12-31 20:39:33 +09:00
Karan Parashar
ad8ffb7d5d sm8350-common: overlay: Enable force LTE_CA toggle
Change-Id: I79715f210feb4958b5bb8d4b67b099eb4e577401
Signed-off-by: RobertGarciaa <chae0218@naver.com>
2024-12-31 20:39:33 +09:00
Karan Parashar
6f573a5efc sm8350-common: overlay: Disable pocket mode lock
Change-Id: I85ee0637f65e0ba11b7b57ff2461ad769bf946b3
Signed-off-by: RobertGarciaa <chae0218@naver.com>
2024-12-31 20:39:33 +09:00
Cassie
2dd3661db3 sm8350-common: overlay: Use the new auto network selection UI
Change-Id: I76698911103601d5f3ad67e1099790af8c2fdc18
Signed-off-by: RobertGarciaa <chae0218@naver.com>
2024-12-31 20:39:32 +09:00
LuK1337
8e69a9a10d sm8350-common: overlay: Set max network scan search time to 254
Matches value found in stock TeleServiceQcom.

Change-Id: If2b224298ffe731f8ccfd0b4f3b6d8a257b6f968
Signed-off-by: aswin7469 <aswinas@pixysos.com>
Signed-off-by: NotHarshhaa <reddyharshhaa12@gmail.com>
Signed-off-by: RobertGarciaa <chae0218@naver.com>
2024-12-31 20:39:09 +09:00
Elektroschmock
1b7137eabf sm8350-common: sepolicy: Fix isolated_app denial
avc:  denied  { setattr } for  name="model-info.pb" dev="dm-38" ino=16414 scontext=u:r:isolated_app:s0:c512,c768 tcontext=u:object_r:app_data_file:s0:c61,c257,c512,c768 tclass=file permissive=0
avc:  denied  { setattr } for  name="model.tflite" dev="dm-38" ino=14897 scontext=u:r:isolated_app:s0:c512,c768 tcontext=u:object_r:app_data_file:s0:c61,c257,c512,c768 tclass=file permissive=0

Change-Id: I9a70417149c3239b89cc4266942cb3de4da34a4f
Signed-off-by: Kneba <abenkenary3@gmail.com>
Signed-off-by: dotkit <ewprjkt@proton.me>
Signed-off-by: RobertGarciaa <chae0218@naver.com>
2024-12-31 20:38:37 +09:00
RobertGarciaa
94ff72434b sm8350-common: sepolicy: Address some sepolicy denials
avc:  denied  { read } for  name="cmdline" dev="proc" ino=59888 scontext=u:r:vendor_hal_perf_default:s0 tcontext=u:r:hal_camera_default:s0 tclass=file permissive=0
avc:  denied  { read } for  name="comm" dev="proc" ino=59889 scontext=u:r:vendor_hal_perf_default:s0 tcontext=u:r:hal_camera_default:s0 tclass=file permissive=0

Signed-off-by: RobertGarciaa <chae0218@naver.com>
2024-12-31 20:38:37 +09:00
Tri Vo
2a8e1a6eaa sm8350-common: sepolicy: Neverallow app open access to /dev/ashmem
- Fixes scroll lag in apps such as twitter etc.

Apps are no longer allowed open access to /dev/ashmem, unless they
target API level < Q.

Bug: 113362644
Test: device boots, Chrome, instant apps work
Change-Id: I1cff08f26159fbf48a42afa7cfa08eafa1936f42

Signed-off-by: BladeRunner-A2C <prisoner56898@protonmail.com>
Signed-off-by: RobertGarciaa <chae0218@naver.com>
2024-12-31 20:38:37 +09:00
¨raystef66¨
ead94bb57e sm8350-common: sepolicy: Adress isolated_app denial
* SELinux : avc:  denied  { find } for pid=19014 uid=99025 name=content_capture scontext=u:r:isolated_app:s0:c512,c768 tcontext=u:object_r:content_capture_service:s0 tclass=service_manager permissive=0
* SELinux : avc:  denied  { find } for pid=11474 uid=99937 name=content_capture scontext=u:r:isolated_app:s0:c512,c768 tcontext=u:object_r:content_capture_service:s0 tclass=service_manager permissive=0

Signed-off-by: RobertGarciaa <chae0218@naver.com>
Change-Id: Ia59e3989a9f0c2aae930f61ed9e266659f6c92fa
2024-12-31 20:38:37 +09:00
minaripenguin
a8dc81168a sm8350-common: sepolicy: Resolve qemu_hw_prop denial
avc: denied { read } for name="u:object_r:qemu_hw_prop:s0" dev="tmpfs" ino=1316 scontext=u:r:system_app:s0 tcontext=u:object_r:qemu_hw_prop:s0 tclass=file permissive=0
Signed-off-by: RobertGarciaa <chae0218@naver.com>
2024-12-31 20:38:37 +09:00
wshamroukh
b6c6b79eef sm8350-common: sepolicy: dontaudit camera hal default_prop
avc: denied { read } for name="u:object_r:default_prop:s0" dev="tmpfs" ino=2320 scontext=u:r:hal_camera_default:s0 tcontext=u:object_r:default_prop:s0 tclass=file permissive=0

Signed-off-by: RobertGarciaa <chae0218@naver.com>
2024-12-31 20:38:37 +09:00
Владимир
93e453da84 sm8350-common: silence log spam OpenGLRenderer
E OpenGLRenderer: Unable to match the desired swap behavior.

Signed-off-by: RobertGarciaa <chae0218@naver.com>
2024-12-31 20:38:35 +09:00
Gareth Kitchen
207289cad1 sm8350-common: gps: Localise NTP to improve GPS TTFF
Testing response times to time.android.com from around the globe reveals
in ms:-

Europe			 <30
Middle East		 <68
North America		<150
Johannesburg		 183
Buenos Aires		 220
Tokyo			 226
Sydney			 276
Hong Kong		 285
Brisbane		 295
Mumbai			 349
Beijing			4691
Shanghai		4906
Russia			 n/a

Whilst time.android.com is NOT used for GPS NTP, North American time servers
are, by specifying north-america.pool.ntp.org as default in the framework,
to align with pixel devices.  I am assuming similar response times to these
servers from around the world.

Great for North America and it appears Europe but it does not address the
global issue. Also, the pool.ntp.org project forbids both hardware and
software vendors from using these default zone names.
http://www.pool.ntp.org/en/vendors.html

It makes sense, therefore, to leverage the ntp.org's existing 'android' vendor
name to make the default ntp server for GPS purposes:
1.android.pool.ntp.org this will return a random but accurate NTP server in
close geopraphic proximity to the device.

Testing on my own build in the UK seems to improve hot and cold TTFF
considerably.

Change-Id: I144af45757efa35b32daf034eece6e046d2bde79
Signed-off-by: Chenyang Zhong <zhongcy95@gmail.com>
Signed-off-by: Adithya R <gh0strider.2k18.reborn@gmail.com>
Signed-off-by: RobertGarciaa <chae0218@naver.com>
2024-12-31 20:38:35 +09:00
Michael Bestas
c89c29b729 sm8350-common: Switch to AIDL USB HALs
Change-Id: I70f6a4e57eef577d86987bfae44f381a4f107624
2024-12-31 20:38:35 +09:00
LuK1337
c2da458c8f sm8350-common: Shim WFD with libgui_shim/libinput_shim
Change-Id: I42bf06bc6b19942303031ef0147dafa6df127fe5
2024-12-31 20:38:22 +09:00
Luofan Chen
ae9a0c11f6 sm8350-common: Remove quotes in TARGET_RECOVERY_PIXEL_FORMAT
Change-Id: Ic400a47f0b4b8d2884082b99df3fe2e09c9438f6
2024-12-31 20:38:22 +09:00
Michael Bestas
af65104e42 sm8350-common: Sync extract scripts with 22 templates
Change-Id: I7963ae050cfb193c5d0c2636da9c1e8f82bcdbdb
2024-12-31 20:38:22 +09:00
Michael Bestas
52ef86fab6 sm8350-common: Shim libwvhidl with libcrypto_shim
The following change
e202e51cb0
removed symbols that our libs require.

Change-Id: I1325c34ecec3d339dd68c665010ecb36fa2e6a29
2024-12-31 20:38:22 +09:00
Michael Bestas
f134314a37 sm8350-common: Switch to AIDL thermal HAL
Change-Id: I6ae621194044ab66fad69b9ef997b3b347bf6120
2024-12-31 20:34:01 +09:00
LucasBlackLu
b4cfbdcbde sm8350-common: Allow ELF prebuilts
* Solve this build error(s):
  error: found ELF prebuilt in PRODUCT_COPY_FILES, use cc_prebuilt_binary / cc_prebuilt_library_shared instead.

Change-Id: Ie5c8f30c823b7154fe2f270ffdb632b041575a15
2024-10-24 22:16:08 +09:00
Dmitry
344ba7d76f sm8350-common: Add blobs for QTI diag services support & Fix qccsyshal elf checks
* Add blobs for QTI diag services support & Fix qccsyshal elf checks

1. QTI diag Required for apps like Network Signal Guru.
2. libqcc_file_agent" depends on undefined module "vendor.qti.hardware.qccsyshal@1.0-vendor

* Switch to Memtrack AIDL service

1/2

* Switch to Memtrack AIDL service

2/2

* add symlinks

Mark CNE symlink target as required package
Declare WFD lib as symlinks during extraction
Declare EGL libs as symlinks during extraction
Declare IMS libs as symlinks during extraction

* add symlink
2024-10-23 15:43:41 +08:00
6bbdbcad04 sm8350-common: Initialize for Evolution X 9.x 2024-10-22 15:33:21 +09:00
pengfeix
9e86cde481 sm8350-common: overlay: Enable IMS feature flags for supported carriers
- Enable VoLTE/VoWIFI for all indian cariers
- Enable VoLTE for Viettel Vietnam
- Enable VoLTE for Mobifone Vietnam
- Add full Support Carrier Smartfren VoLTE
- Enable VoLTE support for Indosat and XL Axiata
- Enable VoLTE support for Telkomsel (Indonesia)
- Enable VoLTE support for Three
- Enable VoLTE support for Bakcell (Azerbaijan)

Signed-off-by: Frost <159105703+Karan-Frost@users.noreply.github.com>
2024-10-22 15:33:05 +09:00
Pratyay Borborah
fd26542f2b sm8350-common: Add SystemUI restart in restart advanced menu 2024-10-22 15:33:05 +09:00
Sebastiano Barezzi
9422aec9db sm8350-common: Partially revert "Move to QTI health AIDL service"
https://github.com/LineageOS/android_system_core/blob/lineage-21.0/init/init.cpp#L1099

This partially reverts commit 4aca996701.

Change-Id: I284f80f364e9057a8373a015f0acaee3ef9e395d
2024-10-22 15:33:05 +09:00
ralph950412
b73708c7ae sm8350-common: sepolicy: Make vendor_camera_sensor_prop public
Change-Id: Id714049ef81ef69337cebbdb4860b7eed0d958f6
2024-10-22 15:33:05 +09:00
althafvly
b4033732a2 sm8350-common: Update CarrierConfig from munch V816.0.2.0.ULMMIXM
Change-Id: I4df6ab6ac380b3eeed1ab6ed64f64bc0e0d0ed3f
2024-10-22 15:33:05 +09:00
Adithya R
e05954dfdb sm8350-common: parts: Get rid of proguard flags
This is obsolete.

Change-Id: I1b692d3e1a96c49ac6efd54907ea23c4b4494f7e
2024-10-22 15:33:05 +09:00
ghostrider-reborn
a5fb57ff5e sm8350-common: overlay: Define OEM fast charge sysfs node
- This forces android to display 'charging rapidly' whenever our proprietary 33w charger is connected, based on the value of this node (0/1)

Signed-off-by: saikiran2001 <bjsaikiran@gmail.com>
2024-10-22 15:33:05 +09:00
Lowxorx
a0722bf977 sm8350-common: overlay: show min/max refresh rate in settings 2024-10-22 15:33:05 +09:00
Omkar Chandorkar
e560819690 sm8350-common: overlay: Update CarrierConfig from phone1
* From Nothing OS 2.0.4

Signed-off-by: flakeforever <113103193+flakeforever@users.noreply.github.com>
2024-10-22 15:33:05 +09:00
Tim Zimmermann
bc2a6de2b9 sm8350-common: CarrierConfig: Set LTE+ threshold bandwidth to 0
* so LTE+ icon will show whenever it's available

Change-Id: I45a569fa52d19f4b9af370d7a18c4198e29febc6
Signed-off-by: Adithya R <gh0strider.2k18.reborn@gmail.com>
2024-10-22 15:33:05 +09:00
Vishalcj17
badc0612e5 sm8350-common: CarrierConfig: Globally enable LTE+ icon
Change-Id: Ifcad30636c0ee76a1fa4830bc0c8143d2b7be879
Signed-off-by: Adithya R <gh0strider.2k18.reborn@gmail.com>
2024-10-22 15:33:05 +09:00
kssrao13882
b742f1c689 sm8350-common: Remove order preference for Thermal Profiles
- In Infinity X rom this tab at top spoils the look of Battery section
2024-10-22 15:33:05 +09:00
Chaohui Wang
08b70e3098 sm8350-common: parts: Migrate to CompoundButton.OnCheckedChangeListener
Switch and SwitchCompat are both CompoundButton.

Using CompoundButton in Java will helps migration in the future.

Bug: 306658427
Test: manual - check Settings pages
Test: m RunSettingsLibRoboTests
Change-Id: I85a70d4c504d8584030ea4a058f30d74206ab835
2024-10-22 15:33:05 +09:00
Peter Kalauskas
d5837727bc sm8350-common: parts: Enable use_resource_processor for all sysui deps
This will make the build faster

Test: m checkbuild
Bug: 295208392
Change-Id: I0c1bd901429bbe3bf81c1530e156735f8637a96e
2024-10-22 15:33:05 +09:00
Adithya R
064eb6bafa sm8350-common: parts: Fix thermal profile screen state handling 2024-10-22 15:33:05 +09:00
EmanuelCN
ff6450667f sm8350-common: parts: Checkout thermal profiles to xiaomi-sm8250 implementation 2024-10-22 15:33:05 +09:00
truly-irham
6090dc13ff sm8350-common: Address sepolicy denial for per-app thermal profile parts 2024-10-22 15:33:05 +09:00
Arian
a97496baa7 sm8350-common: parts: Import from xiaomi_sdm845-common
e261035d91/parts

Change-Id: I442f48780ca020f3e420ee4ccaf8ac07b05457cb
Signed-off-by: Anush02198 <anush.4376@gmail.com>
2024-10-22 15:33:05 +09:00
Chenyang Zhong
e83654d823 sm8350-common: enable Dolby Vision in hwcomposer
Signed-off-by: Chenyang Zhong <zhongcy95@gmail.com>
2024-10-22 15:33:05 +09:00
johnmart19
7c47689eab sm8350-common: Enable VoNR Calls support 2024-10-22 15:33:05 +09:00
Terminator-J
c84712857d sm8350-common: rootdir: Fix the battery drain due to statsd...?
- Could it really be so simple?
2024-10-22 15:33:05 +09:00
Sugakesshaa
794e6f3990 sm8350-common: Build android.hardware.graphics.common-V4-ndk
AOSP upgraded the blob to V5 but xiaomi's libgui requires V4 version of the blob

Change-Id: Ib596cde74c414bcb5ac2ea33c394ad7b83b336f0
2024-10-22 15:33:05 +09:00
Peng Xu
8aa3e8a217 sm8350-common: wifi: Enable support for IEEE80211AX
* This is to allow supporting WiFi 6 mobile hotspots,
   to be noted this is only supported on SDM855+ platforms.
2024-10-22 15:32:33 +09:00
Matheus de Souza
52e0d3bfb4 sm8350-common: Set BUILD_BROKEN_DUP_RULES := true 2024-10-22 15:32:27 +09:00
Lup Gabriel
66a283345d sm8350-common: Enable screen off udfps support 2024-10-22 15:32:01 +09:00
103 changed files with 10989 additions and 978 deletions

View File

@@ -6,6 +6,10 @@
COMMON_PATH := device/xiaomi/sm8350-common
# Ignore overriding commands errors
BUILD_BROKEN_DUP_RULES := true
BUILD_BROKEN_ELF_PREBUILT_PRODUCT_COPY_FILES := true
# A/B
AB_OTA_UPDATER := true
@@ -50,6 +54,11 @@ TARGET_NO_BOOTLOADER := true
# Display
TARGET_SCREEN_DENSITY ?= 440
# Dolby Vision
SOONG_CONFIG_NAMESPACES += dolby_vision
SOONG_CONFIG_dolby_vision += enabled
SOONG_CONFIG_dolby_vision_enabled := true
# Filesystem
TARGET_FS_CONFIG_GEN := $(COMMON_PATH)/config.fs
@@ -151,7 +160,7 @@ BOARD_USES_QCOM_HARDWARE := true
BOARD_INCLUDE_DTB_IN_BOOTIMG := true
BOARD_MOVE_RECOVERY_RESOURCES_TO_VENDOR_BOOT := true
TARGET_RECOVERY_FSTAB := $(COMMON_PATH)/rootdir/etc/fstab.qcom
TARGET_RECOVERY_PIXEL_FORMAT := "RGBX_8888"
TARGET_RECOVERY_PIXEL_FORMAT := RGBX_8888
TARGET_USERIMAGES_USE_EXT4 := true
TARGET_USERIMAGES_USE_F2FS := true
@@ -188,6 +197,7 @@ BOARD_HOSTAPD_DRIVER := NL80211
BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE)
BOARD_WPA_SUPPLICANT_DRIVER := NL80211
BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE)
CONFIG_IEEE80211AX := true
QC_WIFI_HIDL_FEATURE_DUAL_AP := true
WIFI_DRIVER_DEFAULT := wlan
WIFI_DRIVER_STATE_CTRL_PARAM := "/dev/wlan"

View File

@@ -41,6 +41,7 @@
<library name="volume_listener" path="libvolumelistener.so"/>
<library name="audiosphere" path="libasphere.so"/>
<library name="shoebox" path="libshoebox.so"/>
<library name="v4a_re" path="libv4a_re.so"/>
</libraries>
<effects>
<effectProxy name="bassboost" library="proxy" uuid="14804144-a5ee-4d24-aa88-0002a5d5c51b">
@@ -89,6 +90,7 @@
<effect name="notification_helper" library="volume_listener" uuid="0b776dde-0590-11e5-81ba-0025b32654a0"/>
<effect name="audiosphere" library="audiosphere" uuid="184e62ab-2d19-4364-9d1b-c0a40733866c"/>
<effect name="shoebox" library="shoebox" uuid="1eab784c-1a36-4b2a-b7fc-e34c44cab89e"/>
<effect name="v4a_standard_re" library="v4a_re" uuid="90380da3-8536-4744-a6a3-5731970e640f"/>
</effects>
<postprocess>
<stream type="music">

View File

@@ -43,7 +43,10 @@ PRODUCT_PACKAGES += \
android.hardware.audio@6.0-impl \
android.hardware.audio.effect@6.0-impl \
android.hardware.audio.service \
android.hardware.soundtrigger@2.2-impl
android.hardware.soundtrigger@2.0-impl \
android.hardware.soundtrigger@2.1-impl \
android.hardware.soundtrigger@2.2-impl \
android.hardware.soundtrigger@2.3-impl
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/audio/audio_tuning_mixer.txt:$(TARGET_COPY_OUT_VENDOR)/etc/audio_tuning_mixer.txt
@@ -117,7 +120,8 @@ PRODUCT_PACKAGES_DEBUG += \
# Camera
PRODUCT_PACKAGES += \
android.hardware.camera.provider@2.4-impl \
android.hardware.camera.provider@2.4-service_64
android.hardware.camera.provider@2.4-service_64 \
android.hardware.graphics.common-V4-ndk
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/camera_cnf.txt:$(TARGET_COPY_OUT_VENDOR)/etc/camera/camera_cnf.txt
@@ -131,20 +135,22 @@ PRODUCT_COPY_FILES += \
# DebugFS
PRODUCT_SET_DEBUGFS_RESTRICTIONS := true
# Device-specific settings
PRODUCT_PACKAGES += \
XiaomiParts
# Display
PRODUCT_PACKAGES += \
android.hardware.graphics.mapper@3.0-impl-qti-display \
android.hardware.graphics.mapper@4.0-impl-qti-display \
android.hardware.memtrack@1.0-impl \
android.hardware.memtrack@1.0-service \
vendor.qti.hardware.memtrack-service \
vendor.qti.hardware.display.allocator-service \
vendor.qti.hardware.display.composer-service \
vendor.qti.hardware.display.composer-service.rc \
vendor.qti.hardware.display.composer-service.xml
PRODUCT_PACKAGES += \
libqdMetaData.system \
memtrack.default
libqdMetaData.system
PRODUCT_COPY_FILES += \
hardware/qcom-caf/sm8350/display/config/snapdragon_color_libs_config.xml:$(TARGET_COPY_OUT_VENDOR)/etc/snapdragon_color_libs_config.xml
@@ -210,6 +216,10 @@ PRODUCT_COPY_FILES += \
PRODUCT_PACKAGES += \
android.hardware.health-service.qti
PRODUCT_PACKAGES += \
libhidltransport \
libhwbinder
# HotwordEnrollement
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/privapp-permissions-hotword.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/permissions/privapp-permissions-hotword.xml
@@ -371,14 +381,23 @@ PRODUCT_SOONG_NAMESPACES += \
# 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-prd \
qti_telephony_hidl_wrapper.xml \
qti_telephony_hidl_wrapper_prd.xml \
qti-telephony-utils \
qti-telephony-utils-prd \
qti_telephony_utils.xml \
qti_telephony_utils_prd.xml \
telephony-ext \
xiaomi-telephony-stub
xiaomi-telephony-stub \
qcrilNrDb_vendor
PRODUCT_BOOT_JARS += \
telephony-ext \
@@ -392,7 +411,7 @@ PRODUCT_COPY_FILES += \
# Thermal
PRODUCT_PACKAGES += \
android.hardware.thermal@2.0-service.qti
android.hardware.thermal-service.qti
# Touchscreen
PRODUCT_COPY_FILES += \
@@ -413,7 +432,7 @@ PRODUCT_PACKAGES_DEBUG += \
# USB
PRODUCT_PACKAGES += \
android.hardware.usb@1.3-service-qti
android.hardware.usb-service.qti
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.usb.accessory.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.usb.accessory.xml \
@@ -426,6 +445,9 @@ PRODUCT_PACKAGES += \
PRODUCT_COPY_FILES += \
vendor/qcom/opensource/vibrator/excluded-input-devices.xml:$(TARGET_COPY_OUT_VENDOR)/etc/excluded-input-devices.xml
# Viper
$(call inherit-product, packages/apps/ViPER4AndroidFX/config.mk)
# VNDK
# vndservicemanager has been removed from API30 devices (aosp/1235751)
# but we still need it for display services.

View File

@@ -13,12 +13,6 @@ if [[ ! -d "${MY_DIR}" ]]; then MY_DIR="${PWD}"; fi
ANDROID_ROOT="${MY_DIR}/../../.."
export TARGET_ENABLE_CHECKELF=true
# If XML files don't have comments before the XML header, use this flag
# Can still be used with broken XML files by using blob_fixup
export TARGET_DISABLE_XML_FIXING=true
HELPER="${ANDROID_ROOT}/tools/extract-utils/extract_utils.sh"
if [ ! -f "${HELPER}" ]; then
echo "Unable to find helper script at ${HELPER}"
@@ -70,13 +64,19 @@ fi
function blob_fixup() {
case "${1}" in
system_ext/lib64/libwfdmmsrc_system.so|system_ext/lib/libwfdmmsrc_system.so)
[ "$2" = "" ] && return 0
grep -q "libgui_shim.so" "${2}" || "${PATCHELF}" --add-needed "libgui_shim.so" "${2}"
;;
system_ext/lib64/libwfdservice.so|system_ext/lib/libwfdservice.so)
[ "$2" = "" ] && return 0
"${PATCHELF}" --replace-needed "android.media.audio.common.types-V2-cpp.so" "android.media.audio.common.types-V3-cpp.so" "${2}"
"${PATCHELF}" --replace-needed "android.media.audio.common.types-V2-cpp.so" "android.media.audio.common.types-V4-cpp.so" "${2}"
;;
system_ext/lib64/libwfdnative.so)
[ "$2" = "" ] && return 0
"${PATCHELF}" --remove-needed "android.hidl.base@1.0.so" "${2}"
grep -q "libinput_shim.so" "${2}" || "${PATCHELF}" --add-needed "libinput_shim.so" "${2}"
grep -q "libbinder_shim.so" "${2}" || "${PATCHELF}" --add-needed "libbinder_shim.so" "${2}"
;;
vendor/etc/media_lahaina/video_system_specs.json \
|vendor/etc/media_shima_v1/video_system_specs.json \
@@ -93,6 +93,14 @@ function blob_fixup() {
[ "$2" = "" ] && return 0
"${PATCHELF}" --remove-needed "android.hidl.base@1.0.so" "${2}"
;;
vendor/lib64/libwvhidl.so)
[ "$2" = "" ] && return 0
"${PATCHELF}" --add-needed "libcrypto_shim.so" "${2}"
;;
vendor/lib64/mediadrm/libwvdrmengine.so)
[ "$2" = "" ] && return 0
"${PATCHELF}" --add-needed "libcrypto_shim.so" "${2}"
;;
*)
return 1
;;

View File

@@ -4,7 +4,7 @@
ERR_ESTIMATE=0
#NTP server
NTP_SERVER=time.xtracloud.net
NTP_SERVER=1.android.pool.ntp.org
NTP_SERVER_2=asia.pool.ntp.org
NTP_SERVER_3=0.cn.pool.ntp.org

View File

@@ -58,6 +58,9 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<hal format="hidl">
<name>android.hardware.soundtrigger</name>
<transport>hwbinder</transport>
<version>2.0</version>
<version>2.1</version>
<version>2.2</version>
<version>2.3</version>
<interface>
<name>ISoundTriggerHw</name>
@@ -130,15 +133,6 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<instance>wifidisplaysessionimagetrack</instance>
</interface>
</hal>
<hal format="hidl">
<name>android.hardware.memtrack</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IMemtrack</name>
<instance>default</instance>
</interface>
</hal>
<hal format="hidl">
<name>android.hardware.keymaster</name>
<transport>hwbinder</transport>

View File

@@ -887,4 +887,132 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<instance>sxrhalservice</instance>
</interface>
</hal>
<hal format="hidl" optional="true">
<name>android.hardware.biometrics.fingerprint</name>
<version>2.3</version>
<interface>
<name>IBiometricsFingerprint</name>
<instance>default</instance>
</interface>
</hal>
<hal format="hidl" optional="true">
<name>android.hardware.power</name>
<version>1.2</version>
<interface>
<name>IPower</name>
<instance>default</instance>
</interface>
</hal>
<hal format="aidl" optional="true">
<name>android.hardware.bluetooth.audio</name>
<version>4</version>
<interface>
<name>IBluetoothAudioProviderFactory</name>
<instance>default</instance>
</interface>
</hal>
<hal format="hidl" optional="true">
<name>android.hardware.boot</name>
<version>1.2</version>
<interface>
<name>IBootControl</name>
<instance>default</instance>
</interface>
</hal>
<hal format="aidl" optional="true">
<name>android.hardware.drm</name>
<version>1</version>
<interface>
<name>IDrmFactory</name>
<instance>clearkey</instance>
</interface>
</hal>
<hal format="aidl" optional="true">
<name>android.hardware.nfc</name>
<version>1</version>
<interface>
<name>INfc</name>
<instance>default</instance>
</interface>
</hal>
<hal format="aidl" optional="true">
<name>android.hardware.usb</name>
<version>1</version>
<interface>
<name>IUsb</name>
<instance>default</instance>
</interface>
</hal>
<hal format="aidl" optional="true">
<name>android.hardware.wifi</name>
<version>1-2</version>
<interface>
<name>IWifi</name>
<instance>default</instance>
</interface>
</hal>
<hal format="aidl" optional="true">
<name>android.hardware.wifi.hostapd</name>
<version>2</version>
<interface>
<name>IHostapd</name>
<instance>default</instance>
</interface>
</hal>
<hal format="aidl" optional="true">
<name>android.hardware.wifi.supplicant</name>
<version>3</version>
<interface>
<name>ISupplicant</name>
<instance>default</instance>
</interface>
</hal>
<hal format="aidl" optional="true">
<name>android.hardware.power</name>
<version>4</version>
<interface>
<name>IPower</name>
<instance>default</instance>
</interface>
</hal>
<hal format="aidl" optional="true">
<name>android.hardware.vibrator</name>
<version>2</version>
<interface>
<name>IVibrator</name>
<instance>default</instance>
</interface>
</hal>
<hal format="aidl" optional="true">
<name>android.hardware.health</name>
<version>3</version>
<interface>
<name>IHealth</name>
<instance>default</instance>
</interface>
</hal>
<hal format="aidl" optional="true">
<name>android.hardware.ir</name>
<version>1</version>
<interface>
<name>IConsumerIr</name>
<instance>default</instance>
</interface>
</hal>
<hal format="aidl" optional="true">
<name>android.hardware.sensors</name>
<version>2</version>
<interface>
<name>ISensors</name>
<instance>default</instance>
</interface>
</hal>
<hal format="aidl" optional="true">
<name>android.hardware.thermal</name>
<version>1</version>
<interface>
<name>IThermal</name>
<instance>default</instance>
</interface>
</hal>
</compatibility-matrix>

View File

@@ -19,8 +19,8 @@
<!-- Defines the actions shown in advanced reboot submenu -->
<string-array name="config_restartActionsList">
<item>restart</item>
<item>restart_systemui</item>
<item>restart_recovery</item>
<item>restart_bootloader</item>
<item>restart_fastboot</item>
</string-array>
</resources>

View File

@@ -289,4 +289,22 @@
manually by the user. Off by default, since the expected haptic feedback may not be
available on some devices. -->
<bool name="config_enableHapticTextHandle">true</bool>
<!-- Whether devices suports in-display fingerprint when screen is off -->
<bool name="config_supportScreenOffUdfps">true</bool>
<!-- Whether device has turbo power charging support -->
<bool name="config_hasTurboPowerCharger">true</bool>
<!-- Path to fast charging status file to detect whether an oem fast charger is active -->
<string name="config_oemFastChargerStatusPath" translatable="false">/sys/class/qcom-battery/fastchg_mode</string>
<!-- Whether the new Auto Selection Network UI should be shown -->
<bool name="config_enableNewAutoSelectNetworkUI">true</bool>
<!-- Disables pocket mode lock -->
<bool name="config_pocketModeSupported">false</bool>
<!-- If this is true, the screen will come on when you unplug usb/power/whatever. -->
<bool name="config_unplugTurnsOnScreen">true</bool>
</resources>

View File

@@ -57,4 +57,16 @@
<!-- Preferred max refresh rate at keyguard, if supported by the display. -->
<integer name="config_keyguardMaxRefreshRate">60</integer>
<!-- Preferred max refresh rate at AOD & Ambient Display, if supported by the display. -->
<integer name="config_aodMaxRefreshRate">60</integer>
<!-- If not zero, limits the internal screen recorder's framerate to the set value. -->
<integer name="config_screenRecorderMaxFramerate">120</integer>
<!-- FPSInfoService FPS node file path -->
<string name="config_fpsInfoSysNode" translatable="false">/sys/class/drm/sde-crtc-0/measured_fps</string>
<!-- Whether show refresh rate QS tile -->
<bool name="config_showRefreshRateQsTile">true</bool>
</resources>

View File

@@ -15,6 +15,9 @@
-->
<resources>
<!-- Device specific doze package -->
<string name="config_customDozePackage" translatable="false">org.lineageos.settings/org.lineageos.settings.doze.DozeSettingsActivity</string>
<!-- The number of vibration intensity levels supported by the device.
Note that this should correspond to the ability to vary the vibration amplitude, with
@@ -32,5 +35,32 @@
here. If this settings supports only 2 levels, for example, then the default intensity
should be either LOW (1) or HIGH (3).
-->
<integer name="config_vibration_supported_intensity_levels">2</integer>
<integer name="config_vibration_supported_intensity_levels">3</integer>
<!-- Show battery cycle count -->
<bool name="config_show_battery_cycle_count" translatable="false">true</bool>
<!-- Whether to show custom screen resolution settings -->
<bool name="config_show_custom_screen_resolution_switch">true</bool>
<!-- Whether to show peak refresh rate in display settings -->
<bool name="config_show_peak_refresh_rate_switch">true</bool>
<!-- Whether to show min refresh rate in display settings -->
<bool name="config_show_min_refresh_rate_switch">true</bool>
<!-- Whether to show double tap ambient settings -->
<bool name="config_supports_double_tap_ambient" translatable="false">true</bool>
<!-- Whether to show volume steps settings -->
<bool name="config_supports_volume_steps" translatable="false">true</bool>
<!-- Whether to show vendor security patch level -->
<bool name="config_show_vendor_patch_level" translatable="false">false</bool>
<!-- Max network scan search time in seconds -->
<integer name="config_network_scan_helper_max_search_time_sec">254</integer>
<!-- Show Force LTE_CA toggle -->
<bool name="config_showForceLteCaToggle" translatable="false">true</bool>
</resources>

20
parts/Android.bp Normal file
View File

@@ -0,0 +1,20 @@
//
// Copyright (C) 2017-2020 The LineageOS Project
//
// SPDX-License-Identifier: Apache-2.0
//
android_app {
name: "XiaomiParts",
srcs: ["src/**/*.java"],
certificate: "platform",
platform_apis: true,
system_ext_specific: true,
privileged: true,
static_libs: [
"org.lineageos.settings.resources",
],
}

112
parts/AndroidManifest.xml Normal file
View File

@@ -0,0 +1,112 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2015-2016 The CyanogenMod Project
2017-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.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.lineageos.settings"
android:versionCode="1"
android:versionName="1.0"
android:sharedUserId="android.uid.system">
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.GET_TASKS" />
<protected-broadcast android:name="com.android.systemui.doze.pulse" />
<uses-sdk
android:minSdkVersion="24"
android:targetSdkVersion="30"/>
<application
android:label="@string/device_settings_app_name"
android:persistent="true"
android:defaultToDeviceProtectedStorage="true"
android:directBootAware="true"
android:theme="@style/Theme.SubSettingsBase">
<receiver android:name=".BootCompletedReceiver">
<intent-filter android:priority="1000">
<action android:name="android.intent.action.LOCKED_BOOT_COMPLETED" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</receiver>
<activity
android:name=".doze.DozeSettingsActivity"
android:label="@string/ambient_display_title">
</activity>
<service android:name=".doze.DozeService"
android:permission="XiaomiDozeService">
</service>
<activity
android:name=".thermal.ThermalActivity"
android:label="@string/thermal_title">
<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.battery" />
<meta-data
android:name="com.android.settings.summary"
android:resource="@string/thermal_summary" />
</activity>
<service
android:name=".thermal.ThermalService"
android:permission="ThermalService">
</service>
<activity
android:name=".speaker.ClearSpeakerActivity"
android:label="@string/clear_speaker_title">
<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/clear_speaker_summary" />
</activity>
<activity
android:name=".refreshrate.RefreshActivity"
android:label="@string/refresh_title"
android:exported="false">
<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/refresh_summary" />
</activity>
<service
android:name=".refreshrate.RefreshService"
android:exported="true"
android:permission="RefreshService">
</service>
</application>
</manifest>

View File

@@ -0,0 +1,13 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?android:attr/colorControlNormal">
<path
android:fillColor="#000"
android:pathData="M20 4H4C2.9 4 2 4.9 2 6v12c0 1.1 0.9 2 2 2h16c1.1 0 2-0.9 2-2V6c0-1.1-0.9-2-2-2zm0 14H4V6h16v12z"/>
<path
android:fillColor="#000"
android:pathData="M8.29 15.71c-0.49-0.49-0.88-1.06-1.14-1.7c-0.26-0.64-0.4-1.32-0.4-2.01c0-1.35 0.52-2.69 1.53-3.72L7.05 7.05C5.68 8.41 5 10.21 5 12s0.68 3.59 2.06 4.94l1.23-1.23zM12 15.5c1.93 0 3.5-1.57 3.5-3.5S13.93 8.5 12 8.5S8.5 10.07 8.5 12s1.57 3.5 3.5 3.5zm0-5c0.83 0 1.5 0.67 1.5 1.5s-0.67 1.5-1.5 1.5s-1.5-0.67-1.5-1.5s0.67-1.5 1.5-1.5zm3.72 5.22l1.23 1.23C18.32 15.59 19 13.79 19 12s-0.68-3.59-2.06-4.94l-1.23 1.23c0.49 0.49 0.88 1.06 1.14 1.7c0.26 0.64 0.4 1.32 0.4 2.01c0 1.35-0.52 2.69-1.53 3.72z"/>
</vector>

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:height="24dp"
android:width="24dp"
android:tint="?android:attr/colorControlNormal"
android:viewportWidth="24"
android:viewportHeight="24">
<path android:fillColor="#000" android:pathData="M17,19V5H7V19H17M17,1A2,2 0 0,1 19,3V21A2,2 0 0,1 17,23H7C5.89,23 5,22.1 5,21V3C5,1.89 5.89,1 7,1H17M9,7H15V9H9V7M9,11H13V13H9V11Z" />
</vector>

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:height="24dp"
android:width="24dp"
android:tint="?android:attr/colorControlNormal"
android:viewportWidth="24"
android:viewportHeight="24">
<path android:fillColor="#000" android:pathData="M14.3,16L13.6,14H10.4L9.7,16H7.8L11,7H13L16.2,16H14.3M20,8.69V4H15.31L12,0.69L8.69,4H4V8.69L0.69,12L4,15.31V20H8.69L12,23.31L15.31,20H20V15.31L23.31,12L20,8.69M10.85,12.65H13.15L12,9L10.85,12.65Z"/>
</vector>

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:height="24dp"
android:width="24dp"
android:tint="?android:attr/colorControlNormal"
android:viewportWidth="24"
android:viewportHeight="24">
<path android:fillColor="#000" android:pathData="M12,8A4,4 0 0,0 8,12A4,4 0 0,0 12,16A4,4 0 0,0 16,12A4,4 0 0,0 12,8M12,18A6,6 0 0,1 6,12A6,6 0 0,1 12,6A6,6 0 0,1 18,12A6,6 0 0,1 12,18M20,8.69V4H15.31L12,0.69L8.69,4H4V8.69L0.69,12L4,15.31V20H8.69L12,23.31L15.31,20H20V15.31L23.31,12L20,8.69Z"/>
</vector>

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:height="24dp"
android:width="24dp"
android:tint="?android:attr/colorControlNormal"
android:viewportWidth="24"
android:viewportHeight="24">
<path android:fillColor="#000" android:pathData="M12,18V6A6,6 0 0,1 18,12A6,6 0 0,1 12,18M20,15.31L23.31,12L20,8.69V4H15.31L12,0.69L8.69,4H4V8.69L0.69,12L4,15.31V20H8.69L12,23.31L15.31,20H20V15.31Z"/>
</vector>

View File

@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?android:attr/colorAccent">
<path
android:fillColor="#ff000000"
android:pathData="M17 1.01L7 1C5.9 1 5 1.9 5 3v4h2V3h10v18H7v-4H5v4c0 1.1 0.9 2 2 2h10c1.1 0 2-0.9 2-2V3c0-1.1-0.9-1.99-2-1.99Z"/>
<path
android:fillColor="#ff000000"
android:pathData="M1 8v1.56h1.56v6.22H4.1V8H1Z"/>
<path
android:fillColor="#ff000000"
android:pathData="M4.89 8v1.56H8v1.55H6.44c-0.4 0-0.8 0.17-1.1 0.46-0.29 0.29-0.45 0.68-0.45 1.1v3.1h4.67v-1.55H6.44v-1.55H8c0.41 0 0.8-0.17 1.1-0.46 0.3-0.3 0.46-0.69 0.46-1.1V9.56c0-0.42-0.17-0.81-0.46-1.1C8.8 8.16 8.41 8 8 8H4.89Z"/>
<path
android:fillColor="#ff000000"
android:strokeColor="#ff000000"
android:strokeWidth="1"
android:pathData="M11.89 9.06h-0.5v0.5 4.66 0.5h0.5 1.55 0.5v-0.5-4.66-0.5h-0.5-1.55ZM11.14 8.8c0.2-0.2 0.47-0.31 0.75-0.31h1.55c0.28 0 0.55 0.11 0.75 0.3 0.2 0.2 0.31 0.48 0.31 0.76v4.66c0 0.28-0.11 0.55-0.3 0.75-0.2 0.2-0.48 0.3-0.76 0.3H11.9c-0.28 0-0.55-0.1-0.75-0.3-0.2-0.2-0.3-0.47-0.3-0.75V9.56c0-0.28 0.1-0.55 0.3-0.75Z"/>
</vector>

View File

@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?android:attr/colorAccent">
<path
android:fillColor="#ff000000"
android:pathData="M6.55 8c-0.4 0-0.8 0.16-1.1 0.46C5.17 8.75 5 9.14 5 9.56v4.66c0 0.4 0.16 0.8 0.46 1.1 0.29 0.29 0.68 0.45 1.1 0.45H8.1c0.41 0 0.8-0.16 1.1-0.46 0.29-0.29 0.45-0.68 0.45-1.1v-1.55c0-0.41-0.16-0.8-0.45-1.1-0.3-0.29-0.69-0.45-1.1-0.45H6.55V9.55h3.11V8h-3.1Zm0 4.66h1.56v1.56H6.55v-1.56Z"/>
<path
android:fillColor="#ff000000"
android:pathData="M12 8c-0.42 0-0.81 0.16-1.1 0.46-0.3 0.29-0.46 0.68-0.46 1.1v4.66c0 0.4 0.16 0.8 0.45 1.1 0.3 0.29 0.69 0.45 1.1 0.45h1.56c0.4 0 0.8-0.16 1.1-0.46 0.29-0.29 0.45-0.68 0.45-1.1V9.56c0-0.4-0.16-0.8-0.46-1.1C14.35 8.17 13.96 8 13.54 8H12Zm0 1.55h1.55v4.67h-1.56V9.55Z"/>
<path
android:fillColor="#ff000000"
android:pathData="M17 1.01L7 1C5.9 1 5 1.9 5 3v4h2V3h10v18H7v-4H5v4c0 1.1 0.9 2 2 2h10c1.1 0 2-0.9 2-2V3c0-1.1-0.9-1.99-2-1.99Z"/>
</vector>

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?android:attr/colorAccent">
<path
android:fillColor="#ff000000"
android:pathData="M17 3.01V15l2 2V3.01c0-1.1-0.9-1.99-2-1.99L7 1C6 0.99 5 1.99 5 2.99L7 5V3.01h10Zm4.2 18.19L19 19.01l-2-2-10-10-2-2-2.19-2.19L1.4 4.23 5 7.84v13.17c0 1.1 0.9 2 2 2h10c0.85 0 1.58-0.55 1.87-1.3l0.91 0.91 1.41-1.42ZM17 21.01H7L17 21v-0.99 1Zm-10 0V9.84l10 10.17V21L7 21.01Z"/>
</vector>

View File

@@ -0,0 +1,9 @@
<!-- drawable/music_clef_bass.xml -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:height="24dp"
android:width="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?android:attr/colorControlNormal">
<path android:fillColor="#000" android:pathData="M18.5 5A1.5 1.5 0 1 1 17 6.5A1.5 1.5 0 0 1 18.5 5M18.5 11A1.5 1.5 0 1 1 17 12.5A1.5 1.5 0 0 1 18.5 11M10 4A5 5 0 0 0 5 9V10A2 2 0 1 0 7.18 8A3 3 0 0 1 10 6A4 4 0 0 1 14 10C14 13.59 11.77 16.19 7 18.2L7.76 20.04C13.31 17.72 16 14.43 16 10A6 6 0 0 0 10 4Z" />
</vector>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,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/refresh_rv_view"
android:layout_width="match_parent"
android:layout_height="wrap_content" />

View File

@@ -0,0 +1,64 @@
<?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="0dp"
android:layout_height="wrap_content"
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_marginTop="2dp"
android:layout_width="match_parent"
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_refresh_default" />
</LinearLayout>

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2020 The LineageOS Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<androidx.recyclerview.widget.RecyclerView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/thermal_rv_view"
android:layout_width="match_parent"
android:layout_height="wrap_content" />

View File

@@ -0,0 +1,64 @@
<?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="0dp"
android:layout_height="wrap_content"
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_marginTop="2dp"
android:layout_width="match_parent"
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>

Binary file not shown.

View File

@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 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.
-->
<resources>
<string-array name="doze_brightness_level">
<item>@string/doze_brightness_low</item>
<item>@string/doze_brightness_high</item>
<item>@string/doze_brightness_adaptive</item>
</string-array>
<string-array name="doze_brightness_level_mode">
<item>0</item>
<item>1</item>
<item>2</item>
</string-array>
</resources>

View File

@@ -0,0 +1,49 @@
<?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>
<!-- 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">No optimization</string>
<string name="thermal_benchmark">Performance</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>
<!-- Per-app refresh rate -->
<string name="refresh_title">Per-app refresh rate</string>
<string name="refresh_summary">Set the maximum refresh rate for a specific application</string>
<string name="refresh_default">Default</string>
<string name="refresh_standard">60Hz</string>
<string name="refresh_extreme">120Hz</string>
<!-- Doze Strings -->
<string name="doze_brightness_low">Low brightness</string>
<string name="doze_brightness_high">High brightness</string>
<string name="doze_brightness_adaptive">Adaptive brightness</string>
<string name="doze_brightness_title">Doze brightness level</string>
<string name="doze_brightness_summary">Brightness level of doze pulse screen (% of max allowed brightness)</string>
<!-- Clear Speaker -->
<string name="clear_speaker_title">Clear speaker</string>
<string name="clear_speaker_summary">Play a 30-second audio to clear the speaker</string>
<string name="clear_speaker_description">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>
</resources>

View File

@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android"
android:title="@string/clear_speaker_title">
<SwitchPreference
android:key="clear_speaker_pref"
android:title="@string/clear_speaker_title"
android:icon="@drawable/ic_clear_speaker"
android:summary="@string/clear_speaker_summary"/>
<com.android.settingslib.widget.FooterPreference
android:key="footer_preference"
android:title="@string/clear_speaker_description"
android:selectable="false" />
</PreferenceScreen>

View File

@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2015 The CyanogenMod Project
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.
-->
<PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android"
android:title="@string/ambient_display_title">
<com.android.settingslib.widget.MainSwitchPreference
android:defaultValue="false"
android:key="doze_enable"
android:title="@string/ambient_display_enable_title" />
<SwitchPreference
android:key="always_on_display"
android:disableDependentsState="true"
android:icon="@drawable/ic_doze_aod"
android:title="@string/ambient_display_always_on_title"
android:summary="@string/ambient_display_always_on_summary"
android:persistent="false" />
<ListPreference
android:key="doze_brightness"
android:defaultValue="2"
android:title="@string/doze_brightness_title"
android:summary="@string/doze_brightness_summary"
android:entries="@array/doze_brightness_level"
android:entryValues="@array/doze_brightness_level_mode" />
</PreferenceScreen>

View File

@@ -0,0 +1,41 @@
/*
* Copyright (C) 2015 The CyanogenMod 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.
* 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;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;
import org.lineageos.settings.doze.DozeUtils;
import org.lineageos.settings.thermal.ThermalUtils;
import org.lineageos.settings.refreshrate.RefreshUtils;
public class BootCompletedReceiver extends BroadcastReceiver {
private static final boolean DEBUG = false;
private static final String TAG = "XiaomiParts";
@Override
public void onReceive(final Context context, Intent intent) {
if (DEBUG)
Log.d(TAG, "Received boot completed intent");
DozeUtils.onBootCompleted(context);
ThermalUtils.startService(context);
RefreshUtils.startService(context);
}
}

View File

@@ -0,0 +1,80 @@
/*
* Copyright (C) 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.
*/
package org.lineageos.settings.doze;
import android.content.Context;
import android.hardware.Sensor;
import android.hardware.SensorEvent;
import android.hardware.SensorEventListener;
import android.hardware.SensorManager;
import android.util.Log;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
public class AodSensor implements SensorEventListener {
private static final boolean DEBUG = false;
private static final String TAG = "AodSensor";
private SensorManager mSensorManager;
private Sensor mSensor;
private Context mContext;
private ExecutorService mExecutorService;
public AodSensor(Context context) {
mContext = context;
mSensorManager = mContext.getSystemService(SensorManager.class);
mSensor = DozeUtils.getSensor(mSensorManager, "xiaomi.sensor.aod");
mExecutorService = Executors.newSingleThreadExecutor();
}
private Future<?> submit(Runnable runnable) { return mExecutorService.submit(runnable); }
@Override
public void onSensorChanged(SensorEvent event) {
if (DEBUG) {
Log.d(TAG, "Got sensor event: " + event.values[0]);
}
if (event.values[0] == 3 || event.values[0] == 5) {
DozeUtils.setDozeMode(DozeUtils.DOZE_MODE_LBM);
} else if (event.values[0] == 4) {
DozeUtils.setDozeMode(DozeUtils.DOZE_MODE_HBM);
}
}
@Override
public void onAccuracyChanged(Sensor sensor, int accuracy) {
/* Empty */
}
protected void enable() {
if (DEBUG) {
Log.d(TAG, "Enabling");
}
submit(() -> {
mSensorManager.registerListener(this, mSensor, SensorManager.SENSOR_DELAY_NORMAL);
});
}
protected void disable() {
if (DEBUG) {
Log.d(TAG, "Disabling");
}
submit(() -> { mSensorManager.unregisterListener(this, mSensor); });
}
}

View File

@@ -0,0 +1,92 @@
/*
* Copyright (C) 2015 The CyanogenMod Project
* 2017-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.doze;
import android.app.Service;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.IBinder;
import android.util.Log;
public class DozeService extends Service {
private static final String TAG = "DozeService";
private static final boolean DEBUG = false;
private AodSensor mAodSensor;
@Override
public void onCreate() {
if (DEBUG)
Log.d(TAG, "Creating service");
mAodSensor = new AodSensor(this);
IntentFilter screenStateFilter = new IntentFilter();
screenStateFilter.addAction(Intent.ACTION_SCREEN_ON);
screenStateFilter.addAction(Intent.ACTION_SCREEN_OFF);
registerReceiver(mScreenStateReceiver, screenStateFilter);
}
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
if (DEBUG)
Log.d(TAG, "Starting service");
return START_STICKY;
}
@Override
public void onDestroy() {
if (DEBUG)
Log.d(TAG, "Destroying service");
super.onDestroy();
this.unregisterReceiver(mScreenStateReceiver);
}
@Override
public IBinder onBind(Intent intent) {
return null;
}
private void onDisplayOn() {
if (DEBUG)
Log.d(TAG, "Display on");
if (DozeUtils.isDozeAutoBrightnessEnabled(this)) {
mAodSensor.disable();
}
}
private void onDisplayOff() {
if (DEBUG)
Log.d(TAG, "Display off");
if (DozeUtils.isDozeAutoBrightnessEnabled(this)) {
mAodSensor.enable();
}
}
private BroadcastReceiver mScreenStateReceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
if (intent.getAction().equals(Intent.ACTION_SCREEN_ON)) {
onDisplayOn();
} else if (intent.getAction().equals(Intent.ACTION_SCREEN_OFF)) {
onDisplayOff();
}
}
};
}

View File

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

View File

@@ -0,0 +1,156 @@
/*
* Copyright (C) 2015 The CyanogenMod 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.
* 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.doze;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
import android.app.DialogFragment;
import android.content.Context;
import android.content.DialogInterface;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.os.Handler;
import android.widget.CompoundButton;
import android.widget.CompoundButton.OnCheckedChangeListener;
import androidx.preference.ListPreference;
import androidx.preference.Preference;
import androidx.preference.Preference.OnPreferenceChangeListener;
import androidx.preference.PreferenceCategory;
import androidx.preference.PreferenceFragment;
import androidx.preference.SwitchPreference;
import com.android.settingslib.widget.MainSwitchPreference;
import org.lineageos.settings.R;
import org.lineageos.settings.utils.FileUtils;
public class DozeSettingsFragment extends PreferenceFragment
implements OnPreferenceChangeListener, OnCheckedChangeListener {
private MainSwitchPreference mSwitchBar;
private SwitchPreference mAlwaysOnDisplayPreference;
private ListPreference mDozeBrightnessPreference;
private Handler mHandler = new Handler();
@Override
public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
addPreferencesFromResource(R.xml.doze_settings);
SharedPreferences prefs =
getActivity().getSharedPreferences("doze_settings", Activity.MODE_PRIVATE);
if (savedInstanceState == null && !prefs.getBoolean("first_help_shown", false)) {
showHelp();
}
boolean dozeEnabled = DozeUtils.isDozeEnabled(getActivity());
mSwitchBar = (MainSwitchPreference) findPreference(DozeUtils.DOZE_ENABLE);
mSwitchBar.addOnSwitchChangeListener(this);
mSwitchBar.setChecked(dozeEnabled);
mAlwaysOnDisplayPreference = (SwitchPreference) findPreference(DozeUtils.ALWAYS_ON_DISPLAY);
mAlwaysOnDisplayPreference.setEnabled(dozeEnabled);
mAlwaysOnDisplayPreference.setChecked(DozeUtils.isAlwaysOnEnabled(getActivity()));
mAlwaysOnDisplayPreference.setOnPreferenceChangeListener(this);
mDozeBrightnessPreference = (ListPreference) findPreference(DozeUtils.DOZE_BRIGHTNESS_KEY);
mDozeBrightnessPreference.setEnabled(
dozeEnabled && DozeUtils.isAlwaysOnEnabled(getActivity()));
mDozeBrightnessPreference.setOnPreferenceChangeListener(this);
// Hide AOD and doze brightness if not supported and set all its dependents otherwise
if (!DozeUtils.alwaysOnDisplayAvailable(getActivity())) {
getPreferenceScreen().removePreference(mAlwaysOnDisplayPreference);
getPreferenceScreen().removePreference(mDozeBrightnessPreference);
} else {
if (!FileUtils.isFileWritable(DozeUtils.DOZE_MODE_PATH)) {
getPreferenceScreen().removePreference(mDozeBrightnessPreference);
} else {
DozeUtils.updateDozeBrightnessIcon(getContext(), mDozeBrightnessPreference);
}
}
}
@Override
public boolean onPreferenceChange(Preference preference, Object newValue) {
if (DozeUtils.ALWAYS_ON_DISPLAY.equals(preference.getKey())) {
DozeUtils.enableAlwaysOn(getActivity(), (Boolean) newValue);
if (!(Boolean) newValue) {
mDozeBrightnessPreference.setValue(DozeUtils.DOZE_BRIGHTNESS_LBM);
DozeUtils.setDozeMode(DozeUtils.DOZE_BRIGHTNESS_LBM);
}
mDozeBrightnessPreference.setEnabled((Boolean) newValue);
} else if (DozeUtils.DOZE_BRIGHTNESS_KEY.equals(preference.getKey())) {
if (!DozeUtils.DOZE_BRIGHTNESS_AUTO.equals((String) newValue)) {
DozeUtils.setDozeMode((String) newValue);
}
}
mHandler.post(() -> {
DozeUtils.checkDozeService(getActivity());
DozeUtils.updateDozeBrightnessIcon(getContext(), mDozeBrightnessPreference);
});
return true;
}
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
DozeUtils.enableDoze(getActivity(), isChecked);
DozeUtils.checkDozeService(getActivity());
mSwitchBar.setChecked(isChecked);
if (!isChecked) {
DozeUtils.enableAlwaysOn(getActivity(), false);
mAlwaysOnDisplayPreference.setChecked(false);
mDozeBrightnessPreference.setValue(DozeUtils.DOZE_BRIGHTNESS_LBM);
DozeUtils.updateDozeBrightnessIcon(getContext(), mDozeBrightnessPreference);
}
mAlwaysOnDisplayPreference.setEnabled(isChecked);
mDozeBrightnessPreference.setEnabled(
isChecked && DozeUtils.isAlwaysOnEnabled(getActivity()));
}
public static class HelpDialogFragment extends DialogFragment {
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
return new AlertDialog.Builder(getActivity())
.setTitle(R.string.doze_settings_help_title)
.setMessage(R.string.doze_settings_help_text)
.setNegativeButton(R.string.dialog_ok, (dialog, which) -> dialog.cancel())
.create();
}
@Override
public void onCancel(DialogInterface dialog) {
getActivity()
.getSharedPreferences("doze_settings", Activity.MODE_PRIVATE)
.edit()
.putBoolean("first_help_shown", true)
.commit();
}
}
private void showHelp() {
HelpDialogFragment fragment = new HelpDialogFragment();
fragment.show(getFragmentManager(), "help_dialog");
}
}

View File

@@ -0,0 +1,155 @@
/*
* Copyright (C) 2015 The CyanogenMod 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.
* 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.doze;
import static android.provider.Settings.Secure.DOZE_ALWAYS_ON;
import static android.provider.Settings.Secure.DOZE_ENABLED;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.hardware.Sensor;
import android.hardware.SensorManager;
import android.hardware.display.AmbientDisplayConfiguration;
import android.os.PowerManager;
import android.os.SystemClock;
import android.os.UserHandle;
import android.provider.Settings;
import android.util.Log;
import androidx.preference.ListPreference;
import androidx.preference.PreferenceManager;
import org.lineageos.settings.R;
import org.lineageos.settings.utils.FileUtils;
public final class DozeUtils {
private static final String TAG = "DozeUtils";
private static final boolean DEBUG = false;
private static final String DOZE_INTENT = "com.android.systemui.doze.pulse";
protected static final String DOZE_ENABLE = "doze_enable";
protected static final String ALWAYS_ON_DISPLAY = "always_on_display";
protected static final String DOZE_BRIGHTNESS_KEY = "doze_brightness";
protected static final String DOZE_MODE_PATH =
"/sys/devices/platform/soc/soc:qcom,dsi-display-primary/doze_mode";
protected static final String DOZE_MODE_HBM = "1";
protected static final String DOZE_MODE_LBM = "0";
protected static final String DOZE_BRIGHTNESS_LBM = "0";
protected static final String DOZE_BRIGHTNESS_HBM = "1";
protected static final String DOZE_BRIGHTNESS_AUTO = "2";
public static void onBootCompleted(Context context) {
checkDozeService(context);
restoreDozeModes(context);
}
public static void startService(Context context) {
if (DEBUG)
Log.d(TAG, "Starting service");
context.startServiceAsUser(new Intent(context, DozeService.class), UserHandle.CURRENT);
}
protected static void stopService(Context context) {
if (DEBUG)
Log.d(TAG, "Stopping service");
context.stopServiceAsUser(new Intent(context, DozeService.class), UserHandle.CURRENT);
}
public static void checkDozeService(Context context) {
if (isDozeEnabled(context)
&& (isAlwaysOnEnabled(context) || sensorsEnabled(context))) {
startService(context);
} else {
stopService(context);
}
}
private static void restoreDozeModes(Context context) {
if (isAlwaysOnEnabled(context) && !isDozeAutoBrightnessEnabled(context)) {
setDozeMode(PreferenceManager.getDefaultSharedPreferences(context).getString(
DOZE_BRIGHTNESS_KEY, String.valueOf(DOZE_BRIGHTNESS_LBM)));
}
}
protected static boolean enableDoze(Context context, boolean enable) {
return Settings.Secure.putInt(context.getContentResolver(), DOZE_ENABLED, enable ? 1 : 0);
}
public static boolean isDozeEnabled(Context context) {
return Settings.Secure.getInt(context.getContentResolver(), DOZE_ENABLED, 1) != 0;
}
protected static boolean enableAlwaysOn(Context context, boolean enable) {
return Settings.Secure.putIntForUser(context.getContentResolver(), DOZE_ALWAYS_ON,
enable ? 1 : 0, UserHandle.USER_CURRENT);
}
protected static boolean isAlwaysOnEnabled(Context context) {
final boolean enabledByDefault = context.getResources().getBoolean(
com.android.internal.R.bool.config_dozeAlwaysOnEnabled);
return Settings.Secure.getIntForUser(context.getContentResolver(), DOZE_ALWAYS_ON,
alwaysOnDisplayAvailable(context) && enabledByDefault ? 1 : 0,
UserHandle.USER_CURRENT)
!= 0;
}
protected static boolean alwaysOnDisplayAvailable(Context context) {
return new AmbientDisplayConfiguration(context).alwaysOnAvailable();
}
protected static boolean setDozeMode(String value) {
return FileUtils.writeLine(DOZE_MODE_PATH, value);
}
protected static boolean isDozeAutoBrightnessEnabled(Context context) {
return PreferenceManager.getDefaultSharedPreferences(context)
.getString(DOZE_BRIGHTNESS_KEY, DOZE_BRIGHTNESS_LBM)
.equals(DOZE_BRIGHTNESS_AUTO);
}
public static boolean sensorsEnabled(Context context) {
return isDozeAutoBrightnessEnabled(context);
}
protected static Sensor getSensor(SensorManager sm, String type) {
for (Sensor sensor : sm.getSensorList(Sensor.TYPE_ALL)) {
if (type.equals(sensor.getStringType())) {
return sensor;
}
}
return null;
}
protected static void updateDozeBrightnessIcon(Context context, ListPreference preference) {
switch (PreferenceManager.getDefaultSharedPreferences(context).getString(
DOZE_BRIGHTNESS_KEY, DOZE_BRIGHTNESS_LBM)) {
case DozeUtils.DOZE_BRIGHTNESS_LBM:
preference.setIcon(R.drawable.ic_doze_brightness_low);
break;
case DozeUtils.DOZE_BRIGHTNESS_HBM:
preference.setIcon(R.drawable.ic_doze_brightness_high);
break;
case DozeUtils.DOZE_BRIGHTNESS_AUTO:
preference.setIcon(R.drawable.ic_doze_brightness_auto);
break;
}
}
}

View File

@@ -0,0 +1,33 @@
/*
* 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.
*/
package org.lineageos.settings.refreshrate;
import android.os.Bundle;
import com.android.settingslib.collapsingtoolbar.CollapsingToolbarBaseActivity;
public class RefreshActivity extends CollapsingToolbarBaseActivity {
private static final String TAG_REFRESH = "refresh";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getFragmentManager().beginTransaction().replace(com.android.settingslib.collapsingtoolbar.R.id.content_frame,
new RefreshSettingsFragment(), TAG_REFRESH).commit();
}
}

View File

@@ -0,0 +1,102 @@
/*
* 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.
*/
package org.lineageos.settings.refreshrate;
import android.app.ActivityManager;
import android.app.ActivityTaskManager;
import android.app.ActivityTaskManager.RootTaskInfo;
import android.app.IActivityTaskManager;
import android.app.TaskStackListener;
import android.app.Service;
import android.content.BroadcastReceiver;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.Handler;
import android.os.IBinder;
import android.util.Log;
import android.os.RemoteException;
public class RefreshService extends Service {
private static final String TAG = "RefreshService";
private static final boolean DEBUG = true;
private String mPreviousApp;
private RefreshUtils mRefreshUtils;
private IActivityTaskManager mActivityTaskManager;
private BroadcastReceiver mIntentReceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
mPreviousApp = "";
}
};
@Override
public void onCreate() {
if (DEBUG) Log.d(TAG, "Creating service");
try {
mActivityTaskManager = ActivityTaskManager.getService();
mActivityTaskManager.registerTaskStackListener(mTaskListener);
} catch (RemoteException e) {
// Do nothing
}
mRefreshUtils = new RefreshUtils(this);
registerReceiver();
super.onCreate();
}
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
if (DEBUG) Log.d(TAG, "Starting service");
return START_STICKY;
}
@Override
public IBinder onBind(Intent intent) {
return null;
}
private void registerReceiver() {
IntentFilter filter = new IntentFilter();
filter.addAction(Intent.ACTION_SCREEN_OFF);
filter.addAction(Intent.ACTION_SCREEN_ON);
this.registerReceiver(mIntentReceiver, filter);
}
private final TaskStackListener mTaskListener = new TaskStackListener() {
@Override
public void onTaskStackChanged() {
try {
final RootTaskInfo info = mActivityTaskManager.getFocusedRootTaskInfo();
if (info == null || info.topActivity == null) {
return;
}
String foregroundApp = info.topActivity.getPackageName();
if (!mRefreshUtils.isAppInList) {
mRefreshUtils.getOldRate();
}
if (!foregroundApp.equals(mPreviousApp)) {
mRefreshUtils.setRefreshRate(foregroundApp);
mPreviousApp = foregroundApp;
}
} catch (Exception e) {}
}
};
}

View File

@@ -0,0 +1,419 @@
/**
* 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.
*/
package org.lineageos.settings.refreshrate;
import android.annotation.Nullable;
import android.content.Context;
import android.content.Intent;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.os.Bundle;
import android.text.TextUtils;
import android.util.TypedValue;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.SectionIndexer;
import android.widget.Spinner;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.preference.PreferenceFragment;
import androidx.recyclerview.widget.RecyclerView;
import androidx.recyclerview.widget.LinearLayoutManager;
import com.android.settingslib.applications.ApplicationsState;
import org.lineageos.settings.R;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class RefreshSettingsFragment extends PreferenceFragment
implements ApplicationsState.Callbacks {
private AllPackagesAdapter mAllPackagesAdapter;
private ApplicationsState mApplicationsState;
private ApplicationsState.Session mSession;
private ActivityFilter mActivityFilter;
private Map<String, ApplicationsState.AppEntry> mEntryMap =
new HashMap<String, ApplicationsState.AppEntry>();
private RefreshUtils mRefreshUtils;
private RecyclerView mAppsRecyclerView;
@Override
public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mApplicationsState = ApplicationsState.getInstance(getActivity().getApplication());
mSession = mApplicationsState.newSession(this);
mSession.onResume();
mActivityFilter = new ActivityFilter(getActivity().getPackageManager());
mAllPackagesAdapter = new AllPackagesAdapter(getActivity());
mRefreshUtils = new RefreshUtils(getActivity());
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
return inflater.inflate(R.layout.refresh_layout, container, false);
}
@Override
public void onViewCreated(final View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
mAppsRecyclerView = view.findViewById(R.id.refresh_rv_view);
mAppsRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
mAppsRecyclerView.setAdapter(mAllPackagesAdapter);
}
@Override
public void onResume() {
super.onResume();
getActivity().setTitle(getResources().getString(R.string.refresh_title));
rebuild();
}
@Override
public void onDestroy() {
super.onDestroy();
mSession.onPause();
mSession.onDestroy();
}
@Override
public void onPackageListChanged() {
mActivityFilter.updateLauncherInfoList();
rebuild();
}
@Override
public void onRebuildComplete(ArrayList<ApplicationsState.AppEntry> entries) {
if (entries != null) {
handleAppEntries(entries);
mAllPackagesAdapter.notifyDataSetChanged();
}
}
@Override
public void onLoadEntriesCompleted() {
rebuild();
}
@Override
public void onAllSizesComputed() {
}
@Override
public void onLauncherInfoChanged() {
}
@Override
public void onPackageIconChanged() {
}
@Override
public void onPackageSizeChanged(String packageName) {
}
@Override
public void onRunningStateChanged(boolean running) {
}
private void handleAppEntries(List<ApplicationsState.AppEntry> entries) {
final ArrayList<String> sections = new ArrayList<String>();
final ArrayList<Integer> positions = new ArrayList<Integer>();
final PackageManager pm = getActivity().getPackageManager();
String lastSectionIndex = null;
int offset = 0;
for (int i = 0; i < entries.size(); i++) {
final ApplicationInfo info = entries.get(i).info;
final String label = (String) info.loadLabel(pm);
final String sectionIndex;
if (!info.enabled) {
sectionIndex = "--"; // XXX
} else if (TextUtils.isEmpty(label)) {
sectionIndex = "";
} else {
sectionIndex = label.substring(0, 1).toUpperCase();
}
if (lastSectionIndex == null ||
!TextUtils.equals(sectionIndex, lastSectionIndex)) {
sections.add(sectionIndex);
positions.add(offset);
lastSectionIndex = sectionIndex;
}
offset++;
}
mAllPackagesAdapter.setEntries(entries, sections, positions);
mEntryMap.clear();
for (ApplicationsState.AppEntry e : entries) {
mEntryMap.put(e.info.packageName, e);
}
}
private void rebuild() {
mSession.rebuild(mActivityFilter, ApplicationsState.ALPHA_COMPARATOR);
}
private int getStateDrawable(int state) {
switch (state) {
case RefreshUtils.STATE_STANDARD:
return R.drawable.ic_refresh_60;
case RefreshUtils.STATE_EXTREME:
return R.drawable.ic_refresh_120;
case RefreshUtils.STATE_DEFAULT:
default:
return R.drawable.ic_refresh_default;
}
}
private class ViewHolder extends RecyclerView.ViewHolder {
private TextView title;
private Spinner mode;
private ImageView icon;
private View rootView;
private ImageView stateIcon;
private ViewHolder(View view) {
super(view);
this.title = view.findViewById(R.id.app_name);
this.mode = view.findViewById(R.id.app_mode);
this.icon = view.findViewById(R.id.app_icon);
this.stateIcon = view.findViewById(R.id.state);
this.rootView = view;
view.setTag(this);
}
}
private class ModeAdapter extends BaseAdapter {
private final LayoutInflater inflater;
private final int[] items = {
R.string.refresh_default,
R.string.refresh_standard,
R.string.refresh_extreme
};
private ModeAdapter(Context context) {
inflater = LayoutInflater.from(context);
}
@Override
public int getCount() {
return items.length;
}
@Override
public Object getItem(int position) {
return items[position];
}
@Override
public long getItemId(int position) {
return 0;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
TextView view;
if (convertView != null) {
view = (TextView) convertView;
} else {
view = (TextView) inflater.inflate(android.R.layout.simple_spinner_dropdown_item,
parent, false);
}
view.setText(items[position]);
view.setTextSize(14f);
return view;
}
}
private class AllPackagesAdapter extends RecyclerView.Adapter<ViewHolder>
implements AdapterView.OnItemSelectedListener, SectionIndexer {
private List<ApplicationsState.AppEntry> mEntries = new ArrayList<>();
private String[] mSections;
private int[] mPositions;
public AllPackagesAdapter(Context context) {
mActivityFilter = new ActivityFilter(context.getPackageManager());
}
@Override
public int getItemCount() {
return mEntries.size();
}
@Override
public long getItemId(int position) {
return mEntries.get(position).id;
}
@NonNull
@Override
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
return new ViewHolder(LayoutInflater.from(parent.getContext())
.inflate(R.layout.refresh_list_item, parent, false));
}
@Override
public void onBindViewHolder(ViewHolder holder, int position) {
Context context = holder.itemView.getContext();
ApplicationsState.AppEntry entry = mEntries.get(position);
if (entry == null) {
return;
}
holder.mode.setAdapter(new ModeAdapter(context));
holder.mode.setOnItemSelectedListener(this);
holder.title.setText(entry.label);
holder.title.setOnClickListener(v -> holder.mode.performClick());
mApplicationsState.ensureIcon(entry);
holder.icon.setImageDrawable(entry.icon);
int packageState = mRefreshUtils.getStateForPackage(entry.info.packageName);
holder.mode.setSelection(packageState, false);
holder.mode.setTag(entry);
holder.stateIcon.setImageResource(getStateDrawable(packageState));
}
private void setEntries(List<ApplicationsState.AppEntry> entries,
List<String> sections, List<Integer> positions) {
mEntries = entries;
mSections = sections.toArray(new String[sections.size()]);
mPositions = new int[positions.size()];
for (int i = 0; i < positions.size(); i++) {
mPositions[i] = positions.get(i);
}
notifyDataSetChanged();
}
@Override
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
final ApplicationsState.AppEntry entry = (ApplicationsState.AppEntry) parent.getTag();
int currentState = mRefreshUtils.getStateForPackage(entry.info.packageName);
if (currentState != position) {
mRefreshUtils.writePackage(entry.info.packageName, position);
notifyDataSetChanged();
}
}
@Override
public void onNothingSelected(AdapterView<?> parent) {
}
@Override
public int getPositionForSection(int section) {
if (section < 0 || section >= mSections.length) {
return -1;
}
return mPositions[section];
}
@Override
public int getSectionForPosition(int position) {
if (position < 0 || position >= getItemCount()) {
return -1;
}
final int index = Arrays.binarySearch(mPositions, position);
/*
* Consider this example: section positions are 0, 3, 5; the supplied
* position is 4. The section corresponding to position 4 starts at
* position 3, so the expected return value is 1. Binary search will not
* find 4 in the array and thus will return -insertPosition-1, i.e. -3.
* To get from that number to the expected value of 1 we need to negate
* and subtract 2.
*/
return index >= 0 ? index : -index - 2;
}
@Override
public Object[] getSections() {
return mSections;
}
}
private class ActivityFilter implements ApplicationsState.AppFilter {
private final PackageManager mPackageManager;
private final List<String> mLauncherResolveInfoList = new ArrayList<String>();
private ActivityFilter(PackageManager packageManager) {
this.mPackageManager = packageManager;
updateLauncherInfoList();
}
public void updateLauncherInfoList() {
Intent i = new Intent(Intent.ACTION_MAIN);
i.addCategory(Intent.CATEGORY_LAUNCHER);
List<ResolveInfo> resolveInfoList = mPackageManager.queryIntentActivities(i, 0);
synchronized (mLauncherResolveInfoList) {
mLauncherResolveInfoList.clear();
for (ResolveInfo ri : resolveInfoList) {
mLauncherResolveInfoList.add(ri.activityInfo.packageName);
}
}
}
@Override
public void init() {
}
@Override
public boolean filterApp(ApplicationsState.AppEntry entry) {
boolean show = !mAllPackagesAdapter.mEntries.contains(entry.info.packageName);
if (show) {
synchronized (mLauncherResolveInfoList) {
show = mLauncherResolveInfoList.contains(entry.info.packageName);
}
}
return show;
}
}
}

View File

@@ -0,0 +1,141 @@
/*
* 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.
*/
package org.lineageos.settings.refreshrate;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.UserHandle;
import android.view.Display;
import android.provider.Settings;
import androidx.preference.PreferenceManager;
public final class RefreshUtils {
private static final String REFRESH_CONTROL = "refresh_control";
private static float defaultMaxRate;
private static float defaultMinRate;
private static final String KEY_PEAK_REFRESH_RATE = "peak_refresh_rate";
private static final String KEY_MIN_REFRESH_RATE = "min_refresh_rate";
private Context mContext;
protected static boolean isAppInList = false;
protected static final int STATE_DEFAULT = 0;
protected static final int STATE_STANDARD = 1;
protected static final int STATE_EXTREME = 2;
private static final float REFRESH_STATE_DEFAULT = 120f;
private static final float REFRESH_STATE_STANDARD = 60f;
private static final float REFRESH_STATE_EXTREME = 120f;
private static final String REFRESH_STANDARD = "refresh.standard=";
private static final String REFRESH_EXTREME = "refresh.extreme=";
private SharedPreferences mSharedPrefs;
protected RefreshUtils(Context context) {
mSharedPrefs = PreferenceManager.getDefaultSharedPreferences(context);
mContext = context;
}
public static void startService(Context context) {
context.startServiceAsUser(new Intent(context, RefreshService.class),
UserHandle.CURRENT);
}
private void writeValue(String profiles) {
mSharedPrefs.edit().putString(REFRESH_CONTROL, profiles).apply();
}
protected void getOldRate(){
defaultMaxRate = Settings.System.getFloat(mContext.getContentResolver(), KEY_PEAK_REFRESH_RATE, REFRESH_STATE_DEFAULT);
defaultMinRate = Settings.System.getFloat(mContext.getContentResolver(), KEY_MIN_REFRESH_RATE, REFRESH_STATE_DEFAULT);
}
private String getValue() {
String value = mSharedPrefs.getString(REFRESH_CONTROL, null);
if (value == null || value.isEmpty()) {
value = REFRESH_STANDARD + ":" + REFRESH_EXTREME;
writeValue(value);
}
return value;
}
protected void writePackage(String packageName, int mode) {
String value = getValue();
value = value.replace(packageName + ",", "");
String[] modes = value.split(":");
String finalString;
switch (mode) {
case STATE_STANDARD:
modes[0] = modes[0] + packageName + ",";
break;
case STATE_EXTREME:
modes[1] = modes[1] + packageName + ",";
break;
}
finalString = modes[0] + ":" + modes[1];
writeValue(finalString);
}
protected int getStateForPackage(String packageName) {
String value = getValue();
String[] modes = value.split(":");
int state = STATE_DEFAULT;
if (modes[0].contains(packageName + ",")) {
state = STATE_STANDARD;
} else if (modes[1].contains(packageName + ",")) {
state = STATE_EXTREME;
}
return state;
}
protected void setRefreshRate(String packageName) {
String value = getValue();
String modes[];
float maxrate = defaultMaxRate;
float minrate = defaultMinRate;
isAppInList = false;
if (value != null) {
modes = value.split(":");
if (modes[0].contains(packageName + ",")) {
maxrate = REFRESH_STATE_STANDARD;
if ( minrate > maxrate){
minrate = maxrate;
}
isAppInList = true;
} else if (modes[1].contains(packageName + ",")) {
maxrate = REFRESH_STATE_EXTREME;
if ( minrate > maxrate){
minrate = maxrate;
}
isAppInList = true;
}
}
Settings.System.putFloat(mContext.getContentResolver(), KEY_MIN_REFRESH_RATE, minrate);
Settings.System.putFloat(mContext.getContentResolver(), KEY_PEAK_REFRESH_RATE, maxrate);
}
}

View File

@@ -0,0 +1,34 @@
/*
* Copyright (C) 2020 Paranoid Android
*
* 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.speaker;
import android.os.Bundle;
import com.android.settingslib.collapsingtoolbar.CollapsingToolbarBaseActivity;
public class ClearSpeakerActivity extends CollapsingToolbarBaseActivity {
private static final String TAG_CLEARSPEAKER = "clearspeaker";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getFragmentManager().beginTransaction().replace(com.android.settingslib.collapsingtoolbar.R.id.content_frame,
new ClearSpeakerFragment(), TAG_CLEARSPEAKER).commit();
}
}

View File

@@ -0,0 +1,121 @@
/*
* Copyright (C) 2020 Paranoid Android
*
* 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.speaker;
import android.content.Context;
import android.content.res.AssetFileDescriptor;
import android.media.AudioManager;
import android.media.AudioAttributes;
import android.media.MediaPlayer;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
import android.util.Log;
import androidx.preference.Preference;
import androidx.preference.PreferenceFragment;
import androidx.preference.SwitchPreference;
import org.lineageos.settings.R;
import java.io.IOException;
public class ClearSpeakerFragment extends PreferenceFragment implements
Preference.OnPreferenceChangeListener {
private static final String TAG = ClearSpeakerFragment.class.getSimpleName();
private static final String PREF_CLEAR_SPEAKER = "clear_speaker_pref";
private AudioManager mAudioManager;
private Handler mHandler;
private MediaPlayer mMediaPlayer;
private SwitchPreference mClearSpeakerPref;
@Override
public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
addPreferencesFromResource(R.xml.clear_speaker_settings);
mClearSpeakerPref = (SwitchPreference) findPreference(PREF_CLEAR_SPEAKER);
mClearSpeakerPref.setOnPreferenceChangeListener(this);
mHandler = new Handler();
mAudioManager = (AudioManager) getContext().getSystemService(Context.AUDIO_SERVICE);
}
@Override
public boolean onPreferenceChange(Preference preference, Object newValue) {
if (preference == mClearSpeakerPref) {
boolean value = (Boolean) newValue;
if (value) {
if (startPlaying()) {
mHandler.removeCallbacksAndMessages(null);
mHandler.postDelayed(() -> {
stopPlaying();
}, 30000);
return true;
}
}
}
return false;
}
@Override
public void onStop() {
super.onStop();
stopPlaying();
}
public boolean startPlaying() {
mAudioManager.setParameters("status_earpiece_clean=on");
mMediaPlayer = new MediaPlayer();
getActivity().setVolumeControlStream(AudioManager.STREAM_MUSIC);
mMediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);
mMediaPlayer.setLooping(true);
try {
AssetFileDescriptor file = getResources().openRawResourceFd(R.raw.clear_speaker_sound);
try {
mMediaPlayer.setDataSource(file.getFileDescriptor(), file.getStartOffset(), file.getLength());
} finally {
file.close();
}
mClearSpeakerPref.setEnabled(false);
mMediaPlayer.setVolume(1.0f, 1.0f);
mMediaPlayer.prepare();
mMediaPlayer.start();
} catch (IOException ioe) {
Log.e(TAG, "Failed to play speaker clean sound!", ioe);
return false;
}
return true;
}
public void stopPlaying() {
if (mMediaPlayer != null) {
if (mMediaPlayer.isPlaying()) {
mMediaPlayer.stop();
mMediaPlayer.reset();
mMediaPlayer.release();
mMediaPlayer=null;
}
}
mAudioManager.setParameters("status_earpiece_clean=off");
mClearSpeakerPref.setEnabled(true);
mClearSpeakerPref.setChecked(false);
}
}

View File

@@ -0,0 +1,45 @@
/*
* 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.
*/
package org.lineageos.settings.thermal;
import android.os.Bundle;
import android.view.MenuItem;
import com.android.settingslib.collapsingtoolbar.CollapsingToolbarBaseActivity;
public class ThermalActivity extends CollapsingToolbarBaseActivity {
private static final String TAG_THERMAL = "thermal";
private static final String THERMAL_SCONFIG = "/sys/class/thermal/thermal_message/sconfig";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getFragmentManager().beginTransaction().replace(com.android.settingslib.collapsingtoolbar.R.id.content_frame,
new ThermalSettingsFragment(), TAG_THERMAL).commit();
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
if (item.getItemId() == android.R.id.home) {
onBackPressed();
return true;
}
return false;
}
}

View File

@@ -0,0 +1,119 @@
/*
* 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.
*/
package org.lineageos.settings.thermal;
import android.app.ActivityManager;
import android.app.ActivityTaskManager;
import android.app.ActivityTaskManager.RootTaskInfo;
import android.app.IActivityTaskManager;
import android.app.TaskStackListener;
import android.app.Service;
import android.app.TaskStackListener;
import android.content.BroadcastReceiver;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.IBinder;
import android.os.RemoteException;
import android.util.Log;
public class ThermalService extends Service {
private static final String TAG = "ThermalService";
private static final boolean DEBUG = false;
private boolean mScreenOn = true;
private String mCurrentApp = "";
private ThermalUtils mThermalUtils;
private IActivityTaskManager mActivityTaskManager;
private BroadcastReceiver mIntentReceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
switch (intent.getAction()) {
case Intent.ACTION_SCREEN_OFF:
mScreenOn = false;
setThermalProfile();
break;
case Intent.ACTION_SCREEN_ON:
mScreenOn = true;
setThermalProfile();
break;
}
}
};
@Override
public void onCreate() {
if (DEBUG) Log.d(TAG, "Creating service");
try {
mActivityTaskManager = ActivityTaskManager.getService();
mActivityTaskManager.registerTaskStackListener(mTaskListener);
} catch (RemoteException e) {
// Do nothing
}
mThermalUtils = new ThermalUtils(this);
registerReceiver();
super.onCreate();
}
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
if (DEBUG) Log.d(TAG, "Starting service");
return START_STICKY;
}
@Override
public IBinder onBind(Intent intent) {
return null;
}
private void registerReceiver() {
IntentFilter filter = new IntentFilter();
filter.addAction(Intent.ACTION_SCREEN_OFF);
filter.addAction(Intent.ACTION_SCREEN_ON);
this.registerReceiver(mIntentReceiver, filter);
}
private void setThermalProfile() {
if (mScreenOn) {
mThermalUtils.setThermalProfile(mCurrentApp);
} else {
mThermalUtils.setDefaultThermalProfile();
}
}
private final TaskStackListener mTaskListener = new TaskStackListener() {
@Override
public void onTaskStackChanged() {
try {
final ActivityTaskManager.RootTaskInfo focusedTask =
ActivityTaskManager.getService().getFocusedRootTaskInfo();
if (focusedTask != null && focusedTask.topActivity != null) {
ComponentName taskComponentName = focusedTask.topActivity;
String foregroundApp = taskComponentName.getPackageName();
if (!foregroundApp.equals(mCurrentApp)) {
mCurrentApp = foregroundApp;
setThermalProfile();
}
}
} catch (Exception e) {}
}
};
}

View File

@@ -0,0 +1,432 @@
/**
* Copyright (C) 2020 The LineageOS Project
* <p>
* 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
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* 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.thermal;
import android.annotation.Nullable;
import android.content.Context;
import android.content.Intent;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.os.Bundle;
import android.text.TextUtils;
import android.util.TypedValue;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.SectionIndexer;
import android.widget.Spinner;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.preference.PreferenceFragment;
import androidx.recyclerview.widget.RecyclerView;
import androidx.recyclerview.widget.LinearLayoutManager;
import com.android.settingslib.applications.ApplicationsState;
import org.lineageos.settings.R;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class ThermalSettingsFragment extends PreferenceFragment
implements ApplicationsState.Callbacks {
private AllPackagesAdapter mAllPackagesAdapter;
private ApplicationsState mApplicationsState;
private ApplicationsState.Session mSession;
private ActivityFilter mActivityFilter;
private Map<String, ApplicationsState.AppEntry> mEntryMap =
new HashMap<String, ApplicationsState.AppEntry>();
private ThermalUtils mThermalUtils;
private RecyclerView mAppsRecyclerView;
@Override
public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mApplicationsState = ApplicationsState.getInstance(getActivity().getApplication());
mSession = mApplicationsState.newSession(this);
mSession.onResume();
mActivityFilter = new ActivityFilter(getActivity().getPackageManager());
mAllPackagesAdapter = new AllPackagesAdapter(getActivity());
mThermalUtils = new ThermalUtils(getActivity());
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
return inflater.inflate(R.layout.thermal_layout, container, false);
}
@Override
public void onViewCreated(final View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
mAppsRecyclerView = view.findViewById(R.id.thermal_rv_view);
mAppsRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
mAppsRecyclerView.setAdapter(mAllPackagesAdapter);
}
@Override
public void onResume() {
super.onResume();
getActivity().setTitle(getResources().getString(R.string.thermal_title));
rebuild();
}
@Override
public void onDestroy() {
super.onDestroy();
mSession.onPause();
mSession.onDestroy();
}
@Override
public void onPackageListChanged() {
mActivityFilter.updateLauncherInfoList();
rebuild();
}
@Override
public void onRebuildComplete(ArrayList<ApplicationsState.AppEntry> entries) {
if (entries != null) {
handleAppEntries(entries);
mAllPackagesAdapter.notifyDataSetChanged();
}
}
@Override
public void onLoadEntriesCompleted() {
rebuild();
}
@Override
public void onAllSizesComputed() {
}
@Override
public void onLauncherInfoChanged() {
}
@Override
public void onPackageIconChanged() {
}
@Override
public void onPackageSizeChanged(String packageName) {
}
@Override
public void onRunningStateChanged(boolean running) {
}
private void handleAppEntries(List<ApplicationsState.AppEntry> entries) {
final ArrayList<String> sections = new ArrayList<String>();
final ArrayList<Integer> positions = new ArrayList<Integer>();
final PackageManager pm = getActivity().getPackageManager();
String lastSectionIndex = null;
int offset = 0;
for (int i = 0; i < entries.size(); i++) {
final ApplicationInfo info = entries.get(i).info;
final String label = (String) info.loadLabel(pm);
final String sectionIndex;
if (!info.enabled) {
sectionIndex = "--"; // XXX
} else if (TextUtils.isEmpty(label)) {
sectionIndex = "";
} else {
sectionIndex = label.substring(0, 1).toUpperCase();
}
if (lastSectionIndex == null ||
!TextUtils.equals(sectionIndex, lastSectionIndex)) {
sections.add(sectionIndex);
positions.add(offset);
lastSectionIndex = sectionIndex;
}
offset++;
}
mAllPackagesAdapter.setEntries(entries, sections, positions);
mEntryMap.clear();
for (ApplicationsState.AppEntry e : entries) {
mEntryMap.put(e.info.packageName, e);
}
}
private void rebuild() {
mSession.rebuild(mActivityFilter, ApplicationsState.ALPHA_COMPARATOR);
}
private int getStateDrawable(int state) {
switch (state) {
case ThermalUtils.STATE_BENCHMARK:
return R.drawable.ic_thermal_benchmark;
case ThermalUtils.STATE_BROWSER:
return R.drawable.ic_thermal_browser;
case ThermalUtils.STATE_CAMERA:
return R.drawable.ic_thermal_camera;
case ThermalUtils.STATE_DIALER:
return R.drawable.ic_thermal_dialer;
case ThermalUtils.STATE_GAMING:
return R.drawable.ic_thermal_gaming;
case ThermalUtils.STATE_STREAMING:
return R.drawable.ic_thermal_streaming;
case ThermalUtils.STATE_DEFAULT:
default:
return R.drawable.ic_thermal_default;
}
}
private class ViewHolder extends RecyclerView.ViewHolder {
private TextView title;
private Spinner mode;
private ImageView icon;
private View rootView;
private ImageView stateIcon;
private ViewHolder(View view) {
super(view);
this.title = view.findViewById(R.id.app_name);
this.mode = view.findViewById(R.id.app_mode);
this.icon = view.findViewById(R.id.app_icon);
this.stateIcon = view.findViewById(R.id.state);
this.rootView = view;
view.setTag(this);
}
}
private class ModeAdapter extends BaseAdapter {
private final LayoutInflater inflater;
private final int[] items = {
R.string.thermal_default,
R.string.thermal_benchmark,
R.string.thermal_browser,
R.string.thermal_camera,
R.string.thermal_dialer,
R.string.thermal_gaming,
R.string.thermal_streaming
};
private ModeAdapter(Context context) {
inflater = LayoutInflater.from(context);
}
@Override
public int getCount() {
return items.length;
}
@Override
public Object getItem(int position) {
return items[position];
}
@Override
public long getItemId(int position) {
return 0;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
TextView view;
if (convertView != null) {
view = (TextView) convertView;
} else {
view = (TextView) inflater.inflate(android.R.layout.simple_spinner_dropdown_item,
parent, false);
}
view.setText(items[position]);
view.setTextSize(14f);
return view;
}
}
private class AllPackagesAdapter extends RecyclerView.Adapter<ViewHolder>
implements AdapterView.OnItemSelectedListener, SectionIndexer {
private List<ApplicationsState.AppEntry> mEntries = new ArrayList<>();
private String[] mSections;
private int[] mPositions;
public AllPackagesAdapter(Context context) {
mActivityFilter = new ActivityFilter(context.getPackageManager());
}
@Override
public int getItemCount() {
return mEntries.size();
}
@Override
public long getItemId(int position) {
return mEntries.get(position).id;
}
@NonNull
@Override
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
ViewHolder holder = new ViewHolder(LayoutInflater.from(parent.getContext())
.inflate(R.layout.thermal_list_item, parent, false));
Context context = holder.itemView.getContext();
holder.mode.setAdapter(new ModeAdapter(context));
holder.mode.setOnItemSelectedListener(this);
return holder;
}
@Override
public void onBindViewHolder(ViewHolder holder, int position) {
ApplicationsState.AppEntry entry = mEntries.get(position);
if (entry == null) {
return;
}
holder.title.setText(entry.label);
holder.title.setOnClickListener(v -> holder.mode.performClick());
mApplicationsState.ensureIcon(entry);
holder.icon.setImageDrawable(entry.icon);
int packageState = mThermalUtils.getStateForPackage(entry.info.packageName);
holder.mode.setSelection(packageState, false);
holder.mode.setTag(entry);
holder.stateIcon.setImageResource(getStateDrawable(packageState));
}
private void setEntries(List<ApplicationsState.AppEntry> entries,
List<String> sections, List<Integer> positions) {
mEntries = entries;
mSections = sections.toArray(new String[sections.size()]);
mPositions = new int[positions.size()];
for (int i = 0; i < positions.size(); i++) {
mPositions[i] = positions.get(i);
}
notifyDataSetChanged();
}
@Override
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
final ApplicationsState.AppEntry entry = (ApplicationsState.AppEntry) parent.getTag();
int currentState = mThermalUtils.getStateForPackage(entry.info.packageName);
if (currentState != position) {
mThermalUtils.writePackage(entry.info.packageName, position);
notifyDataSetChanged();
}
}
@Override
public void onNothingSelected(AdapterView<?> parent) {
}
@Override
public int getPositionForSection(int section) {
if (section < 0 || section >= mSections.length) {
return -1;
}
return mPositions[section];
}
@Override
public int getSectionForPosition(int position) {
if (position < 0 || position >= getItemCount()) {
return -1;
}
final int index = Arrays.binarySearch(mPositions, position);
/*
* Consider this example: section positions are 0, 3, 5; the supplied
* position is 4. The section corresponding to position 4 starts at
* position 3, so the expected return value is 1. Binary search will not
* find 4 in the array and thus will return -insertPosition-1, i.e. -3.
* To get from that number to the expected value of 1 we need to negate
* and subtract 2.
*/
return index >= 0 ? index : -index - 2;
}
@Override
public Object[] getSections() {
return mSections;
}
}
private class ActivityFilter implements ApplicationsState.AppFilter {
private final PackageManager mPackageManager;
private final List<String> mLauncherResolveInfoList = new ArrayList<String>();
private ActivityFilter(PackageManager packageManager) {
this.mPackageManager = packageManager;
updateLauncherInfoList();
}
public void updateLauncherInfoList() {
Intent i = new Intent(Intent.ACTION_MAIN);
i.addCategory(Intent.CATEGORY_LAUNCHER);
List<ResolveInfo> resolveInfoList = mPackageManager.queryIntentActivities(i, 0);
synchronized (mLauncherResolveInfoList) {
mLauncherResolveInfoList.clear();
for (ResolveInfo ri : resolveInfoList) {
mLauncherResolveInfoList.add(ri.activityInfo.packageName);
}
}
}
@Override
public void init() {
}
@Override
public boolean filterApp(ApplicationsState.AppEntry entry) {
boolean show = !mAllPackagesAdapter.mEntries.contains(entry.info.packageName);
if (show) {
synchronized (mLauncherResolveInfoList) {
show = mLauncherResolveInfoList.contains(entry.info.packageName);
}
}
return show;
}
}
}

View File

@@ -0,0 +1,165 @@
/*
* 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.
*/
package org.lineageos.settings.thermal;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.UserHandle;
import androidx.preference.PreferenceManager;
import org.lineageos.settings.utils.FileUtils;
public final class ThermalUtils {
private static final String THERMAL_CONTROL = "thermal_control";
protected static final int STATE_DEFAULT = 0;
protected static final int STATE_BENCHMARK = 1;
protected static final int STATE_BROWSER = 2;
protected static final int STATE_CAMERA = 3;
protected static final int STATE_DIALER = 4;
protected static final int STATE_GAMING = 5;
protected static final int STATE_STREAMING = 6;
private static final String THERMAL_STATE_DEFAULT = "0";
private static final String THERMAL_STATE_BENCHMARK = "10";
private static final String THERMAL_STATE_BROWSER = "11";
private static final String THERMAL_STATE_CAMERA = "12";
private static final String THERMAL_STATE_DIALER = "8";
private static final String THERMAL_STATE_GAMING = "9";
private static final String THERMAL_STATE_STREAMING = "14";
private static final String THERMAL_BENCHMARK = "thermal.benchmark=";
private static final String THERMAL_BROWSER = "thermal.browser=";
private static final String THERMAL_CAMERA = "thermal.camera=";
private static final String THERMAL_DIALER = "thermal.dialer=";
private static final String THERMAL_GAMING = "thermal.gaming=";
private static final String THERMAL_STREAMING = "thermal.streaming=";
private static final String THERMAL_SCONFIG = "/sys/class/thermal/thermal_message/sconfig";
private SharedPreferences mSharedPrefs;
protected ThermalUtils(Context context) {
mSharedPrefs = PreferenceManager.getDefaultSharedPreferences(context);
}
public static void startService(Context context) {
context.startServiceAsUser(new Intent(context, ThermalService.class),
UserHandle.CURRENT);
}
private void writeValue(String profiles) {
mSharedPrefs.edit().putString(THERMAL_CONTROL, profiles).apply();
}
private String getValue() {
String value = mSharedPrefs.getString(THERMAL_CONTROL, null);
if (value == null || value.isEmpty()) {
value = THERMAL_BENCHMARK + ":" + THERMAL_BROWSER + ":" + THERMAL_CAMERA + ":" +
THERMAL_DIALER + ":" + THERMAL_GAMING + ":" + THERMAL_STREAMING;
writeValue(value);
}
return value;
}
protected void writePackage(String packageName, int mode) {
String value = getValue();
value = value.replace(packageName + ",", "");
String[] modes = value.split(":");
String finalString;
switch (mode) {
case STATE_BENCHMARK:
modes[0] = modes[0] + packageName + ",";
break;
case STATE_BROWSER:
modes[1] = modes[1] + packageName + ",";
break;
case STATE_CAMERA:
modes[2] = modes[2] + packageName + ",";
break;
case STATE_DIALER:
modes[3] = modes[3] + packageName + ",";
break;
case STATE_GAMING:
modes[4] = modes[4] + packageName + ",";
break;
case STATE_STREAMING:
modes[5] = modes[5] + packageName + ",";
break;
}
finalString = modes[0] + ":" + modes[1] + ":" + modes[2] + ":" + modes[3] + ":" +
modes[4] + ":" + modes[5];
writeValue(finalString);
}
protected int getStateForPackage(String packageName) {
String value = getValue();
String[] modes = value.split(":");
int state = STATE_DEFAULT;
if (modes[0].contains(packageName + ",")) {
state = STATE_BENCHMARK;
} else if (modes[1].contains(packageName + ",")) {
state = STATE_BROWSER;
} else if (modes[2].contains(packageName + ",")) {
state = STATE_CAMERA;
} else if (modes[3].contains(packageName + ",")) {
state = STATE_DIALER;
} else if (modes[4].contains(packageName + ",")) {
state = STATE_GAMING;
} else if (modes[5].contains(packageName + ",")) {
state = STATE_STREAMING;
}
return state;
}
protected void setDefaultThermalProfile() {
FileUtils.writeLine(THERMAL_SCONFIG, THERMAL_STATE_DEFAULT);
}
protected void setThermalProfile(String packageName) {
String value = getValue();
String modes[];
String state = THERMAL_STATE_DEFAULT;
if (value != null) {
modes = value.split(":");
if (modes[0].contains(packageName + ",")) {
state = THERMAL_STATE_BENCHMARK;
} else if (modes[1].contains(packageName + ",")) {
state = THERMAL_STATE_BROWSER;
} else if (modes[2].contains(packageName + ",")) {
state = THERMAL_STATE_CAMERA;
} else if (modes[3].contains(packageName + ",")) {
state = THERMAL_STATE_DIALER;
} else if (modes[4].contains(packageName + ",")) {
state = THERMAL_STATE_GAMING;
} else if (modes[5].contains(packageName + ",")) {
state = THERMAL_STATE_STREAMING;
}
}
FileUtils.writeLine(THERMAL_SCONFIG, state);
}
}

View File

@@ -0,0 +1,160 @@
/*
* Copyright (C) 2016 The CyanogenMod 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.utils;
import android.util.Log;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
public final class FileUtils {
private static final String TAG = "FileUtils";
private FileUtils() {
// This class is not supposed to be instantiated
}
/**
* Reads the first line of text from the given file.
* Reference {@link BufferedReader#readLine()} for clarification on what a line is
*
* @return the read line contents, or null on failure
*/
public static String readOneLine(String fileName) {
String line = null;
BufferedReader reader = null;
try {
reader = new BufferedReader(new FileReader(fileName), 512);
line = reader.readLine();
} catch (FileNotFoundException e) {
Log.w(TAG, "No such file " + fileName + " for reading", e);
} catch (IOException e) {
Log.e(TAG, "Could not read from file " + fileName, e);
} finally {
try {
if (reader != null) {
reader.close();
}
} catch (IOException e) {
// Ignored, not much we can do anyway
}
}
return line;
}
/**
* Writes the given value into the given file
*
* @return true on success, false on failure
*/
public static boolean writeLine(String fileName, String value) {
BufferedWriter writer = null;
try {
writer = new BufferedWriter(new FileWriter(fileName));
writer.write(value);
} catch (FileNotFoundException e) {
Log.w(TAG, "No such file " + fileName + " for writing", e);
return false;
} catch (IOException e) {
Log.e(TAG, "Could not write to file " + fileName, e);
return false;
} finally {
try {
if (writer != null) {
writer.close();
}
} catch (IOException e) {
// Ignored, not much we can do anyway
}
}
return true;
}
/**
* Checks whether the given file exists
*
* @return true if exists, false if not
*/
public static boolean fileExists(String fileName) {
final File file = new File(fileName);
return file.exists();
}
/**
* Checks whether the given file is readable
*
* @return true if readable, false if not
*/
public static boolean isFileReadable(String fileName) {
final File file = new File(fileName);
return file.exists() && file.canRead();
}
/**
* Checks whether the given file is writable
*
* @return true if writable, false if not
*/
public static boolean isFileWritable(String fileName) {
final File file = new File(fileName);
return file.exists() && file.canWrite();
}
/**
* Deletes an existing file
*
* @return true if the delete was successful, false if not
*/
public static boolean delete(String fileName) {
final File file = new File(fileName);
boolean ok = false;
try {
ok = file.delete();
} catch (SecurityException e) {
Log.w(TAG, "SecurityException trying to delete " + fileName, e);
}
return ok;
}
/**
* Renames an existing file
*
* @return true if the rename was successful, false if not
*/
public static boolean rename(String srcPath, String dstPath) {
final File srcFile = new File(srcPath);
final File dstFile = new File(dstPath);
boolean ok = false;
try {
ok = srcFile.renameTo(dstFile);
} catch (SecurityException e) {
Log.w(TAG, "SecurityException trying to rename " + srcPath + " to " + dstPath, e);
} catch (NullPointerException e) {
Log.e(TAG, "NullPointerException trying to rename " + srcPath + " to " + dstPath, e);
}
return ok;
}
}

View File

@@ -1,4 +1,4 @@
# All unpinned blobs below are extracted from haydn V816.0.6.0.UKKMIXM
# All unpinned blobs below are extracted from taoyao V816.0.10.0.ULIEUXM
# Current blobs with ELF checks disabled:
# libOmxVideoDSMode depends on libOmxCore, which is a gnu makefile target
@@ -51,7 +51,7 @@ vendor/lib64/libmdsprpc.so
vendor/lib64/libsdsprpc.so
# CNE
vendor/app/CneApp/CneApp.apk
vendor/app/CneApp/CneApp.apk;REQUIRED=CneApp.libvndfwk_detect_jni.qti_vendor_symlink
vendor/bin/cnd
vendor/etc/default-permissions/com.qualcomm.qti.cne.xml
vendor/etc/init/cnd.rc
@@ -128,6 +128,12 @@ vendor/bin/hw/vendor.qti.hardware.capabilityconfigstore@1.0-service
vendor/etc/init/vendor.qti.hardware.capabilityconfigstore@1.0-service.rc
vendor/lib64/hw/vendor.qti.hardware.capabilityconfigstore@1.0-impl.so
# Diag
vendor/bin/diag-router
vendor/etc/init/vendor.qti.diag.rc
-vendor/etc/vintf/manifest/vendor.qti.diag.hal.service.xml
vendor/lib64/vendor.qti.diaghal@1.0.so;MODULE_SUFFIX=-vendor
# Display - from XQ-BC72 61.2.A.0.410
vendor/etc/display/DPU660.xml|b26dd73e361546d89bf3d7082a471703dc6ac2cb
vendor/etc/display/DPU670.xml|e5131a60ceff29ca5eb561eec7eddadef1d0486f
@@ -266,14 +272,14 @@ vendor/lib64/vendor.qti.gnss@2.1.so
vendor/lib64/vendor.qti.gnss@3.0.so
vendor/lib64/vendor.qti.gnss@4.0-service.so
vendor/lib64/vendor.qti.gnss@4.0.so
vendor/lib64/vendor.qti.hardware.qccsyshal@1.0.so
vendor/lib64/vendor.qti.hardware.qccsyshal@1.0.so;MODULE_SUFFIX=-vendor
# Graphics
vendor/lib/egl/eglSubDriverAndroid.so
vendor/lib/egl/libEGL_adreno.so
vendor/lib/egl/libEGL_adreno.so;SYMLINK=vendor/lib/libEGL_adreno.so
vendor/lib/egl/libGLESv1_CM_adreno.so
vendor/lib/egl/libGLESv2_adreno.so
vendor/lib/egl/libq3dtools_adreno.so
vendor/lib/egl/libGLESv2_adreno.so;SYMLINK=vendor/lib/libGLESv2_adreno.so
vendor/lib/egl/libq3dtools_adreno.so;SYMLINK=vendor/lib/libq3dtools_adreno.so
vendor/lib/egl/libq3dtools_esx.so
vendor/lib/hw/vulkan.adreno.so
vendor/lib/libC2D2.so
@@ -285,10 +291,10 @@ vendor/lib/libgsl.so
vendor/lib/libllvm-glnext.so
vendor/lib/libllvm-qcom.so
vendor/lib64/egl/eglSubDriverAndroid.so
vendor/lib64/egl/libEGL_adreno.so
vendor/lib64/egl/libEGL_adreno.so;SYMLINK=vendor/lib64/libEGL_adreno.so
vendor/lib64/egl/libGLESv1_CM_adreno.so
vendor/lib64/egl/libGLESv2_adreno.so
vendor/lib64/egl/libq3dtools_adreno.so
vendor/lib64/egl/libGLESv2_adreno.so;SYMLINK=vendor/lib64/libGLESv2_adreno.so
vendor/lib64/egl/libq3dtools_adreno.so;SYMLINK=vendor/lib64/libq3dtools_adreno.so
vendor/lib64/egl/libq3dtools_esx.so
vendor/lib64/hw/vulkan.adreno.so
vendor/lib64/libC2D2.so
@@ -312,8 +318,8 @@ system_ext/lib64/lib-imsvt.so
system_ext/lib64/lib-imsvtextutils.so
system_ext/lib64/lib-imsvtutils.so
system_ext/lib64/libdiag_system.so
system_ext/lib64/libimscamera_jni.so
system_ext/lib64/libimsmedia_jni.so
system_ext/lib64/libimscamera_jni.so;SYMLINK=system_ext/priv-app/ims/lib/arm64/libimscamera_jni.so
system_ext/lib64/libimsmedia_jni.so;SYMLINK=system_ext/priv-app/ims/lib/arm64/libimsmedia_jni.so
system_ext/lib64/vendor.qti.ImsRtpService-V1-ndk.so
system_ext/lib64/vendor.qti.diaghal@1.0.so
system_ext/lib64/vendor.qti.imsrtpservice@3.0.so
@@ -587,23 +593,6 @@ vendor/etc/init/qcrilNrd.rc
vendor/etc/init/ssgtzd.rc
vendor/etc/init/vendor.qti.rmt_storage.rc
vendor/etc/init/vendor.qti.tftp.rc
vendor/etc/qcril_database/qcrilNr.db
vendor/etc/qcril_database/upgrade/config/10.0_config.sql
vendor/etc/qcril_database/upgrade/config/6.0_config.sql
vendor/etc/qcril_database/upgrade/config/7.0_config.sql
vendor/etc/qcril_database/upgrade/config/8.0_config.sql
vendor/etc/qcril_database/upgrade/config/9.0_config.sql
vendor/etc/qcril_database/upgrade/other/0_initial_qcrilnr.sql
vendor/etc/qcril_database/upgrade/other/10_version_update_ecc_table.sql
vendor/etc/qcril_database/upgrade/other/1_version_intro_qcrilnr.sql
vendor/etc/qcril_database/upgrade/other/2_version_add_wps_config_qcrilnr.sql
vendor/etc/qcril_database/upgrade/other/3_version_update_wps_config_qcrilnr.sql
vendor/etc/qcril_database/upgrade/other/4_version_update_ecc_table_qcrilnr.sql
vendor/etc/qcril_database/upgrade/other/5_version_update_ecc_table_qcrilnr.sql
vendor/etc/qcril_database/upgrade/other/6_version_change_property_table_qcrilnr.sql
vendor/etc/qcril_database/upgrade/other/7_version_update_ecc_table_qcrilnr.sql
vendor/etc/qcril_database/upgrade/other/8_version_update_ecc_table.sql
vendor/etc/qcril_database/upgrade/other/9_version_update_ecc_table.sql
vendor/etc/seccomp_policy/atfwd@2.0.policy
vendor/etc/seccomp_policy/qcrilnr@2.0.policy
vendor/etc/ssg/ta_config.json
@@ -784,8 +773,7 @@ system_ext/lib64/libwfddisplayconfig.so
system_ext/lib64/libwfdmminterface.so
system_ext/lib64/libwfdmmsink.so
system_ext/lib64/libwfdmmsrc_system.so
system_ext/lib64/libwfdnative.so
system_ext/lib64/libwfdrtsp.so
system_ext/lib64/libwfdnative.so;SYMLINK=system_ext/priv-app/WfdService/lib/arm64/libwfdnative.sosystem_ext/lib64/libwfdrtsp.so
system_ext/lib64/libwfdservice.so
system_ext/lib64/libwfdsinksm.so
system_ext/lib64/libwfduibcinterface.so

70
qcril_database/Android.bp Normal file
View File

@@ -0,0 +1,70 @@
filegroup {
name: "rildb_other_sql_files",
srcs: [
"other/0_initial_qcrilnr.sql",
"other/1_version_intro_qcrilnr.sql",
"other/2_version_add_wps_config_qcrilnr.sql",
"other/3_version_update_wps_config_qcrilnr.sql",
"other/4_version_update_ecc_table_qcrilnr.sql",
"other/5_version_update_ecc_table_qcrilnr.sql",
"other/6_version_change_property_table_qcrilnr.sql",
"other/7_version_update_ecc_table_qcrilnr.sql",
"other/8_version_update_ecc_table.sql",
"other/9_version_update_ecc_table.sql",
"other/10_version_update_ecc_table.sql",
],
}
filegroup {
name: "rildb_config_sql_files",
srcs: [
"config/6.0_config.sql",
"config/7.0_config.sql",
"config/8.0_config.sql",
"config/9.0_config.sql",
"config/10.0_config.sql",
],
}
genrule {
name: "qcril_config_database",
enabled: true,
srcs: [
":rildb_other_sql_files",
":rildb_config_sql_files",
],
tool_files: [
"generate_db.sh",
],
tools: [
"sqlite3",
],
cmd: "$(location generate_db.sh) $(location sqlite3) $(out) $(in)",
out: ["qcrilNr.db"],
}
prebuilt_etc {
name: "qcrilNrDb_vendor",
filename: "qcrilNr.db",
src: ":qcril_config_database",
sub_dir: "qcril_database",
vendor: true,
required: [
"0_initial_qcrilnr.sql",
"1_version_intro_qcrilnr.sql",
"2_version_add_wps_config_qcrilnr.sql",
"3_version_update_wps_config_qcrilnr.sql",
"4_version_update_ecc_table_qcrilnr.sql",
"5_version_update_ecc_table_qcrilnr.sql",
"6_version_change_property_table_qcrilnr.sql",
"7_version_update_ecc_table_qcrilnr.sql",
"8_version_update_ecc_table.sql",
"9_version_update_ecc_table.sql",
"10_version_update_ecc_table.sql",
"6.0_config.sql",
"7.0_config.sql",
"8.0_config.sql",
"9.0_config.sql",
"10.0_config.sql",
],
}

View File

@@ -0,0 +1,15 @@
/*
Copyright (c) 2021 Qualcomm Technologies, Inc.
All Rights Reserved.
Confidential and Proprietary - Qualcomm Technologies, Inc.
*/
CREATE TABLE IF NOT EXISTS qcril_properties_table (property TEXT PRIMARY KEY NOT NULL, def_val TEXT, value TEXT);
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES('qcrildb_version',10.0);
UPDATE qcril_properties_table SET def_val="" WHERE property="all_bc_msg";
UPDATE qcril_properties_table SET def_val="1" WHERE property="persist.vendor.radio.custom_ecc";
UPDATE qcril_properties_table SET def_val="1" WHERE property="persist.vendor.radio.cs_srv_type";
UPDATE qcril_properties_table SET def_val="0" WHERE property="persist.vendor.radio.always_send_plmn";
UPDATE qcril_properties_table SET def_val="true" WHERE property="persist.vendor.radio.process_sups_ind";
UPDATE qcril_properties_table SET def_val="false" WHERE property="persist.vendor.radio.redir_party_num";

View File

@@ -0,0 +1,179 @@
/*
Copyright (c) 2019-2020 Qualcomm Technologies, Inc.
All Rights Reserved.
Confidential and Proprietary - Qualcomm Technologies, Inc.
*/
CREATE TABLE IF NOT EXISTS qcril_properties_table (property TEXT PRIMARY KEY NOT NULL, def_val TEXT, value TEXT);
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES('qcrildb_version',6.0);
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("is_rat_tlv_supported", "1");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("is_ril_vrte_learning_enabled", "0");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("all_bc_msg", "all");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("hw_mbn_loaded", "0");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("sw_mbn_loaded", "0");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("mcfg_ver_info", "0");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.data.profile_update", "false");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.disable_nricon_report", "false");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.force_ltd_sys_ind", "0");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.dont_use_dsd", "false");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.tcp_rst_drop", "false");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.datacall_timeout", "155");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.attach.profile", "0");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.dont_use_epc", "true");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.rcv_dormancy_ind", "on_screen_state");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.no_srv_rc_17", "false");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.bar_fake_gcell", "false");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.wait_time_for_fake_ecc", "10");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.unicode_op_names", "false");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.enableadvancedscan", "true");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.do_not_use_ril_optr_db", "true");
INSERT OR REPLACE INTO qcril_properties_table(property) VALUES("persist.vendor.radio.stack_0");
INSERT OR REPLACE INTO qcril_properties_table(property) VALUES("persist.vendor.radio.stack_1");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.disable_retry", "false");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.max_retry_timeout", "100");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.qcril_gstk.disable", "0");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.qcril_uim_vcc_feature", "0");
INSERT OR REPLACE INTO qcril_properties_table(property) VALUES("persist.vendor.radio.uim_temp_unlock_0");
INSERT OR REPLACE INTO qcril_properties_table(property) VALUES("persist.vendor.radio.uim_temp_unlock_1");
INSERT OR REPLACE INTO qcril_properties_table(property) VALUES("persist.vendor.radio.fci");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.sglte_csfb", "false");
INSERT OR REPLACE INTO qcril_properties_table(property) VALUES("persist.vendor.radio.rat_on");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.kddi_hold_answ_on", "false");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.ims_retry_3gpp", "true");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.ims_retry_3gpp2", "true");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.oem_ind_to_both", "1");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.oem_socket", "1");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.sap_silent_pin", "0");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.block_allow_data", "0");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.suppress_req", "0");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.data_con_rprt", "false");
INSERT OR REPLACE INTO qcril_properties_table(property) VALUES("persist.vendor.radio.track_heap_mem");
INSERT OR REPLACE INTO qcril_properties_table(property) VALUES("persist.vendor.radio.voice.modem.index");
INSERT OR REPLACE INTO qcril_properties_table(property) VALUES("persist.vendor.radio.ignore_ims_wlan");
INSERT OR REPLACE INTO qcril_properties_table(property) VALUES("persist.vendor.radio.ver_info");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.sw_mbn_loaded", "0");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.hw_mbn_loaded", "0");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.ril_log_enabled", "0");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.adb_log_on", "0");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.ril_payload_on", "0");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.ril_log_interval", "5");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.ril_extra_debug", "0");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.hw_mbn_update", "false");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.sw_mbn_update", "false");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.sw_mbn_volte", "true");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.sw_mbn_openmkt", "true");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.long_iin_mbn", "false");
INSERT OR REPLACE INTO qcril_properties_table(property) VALUES("persist.vendor.radio.msim.stackid_0");
INSERT OR REPLACE INTO qcril_properties_table(property) VALUES("persist.vendor.radio.msim.stackid_1");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.do_not_init_csvt", "0");
INSERT OR REPLACE INTO qcril_properties_table(property) VALUES("persist.vendor.env.spec");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.apm_sim_not_pwdn", "1");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.add_power_save", "0");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.force_nw_search", "0");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.voice_on_lte", "0");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.report_rstate", "0");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.fill_eons", "0");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.limit_sys_info", "0");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.no_wait_for_card", "0");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.snapshot_timer", "0");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.snapshot_enabled", "0");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.snapshot_data", "0");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.data_timer", "500");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.rcv_data_dorm_ind", "off");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.data_ltd_sys_ind", "0");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.use_se_table_only", "0");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.custom_ecc", "0");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.custom_nw_ecc", "0");
INSERT OR REPLACE INTO qcril_properties_table(property) VALUES("persist.vendor.radio.ecc_hard");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.eri64_as_home", "0");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.prefer_spn", "0");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.proc_nw_scan", "0");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.sglte.eons_domain", "cs");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.sglte.eons_roam", "true");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.prov_emer_in_lpm", "0");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.relay_oprt_change", "0");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.lte_vrte_ltd", "0");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.3gpp_drte_ltd", "0");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.no_cons_man_roam", "0");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.wait_for_pbm", "0");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.wait_for_pbm_time", "0");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.sib16_support", "1");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.lte_full_band", "0");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.cinfo_sweep_limit", "10000");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.use_cc_names", "false");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.reg_den_rej_cause", "0");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.csg_info_avlbl", "0");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.cs_srv_type", "0");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.limit_rac_change", "0");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.poweron_opt", "0");
INSERT OR REPLACE INTO qcril_properties_table(property) VALUES("persist.vendor.radio.sglte_target");
INSERT OR REPLACE INTO qcril_properties_table(property) VALUES("persist.vendor.radio.nitz_plmn_0");
INSERT OR REPLACE INTO qcril_properties_table(property) VALUES("persist.vendor.radio.nitz_plmn_1");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.tuneaway_0", "0");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.tuneaway_1", "0");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.paging_priority_0", "0");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.paging_priority_1", "0");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.is_voip_enabled", "0");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.pwropt_modepref_0", "0");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.pwropt_modepref_1", "0");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.default_network", "0");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.always_send_plmn", "1");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.restore_mode_pref", "false");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.manual_nw_rej_ct", "0");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.ignore_dom_time", "0");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.1x_roam_mtu_size", "0");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.lte_tuneaway_0", "0xFF");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.lte_tuneaway_1", "0xFF");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.apm_mdm_not_pwdn", "1");
INSERT OR REPLACE INTO qcril_properties_table(property) VALUES("persist.vendor.radio.nitz_lons_0_0");
INSERT OR REPLACE INTO qcril_properties_table(property) VALUES("persist.vendor.radio.nitz_lons_0_1");
INSERT OR REPLACE INTO qcril_properties_table(property) VALUES("persist.vendor.radio.nitz_lons_1_0");
INSERT OR REPLACE INTO qcril_properties_table(property) VALUES("persist.vendor.radio.nitz_lons_1_1");
INSERT OR REPLACE INTO qcril_properties_table(property) VALUES("persist.vendor.radio.nitz_lons_2_0");
INSERT OR REPLACE INTO qcril_properties_table(property) VALUES("persist.vendor.radio.nitz_lons_2_1");
INSERT OR REPLACE INTO qcril_properties_table(property) VALUES("persist.vendor.radio.nitz_lons_3_0");
INSERT OR REPLACE INTO qcril_properties_table(property) VALUES("persist.vendor.radio.nitz_lons_3_1");
INSERT OR REPLACE INTO qcril_properties_table(property) VALUES("persist.vendor.radio.nitz_sons_0_0");
INSERT OR REPLACE INTO qcril_properties_table(property) VALUES("persist.vendor.radio.nitz_sons_0_1");
INSERT OR REPLACE INTO qcril_properties_table(property) VALUES("persist.vendor.radio.nitz_sons_1_0");
INSERT OR REPLACE INTO qcril_properties_table(property) VALUES("persist.vendor.radio.nitz_sons_1_1");
INSERT OR REPLACE INTO qcril_properties_table(property) VALUES("persist.vendor.radio.nitz_sons_2_0");
INSERT OR REPLACE INTO qcril_properties_table(property) VALUES("persist.vendor.radio.nitz_sons_2_1");
INSERT OR REPLACE INTO qcril_properties_table(property) VALUES("persist.vendor.radio.nitz_sons_3_0");
INSERT OR REPLACE INTO qcril_properties_table(property) VALUES("persist.vendor.radio.nitz_sons_3_1");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.cn_mcc", "460");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.tw_mcc", "466");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.mbn_path", "/data/modem_config/");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.stack_id_0", "0");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.stack_id_1", "0");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.start_ota_daemon", "false");
INSERT OR REPLACE INTO qcril_properties_table(property) VALUES("persist.vendor.radio.mt_sms_ack");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.sms_link_timer", "4");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.force_on_dc", "false");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.block_sms_on_1x", "0");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.process_sups_ind", "false");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.0x9e_not_callname", "false");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.orig_num_disp", "0");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.clir0", "0");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.clir1", "0");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.report_codec", "0");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.support_subaddr", "false");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.subaddr_amp", "true");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.reject_cause_21", "false");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.subaddr_ia5_id", "false");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.redir_party_num", "false");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.call_type", "0");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.facnotsup_as_nonw", "false");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.autoanswer.ms", "0");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.voice_diag_logging", "false");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.cb.dup_detection", "true");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.support.encrypted_calls", "true");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.vdp_on_ims_cap", "false");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.disable_modem_cfg", "false");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.5g_mode_pref", "0");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.5g_mode_pref_0", "0");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.5g_mode_pref_1", "0");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.fake_audio_up", "false");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.hidl_dev_service", "false");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.is_ussd_supported", "false");
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.hlos_prov_pref_auto", "0");

View File

@@ -0,0 +1,11 @@
/*
Copyright (c) 2021 Qualcomm Technologies, Inc.
All Rights Reserved.
Confidential and Proprietary - Qualcomm Technologies, Inc.
*/
CREATE TABLE IF NOT EXISTS qcril_properties_table (property TEXT PRIMARY KEY NOT NULL, def_val TEXT, value TEXT);
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES('qcrildb_version',7.0);
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES("persist.vendor.radio.shutdown_deactivate_timer", "90");
UPDATE qcril_properties_table SET def_val="1" WHERE property="persist.vendor.radio.cs_srv_type";
DELETE FROM qcril_properties_table WHERE property="persist.vendor.radio.hlos_prov_pref_auto";

View File

@@ -0,0 +1,9 @@
/*
Copyright (c) 2021 Qualcomm Technologies, Inc.
All Rights Reserved.
Confidential and Proprietary - Qualcomm Technologies, Inc.
*/
CREATE TABLE IF NOT EXISTS qcril_properties_table (property TEXT PRIMARY KEY NOT NULL, def_val TEXT, value TEXT);
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES('qcrildb_version',8.0);
UPDATE qcril_properties_table SET def_val="1" WHERE property="persist.vendor.radio.cs_srv_type";

View File

@@ -0,0 +1,12 @@
/*
Copyright (c) 2021 Qualcomm Technologies, Inc.
All Rights Reserved.
Confidential and Proprietary - Qualcomm Technologies, Inc.
*/
CREATE TABLE IF NOT EXISTS qcril_properties_table (property TEXT PRIMARY KEY NOT NULL, def_val TEXT, value TEXT);
INSERT OR REPLACE INTO qcril_properties_table(property, def_val) VALUES('qcrildb_version',9.0);
UPDATE qcril_properties_table SET def_val="" WHERE property="all_bc_msg";
UPDATE qcril_properties_table SET def_val="1" WHERE property="persist.vendor.radio.custom_ecc";
UPDATE qcril_properties_table SET def_val="1" WHERE property="persist.vendor.radio.cs_srv_type";

View File

@@ -0,0 +1,34 @@
prebuilt_etc {
name: "6.0_config.sql",
src: "6.0_config.sql",
sub_dir: "qcril_database/upgrade/config",
vendor: true,
}
prebuilt_etc {
name: "7.0_config.sql",
src: "7.0_config.sql",
sub_dir: "qcril_database/upgrade/config",
vendor: true,
}
prebuilt_etc {
name: "8.0_config.sql",
src: "8.0_config.sql",
sub_dir: "qcril_database/upgrade/config",
vendor: true,
}
prebuilt_etc {
name: "9.0_config.sql",
src: "9.0_config.sql",
sub_dir: "qcril_database/upgrade/config",
vendor: true,
}
prebuilt_etc {
name: "10.0_config.sql",
src: "10.0_config.sql",
sub_dir: "qcril_database/upgrade/config",
vendor: true,
}

49
qcril_database/generate_db.sh Executable file
View File

@@ -0,0 +1,49 @@
#!/bin/bash
#
# Copyright (C) 2024 The LineageOS Project
#
# SPDX-License-Identifier: Apache-2.0
#
set -e
if [[ $# -le 2 ]]; then
echo "syntax: generate_db.sh sqlite3 target_db sql_file0 sql_file1..."
exit 1
fi
SQLITE=$1
if [[ ! -x "$SQLITE" ]]; then
echo "sqlite binary not found or not executable: $SQLITE"
exit 1
fi
TARGET_DB=$2
shift 2
# Split the config sql and ecc sql files
for file in "$@"; do
if [[ $file == *_config.sql ]]; then
CONFIG_SQL_FILES+=("$file")
else
ECC_SQL_FILES+=("$file")
fi
done
# Sort the files
IFS=$'\n' CONFIG_SQL_FILES=($(sort -V <<< "${CONFIG_SQL_FILES[*]}"))
IFS=$'\n' ECC_SQL_FILES=($(sort -V <<< "${ECC_SQL_FILES[*]}"))
unset IFS
# Config migrations should be applied after ecc migrations
ORDERED_MIGRATIONS=("${ECC_SQL_FILES[@]}" "${CONFIG_SQL_FILES[@]}")
rm -f "$TARGET_DB"
{
echo "BEGIN TRANSACTION;"
for file in "${ORDERED_MIGRATIONS[@]}"; do
cat "$file"
done
echo "COMMIT TRANSACTION;"
} | $SQLITE "$TARGET_DB"

View File

@@ -0,0 +1,714 @@
/*
Copyright (c) 2016 Qualcomm Technologies, Inc.
All Rights Reserved.
Confidential and Proprietary - Qualcomm Technologies, Inc.
*/
-- VERSION: 5
PRAGMA foreign_keys=OFF;
CREATE TABLE qcril_emergency_source_mcc_table(MCC TEXT, NUMBER TEXT, IMS_ADDRESS TEXT, SERVICE TEXT, PRIMARY KEY(MCC,NUMBER));
INSERT INTO qcril_emergency_source_mcc_table VALUES('334','060','','');
INSERT INTO qcril_emergency_source_mcc_table VALUES('730','133','','');
INSERT INTO qcril_emergency_source_mcc_table VALUES('732','123','','');
INSERT INTO qcril_emergency_source_mcc_table VALUES('901','999','','');
INSERT INTO qcril_emergency_source_mcc_table VALUES('901','122','','');
INSERT INTO qcril_emergency_source_mcc_table VALUES('520','191','','limited');
INSERT INTO qcril_emergency_source_mcc_table VALUES('520','1669','','limited');
INSERT INTO qcril_emergency_source_mcc_table VALUES('520','199','','limited');
INSERT INTO qcril_emergency_source_mcc_table VALUES('520','112','','limited');
INSERT INTO qcril_emergency_source_mcc_table VALUES('520','911','','limited');
INSERT INTO qcril_emergency_source_mcc_table VALUES('414','191','','limited');
INSERT INTO qcril_emergency_source_mcc_table VALUES('414','192','','limited');
INSERT INTO qcril_emergency_source_mcc_table VALUES('414','199','','limited');
INSERT INTO qcril_emergency_source_mcc_table VALUES('515','117','','limited');
INSERT INTO qcril_emergency_source_mcc_table VALUES('515','112','','limited');
INSERT INTO qcril_emergency_source_mcc_table VALUES('515','911','','limited');
INSERT INTO qcril_emergency_source_mcc_table VALUES('460','110','','');
INSERT INTO qcril_emergency_source_mcc_table VALUES('460','119','','');
INSERT INTO qcril_emergency_source_mcc_table VALUES('460','120','','');
INSERT INTO qcril_emergency_source_mcc_table VALUES('460','112','','');
INSERT INTO qcril_emergency_source_mcc_table VALUES('460','999','','');
INSERT INTO qcril_emergency_source_mcc_table VALUES('460','122','','');
INSERT INTO qcril_emergency_source_mcc_table VALUES('852','999','','');
INSERT INTO qcril_emergency_source_mcc_table VALUES('510','110','','');
INSERT INTO qcril_emergency_source_mcc_table VALUES('510','118','','');
INSERT INTO qcril_emergency_source_mcc_table VALUES('510','199','','');
INSERT INTO qcril_emergency_source_mcc_table VALUES('510','113','','');
INSERT INTO qcril_emergency_source_mcc_table VALUES('510','112','','');
INSERT INTO qcril_emergency_source_mcc_table VALUES('452','112','','');
INSERT INTO qcril_emergency_source_mcc_table VALUES('452','113','','');
INSERT INTO qcril_emergency_source_mcc_table VALUES('452','114','','');
INSERT INTO qcril_emergency_source_mcc_table VALUES('452','115','','');
INSERT INTO qcril_emergency_source_mcc_table VALUES('502','112','','');
INSERT INTO qcril_emergency_source_mcc_table VALUES('502','911','','');
INSERT INTO qcril_emergency_source_mcc_table VALUES('502','991','','');
INSERT INTO qcril_emergency_source_mcc_table VALUES('502','994','','');
INSERT INTO qcril_emergency_source_mcc_table VALUES('502','999','','');
INSERT INTO qcril_emergency_source_mcc_table VALUES('310','112','','');
INSERT INTO qcril_emergency_source_mcc_table VALUES('310','911','','');
INSERT INTO qcril_emergency_source_mcc_table VALUES('302','112','','');
INSERT INTO qcril_emergency_source_mcc_table VALUES('302','911','','');
INSERT INTO qcril_emergency_source_mcc_table VALUES('456','191','','');
INSERT INTO qcril_emergency_source_mcc_table VALUES('456','192','','');
INSERT INTO qcril_emergency_source_mcc_table VALUES('456','199','','');
INSERT INTO qcril_emergency_source_mcc_table VALUES('457','191','','');
INSERT INTO qcril_emergency_source_mcc_table VALUES('457','192','','');
INSERT INTO qcril_emergency_source_mcc_table VALUES('457','199','','');
INSERT INTO qcril_emergency_source_mcc_table VALUES('706','122','','');
INSERT INTO qcril_emergency_source_mcc_table VALUES('704','122','','');
INSERT INTO qcril_emergency_source_mcc_table VALUES('334','066','','');
INSERT INTO qcril_emergency_source_mcc_table VALUES('716','105','','');
INSERT INTO qcril_emergency_source_mcc_table VALUES('429','100',NULL,NULL);
INSERT INTO qcril_emergency_source_mcc_table VALUES('429','101',NULL,NULL);
INSERT INTO qcril_emergency_source_mcc_table VALUES('429','102',NULL,NULL);
INSERT INTO qcril_emergency_source_mcc_table VALUES('429','108',NULL,NULL);
INSERT INTO qcril_emergency_source_mcc_table VALUES('429','112',NULL,NULL);
INSERT INTO qcril_emergency_source_mcc_table VALUES('470','100',NULL,NULL);
INSERT INTO qcril_emergency_source_mcc_table VALUES('470','101',NULL,NULL);
INSERT INTO qcril_emergency_source_mcc_table VALUES('470','102',NULL,NULL);
INSERT INTO qcril_emergency_source_mcc_table VALUES('470','108',NULL,NULL);
INSERT INTO qcril_emergency_source_mcc_table VALUES('470','112',NULL,NULL);
INSERT INTO qcril_emergency_source_mcc_table VALUES('234','999','','');
INSERT INTO qcril_emergency_source_mcc_table VALUES('505','000','','');
CREATE TABLE qcril_emergency_source_voice_table(MCC TEXT, NUMBER TEXT, IMS_ADDRESS TEXT, SERVICE TEXT, PRIMARY KEY(MCC,NUMBER));
INSERT INTO qcril_emergency_source_voice_table VALUES('460','110','','full');
INSERT INTO qcril_emergency_source_voice_table VALUES('460','119','','full');
INSERT INTO qcril_emergency_source_voice_table VALUES('460','120','','full');
INSERT INTO qcril_emergency_source_voice_table VALUES('460','112','','full');
INSERT INTO qcril_emergency_source_voice_table VALUES('460','999','','full');
INSERT INTO qcril_emergency_source_voice_table VALUES('852','999','','full');
INSERT INTO qcril_emergency_source_voice_table VALUES('460','122','','full');
INSERT INTO qcril_emergency_source_voice_table VALUES('520','191','','full');
INSERT INTO qcril_emergency_source_voice_table VALUES('520','1669','','full');
INSERT INTO qcril_emergency_source_voice_table VALUES('520','199','','full');
INSERT INTO qcril_emergency_source_voice_table VALUES('520','112','','full');
INSERT INTO qcril_emergency_source_voice_table VALUES('520','911','','full');
INSERT INTO qcril_emergency_source_voice_table VALUES('414','191','','full');
INSERT INTO qcril_emergency_source_voice_table VALUES('414','192','','full');
INSERT INTO qcril_emergency_source_voice_table VALUES('414','199','','full');
INSERT INTO qcril_emergency_source_voice_table VALUES('515','117','','full');
INSERT INTO qcril_emergency_source_voice_table VALUES('515','112','','full');
INSERT INTO qcril_emergency_source_voice_table VALUES('515','911','','full');
INSERT INTO qcril_emergency_source_voice_table VALUES('510','110','','full');
INSERT INTO qcril_emergency_source_voice_table VALUES('510','118','','full');
INSERT INTO qcril_emergency_source_voice_table VALUES('510','199','','full');
INSERT INTO qcril_emergency_source_voice_table VALUES('510','113','','full');
INSERT INTO qcril_emergency_source_voice_table VALUES('510','112','','full');
INSERT INTO qcril_emergency_source_voice_table VALUES('452','112','','full');
INSERT INTO qcril_emergency_source_voice_table VALUES('452','113','','full');
INSERT INTO qcril_emergency_source_voice_table VALUES('452','114','','full');
INSERT INTO qcril_emergency_source_voice_table VALUES('452','115','','full');
INSERT INTO qcril_emergency_source_voice_table VALUES('502','112','','full');
INSERT INTO qcril_emergency_source_voice_table VALUES('502','911','','full');
INSERT INTO qcril_emergency_source_voice_table VALUES('502','991','','full');
INSERT INTO qcril_emergency_source_voice_table VALUES('502','994','','full');
INSERT INTO qcril_emergency_source_voice_table VALUES('502','999','','full');
CREATE TABLE qcril_emergency_source_hard_mcc_table(MCC TEXT, NUMBER TEXT, IMS_ADDRESS TEXT, SERVICE TEXT, PRIMARY KEY(MCC,NUMBER));
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('460','110','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('460','119','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('460','120','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('460','112','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('460','999','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('852','999','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('460','122','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('520','191','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('520','1669','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('520','199','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('520','112','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('520','911','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('414','191','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('414','192','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('414','199','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('515','117','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('515','112','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('515','911','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('510','110','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('510','118','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('510','199','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('510','113','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('510','112','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('452','112','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('452','113','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('452','114','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('452','115','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('502','112','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('502','911','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('502','991','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('502','994','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('502','999','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('310','112','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('310','911','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('310','999','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('302','112','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('302','911','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('302','999','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('456','191','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('456','192','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('456','199','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('457','191','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('457','192','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('457','199','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('730','133','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('429','100',NULL,NULL);
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('429','101',NULL,NULL);
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('429','102',NULL,NULL);
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('429','108',NULL,NULL);
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('429','112',NULL,NULL);
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('470','100',NULL,NULL);
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('470','101',NULL,NULL);
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('470','102',NULL,NULL);
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('470','108',NULL,NULL);
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('470','112',NULL,NULL);
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('262','112','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('234','999','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('234','112','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('234','911','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('222','112','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('222','911','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('222','999','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('222','08','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('222','118','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('222','119','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('214','112','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('268','112','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('204','112','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('272','112','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('272','999','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('216','112','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('230','112','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('230','150','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('230','155','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('230','158','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('655','112','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('655','911','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('286','112','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('226','112','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('226','911','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('206','112','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('260','112','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('260','911','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('231','911','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('231','112','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('214','911','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('208','911','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('208','112','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('334','112','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('334','060','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('334','911','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('732','911','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('732','112','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('716','911','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('716','112','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('724','911','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('724','112','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('724','190','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('724','192','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('724','193','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('722','112','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('722','911','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('730','112','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('730','911','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('712','112','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('712','911','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('740','112','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('740','911','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('706','112','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('706','911','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('704','112','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('704','911','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('710','112','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('710','911','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('714','112','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('714','911','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('748','112','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('748','911','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('734','112','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('734','911','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('262','911','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('262','000','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('262','08','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('262','110','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('262','999','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('262','118','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('262','119','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('262','122','','');
CREATE TABLE qcril_emergency_source_nw_table(MCC TEXT, NUMBER TEXT, IMS_ADDRESS TEXT, SERVICE TEXT, PRIMARY KEY(MCC,NUMBER));
CREATE TABLE qcril_emergency_source_escv_iin_table(IIN TEXT, NUMBER TEXT, ESCV INTEGER, ROAM TEXT, PRIMARY KEY(IIN,NUMBER,ROAM));
CREATE TABLE qcril_emergency_source_escv_nw_table(MCC TEXT, MNC TEXT, NUMBER TEXT, ESCV INTEGER, PRIMARY KEY(MCC,NUMBER, ESCV));
CREATE TABLE qcril_emergency_source_mcc_mnc_table(MCC TEXT, MNC TEXT, NUMBER TEXT, IMS_ADDRESS TEXT, SERVICE TEXT, PRIMARY KEY(MCC,NUMBER,MNC));
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('262','02','112','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('234','20','999','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('234','20','112','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('234','15','999','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('234','15','112','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('234','15','911','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('222','10','112','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('222','99','112','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('222','99','911','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('222','99','999','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('222','99','08','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('222','99','118','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('222','99','119','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('214','01','112','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('268','01','112','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('204','04','112','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('272','01','112','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('272','01','999','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('216','70','112','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('230','03','112','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('230','03','150','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('230','03','155','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('230','03','158','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('655','01','112','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('655','01','911','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('286','02','112','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('226','10','112','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('226','10','911','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('206','10','112','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('260','03','112','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('260','03','911','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('231','01','911','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('231','01','112','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('214','03','112','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('214','03','911','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','01','911','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','01','112','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('334','020','060','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('334','020','112','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('334','020','911','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('732','101','112','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('732','101','911','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('716','10','112','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('716','10','911','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('724','05','190','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('724','05','192','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('724','05','193','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('724','05','911','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('724','05','112','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('724','12','190','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('724','12','192','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('724','12','193','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('724','12','911','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('724','12','112','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('724','38','190','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('724','38','192','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('724','38','193','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('724','38','911','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('724','38','112','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('722','07','112','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('722','07','911','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('722','10','112','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('722','10','911','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('722','070','112','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('722','070','911','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('730','02','112','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('730','02','911','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('730','02','133','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('732','001','112','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('732','001','911','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('732','001','123','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('732','102','112','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('732','102','911','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('732','102','123','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('732','123','112','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('732','123','911','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('732','123','123','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('712','04','911','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('712','04','112','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('740','00','911','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('740','00','112','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('706','04','911','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('706','04','112','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('706','04','122','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('704','03','911','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('704','03','112','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('704','03','122','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('334','03','911','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('334','03','112','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('334','03','066','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('334','030','911','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('334','030','112','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('334','030','066','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('710','30','911','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('710','30','112','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('710','300','911','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('710','300','112','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('714','02','911','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('714','02','112','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('716','06','911','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('716','06','112','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('716','06','105','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('748','07','911','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('748','07','112','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('734','04','911','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('734','04','112','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('262','03','911','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('262','03','112','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('234','30','999','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('234','30','112','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('234','33','999','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('234','33','112','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','840','100','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','840','101','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','840','102','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','840','108','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','854','100','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','854','101','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','854','102','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','854','108','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','855','100','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','855','101','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','855','102','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','855','108','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','856','100','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','856','101','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','856','102','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','856','108','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','857','100','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','857','101','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','857','102','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','857','108','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','858','100','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','858','101','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','858','102','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','858','108','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','859','100','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','859','101','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','859','102','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','859','108','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','860','100','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','860','101','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','860','102','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','860','108','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','861','100','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','861','101','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','861','102','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','861','108','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','862','100','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','862','101','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','862','102','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','862','108','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','863','100','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','863','101','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','863','102','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','863','108','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','864','100','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','864','101','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','864','102','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','864','108','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','865','100','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','865','101','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','865','102','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','865','108','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','866','100','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','866','101','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','866','102','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','866','108','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','867','100','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','867','101','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','867','102','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','867','108','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','868','100','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','868','101','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','868','102','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','868','108','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','869','100','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','869','101','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','869','102','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','869','108','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','870','100','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','870','101','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','870','102','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','870','108','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','871','100','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','871','101','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','871','102','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','871','108','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','872','100','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','872','101','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','872','102','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','872','108','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','873','100','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','873','101','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','873','102','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','873','108','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','874','100','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','874','101','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','874','102','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('405','874','108','','');
CREATE TABLE qcril_emergency_source_voice_mcc_mnc_table(MCC TEXT, MNC TEXT, NUMBER TEXT, IMS_ADDRESS TEXT, SERVICE TEXT, PRIMARY KEY(MCC,NUMBER,MNC));
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','840','100','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','840','101','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','840','102','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','840','108','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','854','100','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','854','101','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','854','102','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','854','108','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','855','100','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','855','101','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','855','102','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','855','108','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','856','100','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','856','101','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','856','102','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','856','108','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','857','100','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','857','101','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','857','102','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','857','108','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','858','100','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','858','101','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','858','102','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','858','108','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','859','100','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','859','101','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','859','102','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','859','108','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','860','100','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','860','101','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','860','102','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','860','108','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','861','100','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','861','101','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','861','102','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','861','108','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','862','100','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','862','101','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','862','102','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','862','108','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','863','100','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','863','101','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','863','102','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','863','108','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','864','100','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','864','101','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','864','102','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','864','108','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','865','100','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','865','101','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','865','102','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','865','108','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','866','100','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','866','101','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','866','102','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','866','108','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','867','100','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','867','101','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','867','102','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','867','108','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','868','100','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','868','101','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','868','102','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','868','108','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','869','100','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','869','101','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','869','102','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','869','108','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','870','100','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','870','101','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','870','102','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','870','108','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','871','100','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','871','101','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','871','102','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','871','108','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','872','100','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','872','101','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','872','102','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','872','108','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','873','100','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','873','101','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','873','102','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','873','108','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','874','100','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','874','101','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','874','102','','full');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('405','874','108','','full');
CREATE TABLE qcril_properties_table (property TEXT,value TEXT, PRIMARY KEY(property));
INSERT INTO qcril_properties_table VALUES('qcrildb_version','5');
CREATE TABLE qcril_operator_specific_config(MCC TEXT, MNC TEXT, WPS_OVER_CS INTEGER, PRIMARY KEY(MCC, MNC));
INSERT INTO qcril_operator_specific_config VALUES('310','410',1);
DELETE FROM qcril_operator_specific_config where MCC = '310' AND MNC = '410';
CREATE TABLE qcril_cdma_operator_specific_config(MCC TEXT, MNC TEXT, FORCE_ON_DC INTEGER, PRIMARY KEY(MCC, MNC));
INSERT INTO qcril_cdma_operator_specific_config VALUES('460','03',1);
INSERT INTO qcril_cdma_operator_specific_config VALUES('460','11',1);
INSERT INTO qcril_cdma_operator_specific_config VALUES('454','03',1);
INSERT INTO qcril_cdma_operator_specific_config VALUES('454','31',1);
INSERT INTO qcril_cdma_operator_specific_config VALUES('204','04',1);
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '840' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '854' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '855' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '856' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '857' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '858' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '859' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '860' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '861' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '862' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '863' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '864' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '865' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '866' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '867' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '868' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '869' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '870' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '871' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '872' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '873' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '874' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '840' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '854' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '855' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '856' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '857' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '858' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '859' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '860' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '861' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '862' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '863' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '864' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '865' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '866' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '867' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '868' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '869' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '870' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '871' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '872' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '873' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '874' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '840' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '840' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '840' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '854' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '854' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '854' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '855' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '855' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '855' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '856' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '856' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '856' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '857' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '857' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '857' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '858' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '858' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '858' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '859' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '859' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '859' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '860' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '860' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '860' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '861' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '861' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '861' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '862' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '862' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '862' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '863' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '863' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '863' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '864' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '864' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '864' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '865' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '865' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '865' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '866' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '866' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '866' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '867' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '867' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '867' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '868' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '868' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '868' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '869' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '869' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '869' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '870' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '870' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '870' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '871' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '871' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '871' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '872' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '872' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '872' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '873' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '873' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '873' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '874' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '874' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '874' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '840' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '840' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '840' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '854' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '854' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '854' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '855' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '855' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '855' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '856' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '856' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '856' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '857' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '857' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '857' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '858' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '858' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '858' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '859' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '859' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '859' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '860' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '860' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '860' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '861' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '861' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '861' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '862' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '862' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '862' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '863' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '863' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '863' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '864' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '864' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '864' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '865' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '865' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '865' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '866' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '866' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '866' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '867' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '867' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '867' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '868' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '868' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '868' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '869' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '869' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '869' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '870' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '870' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '870' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '871' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '871' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '871' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '872' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '872' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '872' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '873' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '873' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '873' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '874' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '874' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '874' AND NUMBER = '108';

View File

@@ -0,0 +1,12 @@
/*
Copyright (c) 2021 Qualcomm Technologies, Inc.
All Rights Reserved.
Confidential and Proprietary - Qualcomm Technologies, Inc.
*/
INSERT OR REPLACE INTO qcril_properties_table (property, value) VALUES ('qcrildb_version', 10);
INSERT INTO qcril_emergency_source_mcc_table VALUES('235','999','','');
INSERT INTO qcril_emergency_source_mcc_table VALUES('530','111','','');
INSERT INTO qcril_emergency_source_hard_mcc_table VALUES('235','999','','');

View File

@@ -0,0 +1,14 @@
/*
Copyright (c) 2016 Qualcomm Technologies, Inc.
All Rights Reserved.
Confidential and Proprietary - Qualcomm Technologies, Inc.
*/
CREATE TABLE IF NOT EXISTS qcril_properties_table (property TEXT,value TEXT, PRIMARY KEY(property));
INSERT OR REPLACE INTO qcril_properties_table (property, value) VALUES ('qcrildb_version', 1);
DELETE FROM qcril_emergency_source_mcc_table where MCC = '234' AND NUMBER = '999';
INSERT INTO qcril_emergency_source_mcc_table VALUES('234','999','','');
DELETE FROM qcril_emergency_source_mcc_table WHERE MCC = '505' AND NUMBER = '000';
INSERT INTO qcril_emergency_source_mcc_table VALUES('505', '000', '','');

View File

@@ -0,0 +1,10 @@
/*
Copyright (c) 2017 Qualcomm Technologies, Inc.
All Rights Reserved.
Confidential and Proprietary - Qualcomm Technologies, Inc.
*/
INSERT OR REPLACE INTO qcril_properties_table (property, value) VALUES ('qcrildb_version', 2);
CREATE TABLE IF NOT EXISTS qcril_operator_specific_config(MCC TEXT, MNC TEXT, WPS_OVER_CS INTEGER, PRIMARY KEY(MCC, MNC));
INSERT OR REPLACE INTO qcril_operator_specific_config VALUES ('310', '410', 1);

View File

@@ -0,0 +1,9 @@
/*
Copyright (c) 2018 Qualcomm Technologies, Inc.
All Rights Reserved.
Confidential and Proprietary - Qualcomm Technologies, Inc.
*/
INSERT OR REPLACE INTO qcril_properties_table (property, value) VALUES ('qcrildb_version', 3);
DELETE FROM qcril_operator_specific_config where MCC = '310' AND MNC = '410';

View File

@@ -0,0 +1,53 @@
/*
Copyright (c) 2018 Qualcomm Technologies, Inc.
All Rights Reserved.
Confidential and Proprietary - Qualcomm Technologies, Inc.
*/
INSERT OR REPLACE INTO qcril_properties_table (property, value) VALUES ('qcrildb_version', 4);
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '840' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '854' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '855' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '856' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '857' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '858' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '859' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '860' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '861' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '862' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '863' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '864' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '865' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '866' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '867' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '868' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '869' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '870' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '871' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '872' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '873' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '874' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '840' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '854' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '855' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '856' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '857' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '858' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '859' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '860' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '861' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '862' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '863' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '864' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '865' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '866' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '867' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '868' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '869' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '870' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '871' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '872' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '873' AND NUMBER = '100';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '874' AND NUMBER = '100';

View File

@@ -0,0 +1,140 @@
/*
Copyright (c) 2019 Qualcomm Technologies, Inc.
All Rights Reserved.
Confidential and Proprietary - Qualcomm Technologies, Inc.
*/
INSERT OR REPLACE INTO qcril_properties_table (property, value) VALUES ('qcrildb_version', 5);
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '840' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '840' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '840' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '854' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '854' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '854' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '855' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '855' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '855' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '856' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '856' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '856' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '857' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '857' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '857' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '858' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '858' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '858' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '859' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '859' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '859' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '860' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '860' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '860' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '861' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '861' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '861' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '862' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '862' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '862' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '863' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '863' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '863' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '864' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '864' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '864' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '865' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '865' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '865' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '866' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '866' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '866' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '867' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '867' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '867' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '868' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '868' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '868' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '869' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '869' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '869' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '870' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '870' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '870' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '871' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '871' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '871' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '872' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '872' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '872' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '873' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '873' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '873' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '874' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '874' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_mcc_mnc_table where MCC = '405' AND MNC = '874' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '840' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '840' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '840' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '854' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '854' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '854' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '855' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '855' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '855' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '856' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '856' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '856' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '857' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '857' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '857' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '858' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '858' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '858' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '859' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '859' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '859' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '860' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '860' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '860' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '861' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '861' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '861' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '862' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '862' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '862' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '863' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '863' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '863' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '864' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '864' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '864' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '865' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '865' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '865' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '866' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '866' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '866' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '867' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '867' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '867' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '868' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '868' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '868' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '869' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '869' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '869' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '870' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '870' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '870' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '871' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '871' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '871' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '872' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '872' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '872' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '873' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '873' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '873' AND NUMBER = '108';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '874' AND NUMBER = '101';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '874' AND NUMBER = '102';
DELETE FROM qcril_emergency_source_voice_mcc_mnc_table where MCC = '405' AND MNC = '874' AND NUMBER = '108';

View File

@@ -0,0 +1,9 @@
/*
Copyright (c) 2019 Qualcomm Technologies, Inc.
All Rights Reserved.
Confidential and Proprietary - Qualcomm Technologies, Inc.
*/
DROP TABLE IF EXISTS qcril_properties_table;
CREATE TABLE qcril_properties_table (property TEXT PRIMARY KEY NOT NULL, def_val TEXT, value TEXT);
INSERT OR REPLACE INTO qcril_properties_table (property, def_val) VALUES ('qcrildb_version', 6);

View File

@@ -0,0 +1,229 @@
/*
Copyright (c) 2020 Qualcomm Technologies, Inc.
All Rights Reserved.
Confidential and Proprietary - Qualcomm Technologies, Inc.
*/
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','01','15','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','01','17','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','01','18','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','01','115','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','01','119','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','01','191','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','01','196','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','01','197','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','01','116000','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','01','116117','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','02','15','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','02','17','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','02','18','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','02','115','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','02','119','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','02','191','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','02','196','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','02','197','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','02','116000','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','02','116117','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','91','15','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','91','17','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','91','18','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','91','115','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','91','119','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','91','191','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','91','196','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','91','197','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','91','116000','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','91','116117','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','20','15','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','20','17','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','20','18','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','20','115','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','20','119','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','20','191','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','20','196','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','20','197','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','20','116000','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','20','116117','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','21','15','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','21','17','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','21','18','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','21','115','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','21','119','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','21','191','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','21','196','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','21','197','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','21','116000','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','21','116117','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','88','15','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','88','17','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','88','18','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','88','115','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','88','119','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','88','191','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','88','196','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','88','197','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','88','116000','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','88','116117','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','09','15','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','09','17','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','09','18','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','09','115','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','09','119','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','09','191','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','09','196','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','09','197','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','09','116000','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','09','116117','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','10','15','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','10','17','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','10','18','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','10','115','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','10','119','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','10','191','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','10','196','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','10','197','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','10','116000','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','10','116117','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','11','15','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','11','17','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','11','18','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','11','115','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','11','119','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','11','191','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','11','196','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','11','197','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','11','116000','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','11','116117','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','13','15','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','13','17','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','13','18','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','13','115','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','13','119','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','13','191','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','13','196','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','13','197','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','13','116000','','');
INSERT INTO qcril_emergency_source_mcc_mnc_table VALUES('208','13','116117','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','01','15','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','01','17','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','01','18','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','01','115','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','01','119','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','01','191','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','01','196','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','01','197','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','01','116000','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','01','116117','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','02','15','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','02','17','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','02','18','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','02','115','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','02','119','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','02','191','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','02','196','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','02','197','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','02','116000','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','02','116117','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','91','15','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','91','17','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','91','18','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','91','115','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','91','119','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','91','191','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','91','196','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','91','197','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','91','116000','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','91','116117','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','20','15','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','20','17','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','20','18','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','20','115','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','20','119','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','20','191','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','20','196','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','20','197','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','20','116000','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','20','116117','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','21','15','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','21','17','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','21','18','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','21','115','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','21','119','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','21','191','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','21','196','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','21','197','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','21','116000','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','21','116117','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','88','15','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','88','17','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','88','18','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','88','115','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','88','119','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','88','191','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','88','196','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','88','197','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','88','116000','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','88','116117','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','09','15','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','09','17','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','09','18','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','09','115','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','09','119','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','09','191','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','09','196','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','09','197','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','09','116000','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','09','116117','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','10','15','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','10','17','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','10','18','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','10','115','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','10','119','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','10','191','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','10','196','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','10','197','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','10','116000','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','10','116117','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','11','15','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','11','17','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','11','18','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','11','115','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','11','119','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','11','191','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','11','196','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','11','197','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','11','116000','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','11','116117','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','13','15','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','13','17','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','13','18','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','13','115','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','13','119','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','13','191','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','13','196','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','13','197','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','13','116000','','');
INSERT INTO qcril_emergency_source_voice_mcc_mnc_table VALUES('208','13','116117','','');

View File

@@ -0,0 +1,65 @@
/*
Copyright (c) 2021 Qualcomm Technologies, Inc.
All Rights Reserved.
Confidential and Proprietary - Qualcomm Technologies, Inc.
*/
INSERT OR REPLACE INTO qcril_properties_table (property, value) VALUES ('qcrildb_version', 8);
INSERT INTO qcril_emergency_source_mcc_table VALUES('204','112','','');
INSERT INTO qcril_emergency_source_mcc_table VALUES('206','112','','');
INSERT INTO qcril_emergency_source_mcc_table VALUES('208','911','','');
INSERT INTO qcril_emergency_source_mcc_table VALUES('208','112','','');
INSERT INTO qcril_emergency_source_mcc_table VALUES('214','911','','');
INSERT INTO qcril_emergency_source_mcc_table VALUES('214','112','','');
INSERT INTO qcril_emergency_source_mcc_table VALUES('216','112','','');
INSERT INTO qcril_emergency_source_mcc_table VALUES('222','112','','');
INSERT INTO qcril_emergency_source_mcc_table VALUES('222','911','','');
INSERT INTO qcril_emergency_source_mcc_table VALUES('222','999','','');
INSERT INTO qcril_emergency_source_mcc_table VALUES('222','08','','');
INSERT INTO qcril_emergency_source_mcc_table VALUES('222','118','','');
INSERT INTO qcril_emergency_source_mcc_table VALUES('222','119','','');
INSERT INTO qcril_emergency_source_mcc_table VALUES('226','112','','');
INSERT INTO qcril_emergency_source_mcc_table VALUES('226','911','','');
INSERT INTO qcril_emergency_source_mcc_table VALUES('230','112','','');
INSERT INTO qcril_emergency_source_mcc_table VALUES('230','150','','');
INSERT INTO qcril_emergency_source_mcc_table VALUES('230','155','','');
INSERT INTO qcril_emergency_source_mcc_table VALUES('230','158','','');
INSERT INTO qcril_emergency_source_mcc_table VALUES('231','112','','');
INSERT INTO qcril_emergency_source_mcc_table VALUES('231','911','','');
INSERT INTO qcril_emergency_source_mcc_table VALUES('234','112','','');
INSERT INTO qcril_emergency_source_mcc_table VALUES('234','911','','');
INSERT INTO qcril_emergency_source_mcc_table VALUES('260','112','','');
INSERT INTO qcril_emergency_source_mcc_table VALUES('260','911','','');
INSERT INTO qcril_emergency_source_mcc_table VALUES('262','112','','');
INSERT INTO qcril_emergency_source_mcc_table VALUES('268','112','','');
INSERT INTO qcril_emergency_source_mcc_table VALUES('272','112','','');
INSERT INTO qcril_emergency_source_mcc_table VALUES('272','999','','');
INSERT INTO qcril_emergency_source_mcc_table VALUES('286','112','','');
INSERT INTO qcril_emergency_source_mcc_table VALUES('302','999','','');
INSERT INTO qcril_emergency_source_mcc_table VALUES('310','999','','');
INSERT INTO qcril_emergency_source_mcc_table VALUES('404','112','','');
INSERT INTO qcril_emergency_source_mcc_table VALUES('405','112','','');
DELETE FROM qcril_emergency_source_mcc_table where MCC = '414' AND NUMBER = '191';
INSERT INTO qcril_emergency_source_mcc_table VALUES('414','191','','');
DELETE FROM qcril_emergency_source_mcc_table where MCC = '414' AND NUMBER = '192';
INSERT INTO qcril_emergency_source_mcc_table VALUES('414','192','','');
DELETE FROM qcril_emergency_source_mcc_table where MCC = '414' AND NUMBER = '199';
INSERT INTO qcril_emergency_source_mcc_table VALUES('414','199','','');
DELETE FROM qcril_emergency_source_mcc_table where MCC = '515' AND NUMBER = '117';
INSERT INTO qcril_emergency_source_mcc_table VALUES('515','117','','');
DELETE FROM qcril_emergency_source_mcc_table where MCC = '515' AND NUMBER = '192';
INSERT INTO qcril_emergency_source_mcc_table VALUES('515','192','','');
DELETE FROM qcril_emergency_source_mcc_table where MCC = '515' AND NUMBER = '911';
INSERT INTO qcril_emergency_source_mcc_table VALUES('515','911','','');
DELETE FROM qcril_emergency_source_mcc_table where MCC = '520' AND NUMBER = '191';
INSERT INTO qcril_emergency_source_mcc_table VALUES('520','191','','');
DELETE FROM qcril_emergency_source_mcc_table where MCC = '520' AND NUMBER = '1669';
INSERT INTO qcril_emergency_source_mcc_table VALUES('520','1669','','');
DELETE FROM qcril_emergency_source_mcc_table where MCC = '520' AND NUMBER = '199';
INSERT INTO qcril_emergency_source_mcc_table VALUES('520','199','','');
DELETE FROM qcril_emergency_source_mcc_table where MCC = '520' AND NUMBER = '112';
INSERT INTO qcril_emergency_source_mcc_table VALUES('520','112','','');
DELETE FROM qcril_emergency_source_mcc_table where MCC = '520' AND NUMBER = '911';
INSERT INTO qcril_emergency_source_mcc_table VALUES('520','911','','');
INSERT INTO qcril_emergency_source_mcc_table VALUES('655','112','','');
INSERT INTO qcril_emergency_source_mcc_table VALUES('655','911','','');

View File

@@ -0,0 +1,10 @@
/*
Copyright (c) 2021 Qualcomm Technologies, Inc.
All Rights Reserved.
Confidential and Proprietary - Qualcomm Technologies, Inc.
*/
INSERT OR REPLACE INTO qcril_properties_table (property, value) VALUES ('qcrildb_version', 9);
INSERT INTO qcril_emergency_source_mcc_table VALUES('450','112','','');
INSERT INTO qcril_emergency_source_mcc_table VALUES('450','119','','');

View File

@@ -0,0 +1,76 @@
prebuilt_etc {
name: "0_initial_qcrilnr.sql",
src: "0_initial_qcrilnr.sql",
sub_dir: "qcril_database/upgrade/other",
vendor: true,
}
prebuilt_etc {
name: "1_version_intro_qcrilnr.sql",
src: "1_version_intro_qcrilnr.sql",
sub_dir: "qcril_database/upgrade/other",
vendor: true,
}
prebuilt_etc {
name: "2_version_add_wps_config_qcrilnr.sql",
src: "2_version_add_wps_config_qcrilnr.sql",
sub_dir: "qcril_database/upgrade/other",
vendor: true,
}
prebuilt_etc {
name: "3_version_update_wps_config_qcrilnr.sql",
src: "3_version_update_wps_config_qcrilnr.sql",
sub_dir: "qcril_database/upgrade/other",
vendor: true,
}
prebuilt_etc {
name: "4_version_update_ecc_table_qcrilnr.sql",
src: "4_version_update_ecc_table_qcrilnr.sql",
sub_dir: "qcril_database/upgrade/other",
vendor: true,
}
prebuilt_etc {
name: "5_version_update_ecc_table_qcrilnr.sql",
src: "5_version_update_ecc_table_qcrilnr.sql",
sub_dir: "qcril_database/upgrade/other",
vendor: true,
}
prebuilt_etc {
name: "6_version_change_property_table_qcrilnr.sql",
src: "6_version_change_property_table_qcrilnr.sql",
sub_dir: "qcril_database/upgrade/other",
vendor: true,
}
prebuilt_etc {
name: "7_version_update_ecc_table_qcrilnr.sql",
src: "7_version_update_ecc_table_qcrilnr.sql",
sub_dir: "qcril_database/upgrade/other",
vendor: true,
}
prebuilt_etc {
name: "8_version_update_ecc_table.sql",
src: "8_version_update_ecc_table.sql",
sub_dir: "qcril_database/upgrade/other",
vendor: true,
}
prebuilt_etc {
name: "9_version_update_ecc_table.sql",
src: "9_version_update_ecc_table.sql",
sub_dir: "qcril_database/upgrade/other",
vendor: true,
}
prebuilt_etc {
name: "10_version_update_ecc_table.sql",
src: "10_version_update_ecc_table.sql",
sub_dir: "qcril_database/upgrade/other",
vendor: true,
}

View File

@@ -26,4 +26,4 @@ on charger
chmod 0664 /sys/class/qcom-battery/authentic
chmod 0664 /sys/class/qcom-battery/verify_slave_flag
chmod 0664 /sys/class/qcom-battery/slave_authentic
chmod 0664 /sys/class/qcom-battery/is_old_hw
chmod 0664 /sys/class/qcom-battery/is_old_hw

View File

@@ -39,6 +39,11 @@ on early-init
# Disable UFS clock gating
write /sys/bus/platform/devices/1d84000.ufshc/clkgate_enable 0
mkdir /mnt/vendor/dsp 0770 root root
copy /vendor/dsp/cdsp/fastrpc_shell_3 /mnt/vendor/dsp/fastrpc_shell_3
chmod 0644 /mnt/vendor/dsp/fastrpc_shell_3
mount none /mnt/vendor/dsp/fastrpc_shell_3 /vendor/dsp/cdsp/fastrpc_shell_3 bind
on early-boot
write /sys/class/drm/card0-DSI-1/status "detect"
write /sys/module/drm/parameters/vblankoffdelay -1
@@ -236,6 +241,9 @@ on property:sys.boot_completed=1
# Reinit lmkd to reconfigure lmkd properties
setprop lmkd.reinit 1
# STOP EATING MY BATTERY AFTER 100H OF UPTIME FUCK YOU
stop statsd
service vendor.qrtr-ns /vendor/bin/qrtr-ns -f
class core
user vendor_qrtr

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1 @@
dontaudit isolated_app content_capture_service:service_manager find;

View File

@@ -0,0 +1,23 @@
# Camera
ro.camera.req.fmq. u:object_r:exported_default_prop:s0
ro.camera.res.fmq. u:object_r:exported_default_prop:s0
camera.debug.superlowlight u:object_r:vendor_camera_prop:s0
persist.al.ldc.log u:object_r:vendor_camera_prop:s0
persist.al.cfr.loglevel u:object_r:vendor_camera_prop:s0
persist.wa.log.level u:object_r:vendor_camera_prop:s0
persist.wa.dump u:object_r:vendor_camera_prop:s0
persist.wa.timelog u:object_r:vendor_camera_prop:s0
persist.sys.camlog.system.af u:object_r:vendor_camera_prop:s0
MACE_CPP_MIN_VLOG_LEVEL u:object_r:vendor_camera_prop:s0
# Global
ro.product.marketname u:object_r:build_prop:s0
ro.product.mod_device u:object_r:build_prop:s0
# MIUI
ro.miui.build.region u:object_r:exported_system_prop:s0
vendor.panel.display u:object_r:exported_system_prop:s0
# Hardware
ro.hardware.chipname u:object_r:exported_default_prop:s0

View File

@@ -1 +1,4 @@
hal_client_domain(system_app, hal_mlipay)
# Allow settings to query qemu.hw.mainkeys
get_prop(system_app, qemu_hw_prop)

4
sepolicy/vendor/adsprpcd.te vendored Normal file
View File

@@ -0,0 +1,4 @@
type public_adsprpcd_file, file_type;
r_dir_file(vendor_adsprpcd, public_adsprpcd_file)
r_dir_file(vendor_adsprpcd, vendor_sysfs_graphics)

View File

@@ -1,2 +1,5 @@
get_prop({ appdomain -isolated_app_all }, vendor_fp_prop)
get_prop({ appdomain -isolated_app_all }, vendor_mlipay_prop)
allow { appdomain -isolated_app_all } adsprpcd_file:dir r_dir_perms;
allow { appdomain -isolated_app_all } public_adsprpcd_file:file r_file_perms;

1
sepolicy/vendor/cameraserver.te vendored Normal file
View File

@@ -0,0 +1 @@
allow cameraserver property_socket:sock_file { write };

1
sepolicy/vendor/cdsprpcd.te vendored Normal file
View File

@@ -0,0 +1 @@
r_dir_file(vendor_cdsprpcd, public_adsprpcd_file)

5
sepolicy/vendor/dontaudit.te vendored Normal file
View File

@@ -0,0 +1,5 @@
dontaudit {
hal_camera_default
} default_prop:file r_file_perms;
dontaudit untrusted_app ashmem_device:chr_file open;

View File

@@ -22,6 +22,11 @@
/vendor/lib(64)?/rfsa/adsp/libsnpe_htp_v66_skel\.so u:object_r:same_process_hal_file:s0
/vendor/lib(64)?/rfsa/adsp/libsnpe_htp_v68_skel\.so u:object_r:same_process_hal_file:s0
# Hexagon DSP-side executable needed for Halide operation
# This is labeled as public_adsprpcd_file as it needs to be read by apps
# (e.g. Google Camera App)
/mnt/vendor/dsp/fastrpc_shell_3 u:object_r:public_adsprpcd_file:s0
# IR
/dev/lirc[0-9]+ u:object_r:lirc_device:s0
/vendor/bin/hw/android\.hardware\.ir-service\.xiaomi u:object_r:hal_ir_default_exec:s0

View File

@@ -51,3 +51,4 @@ genfscon sysfs /devices/platform/soc/soc:qcom,kgsl-hyp/subsys3/wakeup u:object_r
genfscon sysfs /devices/platform/soc/soc:qcom,kgsl-hyp/subsys4/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/soc:qcom,trustedvm@d0800000/subsys1/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/soc:qcom,trustedvm@d0800000/subsys2/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/soc/3700000.qcom,lpass/subsys6/wakeup u:object_r:sysfs_wakeup:s0

View File

@@ -1,9 +1,12 @@
type camera_persist_file, vendor_persist_type, file_type;
type vendor_hal_cameraperf_hwservice, hwservice_manager_type, protected_hwservice;
type vendor_hal_camerapostproc_xiaomi_hwservice, hwservice_manager_type;
vendor_internal_prop(vendor_camera_sensor_prop)
vendor_public_prop(vendor_camera_sensor_prop)
set_prop(hal_camera_default, vendor_camera_sensor_prop)
set_prop(hal_camera_default, vendor_camera_prop)
r_dir_file(hal_camera_default, vendor_sysfs_kgsl)
r_dir_file(hal_camera_default, mnt_vendor_file)
r_dir_file(hal_camera_default, camera_persist_file)
allow hal_camera_default mnt_vendor_file:dir search;
@@ -13,3 +16,5 @@ add_hwservice(hal_camera_server, vendor_hal_cameraperf_hwservice)
add_hwservice(hal_camera_server, vendor_hal_camerapostproc_xiaomi_hwservice)
allow hal_camera_client vendor_hal_cameraperf_hwservice:hwservice_manager find;
allow hal_camera_client vendor_hal_camerapostproc_xiaomi_hwservice:hwservice_manager find;
allow hal_camera_default public_adsprpcd_file:file r_file_perms;

View File

@@ -0,0 +1 @@
r_dir_file(vendor_hal_neuralnetworks_default, public_adsprpcd_file)

View File

@@ -3,3 +3,8 @@ allow vendor_hal_perf_default hal_audio_default:file r_file_perms;
allow vendor_hal_perf_default hal_fingerprint_default:dir r_dir_perms;
allow vendor_hal_perf_default hal_fingerprint_default:file r_file_perms;
allow vendor_hal_perf_default hal_camera_default:dir r_dir_perms;
allow vendor_hal_perf_default hal_camera_default:file { read open };
allow vendor_hal_perf_default ctl_start_prop:property_service { set };
allow vendor_hal_perf_default vendor_msm_irqbalance_prop:property_service { set };
allow vendor_hal_perf_default ctl_stop_prop:property_service { set };

1
sepolicy/vendor/init.te vendored Normal file
View File

@@ -0,0 +1 @@
allow init adsprpcd_file:file mounton;

1
sepolicy/vendor/isolated_app.te vendored Normal file
View File

@@ -0,0 +1 @@
allow isolated_app app_data_file:file setattr;

1
sepolicy/vendor/mediaserver.te vendored Normal file
View File

@@ -0,0 +1 @@
allow mediaserver package_native_service:service_manager { find };

3
sepolicy/vendor/mediaswcodec.te vendored Normal file
View File

@@ -0,0 +1,3 @@
allow mediaswcodec servicemanager:binder call;
allow mediaswcodec gpu_device:chr_file rw_file_perms;

View File

@@ -1,6 +1,14 @@
# Camera
persist.camera. u:object_r:vendor_camera_prop:s0
persist.vendor.camera u:object_r:vendor_camera_prop:s0
vendor.camera. u:object_r:vendor_camera_prop:s0
vendor.camera.sensor.logsystem u:object_r:vendor_camera_prop:s0
vendor.camera.sensor. u:object_r:vendor_camera_sensor_prop:s0
persist.vendor.aiie_capture_log.debug u:object_r:vendor_camera_prop:s0
ro.boot.camera. u:object_r:vendor_camera_prop:s0
ro.boot.camera.config u:object_r:vendor_camera_sensor_prop:s0
persist.vendor.low.cutoff u:object_r:vendor_camera_prop:s0
ro.vendor.audio.us.proximity u:object_r:vendor_camera_prop:s0
# Fingerprint
persist.vendor.sys.fp. u:object_r:vendor_fp_prop:s0

1
sepolicy/vendor/system_app.te vendored Normal file
View File

@@ -0,0 +1 @@
allow system_app sysfs_thermal:file write;

5
sepolicy/vendor/system_server.te vendored Normal file
View File

@@ -0,0 +1,5 @@
# Allow system_server to read Fast Charging status
allow system_server vendor_sysfs_battery_supply:file rw_file_perms;
allow system_server vendor_sysfs_battery_supply:file { getattr open read };
allow system_server vendor_sysfs_graphics:file rw_file_perms;

1
sepolicy/vendor/vppservice.te vendored Normal file
View File

@@ -0,0 +1 @@
r_dir_file(vendor_vppservice, public_adsprpcd_file)

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