rog3: rog2 --> rog3
diff --git a/Android.bp b/Android.bp
deleted file mode 100644
index c2ab30c..0000000
--- a/Android.bp
+++ /dev/null
@@ -1,3 +0,0 @@
-soong_namespace {
- imports: ["hardware/qcom/bootctrl"],
-}
diff --git a/Android.mk b/Android.mk
index 2963c72..4ad8367 100755
--- a/Android.mk
+++ b/Android.mk
@@ -27,6 +27,7 @@
LOCAL_PATH := $(call my-dir)
-ifeq ($(TARGET_DEVICE),$(filter $(TARGET_DEVICE),rog2))
-
+ifeq ($(TARGET_DEVICE),rog3)
+ subdir_makefiles=$(call first-makefiles-under,$(LOCAL_PATH))
+ $(foreach mk,$(subdir_makefiles),$(info including $(mk) ...)$(eval include $(mk)))
endif
diff --git a/AndroidBoard.mk b/AndroidBoard.mk
deleted file mode 100644
index 7e67478..0000000
--- a/AndroidBoard.mk
+++ /dev/null
@@ -1,21 +0,0 @@
-#
-# Copyright (C) 2019 The TwrpBuilder Open-Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-LOCAL_PATH := $(call my-dir)
-
-ifneq ($(filter rog2,$(TARGET_DEVICE)),)
-include $(call all-makefiles-under,$(LOCAL_PATH))
-endif
diff --git a/AndroidProducts.mk b/AndroidProducts.mk
index 470c640..1c6e24f 100755
--- a/AndroidProducts.mk
+++ b/AndroidProducts.mk
@@ -1,8 +1,9 @@
PRODUCT_MAKEFILES := \
- $(LOCAL_DIR)/device.mk \
- $(LOCAL_DIR)/omni_rog2.mk
+ $(LOCAL_DIR)/omni_rog3.mk
COMMON_LUNCH_CHOICES := \
- omni_rog2-user \
- omni_rog2-userdebug \
- omni_rog2-eng
\ No newline at end of file
+ omni_rog3-user \
+ omni_rog3-userdebug \
+ omni_rog3-eng
+
+
\ No newline at end of file
diff --git a/BoardConfig.mk b/BoardConfig.mk
index e8db529..bf798a6 100755
--- a/BoardConfig.mk
+++ b/BoardConfig.mk
@@ -18,160 +18,20 @@
# device-specific aspects (drivers) with a device-agnostic
# product configuration (apps).
#
-DEVICE_PATH := device/asus/rog2
-BOARD_VENDOR := asus
+# Inherit from asus sm8250-common
+-include device/asus/sm8250-common/BoardConfigCommon.mk
-# Architecture
-TARGET_ARCH := arm64
-TARGET_ARCH_VARIANT := armv8-a
-TARGET_CPU_ABI := arm64-v8a
-TARGET_CPU_ABI2 :=
-TARGET_CPU_VARIANT := generic
-TARGET_CPU_VARIANT_RUNTIME := kryo385
-
-TARGET_2ND_ARCH := arm
-TARGET_2ND_ARCH_VARIANT := armv8-a
-TARGET_2ND_CPU_ABI := armeabi-v7a
-TARGET_2ND_CPU_ABI2 := armeabi
-TARGET_CPU_VARIANT := generic
-TARGET_CPU_VARIANT_RUNTIME := kryo385
-
-TARGET_USES_64_BIT_BINDER := true
-
-ENABLE_CPUSETS := true
-ENABLE_SCHEDBOOST := true
-
-# Bootloader
-TARGET_BOOTLOADER_BOARD_NAME := msmnile
-TARGET_NO_BOOTLOADER := true
-
-# A/B
-BOARD_AVB_ENABLE := true
-BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS += --set_hashtree_disabled_flag
-BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS += --flags 2
-
-# ANT+
-BOARD_ANT_WIRELESS_DEVICE := "qualcomm-hidl"
-
-# APEX
-DEXPREOPT_GENERATE_APEX_IMAGE := true
-
-# Audio
-USE_CUSTOM_AUDIO_POLICY := 1
-USE_XML_AUDIO_POLICY_CONF := 1
-AUDIO_FEATURE_ENABLED_COMPRESS_VOIP := true
-AUDIO_FEATURE_ENABLED_EXTN_FORMATS := true
-AUDIO_FEATURE_ENABLED_FM_POWER_OPT := true
-AUDIO_FEATURE_ENABLED_PROXY_DEVICE := true
-AUDIO_FEATURE_ENABLED_RECORD_PLAY_CONCURRENCY := true
-AUDIO_FEATURE_ENABLED_VOICE_CONCURRENCY := true
+DEVICE_PATH := device/asus/rog3
# Bluetooth
-BOARD_HAVE_BLUETOOTH := true
-BOARD_HAVE_BLUETOOTH_QCOM := true
BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := $(DEVICE_PATH)/bluetooth
-QCOM_BT_USE_BTNV := true
-
-# charger
-HEALTHD_USE_BATTERY_INFO := true
-BOARD_CHARGER_ENABLE_SUSPEND := true
-BOARD_CHARGER_DISABLE_INIT_BLANK := true
-
-# Dex
-ifeq ($(HOST_OS),linux)
- ifneq ($(TARGET_BUILD_VARIANT),eng)
- WITH_DEXPREOPT ?= true
- endif
-endif
-WITH_DEXPREOPT_BOOT_IMG_AND_SYSTEM_SERVER_ONLY ?= true
-
-# Display
-TARGET_USES_HWC2 := true
-
-# DRM
-TARGET_ENABLE_MEDIADRM_64 := true
-
-# Filesystem
-TARGET_FS_CONFIG_GEN := $(DEVICE_PATH)/config.fs
-
-# FM
-BOARD_HAS_QCA_FM_SOC := "cherokee"
-BOARD_HAVE_QCOM_FM := true
-
-# Global
-BOARD_USES_QCOM_HARDWARE := true
-TARGET_SPECIFIC_HEADER_PATH := $(DEVICE_PATH)/include
-TARGET_SUPPORTS_32_BIT_APPS := true
-TARGET_SUPPORTS_64_BIT_APPS := true
-TARGET_USES_QCOM_BSP := false
-TARGET_USERIMAGES_SPARSE_EXT_DISABLED := false
-
-# HIDL
-DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE += $(DEVICE_PATH)/vendor_framework_compatibility_matrix.xml
-DEVICE_FRAMEWORK_MANIFEST_FILE += $(DEVICE_PATH)/framework_manifest.xml
-
-# Init
-TARGET_INIT_VENDOR_LIB := //$(DEVICE_PATH):libinit_rog2
# Kernel
-BOARD_KERNEL_CMDLINE := console=ttyMSM0,115200n8 earlycon=msm_geni_serial,0xa90000 androidboot.hardware=qcom androidboot.console=ttyMSM0 androidboot.memcg=1 lpm_levels.sleep_disabled=1 video=vfb:640x400,bpp=32,memsize=3072000 msm_rtb.filter=0x237 service_locator.enable=1 swiotlb=2048 loop.max_part=7 androidboot.usbcontroller=a600000.dwc3
-#BOARD_KERNEL_CMDLINE += androidboot.selinux=permissive
-BOARD_KERNEL_PAGESIZE := 4096
-BOARD_KERNEL_BASE := 0x00000000
-BOARD_KERNEL_TAGS_OFFSET := 0x00008000
-BOARD_RAMDISK_OFFSET := 0x01000000
-BOARD_TAGS_OFFSET := 0x00000100
-TARGET_KERNEL_ARCH := arm64
-TARGET_KERNEL_HEADER_ARCH := arm64
-BOARD_KERNEL_IMAGE_NAME := Image.gz-dtb
-TARGET_COMPILE_WITH_MSM_KERNEL := true
-TARGET_KERNEL_SOURCE := kernel/asus/rog2
-TARGET_KERNEL_CONFIG := vendor/rog2_defconfig
-BOARD_KERNEL_SEPARATED_DTBO := true
-TARGET_KERNEL_CLANG_COMPILE := true
+TARGET_KERNEL_CONFIG := vendor/rog3_defconfig
-# NFC
-TARGET_USES_NQ_NFC := true
+# Properties
+TARGET_SYSTEM_PROP += $(DEVICE_PATH)/system.prop
-# Partitions
-BOARD_BUILD_SYSTEM_ROOT_IMAGE := true
-BOARD_BOOTIMAGE_PARTITION_SIZE := 100663296
-BOARD_DTBOIMG_PARTITION_SIZE := 8388608
-BOARD_SYSTEMIMAGE_PARTITION_SIZE := 3758096384
-BOARD_USERDATAIMAGE_PARTITION_SIZE := 118112366592
-BOARD_FLASH_BLOCK_SIZE := 262144 # (BOARD_KERNEL_PAGESIZE * 64)
-BOARD_USES_METADATA_PARTITION := true
-BOARD_USES_PRODUCTIMAGE := true
-TARGET_COPY_OUT_ODM := odm
-TARGET_COPY_OUT_VENDOR := vendor
-
-BOARD_ROOT_EXTRA_FOLDERS := ADF APD asdf batinfo voucher xrom
-
-# Platform
-TARGET_BOARD_PLATFORM := msmnile
-TARGET_BOARD_PLATFORM_GPU := qcom-adreno640
-
-# Recovery
-BOARD_USES_RECOVERY_AS_BOOT := true
-TARGET_NO_RECOVERY := true
-TARGET_RECOVERY_FSTAB := $(DEVICE_PATH)/recovery.fstab
-TARGET_RECOVERY_PIXEL_FORMAT := "BGRA_8888"
-TARGET_USERIMAGES_USE_EXT4 := true
-TARGET_USERIMAGES_USE_F2FS := true
-TARGET_USES_MKE2FS := true
-
-# Sepolicy
-include vendor/omni/sepolicy/sepolicy.mk
-BOARD_PLAT_PRIVATE_SEPOLICY_DIR += $(DEVICE_PATH)/sepolicy/private
-
-BOARD_PLAT_PUBLIC_SEPOLICY_DIR += \
- device/qcom/sepolicy/generic/public \
- device/qcom/sepolicy/qva/public
-
-BOARD_PLAT_PRIVATE_SEPOLICY_DIR += \
- device/qcom/sepolicy/generic/private \
- device/qcom/sepolicy/qva/private
-
-# Treble
-BOARD_VNDK_VERSION := current
+# inherit from the proprietary version
+-include vendor/asus/rog3/BoardConfigVendor.mk
diff --git a/DeviceParts/Android.mk b/DeviceParts/Android.mk
deleted file mode 100644
index 9d01b53..0000000
--- a/DeviceParts/Android.mk
+++ /dev/null
@@ -1,37 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-ifeq ($(TARGET_DEVICE),$(filter $(TARGET_DEVICE),rog2))
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := optional
-LOCAL_STATIC_ANDROID_LIBRARIES := \
- androidx.core_core \
- androidx.preference_preference
-
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
-LOCAL_PACKAGE_NAME := DeviceParts
-LOCAL_CERTIFICATE := platform
-LOCAL_PRIVILEGED_MODULE := true
-LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
-LOCAL_USE_AAPT2 := true
-
-package_resource_overlays := $(strip \
- $(wildcard $(foreach dir, $(PRODUCT_PACKAGE_OVERLAYS), \
- $(addprefix $(dir)/, packages/apps/DeviceParts/res))) \
- $(wildcard $(foreach dir, $(DEVICE_PACKAGE_OVERLAYS), \
- $(addprefix $(dir)/, packages/apps/DeviceParts/res))))
-
-LOCAL_RESOURCE_DIR := $(package_resource_overlays) $(LOCAL_RESOURCE_DIR)
-
-LOCAL_JAVA_LIBRARIES := telephony-common
-
-LOCAL_PROGUARD_ENABLED := disabled
-LOCAL_DEX_PREOPT := false
-
-include frameworks/base/packages/SettingsLib/common.mk
-
-include packages/apps/OmniLib/common.mk
-
-include $(BUILD_PACKAGE)
-
-include $(call all-makefiles-under,$(LOCAL_PATH))
-endif
diff --git a/DeviceParts/AndroidManifest.xml b/DeviceParts/AndroidManifest.xml
deleted file mode 100644
index bf7f4ec..0000000
--- a/DeviceParts/AndroidManifest.xml
+++ /dev/null
@@ -1,101 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- package="org.omnirom.device"
- android:sharedUserId="android.uid.system" >
- <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
- <uses-permission android:name="android.permission.VIBRATE" />
- <uses-permission android:name="android.permission.WRITE_SETTINGS" />
- <uses-permission android:name="android.permission.INJECT_EVENTS" />
- <uses-permission android:name="android.permission.CAMERA" />
- <uses-permission android:name="com.asus.focusapplistener.permission.GAME_GENIE_PROVIDER"/>
- <uses-permission android:name="com.asus.hardwarestub.permission.FPS_CENTRAL_CONTROL_SERVICE"/>
-
- <protected-broadcast android:name="com.android.systemui.doze.pulse" />
-
- <uses-sdk
- android:minSdkVersion="26"
- android:targetSdkVersion="26" />
- <application
- android:icon="@drawable/ic_launcher"
- android:label="@string/advanced_settings"
- android:theme="@style/AppTheme"
- android:appComponentFactory="androidx.core.app.CoreComponentFactory"
- tools:replace="android:appComponentFactory"
- android:supportsRtl="true" >
- <activity
- android:name="org.omnirom.device.DeviceSettingsActivity"
- android:exported="false"
- android:label="@string/advanced_settings"
- android:launchMode="singleTask" >
- <intent-filter>
- <action android:name="android.intent.action.MAIN" />
- <category android:name="android.intent.category.DEFAULT" />
- </intent-filter>
- </activity>
- <activity-alias
- android:name="org.omnirom.device.DeviceSettings"
- android:exported="true"
- android:label="@string/advanced_settings"
- android:targetActivity="DeviceSettingsActivity" >
- <intent-filter>
- <action android:name="android.intent.action.MAIN" />
- <category android:name="android.intent.category.DEFAULT" />
- </intent-filter>
- </activity-alias>
- <activity
- android:name="org.omnirom.device.GestureSettingsActivity"
- android:exported="false"
- android:label="@string/category_gestures_title"
- android:launchMode="singleTask" >
- <intent-filter>
- <action android:name="android.intent.action.MAIN" />
- <category android:name="android.intent.category.DEFAULT" />
- </intent-filter>
- </activity>
- <activity
- android:name="org.omnirom.device.DozeSettingsActivity"
- android:exported="false"
- android:label="@string/doze_category_title"
- android:launchMode="singleTask" >
- <intent-filter>
- <action android:name="android.intent.action.MAIN" />
- <category android:name="android.intent.category.DEFAULT" />
- </intent-filter>
- </activity>
- <receiver android:name="org.omnirom.device.Startup" >
- <intent-filter android:priority="100" >
- <action android:name="android.intent.action.BOOT_COMPLETED" />
- </intent-filter>
- </receiver>
- <service
- android:name="org.omnirom.device.GloveModeTileService"
- android:icon="@drawable/ic_glove_tile"
- android:label="@string/glove_mode_title"
- android:permission="android.permission.BIND_QUICK_SETTINGS_TILE">
- <intent-filter>
- <action
- android:name="android.service.quicksettings.action.QS_TILE"/>
- </intent-filter>
- </service>
- <service
- android:name="org.omnirom.device.FrameRateTileService"
- android:icon="@drawable/ic_refresh_rate"
- android:label="@string/refresh_rate_title"
- android:permission="android.permission.BIND_QUICK_SETTINGS_TILE">
- <intent-filter>
- <action
- android:name="android.service.quicksettings.action.QS_TILE"/>
- </intent-filter>
- </service>
- <service
- android:name="org.omnirom.device.VolumeTile"
- android:icon="@drawable/ic_volume_ringer"
- android:label="@string/volume_mode"
- android:permission="android.permission.BIND_QUICK_SETTINGS_TILE">
- <intent-filter>
- <action android:name="android.service.quicksettings.action.QS_TILE" />
- </intent-filter>
- </service>
- </application>
-</manifest>
diff --git a/DeviceParts/res/drawable-v26/ic_launcher.xml b/DeviceParts/res/drawable-v26/ic_launcher.xml
deleted file mode 100644
index 44a0834..0000000
--- a/DeviceParts/res/drawable-v26/ic_launcher.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:aapt="http://schemas.android.com/aapt">
- <background android:drawable="@drawable/asus_app_ic_background_launcher"/>
- <foreground android:drawable="@drawable/ic_asus_app_ic_foreground_launcher"/>
-</adaptive-icon>
diff --git a/DeviceParts/res/drawable/arrow_collapse_down.xml b/DeviceParts/res/drawable/arrow_collapse_down.xml
deleted file mode 100644
index 8f793f3..0000000
--- a/DeviceParts/res/drawable/arrow_collapse_down.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<!-- drawable/arrow_collapse_down.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/colorAccent">
- <path android:fillColor="#000" android:pathData="M19.92,12.08L12,20L4.08,12.08L5.5,10.67L11,16.17V2H13V16.17L18.5,10.66L19.92,12.08M12,20H2V22H22V20H12Z" />
-</vector>
diff --git a/DeviceParts/res/drawable/arrow_collapse_up.xml b/DeviceParts/res/drawable/arrow_collapse_up.xml
deleted file mode 100644
index e859eb6..0000000
--- a/DeviceParts/res/drawable/arrow_collapse_up.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<!-- drawable/arrow_collapse_up.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/colorAccent">
- <path android:fillColor="#000" android:pathData="M4.08,11.92L12,4L19.92,11.92L18.5,13.33L13,7.83V22H11V7.83L5.5,13.33L4.08,11.92M12,4H22V2H2V4H12Z" />
-</vector>
diff --git a/DeviceParts/res/drawable/asus_app_ic_background_launcher.png b/DeviceParts/res/drawable/asus_app_ic_background_launcher.png
deleted file mode 100644
index 0f54091..0000000
--- a/DeviceParts/res/drawable/asus_app_ic_background_launcher.png
+++ /dev/null
Binary files differ
diff --git a/DeviceParts/res/drawable/back.xml b/DeviceParts/res/drawable/back.xml
deleted file mode 100644
index 3345310..0000000
--- a/DeviceParts/res/drawable/back.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<!-- drawable/arrow_left.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/colorAccent">
- <path android:fillColor="#000" android:pathData="M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z" />
-</vector>
diff --git a/DeviceParts/res/drawable/home.xml b/DeviceParts/res/drawable/home.xml
deleted file mode 100644
index 77475c4..0000000
--- a/DeviceParts/res/drawable/home.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<!-- drawable/checkbox_blank_circle_outline.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/colorAccent">
- <path android:fillColor="#000" android:pathData="M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z" />
-</vector>
diff --git a/DeviceParts/res/drawable/ic_asus_app_ic_foreground_launcher.xml b/DeviceParts/res/drawable/ic_asus_app_ic_foreground_launcher.xml
deleted file mode 100644
index de4b929..0000000
--- a/DeviceParts/res/drawable/ic_asus_app_ic_foreground_launcher.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<vector xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:aapt="http://schemas.android.com/aapt" android:height="108dp" android:width="108dp" android:viewportWidth="108" android:viewportHeight="108">
- <path android:fillColor="#ebebeb" android:pathData="M54,40.6L38.6,52.8v17.7c0,1.2 0.9,2 2,2h8.2V60.1H59v12.4h8.2c1.2,0 2,-0.9 2,-2V52.8L54,40.6z"/>
- <path android:fillColor="#7fb2e8" android:pathData="M71.5,54.5l-17.5,-13.9l-17.5,13.9l-3.8,-4.1l21.3,-17l21.3,17z"/>
-</vector>
diff --git a/DeviceParts/res/drawable/ic_camera.xml b/DeviceParts/res/drawable/ic_camera.xml
deleted file mode 100644
index 8294f4b..0000000
--- a/DeviceParts/res/drawable/ic_camera.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<!-- drawable/camera.xml -->
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:height="32dp"
- android:width="32dp"
- android:viewportWidth="24"
- android:viewportHeight="24"
- android:tint="?android:attr/colorAccent" >
- <path android:fillColor="#fff" android:pathData="M4,4H7L9,2H15L17,4H20A2,2 0 0,1 22,6V18A2,2 0 0,1 20,20H4A2,2 0 0,1 2,18V6A2,2 0 0,1 4,4M12,7A5,5 0 0,0 7,12A5,5 0 0,0 12,17A5,5 0 0,0 17,12A5,5 0 0,0 12,7M12,9A3,3 0 0,1 15,12A3,3 0 0,1 12,15A3,3 0 0,1 9,12A3,3 0 0,1 12,9Z" />
-</vector>
diff --git a/DeviceParts/res/drawable/ic_camera_tile.xml b/DeviceParts/res/drawable/ic_camera_tile.xml
deleted file mode 100644
index 488f41b..0000000
--- a/DeviceParts/res/drawable/ic_camera_tile.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:height="24dp"
- android:width="24dp"
- android:viewportWidth="24"
- android:viewportHeight="24">
- <path android:fillColor="#000" android:pathData="M9,12C9,11.19 9.3,10.5 9.89,9.89C10.5,9.3 11.19,9 12,9C12.81,9 13.5,9.3 14.11,9.89C14.7,10.5 15,11.19 15,12C15,12.81 14.7,13.5 14.11,14.11C13.5,14.7 12.81,15 12,15C11.19,15 10.5,14.7 9.89,14.11C9.3,13.5 9,12.81 9,12M5.53,8.44L7.31,10.22L5.53,12L7.31,13.78L5.53,15.56L2,12L5.53,8.44M8.44,18.47L10.22,16.69L12,18.47L13.78,16.69L15.56,18.47L12,22L8.44,18.47M18.47,15.56L16.69,13.78L18.47,12L16.69,10.22L18.47,8.44L22,12L18.47,15.56M15.56,5.53L13.78,7.31L12,5.53L10.22,7.31L8.44,5.53L12,2L15.56,5.53Z" />
-</vector>
\ No newline at end of file
diff --git a/DeviceParts/res/drawable/ic_disabled.xml b/DeviceParts/res/drawable/ic_disabled.xml
deleted file mode 100644
index 1c5152b..0000000
--- a/DeviceParts/res/drawable/ic_disabled.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:height="32dp"
- android:width="32dp"
- android:viewportWidth="24"
- android:viewportHeight="24"
- android:tint="?android:attr/colorAccent" >
- <path android:fillColor="#fff" android:pathData="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"/>
-</vector>
diff --git a/DeviceParts/res/drawable/ic_flashlight.xml b/DeviceParts/res/drawable/ic_flashlight.xml
deleted file mode 100644
index 213a7f6..0000000
--- a/DeviceParts/res/drawable/ic_flashlight.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<!-- drawable/flashlight.xml -->
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:height="32dp"
- android:width="32dp"
- android:viewportWidth="24"
- android:viewportHeight="24"
- android:tint="?android:attr/colorAccent" >
- <path android:fillColor="#fff" android:pathData="M9,10L6,5H18L15,10H9M18,4H6V2H18V4M9,22V11H15V22H9M12,13A1,1 0 0,0 11,14A1,1 0 0,0 12,15A1,1 0 0,0 13,14A1,1 0 0,0 12,13Z" />
-</vector>
diff --git a/DeviceParts/res/drawable/ic_glove_tile.xml b/DeviceParts/res/drawable/ic_glove_tile.xml
deleted file mode 100644
index b69529e..0000000
--- a/DeviceParts/res/drawable/ic_glove_tile.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:height="24.0dip"
- android:width="24.0dip"
- android:viewportWidth="24.0"
- android:viewportHeight="24.0">
- <path android:fillColor="#ff000000" android:pathData="M18.2638,12.94 L15.0238,11.32 A5.44892,5.44892,0,0,0,17.1438,7 A5.5,5.5,0,1,0,9.1438,11.89 L9.1438,15.15 L7.3038,14.76 L7.2038,14.74 A1.58226,1.58226,0,0,0,6.8838,14.71 A1.98311,1.98311,0,0,0,5.4738,15.3 L4.0738,16.72 L9.1638,21.81 A2.31462,2.31462,0,0,0,10.8138,22.5 L17.1138,22.5 A1.98854,1.98854,0,0,0,19.0838,20.83 L19.8838,16.12 A2.99226,2.99226,0,0,0,18.2638,12.94 Z M17.9138,15.79 L17.1138,20.5 L10.8138,20.5 A0.369,0.369,0,0,1,10.5738,20.4 L6.8938,16.72 L11.1438,17.61 L11.1438,7 A0.5,0.5,0,0,1,12.1438,7 L12.1438,13 L13.9038,13 L17.3638,14.73 A1.00676,1.00676,0,0,1,17.9138,15.79 Z M8.14379,7 A3.5,3.5,0,0,1,15.1438,7 A3.46426,3.46426,0,0,1,14.1438,9.44 L14.1438,7 A2.5,2.5,0,0,0,9.1438,7 L9.1438,9.44 A3.46426,3.46426,0,0,1,8.14379,7 Z" />
-</vector>
\ No newline at end of file
diff --git a/DeviceParts/res/drawable/ic_info_outline_24dp.xml b/DeviceParts/res/drawable/ic_info_outline_24dp.xml
deleted file mode 100644
index 3fe1e9e..0000000
--- a/DeviceParts/res/drawable/ic_info_outline_24dp.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2016 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="24dp"
- android:height="24dp"
- android:viewportWidth="24.0"
- android:viewportHeight="24.0"
- android:tint="?android:attr/textColorSecondary">
- <path
- android:fillColor="#000000"
- android:pathData="M11,17h2v-6h-2v6zM12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM12,20c-4.41,0 -8,-3.59 -8,-8s3.59,-8 8,-8 8,3.59 8,8 -3.59,8 -8,8zM11,9h2L13,7h-2v2z"/>
-</vector>
diff --git a/DeviceParts/res/drawable/ic_music_next.xml b/DeviceParts/res/drawable/ic_music_next.xml
deleted file mode 100644
index baad21d..0000000
--- a/DeviceParts/res/drawable/ic_music_next.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<!-- drawable/skip_next.xml -->
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:height="32dp"
- android:width="32dp"
- android:viewportWidth="24"
- android:viewportHeight="24"
- android:tint="?android:attr/colorAccent" >
- <path android:fillColor="#fff" android:pathData="M16,18H18V6H16M6,18L14.5,12L6,6V18Z" />
-</vector>
diff --git a/DeviceParts/res/drawable/ic_music_play.xml b/DeviceParts/res/drawable/ic_music_play.xml
deleted file mode 100644
index d8c3ba8..0000000
--- a/DeviceParts/res/drawable/ic_music_play.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<!-- drawable/play.xml -->
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:height="32dp"
- android:width="32dp"
- android:viewportWidth="24"
- android:viewportHeight="24"
- android:tint="?android:attr/colorAccent" >
- <path android:fillColor="#fff" android:pathData="M8,5.14V19.14L19,12.14L8,5.14Z" />
-</vector>
diff --git a/DeviceParts/res/drawable/ic_music_prev.xml b/DeviceParts/res/drawable/ic_music_prev.xml
deleted file mode 100644
index 199fcd1..0000000
--- a/DeviceParts/res/drawable/ic_music_prev.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<!-- drawable/skip_previous.xml -->
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:height="32dp"
- android:width="32dp"
- android:viewportWidth="24"
- android:viewportHeight="24"
- android:tint="?android:attr/colorAccent" >
- <path android:fillColor="#fff" android:pathData="M6,18V6H8V18H6M9.5,12L18,6V18L9.5,12Z" />
-</vector>
diff --git a/DeviceParts/res/drawable/ic_panel_tile.xml b/DeviceParts/res/drawable/ic_panel_tile.xml
deleted file mode 100644
index ee0137f..0000000
--- a/DeviceParts/res/drawable/ic_panel_tile.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:height="24dp"
- android:width="24dp"
- android:viewportWidth="24"
- android:viewportHeight="24">
- <path android:fillColor="#fff" android:pathData="M17.5,12A1.5,1.5 0 0,1 16,10.5A1.5,1.5 0 0,1 17.5,9A1.5,1.5 0 0,1 19,10.5A1.5,1.5 0 0,1 17.5,12M14.5,8A1.5,1.5 0 0,1 13,6.5A1.5,1.5 0 0,1 14.5,5A1.5,1.5 0 0,1 16,6.5A1.5,1.5 0 0,1 14.5,8M9.5,8A1.5,1.5 0 0,1 8,6.5A1.5,1.5 0 0,1 9.5,5A1.5,1.5 0 0,1 11,6.5A1.5,1.5 0 0,1 9.5,8M6.5,12A1.5,1.5 0 0,1 5,10.5A1.5,1.5 0 0,1 6.5,9A1.5,1.5 0 0,1 8,10.5A1.5,1.5 0 0,1 6.5,12M12,3A9,9 0 0,0 3,12A9,9 0 0,0 12,21A1.5,1.5 0 0,0 13.5,19.5C13.5,19.11 13.35,18.76 13.11,18.5C12.88,18.23 12.73,17.88 12.73,17.5A1.5,1.5 0 0,1 14.23,16H16A5,5 0 0,0 21,11C21,6.58 16.97,3 12,3Z" />
-</vector>
diff --git a/DeviceParts/res/drawable/ic_refresh_rate.xml b/DeviceParts/res/drawable/ic_refresh_rate.xml
deleted file mode 100644
index e6fc714..0000000
--- a/DeviceParts/res/drawable/ic_refresh_rate.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:height="24dp"
- android:width="24dp"
- android:viewportWidth="24"
- android:viewportHeight="24">
- <path android:fillColor="#ff000000" android:pathData="M16.9846,18.2382 L18.2258,18.2382 C18.2131,18.2499,18.2014,18.2606,18.1897,18.2724 L16.3938,20.0038 L16.218,20.661 L19.0364,20.661 L19.2815,19.746 L17.9094,19.746 C17.923,19.7323,17.9367,19.7196,17.9494,19.706 L19.6974,18.0185 L19.7179,17.999 L19.9142,17.3174 L17.2316,17.3174 Z" />
- <path android:fillColor="#ff000000" android:pathData="M16.824,16.202 L15.796,16.202 L15.353,17.856 L13.951,17.856 L14.395,16.202 L13.372,16.202 L12.212,20.528 L12.177,20.661 L13.199,20.661 L13.696,18.808 L15.098,18.808 L14.601,20.661 L15.629,20.661 L16.789,16.335 L16.824,16.202 Z" />
- <path android:fillColor="#ff000000" android:pathData="M20.5676,5.55489 L3.43243,5.55489 A1.99674,1.99674,0,0,0,1.43732,7.549 L1.43732,16.3264 A1.99763,1.99763,0,0,0,3.43244,18.3215 L12.1487,18.3215 L12.5239,16.9229 L3.43243,16.9229 A0.5974,0.5974,0,0,1,2.83593,16.3264 L2.83593,15.5738 L4.38348,14.813 L4.38348,9.052 L2.83594,8.29946 L2.83594,7.549 A0.59756,0.59756,0,0,1,3.43244,6.95153 L20.5676,6.95153 A0.59778,0.59778,0,0,1,21.1651,7.549 L21.1651,8.29845 L19.6165,9.05205 L19.6165,14.812 L21.1651,15.5738 L21.1651,16.3264 A0.59982,0.59982,0,0,1,20.6978,16.9074 L20.5759,16.9353 L20.1779,18.3215 L20.5676,18.3215 A1.99763,1.99763,0,0,0,22.5627,16.3264 L22.5627,7.549 A1.99674,1.99674,0,0,0,20.5676,5.55489 Z" />
- <path android:fillColor="#ff000000" android:pathData="M9.44588,10.2675 A2.81936,2.81936,0,0,1,10.7652,9.72158 A3.20479,3.20479,0,0,1,11.3922,9.69326 L11.5924,9.71474 L11.902,8.56044 L11.61,8.54482 C11.5641,8.54282,11.5133,8.54189,11.4537,8.54189 A4.48486,4.48486,0,0,0,10.7984,8.59267 A4.271,4.271,0,0,0,8.68317,9.45888 A5.452,5.452,0,0,0,6.77792,12.453 A2.59467,2.59467,0,0,0,6.98492,14.7323 A1.62291,1.62291,0,0,0,8.33746,15.327 A3.14951,3.14951,0,0,0,11.2349,12.9793 A1.80218,1.80218,0,0,0,11.0142,11.3836 A1.5749,1.5749,0,0,0,9.70268,10.8113 A2.47,2.47,0,0,0,8.71049,11.0164 A3.28815,3.28815,0,0,1,9.44588,10.2675 Z M9.94488,12.914 A1.61176,1.61176,0,0,1,8.57188,14.2246 A0.5861,0.5861,0,0,1,8.07774,14.0244 A1.68719,1.68719,0,0,1,8.04356,12.6787 A0.49369,0.49369,0,0,1,8.15001,12.4707 A1.60065,1.60065,0,0,1,9.3453,11.913 A0.63655,0.63655,0,0,1,9.87655,12.1269 A0.90955,0.90955,0,0,1,9.94491,12.914 Z" />
- <path android:fillColor="#ff000000" android:pathData="M16.7756,11.9335 A3.33176,3.33176,0,0,0,16.6262,9.10536 A1.511,1.511,0,0,0,15.3537,8.54188 C13.9318,8.54188,12.7033,9.82704,12.1477,11.8974 A3.39927,3.39927,0,0,0,12.3303,14.7773 A1.4874,1.4874,0,0,0,13.5569,15.3339 C15.0441,15.3339,16.1877,14.1269,16.7756,11.9335 Z M13.4299,12.0272 C13.8098,10.6082,14.4953,9.6542,15.135,9.6542 A0.4566,0.4566,0,0,1,15.5305,9.82315 A2.76878,2.76878,0,0,1,15.4807,11.8485 C15.0705,13.3788,14.4651,14.2215,13.7756,14.2215 A0.425,0.425,0,0,1,13.4094,14.0535 A2.6914,2.6914,0,0,1,13.4299,12.0272 Z" />
-</vector>
\ No newline at end of file
diff --git a/DeviceParts/res/drawable/ic_refresh_rate_120.xml b/DeviceParts/res/drawable/ic_refresh_rate_120.xml
deleted file mode 100644
index eba0d6b..0000000
--- a/DeviceParts/res/drawable/ic_refresh_rate_120.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:height="24dp"
- android:width="24dp"
- android:viewportWidth="24"
- android:viewportHeight="24">
- <path android:fillColor="#ff000000" android:pathData="M17,18.24 L18.25,18.24 L18.25,18.24 L16.39,20 L16.22,20.66 L19,20.66 L19.24,19.75 L17.91,19.75 L17.91,19.75 L19.7,18 L19.7,18 L19.89,17.32 L17.23,17.32 Z" />
- <path android:fillColor="#ff000000" android:pathData="M16.82,16.2 L15.8,16.2 L15.35,17.86 L13.95,17.86 L14.39,16.2 L13.37,16.2 L12.21,20.53 L12.18,20.66 L13.2,20.66 L13.7,18.81 L15.1,18.81 L14.6,20.66 L15.63,20.66 L16.79,16.34 L16.82,16.2 Z" />
- <path android:fillColor="#ff000000" android:pathData="M20.57,5.55 L3.43,5.55 A2,2,0,0,0,1.43,7.55 L1.43,16.33 A2,2,0,0,0,3.43,18.33 L12.15,18.33 L12.52,16.93 L3.43,16.93 A0.58,0.58,0,0,1,2.84,16.34 L2.84,15.58 L4.38,14.82 L4.38,9.05 L2.84,8.3 L2.84,7.55 A0.59,0.59,0,0,1,3.43,7 L20.57,7 A0.6,0.6,0,0,1,21.17,7.6 L21.17,8.3 L19.62,9.05 L19.62,14.81 L21.17,15.57 L21.17,16.33 A0.61,0.61,0,0,1,20.7,16.91 L20.58,16.91 L20.18,18.29 L20.57,18.29 A2,2,0,0,0,22.57,16.29 L22.57,7.55 A2,2,0,0,0,20.57,5.55 Z" />
- <path android:fillColor="#ff000000" android:pathData="M18.11,11.93 A3.32,3.32,0,0,0,18,9.11 A1.51,1.51,0,0,0,16.73,8.54 C15.31,8.54,14.08,9.83,13.52,11.9 A3.44,3.44,0,0,0,13.7,14.78 A1.51,1.51,0,0,0,14.93,15.33 C16.38,15.33,17.52,14.13,18.11,11.93 Z M14.76,12.03 C15.14,10.61,15.83,9.65,16.47,9.65 A0.45,0.45,0,0,1,16.86,9.82 C17.1,10.13,17.08,10.82,16.81,11.82 C16.4,13.35,15.81,14.19,15.11,14.19 A0.43,0.43,0,0,1,14.74,14.02 A2.7,2.7,0,0,1,14.76,12 Z" />
- <path android:fillColor="#ff000000" android:pathData="M6.53,8.64 L5.87,9.82 L7.01,9.82 L5.2,15.19 L6.46,15.19 L8.66,8.64 L6.53,8.64 Z" />
- <path android:fillColor="#ff000000" android:pathData="M12.94,9.1 A1.67,1.67,0,0,0,11.56,8.54 A2.52,2.52,0,0,0,9.64,9.35 A3.73,3.73,0,0,0,8.93,10.78 L8.93,10.99 L10.13,10.99 L10.13,10.87 A2.62,2.62,0,0,1,10.35,10.32 A1.69,1.69,0,0,1,10.62,9.96 A1,1,0,0,1,10.94,9.76 A1.26,1.26,0,0,1,11.71,9.76 A0.49,0.49,0,0,1,11.93,9.9 A0.64,0.64,0,0,1,12.03,10.14 A0.91,0.91,0,0,1,12.03,10.5 A1.31,1.31,0,0,1,11.76,11.07 C11.68,11.16,11.55,11.3,11.37,11.47 S10.92,11.89,10.6,12.17 L7.41,15.17 L11.79,15.17 L12.19,13.98 L10.19,13.98 L11.64,12.71 C11.94,12.44,12.18,12.22,12.38,12.02 A4.35,4.35,0,0,0,12.83,11.52 A2.23,2.23,0,0,0,13.27,10.52 A1.62,1.62,0,0,0,12.94,9.1 Z" />
-</vector>
diff --git a/DeviceParts/res/drawable/ic_refresh_rate_90.xml b/DeviceParts/res/drawable/ic_refresh_rate_90.xml
deleted file mode 100644
index 9d2ef09..0000000
--- a/DeviceParts/res/drawable/ic_refresh_rate_90.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:height="24dp"
- android:width="24dp"
- android:viewportWidth="24"
- android:viewportHeight="24">
- <path android:fillColor="#ff000000" android:pathData="M16.9846,18.2382 L18.2258,18.2382 C18.2131,18.2499,18.2014,18.2606,18.1897,18.2724 L16.3938,20.0038 L16.218,20.661 L19.0364,20.661 L19.2815,19.746 L17.9094,19.746 C17.923,19.7323,17.9367,19.7196,17.9494,19.706 L19.6974,18.0185 L19.7179,17.999 L19.9142,17.3174 L17.2316,17.3174 Z" />
- <path android:fillColor="#ff000000" android:pathData="M16.824,16.202 L15.796,16.202 L15.353,17.856 L13.951,17.856 L14.395,16.202 L13.372,16.202 L12.212,20.528 L12.177,20.661 L13.199,20.661 L13.696,18.808 L15.098,18.808 L14.601,20.661 L15.629,20.661 L16.789,16.335 L16.824,16.202 Z" />
- <path android:fillColor="#ff000000" android:pathData="M20.5676,5.55489 L3.43243,5.55489 A1.99674,1.99674,0,0,0,1.43732,7.549 L1.43732,16.3264 A1.99763,1.99763,0,0,0,3.43244,18.3215 L12.1487,18.3215 L12.5239,16.9229 L3.43243,16.9229 A0.5974,0.5974,0,0,1,2.83593,16.3264 L2.83593,15.5738 L4.38348,14.813 L4.38348,9.052 L2.83594,8.29946 L2.83594,7.549 A0.59756,0.59756,0,0,1,3.43244,6.95153 L20.5676,6.95153 A0.59778,0.59778,0,0,1,21.1651,7.549 L21.1651,8.29845 L19.6165,9.05205 L19.6165,14.812 L21.1651,15.5738 L21.1651,16.3264 A0.59982,0.59982,0,0,1,20.6978,16.9074 L20.5759,16.9353 L20.1779,18.3215 L20.5676,18.3215 A1.99763,1.99763,0,0,0,22.5627,16.3264 L22.5627,7.549 A1.99674,1.99674,0,0,0,20.5676,5.55489 Z" />
- <path android:fillColor="#ff000000" android:pathData="M9.07928,13.6015 A2.81936,2.81936,0,0,1,7.75994,14.1474 A3.20479,3.20479,0,0,1,7.13294,14.1757 L6.93274,14.1542 L6.62317,15.3085 L6.91517,15.3241 C6.96107,15.3261,7.01185,15.327,7.07142,15.327 A4.48486,4.48486,0,0,0,7.72669,15.2762 A4.271,4.271,0,0,0,9.842,14.4101 A5.452,5.452,0,0,0,11.7473,11.4159 A2.59467,2.59467,0,0,0,11.5403,9.1366 A1.62291,1.62291,0,0,0,10.1878,8.54187 A3.14951,3.14951,0,0,0,7.29034,10.8895 A1.80218,1.80218,0,0,0,7.51104,12.4852 A1.5749,1.5749,0,0,0,8.82256,13.0575 A2.47,2.47,0,0,0,9.81475,12.8524 A3.28815,3.28815,0,0,1,9.07928,13.6015 Z M8.58028,10.955 A1.61176,1.61176,0,0,1,9.95328,9.64445 A0.5861,0.5861,0,0,1,10.4474,9.84465 A1.68719,1.68719,0,0,1,10.4816,11.1903 A0.49369,0.49369,0,0,1,10.3751,11.3983 A1.60065,1.60065,0,0,1,9.17979,11.9559 A0.63655,0.63655,0,0,1,8.64854,11.742 A0.90955,0.90955,0,0,1,8.58026,10.955 Z" />
- <path android:fillColor="#ff000000" android:pathData="M16.7756,11.9335 A3.33176,3.33176,0,0,0,16.6262,9.10536 A1.511,1.511,0,0,0,15.3537,8.54188 C13.9318,8.54188,12.7033,9.82704,12.1477,11.8974 A3.39927,3.39927,0,0,0,12.3303,14.7773 A1.4874,1.4874,0,0,0,13.5569,15.3339 C15.0441,15.3339,16.1877,14.1269,16.7756,11.9335 Z M13.4299,12.0272 C13.8098,10.6082,14.4953,9.6542,15.135,9.6542 A0.4566,0.4566,0,0,1,15.5305,9.82315 A2.76878,2.76878,0,0,1,15.4807,11.8485 C15.0705,13.3788,14.4651,14.2215,13.7756,14.2215 A0.425,0.425,0,0,1,13.4094,14.0535 A2.6914,2.6914,0,0,1,13.4299,12.0272 Z" />
-</vector>
diff --git a/DeviceParts/res/drawable/ic_settings_sound.xml b/DeviceParts/res/drawable/ic_settings_sound.xml
deleted file mode 100644
index 7054d78..0000000
--- a/DeviceParts/res/drawable/ic_settings_sound.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<!--
- Copyright (C) 2016 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="24.0dp"
- android:height="24.0dp"
- android:viewportWidth="24.0"
- android:viewportHeight="24.0"
- android:tint="?android:attr/colorControlNormal">
- <path
- android:fillColor="#FFFFFFFF"
- android:pathData="M3 10v4c0 .55 .45 1 1 1h3l3.29 3.29c.63 .63 1.71 .18
-1.71-.71V6.41c0-.89-1.08-1.34-1.71-.71L7 9H4c-.55 0-1 .45-1 1zm13.5 2A4.5 4.5 0
-0 0 14 7.97v8.05c1.48-.73 2.5-2.25 2.5-4.02zM14 4.46v.19c0 .38 .25 .71 .61
-.85C17.18 6.54 19 9.06 19 12s-1.82 5.46-4.39 6.5c-.36 .14 -.61 .47 -.61 .85
-v.19c0 .63 .63 1.08 1.22 .86 a8.995 8.995 0 0 0 0-16.8c-.59-.23-1.22 .23 -1.22
-.86 z"/>
-</vector>
diff --git a/DeviceParts/res/drawable/ic_volume_ringer.xml b/DeviceParts/res/drawable/ic_volume_ringer.xml
deleted file mode 100644
index 11d8428..0000000
--- a/DeviceParts/res/drawable/ic_volume_ringer.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<vector xmlns:androidprv="http://schemas.android.com/apk/prv/res/android" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:sysui="http://schemas.android.com/apk/res-auto" xmlns:aapt="http://schemas.android.com/aapt" android:tint="?android:attr/colorControlNormal" android:height="24dp" android:width="24dp" android:viewportWidth="24" android:viewportHeight="24">
- <path android:fillColor="#ffffffff" android:pathData="M18,17v-6c0,-3.07 -1.63,-5.64 -4.5,-6.32V4c0,-0.83 -0.67,-1.5 -1.5,-1.5S10.5,3.17 10.5,4v0.68C7.64,5.36 6,7.92 6,11v6H4v2h10h0.38H20v-2H18zM16,17H8v-6c0,-2.48 1.51,-4.5 4,-4.5s4,2.02 4,4.5V17z"/>
- <path android:fillColor="#ffffffff" android:pathData="M12,22c1.1,0 2,-0.9 2,-2h-4C10,21.1 10.9,22 12,22z"/>
-</vector>
diff --git a/DeviceParts/res/drawable/ic_volume_ringer_mute.xml b/DeviceParts/res/drawable/ic_volume_ringer_mute.xml
deleted file mode 100644
index f6f486f..0000000
--- a/DeviceParts/res/drawable/ic_volume_ringer_mute.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<vector xmlns:androidprv="http://schemas.android.com/apk/prv/res/android" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:sysui="http://schemas.android.com/apk/res-auto" xmlns:aapt="http://schemas.android.com/aapt" android:tint="?android:attr/colorControlNormal" android:height="24dp" android:width="24dp" android:viewportWidth="24" android:viewportHeight="24">
- <path android:fillColor="#ffffffff" android:pathData="M12,22c1.1,0 2,-0.9 2,-2h-4C10,21.1 10.9,22 12,22z"/>
- <path android:fillColor="#ffffffff" android:pathData="M16,16L2.81,2.81L1.39,4.22l4.85,4.85C6.09,9.68 6,10.33 6,11v6H4v2h12.17l3.61,3.61l1.41,-1.41L16,16zM8,17c0,0 0.01,-6.11 0.01,-6.16L14.17,17H8z"/>
- <path android:fillColor="#ffffffff" android:pathData="M12,6.5c2.49,0 4,2.02 4,4.5v2.17l2,2V11c0,-3.07 -1.63,-5.64 -4.5,-6.32V4c0,-0.83 -0.67,-1.5 -1.5,-1.5S10.5,3.17 10.5,4v0.68C9.72,4.86 9.05,5.2 8.46,5.63L9.93,7.1C10.51,6.73 11.2,6.5 12,6.5z"/>
-</vector>
diff --git a/DeviceParts/res/drawable/ic_volume_ringer_vibrate.xml b/DeviceParts/res/drawable/ic_volume_ringer_vibrate.xml
deleted file mode 100644
index 9010c53..0000000
--- a/DeviceParts/res/drawable/ic_volume_ringer_vibrate.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<vector xmlns:androidprv="http://schemas.android.com/apk/prv/res/android" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:sysui="http://schemas.android.com/apk/res-auto" xmlns:aapt="http://schemas.android.com/aapt" android:height="19dp" android:width="19dp" android:viewportWidth="24" android:viewportHeight="24">
- <path android:fillColor="#ffffffff" android:pathData="M1,9h2v6H1V9zM4,17h2V7H4V17zM21,9v6h2V9H21zM18,17h2V7h-2V17zM17,5.5v13c0,0.83 -0.67,1.5 -1.5,1.5h-7C7.67,20 7,19.33 7,18.5v-13C7,4.67 7.67,4 8.5,4h7C16.33,4 17,4.67 17,5.5zM15,6H9v12h6V6z"/>
-</vector>
diff --git a/DeviceParts/res/drawable/ic_wakeup.xml b/DeviceParts/res/drawable/ic_wakeup.xml
deleted file mode 100644
index 34209eb..0000000
--- a/DeviceParts/res/drawable/ic_wakeup.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:height="32dp"
- android:width="32dp"
- android:viewportWidth="24"
- android:viewportHeight="24"
- android:tint="?android:attr/colorAccent" >
- <path android:fillColor="#fff" android:pathData="M16.56,5.44L15.11,6.89C16.84,7.94 18,9.83 18,12A6,6 0 0,1 12,18A6,6 0 0,1 6,12C6,9.83 7.16,7.94 8.88,6.88L7.44,5.44C5.36,6.88 4,9.28 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12C20,9.28 18.64,6.88 16.56,5.44M13,3H11V13H13" />
-</vector>
diff --git a/DeviceParts/res/drawable/recent.xml b/DeviceParts/res/drawable/recent.xml
deleted file mode 100644
index e3935a3..0000000
--- a/DeviceParts/res/drawable/recent.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<!-- drawable/crop_square.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/colorAccent">
- <path android:fillColor="#000" android:pathData="M18,18H6V6H18M18,4H6A2,2 0 0,0 4,6V18A2,2 0 0,0 6,20H18A2,2 0 0,0 20,18V6C20,4.89 19.1,4 18,4Z" />
-</vector>
diff --git a/DeviceParts/res/layout/applist_preference_icon.xml b/DeviceParts/res/layout/applist_preference_icon.xml
deleted file mode 100644
index 1d6425d..0000000
--- a/DeviceParts/res/layout/applist_preference_icon.xml
+++ /dev/null
@@ -1,58 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2006 The Android Open Source Project
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<!-- Layout for a Preference in a PreferenceActivity. The
- Preference is able to place a specific widget for its particular
- type in the "widget_frame" layout. -->
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@android:id/widget_frame"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:minHeight="?android:attr/listPreferredItemHeightSmall"
- android:gravity="center_vertical"
- android:paddingStart="?android:attr/listPreferredItemPaddingStart"
- android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
- android:background="?android:attr/selectableItemBackground">
-
- <ImageView
- android:id="@+id/icon"
- android:layout_width="48dp"
- android:layout_height="48dp"
- android:layout_marginEnd="12dip"
- android:padding="2dp"
- android:scaleType="centerInside"
- android:layout_gravity="center" />
-
- <RelativeLayout
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginStart="2dip"
- android:layout_marginEnd="6dip"
- android:layout_marginTop="6dip"
- android:layout_marginBottom="6dip"
- android:layout_weight="1">
-
- <TextView android:id="@+id/title"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:singleLine="true"
- android:textAppearance="?android:attr/textAppearanceListItem"
- android:textColor="?android:attr/textColorPrimary"
- android:ellipsize="marquee"
- android:fadingEdge="horizontal" />
-
- </RelativeLayout>
-
-</LinearLayout>
diff --git a/DeviceParts/res/layout/preference_app_select.xml b/DeviceParts/res/layout/preference_app_select.xml
deleted file mode 100644
index e1a92f9..0000000
--- a/DeviceParts/res/layout/preference_app_select.xml
+++ /dev/null
@@ -1,79 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- Copyright (C) 2016 The OmniROM Project
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
--->
-<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:gravity="center_vertical"
- android:paddingStart="?android:attr/listPreferredItemPaddingStart"
- android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
- android:background="?android:attr/selectableItemBackground"
- android:clipToPadding="false"
- android:orientation="horizontal" >
-
- <LinearLayout
- android:id="@+id/icon_container"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:gravity="start|center_vertical"
- android:orientation="horizontal"
- android:clipToPadding="false"
- android:paddingEnd="12dp"
- android:paddingTop="4dp"
- android:paddingBottom="4dp">
- <com.android.internal.widget.PreferenceImageView
- android:id="@android:id/icon"
- android:layout_width="48dp"
- android:layout_height="48dp"
- android:gravity="center"
- android:scaleType="centerInside" />
- </LinearLayout>
-
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical"
- android:gravity="center_vertical"
- android:layout_weight="1" >
-
- <RelativeLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginEnd="6dip"
- android:layout_marginTop="10dip"
- android:layout_marginBottom="6dip" >
-
- <TextView android:id="@android:id/title"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:singleLine="true"
- android:textAppearance="?android:attr/textAppearanceListItem"
- android:ellipsize="marquee" />
-
- <TextView android:id="@android:id/summary"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_below="@android:id/title"
- android:layout_alignStart="@android:id/title"
- android:textAppearance="?android:attr/textAppearanceListItemSecondary"
- android:textColor="?android:attr/textColorSecondary"
- android:maxLines="10"
- android:ellipsize="end" />
-
- </RelativeLayout>
- </LinearLayout>
-</LinearLayout>
diff --git a/DeviceParts/res/layout/preference_dialog_applist.xml b/DeviceParts/res/layout/preference_dialog_applist.xml
deleted file mode 100644
index 38b4fd4..0000000
--- a/DeviceParts/res/layout/preference_dialog_applist.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2016 The OmniROM 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="match_parent"
- android:orientation="vertical"
- android:gravity="center_horizontal"
- android:padding="24dip">
-
- <ListView android:id="@+id/applist"
- android:layout_width="match_parent"
- android:layout_height="match_parent"/>
-
-</LinearLayout>
diff --git a/DeviceParts/res/layout/preference_seek_bar.xml b/DeviceParts/res/layout/preference_seek_bar.xml
deleted file mode 100644
index 2afc97c..0000000
--- a/DeviceParts/res/layout/preference_seek_bar.xml
+++ /dev/null
@@ -1,96 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- Copyright (C) 2016 The OmniROM Project
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
--->
-<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:gravity="center_vertical"
- android:paddingStart="?android:attr/listPreferredItemPaddingStart"
- android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
- android:background="?android:attr/selectableItemBackground"
- android:clipToPadding="false"
- android:orientation="horizontal" >
-
- <LinearLayout
- android:id="@android:id/icon_frame"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginStart="-4dp"
- android:minWidth="60dp"
- android:gravity="start|center_vertical"
- android:orientation="horizontal"
- android:paddingEnd="12dp"
- android:paddingTop="4dp"
- android:paddingBottom="4dp">
- <com.android.internal.widget.PreferenceImageView
- android:id="@android:id/icon"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:maxWidth="48dp"
- android:maxHeight="48dp" />
- </LinearLayout>
-
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical"
- android:gravity="center_vertical"
- android:layout_weight="1" >
-
- <RelativeLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginTop="10dip"
- android:layout_marginBottom="6dip" >
-
- <TextView android:id="@android:id/title"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:singleLine="true"
- android:textAppearance="?android:attr/textAppearanceListItem"
- android:ellipsize="marquee" />
-
- <TextView android:id="@android:id/summary"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_below="@android:id/title"
- android:layout_alignStart="@android:id/title"
- android:textAppearance="?android:attr/textAppearanceListItemSecondary"
- android:textColor="?android:attr/textColorSecondary"
- android:maxLines="10"
- android:ellipsize="end" />
-
- </RelativeLayout>
-
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:gravity="center_vertical"
- android:orientation="horizontal"
- android:layout_marginTop="5dip"
- android:layout_marginBottom="10dip">
-
- <SeekBar android:id="@+id/seekbar"
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:paddingLeft="5dp"
- android:paddingRight="5dp" />
-
- </LinearLayout>
- </LinearLayout>
-</LinearLayout>
diff --git a/DeviceParts/res/values/arrays.xml b/DeviceParts/res/values/arrays.xml
deleted file mode 100644
index c00e7d6..0000000
--- a/DeviceParts/res/values/arrays.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2020 The OmniROM 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="frame_rate_entries" translatable="false">
- <item>60 Hz</item>
- <item>90 Hz</item>
- <item>120 Hz</item>
- </string-array>
-
- <string-array name="frame_rate_values" translatable="false">
- <item>60</item>
- <item>90</item>
- <item>120</item>
- </string-array>
-</resources>
\ No newline at end of file
diff --git a/DeviceParts/res/values/config.xml b/DeviceParts/res/values/config.xml
deleted file mode 100644
index d396095..0000000
--- a/DeviceParts/res/values/config.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2016 The OmniROM Project
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
- -->
-
-<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-
- <bool name="config_device_has_hw_nav_buttons">false</bool>
-
-</resources>
diff --git a/DeviceParts/res/values/strings.xml b/DeviceParts/res/values/strings.xml
deleted file mode 100644
index 8a6bc30..0000000
--- a/DeviceParts/res/values/strings.xml
+++ /dev/null
@@ -1,86 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2014-2017 The OmniROM 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 name="app_name">Zenfone 6</string>
- <string name="category_gestures_title">Device gestures</string>
- <string name="category_vibrator">Vibrator</string>
- <string name="vib_strength_title_head">Strength</string>
- <string name="vib_strength_summary_head">Define the strength of the vibrator</string>
- <string name="vib_test">Test</string>
- <string name="advanced_settings">Advanced</string>
- <string name="graphics_title">Graphics</string>
- <string name="screen_title">Screen Sensitivity</string>
- <string name="glove_mode_summary">Increase touch sensitivity when wearing gloves</string>
- <string name="glove_mode_title">Glove mode</string>
- <string name="proxi_summary_head">Check proximity sensor for handling fingerprint sensor</string>
- <string name="proxi_title_head">Proximity check</string>
-
- <string name="choose_app">Choose app</string>
- <string name="offscreen_gesture_title">Offscreen gestures</string>
- <string name="category_c_gesture">Letter c</string>
- <string name="category_e_gesture">Letter e</string>
- <string name="category_s_gesture">Letter s</string>
- <string name="category_v_gesture">Letter v</string>
- <string name="category_w_gesture">Letter w</string>
- <string name="category_z_gesture">Letter z</string>
- <string name="category_left_arrow_gesture">< gesture</string>
- <string name="category_right_arrow_gesture">> gesture</string>
- <string name="category_gestures_summary">Configure gesture actions</string>
- <string name="torch_entry">Flashlight</string>
- <string name="disabled_entry">Disabled</string>
- <string name="camera_entry">Camera</string>
- <string name="camera_label">Rotate camera</string>
- <string name="music_play_entry">Play / pause music</string>
- <string name="music_prev_entry">Prev track</string>
- <string name="music_next_entry">Next track</string>
- <string name="volume_up">Raise volume</string>
- <string name="volume_down">Lower volume</string>
- <string name="browse_scroll_up">Scroll up</string>
- <string name="browse_scroll_down">Scroll down</string>
- <string name="navigate_back">Back</string>
- <string name="navigate_home">Home</string>
- <string name="navigate_recent">Recent</string>
- <string name="not_ready_summary">Resolving...</string>
- <string name="resolve_failed_summary">Resolving app failed</string>
- <string name="category_down_swipe_gesture">Down swipe</string>
- <string name="category_up_swipe_gesture">Up swipe</string>
- <string name="category_left_swipe_gesture">Left swipe</string>
- <string name="category_right_swipe_gesture">Right swipe</string>
-
- <string name="doze_category_title">Ambient display</string>
- <string name="doze_category_summary">Wake screen when you receive notifications</string>
- <string name="wave_check_summary">Pulse notifications on hand wave</string>
- <string name="wave_check_title">Hand wave</string>
- <string name="tilt_check_summary">Pulse notifications when device is picked up</string>
- <string name="tilt_check_title">Pick up</string>
- <string name="pocket_check_summary">Pulse notifications on removal from pocket</string>
- <string name="pocket_check_title">Pocket</string>
- <string name="ambient_display_enable">Ambient display must be enabled in display settings</string>
- <string name="wake_entry">Wakeup</string>
- <string name="swipe_up_to_wake_up_title">Swipe up to wake up</string>
- <string name="swipe_up_to_wake_up_summary">Swipe up on the screen to wake up your device from idle mode</string>
- <string name="category_frame_rate">FPS of the screen</string>
- <string name="refresh_rate_title">Refresh rate</string>
- <string name="summary_placeholder"> </string>
-
- <string name="gaming_title">Game Genie</string>
- <string name="gaming_browse_summary">Lunch game genie settings</string>
-
- <!-- Volume panel QS tile -->
- <string name="volume_mode">Sound</string>
- <string name="vibrate_mode">Vibrate</string>
- <string name="mute_mode">Mute</string>
-</resources>
diff --git a/DeviceParts/res/values/styles.xml b/DeviceParts/res/values/styles.xml
deleted file mode 100644
index ae909bd..0000000
--- a/DeviceParts/res/values/styles.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2014-2017 The OmniROM 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>
- <style name="AppTheme" parent="@android:style/Theme.DeviceDefault.Settings">
- <item name="preferenceTheme">@style/PreferenceTheme</item>
- </style>
-
- <style name="PreferenceTheme" parent="@style/PreferenceThemeOverlay.SettingsBase">
- </style>
-</resources>
diff --git a/DeviceParts/res/xml/doze_settings.xml b/DeviceParts/res/xml/doze_settings.xml
deleted file mode 100644
index 13c2037..0000000
--- a/DeviceParts/res/xml/doze_settings.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- Copyright (C) 2014-2016 The OmniROM 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">
- <SwitchPreference
- android:key="wave_check"
- android:summary="@string/wave_check_summary"
- android:title="@string/wave_check_title"
- android:persistent="false" />
- <SwitchPreference
- android:key="pocket_check"
- android:summary="@string/pocket_check_summary"
- android:title="@string/pocket_check_title"
- android:persistent="false" />
- <SwitchPreference
- android:key="tilt_check"
- android:summary="@string/tilt_check_summary"
- android:title="@string/tilt_check_title"
- android:persistent="false" />
- <Preference
- android:key="footer"
- android:summary="@string/ambient_display_enable"
- android:persistent="false"
- android:icon="@drawable/ic_info_outline_24dp" />
-</PreferenceScreen>
diff --git a/DeviceParts/res/xml/framerate_mode.xml b/DeviceParts/res/xml/framerate_mode.xml
deleted file mode 100644
index 8df0e8f..0000000
--- a/DeviceParts/res/xml/framerate_mode.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- Copyright (C) 2020 The OmniROM 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">
-
- <PreferenceCategory
- android:key="frame_mode_main"
- android:title="@string/category_frame_rate">
- <ListPreference
- android:key="frame_mode_key"
- android:title="@string/refresh_rate_title"
- android:entries="@array/frame_rate_entries"
- android:entryValues="@array/frame_rate_values"
- android:persistent="true" />
- </PreferenceCategory>
-
-</PreferenceScreen>
\ No newline at end of file
diff --git a/DeviceParts/res/xml/gesture_settings.xml b/DeviceParts/res/xml/gesture_settings.xml
deleted file mode 100644
index 7a3e41b..0000000
--- a/DeviceParts/res/xml/gesture_settings.xml
+++ /dev/null
@@ -1,63 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- Copyright (C) 2017 The OmniROM 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">
-
- <SwitchPreference
- android:key="proxi"
- android:summary="@string/proxi_summary_head"
- android:title="@string/proxi_title_head"
- android:persistent="false"
- android:defaultValue="true" />
-
- <PreferenceCategory
- android:title="@string/offscreen_gesture_title">
-
- <SwitchPreference
- android:key="swipeup"
- android:title="@string/swipe_up_to_wake_up_title"
- android:summary="@string/swipe_up_to_wake_up_summary"
- android:persistent="false" />
-
- <org.omnirom.device.AppSelectListPreference
- android:key="c_gesture_app"
- android:title="@string/category_c_gesture"
- android:persistent="false" />
-
- <org.omnirom.device.AppSelectListPreference
- android:key="e_gesture_app"
- android:title="@string/category_e_gesture"
- android:persistent="false" />
-
- <org.omnirom.device.AppSelectListPreference
- android:key="s_gesture_app"
- android:title="@string/category_s_gesture"
- android:persistent="false" />
-
- <org.omnirom.device.AppSelectListPreference
- android:key="v_gesture_app"
- android:title="@string/category_v_gesture"
- android:persistent="false"/>
-
- <org.omnirom.device.AppSelectListPreference
- android:key="w_gesture_app"
- android:title="@string/category_w_gesture"
- android:persistent="false"/>
-
- <org.omnirom.device.AppSelectListPreference
- android:key="z_gesture_app"
- android:title="@string/category_z_gesture"
- android:persistent="false"/>
-
- </PreferenceCategory>
-
-</PreferenceScreen>
diff --git a/DeviceParts/res/xml/main.xml b/DeviceParts/res/xml/main.xml
deleted file mode 100644
index 22d6b30..0000000
--- a/DeviceParts/res/xml/main.xml
+++ /dev/null
@@ -1,82 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- Copyright (C) 2014-2016 The OmniROM 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">
-
- <PreferenceCategory
- android:key="key_gesture_category"
- android:title="@string/category_gestures_title">
- <Preference
- android:key="gesture_category"
- android:title="@string/category_gestures_title"
- android:summary="@string/category_gestures_summary"
- android:persistent="false" >
- <intent android:action="android.intent.action.MAIN"
- android:targetPackage="org.omnirom.device"
- android:targetClass="org.omnirom.device.GestureSettingsActivity" />
- </Preference>
- </PreferenceCategory>
-
- <PreferenceCategory
- android:key="key_doze_category"
- android:title="@string/doze_category_title">
- <Preference
- android:key="doze_category"
- android:title="@string/doze_category_title"
- android:summary="@string/doze_category_summary"
- android:persistent="false" >
- <intent android:action="android.intent.action.MAIN"
- android:targetPackage="org.omnirom.device"
- android:targetClass="org.omnirom.device.DozeSettingsActivity" />
- </Preference>
- </PreferenceCategory>
-
- <PreferenceCategory
- android:key="frame_mode_main"
- android:title="@string/category_frame_rate">
- <ListPreference
- android:key="frame_mode_key"
- android:title="@string/refresh_rate_title"
- android:entries="@array/frame_rate_entries"
- android:entryValues="@array/frame_rate_values"
- android:persistent="false" />
- </PreferenceCategory>
-
- <PreferenceCategory
- android:key="screen"
- android:title="@string/screen_title">
- <SwitchPreference
- android:key="glove"
- android:summary="@string/glove_mode_summary"
- android:title="@string/glove_mode_title"
- android:persistent="false" />
- </PreferenceCategory>
-
- <PreferenceCategory
- android:key="category_gaming"
- android:title="@string/gaming_title">
-
- <Preference
- android:key="game_toolbar_app"
- android:title="@string/gaming_title"
- android:summary="@string/gaming_browse_summary"
- android:persistent="false" >
- <intent android:action="com.asus.gamewidget.action.SETTINGS"
- android:targetPackage="com.asus.gamewidget"/>
- </Preference>
-
- </PreferenceCategory>
-
-</PreferenceScreen>
diff --git a/DeviceParts/src/org/omnirom/device/AppSelectListPreference.java b/DeviceParts/src/org/omnirom/device/AppSelectListPreference.java
deleted file mode 100644
index 6d022e8..0000000
--- a/DeviceParts/src/org/omnirom/device/AppSelectListPreference.java
+++ /dev/null
@@ -1,422 +0,0 @@
-/*
-* Copyright (C) 2017 The OmniROM Project
-*
-* This program is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, either version 2 of the License, or
-* (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program. If not, see <http://www.gnu.org/licenses/>.
-*
-*/
-package org.omnirom.device;
-
-import android.content.ComponentName;
-import android.content.Context;
-import android.content.DialogInterface;
-import android.content.Intent;
-import android.content.pm.ActivityInfo;
-import android.content.pm.ApplicationInfo;
-import android.content.pm.PackageManager;
-import android.content.pm.ResolveInfo;
-import android.graphics.drawable.Drawable;
-import android.os.Handler;
-import android.os.Message;
-import androidx.preference.PreferenceViewHolder;
-import androidx.preference.PreferenceDialogFragment;
-import android.util.AttributeSet;
-import android.util.Log;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.AdapterView;
-import android.widget.AdapterView.OnItemClickListener;
-import android.widget.BaseAdapter;
-import android.widget.ImageView;
-import android.widget.ListView;
-import android.widget.TextView;
-
-import java.util.Collections;
-import java.util.LinkedList;
-import java.util.List;
-
-import com.android.settingslib.CustomDialogPreference;
-
-public class AppSelectListPreference extends CustomDialogPreference {
-
- private static String TAG = "AppSelectListPreference";
-
- public static final String TORCH_ENTRY = "torch";
- public static final String DISABLED_ENTRY = "disabled";
- public static final String CAMERA_ENTRY = "camera";
- public static final String MUSIC_PLAY_ENTRY = "music_play";
- public static final String MUSIC_PREV_ENTRY = "music_prev";
- public static final String MUSIC_NEXT_ENTRY = "music_next";
- public static final String WAKE_ENTRY = "wake";
- public static final String VOLUME_UP_ENTRY = "volume_up";
- public static final String VOLUME_DOWN_ENTRY = "volume_down";
- public static final String BROWSE_SCROLL_DOWN_ENTRY = "browse_scroll_down";
- public static final String BROWSE_SCROLL_UP_ENTRY = "browse_scroll_up";
- public static final String NAVIGATE_BACK_ENTRY = "navigate_back";
- public static final String NAVIGATE_HOME_ENTRY = "navigate_home";
- public static final String NAVIGATE_RECENT_ENTRY = "navigate_recent";
-
- private AppSelectListAdapter mAdapter;
- private Drawable mAppIconDrawable;
- private int mAppIconResourceId;
- private CharSequence mTitle;
- private String mValue;
- private PackageManager mPm;
- private List<PackageItem> mInstalledPackages = new LinkedList<PackageItem>();
-
- public static class PackageItem implements Comparable<PackageItem> {
- public final CharSequence mTitle;
- public final int mAppIconResourceId;
- public final ComponentName mComponentName;
- public final String mValue;
-
- PackageItem(CharSequence title, int iconResourceId, ComponentName componentName) {
- mTitle = title;
- mAppIconResourceId = iconResourceId;
- mComponentName = componentName;
- mValue = componentName.flattenToString();
- }
-
- PackageItem(CharSequence title, int iconResourceId, String value) {
- mTitle = title;
- mAppIconResourceId = iconResourceId;
- mComponentName = null;
- mValue = value;
- }
-
- @Override
- public int compareTo(PackageItem another) {
- return mTitle.toString().toUpperCase().compareTo(another.mTitle.toString().toUpperCase());
- }
-
- @Override
- public int hashCode() {
- return mValue.hashCode();
- }
-
- @Override
- public boolean equals(Object another) {
- if (another == null || !(another instanceof PackageItem)) {
- return false;
- }
- return mValue.equals(((PackageItem) another).mValue);
- }
- }
-
- public class AppSelectListAdapter extends BaseAdapter {
- private LayoutInflater mInflater;
-
- public AppSelectListAdapter(Context context) {
- mInflater = LayoutInflater.from(context);
- }
-
- @Override
- public int getCount() {
- return mInstalledPackages.size();
- }
-
- @Override
- public PackageItem getItem(int position) {
- return mInstalledPackages.get(position);
- }
-
- @Override
- public long getItemId(int position) {
- return mInstalledPackages.get(position).hashCode();
- }
-
- @Override
- public View getView(int position, View convertView, ViewGroup parent) {
- ViewHolder holder;
- if (convertView != null) {
- holder = (ViewHolder) convertView.getTag();
- } else {
- convertView = mInflater.inflate(R.layout.applist_preference_icon, null, false);
- holder = new ViewHolder();
- convertView.setTag(holder);
- holder.title = (TextView) convertView.findViewById(R.id.title);
- holder.icon = (ImageView) convertView.findViewById(R.id.icon);
- }
-
- PackageItem applicationInfo = getItem(position);
- holder.title.setText(applicationInfo.mTitle);
- if (applicationInfo.mAppIconResourceId != 0) {
- holder.icon.setImageResource(applicationInfo.mAppIconResourceId);
- } else {
- Drawable d = resolveAppIcon(applicationInfo);
- holder.icon.setImageDrawable(d);
- }
- return convertView;
- }
-
- private PackageItem resolveApplication(ComponentName componentName) {
- for (PackageItem item : mInstalledPackages) {
- if (item.mComponentName != null && item.mComponentName.equals(componentName)) {
- return item;
- }
- }
- return null;
- }
-
- private class ViewHolder {
- TextView title;
- TextView summary;
- ImageView icon;
- }
- }
-
- public AppSelectListPreference(Context context, AttributeSet attrs) {
- super(context, attrs);
- init();
- }
-
- public AppSelectListPreference(Context context, int color) {
- super(context, null);
- init();
- }
-
- public void setPackageList(List<PackageItem> installedPackages) {
- mInstalledPackages.clear();
- mInstalledPackages.addAll(installedPackages);
- addSpecialApps();
- mAdapter.notifyDataSetChanged();
- updatePreferenceViews();
- }
-
- private void init() {
- mPm = getContext().getPackageManager();
- setDialogLayoutResource(R.layout.preference_dialog_applist);
- setLayoutResource(R.layout.preference_app_select);
- setNegativeButtonText(android.R.string.cancel);
- setPositiveButtonText(null);
- setDialogTitle(R.string.choose_app);
- setDialogIcon(null);
- mAdapter = new AppSelectListAdapter(getContext());
- }
-
- private void addSpecialApps() {
- PackageItem cameraItem = new PackageItem(getContext().getResources().getString(R.string.camera_entry),
- R.drawable.ic_camera, CAMERA_ENTRY);
- mInstalledPackages.add(0, cameraItem);
-
- PackageItem torchItem = new PackageItem(getContext().getResources().getString(R.string.torch_entry),
- R.drawable.ic_flashlight, TORCH_ENTRY);
- mInstalledPackages.add(0, torchItem);
-
- PackageItem musicNextItem = new PackageItem(getContext().getResources().getString(R.string.music_next_entry),
- R.drawable.ic_music_next, MUSIC_NEXT_ENTRY);
- mInstalledPackages.add(0, musicNextItem);
-
- PackageItem musicPrevItem = new PackageItem(getContext().getResources().getString(R.string.music_prev_entry),
- R.drawable.ic_music_prev, MUSIC_PREV_ENTRY);
- mInstalledPackages.add(0, musicPrevItem);
-
- PackageItem musicPlayItem = new PackageItem(getContext().getResources().getString(R.string.music_play_entry),
- R.drawable.ic_music_play, MUSIC_PLAY_ENTRY);
- mInstalledPackages.add(0, musicPlayItem);
-
- PackageItem wakeItem = new PackageItem(getContext().getResources().getString(R.string.wake_entry),
- R.drawable.ic_wakeup, WAKE_ENTRY);
- mInstalledPackages.add(0, wakeItem);
-
- PackageItem volumeUpItem = new PackageItem(
- getContext().getResources().getString(R.string.volume_up),
- R.drawable.ic_settings_sound, VOLUME_UP_ENTRY);
- mInstalledPackages.add(0, volumeUpItem);
-
- PackageItem volumeDownItem = new PackageItem(
- getContext().getResources().getString(R.string.volume_down),
- R.drawable.ic_settings_sound, VOLUME_DOWN_ENTRY);
- mInstalledPackages.add(0, volumeDownItem);
-
- PackageItem browseScrollDownItem = new PackageItem(
- getContext().getResources().getString(R.string.browse_scroll_down),
- R.drawable.arrow_collapse_down, BROWSE_SCROLL_DOWN_ENTRY);
- mInstalledPackages.add(0, browseScrollDownItem);
-
- PackageItem browseScrollUpItem = new PackageItem(
- getContext().getResources().getString(R.string.browse_scroll_up),
- R.drawable.arrow_collapse_up, BROWSE_SCROLL_UP_ENTRY);
- mInstalledPackages.add(0, browseScrollUpItem);
-
- PackageItem navigateBackItem = new PackageItem(
- getContext().getResources().getString(R.string.navigate_back),
- R.drawable.back, NAVIGATE_BACK_ENTRY);
- mInstalledPackages.add(0, navigateBackItem);
-
- PackageItem navigateHomeItem = new PackageItem(
- getContext().getResources().getString(R.string.navigate_home),
- R.drawable.home, NAVIGATE_HOME_ENTRY);
- mInstalledPackages.add(0, navigateHomeItem);
-
- PackageItem navigateRecentItem = new PackageItem(
- getContext().getResources().getString(R.string.navigate_recent),
- R.drawable.recent, NAVIGATE_RECENT_ENTRY);
- mInstalledPackages.add(0, navigateRecentItem);
-
- PackageItem disabledItem = new PackageItem(getContext().getResources().getString(R.string.disabled_entry),
- R.drawable.ic_disabled, DISABLED_ENTRY);
- mInstalledPackages.add(0, disabledItem);
- }
-
- @Override
- protected void onSetInitialValue(boolean restorePersistedValue, Object defaultValue) {
- super.onSetInitialValue(restorePersistedValue, defaultValue);
- if (mTitle != null) {
- setSummary(mTitle);
- } else {
- setSummary(getContext().getResources().getString(R.string.not_ready_summary));
- }
- mAppIconResourceId = R.drawable.ic_disabled;
- setIcon(mAppIconResourceId);
- }
-
- @Override
- protected void onBindDialogView(View view) {
- super.onBindDialogView(view);
-
- final ListView list = (ListView) view.findViewById(R.id.applist);
- list.setAdapter(mAdapter);
- list.setOnItemClickListener(new OnItemClickListener() {
- @Override
- public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
- PackageItem info = (PackageItem) parent.getItemAtPosition(position);
- mValue = info.mValue;
- if (shouldPersist()) {
- persistString(mValue);
- }
- mTitle = info.mTitle;
- mAppIconDrawable = null;
- mAppIconResourceId = 0;
- if (info.mComponentName != null) {
- mAppIconDrawable = resolveAppIcon(info);
- } else {
- mAppIconResourceId = info.mAppIconResourceId;
- }
-
- updatePreferenceViews();
- callChangeListener(mValue);
- getDialog().dismiss();
- }
- });
- }
-
- private void updatePreferenceViews() {
- String name = null;
- if (shouldPersist()) {
- name = getPersistedString(null);
- } else {
- name = mValue;
- }
- mAppIconResourceId = R.drawable.ic_disabled;
-
- if (name != null) {
- mAppIconDrawable = null;
- if (name.equals(DISABLED_ENTRY)) {
- mTitle = getContext().getResources().getString(R.string.disabled_entry);
- mAppIconResourceId = R.drawable.ic_disabled;
- } else if (name.equals(TORCH_ENTRY)) {
- mTitle = getContext().getResources().getString(R.string.torch_entry);
- mAppIconResourceId = R.drawable.ic_flashlight;
- } else if (name.equals(CAMERA_ENTRY)) {
- mTitle = getContext().getResources().getString(R.string.camera_entry);
- mAppIconResourceId = R.drawable.ic_camera;
- } else if (name.equals(MUSIC_PLAY_ENTRY)) {
- mTitle = getContext().getResources().getString(R.string.music_play_entry);
- mAppIconResourceId = R.drawable.ic_music_play;
- } else if (name.equals(MUSIC_NEXT_ENTRY)) {
- mTitle = getContext().getResources().getString(R.string.music_next_entry);
- mAppIconResourceId = R.drawable.ic_music_next;
- } else if (name.equals(MUSIC_PREV_ENTRY)) {
- mTitle = getContext().getResources().getString(R.string.music_prev_entry);
- mAppIconResourceId = R.drawable.ic_music_prev;
- } else if (name.equals(WAKE_ENTRY)) {
- mTitle = getContext().getResources().getString(R.string.wake_entry);
- mAppIconResourceId = R.drawable.ic_wakeup;
- } else if (name.equals(VOLUME_UP_ENTRY)) {
- mTitle = getContext().getResources().getString(R.string.volume_up);
- mAppIconResourceId = R.drawable.ic_settings_sound;
- } else if (name.equals(VOLUME_DOWN_ENTRY)) {
- mTitle = getContext().getResources().getString(R.string.volume_down);
- mAppIconResourceId = R.drawable.ic_settings_sound;
- } else if (name.equals(BROWSE_SCROLL_DOWN_ENTRY)) {
- mTitle = getContext().getResources().getString(R.string.browse_scroll_down);
- mAppIconResourceId = R.drawable.arrow_collapse_down;
- } else if (name.equals(BROWSE_SCROLL_UP_ENTRY)) {
- mTitle = getContext().getResources().getString(R.string.browse_scroll_up);
- mAppIconResourceId = R.drawable.arrow_collapse_up;
- } else if (name.equals(NAVIGATE_BACK_ENTRY)) {
- mTitle = getContext().getResources().getString(R.string.navigate_back);
- mAppIconResourceId = R.drawable.back;
- } else if (name.equals(NAVIGATE_HOME_ENTRY)) {
- mTitle = getContext().getResources().getString(R.string.navigate_home);
- mAppIconResourceId = R.drawable.home;
- } else if (name.equals(NAVIGATE_RECENT_ENTRY)) {
- mTitle = getContext().getResources().getString(R.string.navigate_recent);
- mAppIconResourceId = R.drawable.recent;
- } else {
- ComponentName componentName = ComponentName.unflattenFromString(name);
- PackageItem item = mAdapter.resolveApplication(componentName);
- if (item != null) {
- mTitle = item.mTitle;
- mAppIconDrawable = resolveAppIcon(item);
- } else {
- mTitle = getContext().getResources().getString(R.string.resolve_failed_summary);
- }
- }
- } else {
- mTitle = getContext().getResources().getString(R.string.disabled_entry);
- mAppIconResourceId = R.drawable.ic_disabled;
- }
-
- setSummary(mTitle);
- if (mAppIconDrawable != null) {
- setIcon(mAppIconDrawable);
- } else {
- setIcon(mAppIconResourceId);
- }
- }
-
- private Drawable getDefaultActivityIcon() {
- return getContext().getResources().getDrawable(android.R.drawable.sym_def_app_icon);
- }
-
- public String getValue() {
- return mValue;
- }
-
- public void setValue(String value) {
- mValue = value;
- }
-
- private Drawable resolveAppIcon(PackageItem item) {
- Drawable appIcon = null;
- try {
- appIcon = mPm.getActivityIcon(item.mComponentName);
- } catch (PackageManager.NameNotFoundException e) {
- }
- if (appIcon == null) {
- appIcon = getDefaultActivityIcon();
- }
- return appIcon;
- }
-
- public static class AppSelectListPreferenceDialogFragment
- extends CustomDialogPreference.CustomPreferenceDialogFragment {
- public static CustomDialogPreference.CustomPreferenceDialogFragment
- newInstance(String key) {
- return CustomDialogPreference.CustomPreferenceDialogFragment.newInstance(key);
- }
- }
-}
diff --git a/DeviceParts/src/org/omnirom/device/DeviceSettings.java b/DeviceParts/src/org/omnirom/device/DeviceSettings.java
deleted file mode 100644
index 070c85a..0000000
--- a/DeviceParts/src/org/omnirom/device/DeviceSettings.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
-* Copyright (C) 2016 The OmniROM Project
-*
-* This program is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, either version 2 of the License, or
-* (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program. If not, see <http://www.gnu.org/licenses/>.
-*
-*/
-package org.omnirom.device;
-
-import android.app.AlertDialog;
-import android.app.Dialog;
-import android.content.pm.ApplicationInfo;
-import android.content.pm.PackageManager;
-import android.content.res.Resources;
-import android.content.Intent;
-import android.os.Bundle;
-import android.os.SystemProperties;
-import androidx.preference.PreferenceFragment;
-import androidx.preference.ListPreference;
-import androidx.preference.Preference;
-import androidx.preference.PreferenceCategory;
-import androidx.preference.PreferenceScreen;
-import androidx.preference.TwoStatePreference;
-import android.provider.Settings;
-import android.text.TextUtils;
-import android.view.MenuItem;
-import android.view.View;
-import android.widget.AdapterView;
-import android.widget.AdapterView.OnItemClickListener;
-import android.widget.ListView;
-import android.util.Log;
-
-public class DeviceSettings extends PreferenceFragment implements
- Preference.OnPreferenceChangeListener {
-
- public static final String KEY_SETTINGS_PREFIX = "device_setting_";
- public static final String KEY_GLOVE_SWITCH = "glove";
-
- private static final String KEY_CATEGORY_SCREEN = "screen";
- private static final String KEY_FRAME_MODE = "frame_mode_key";
- public static final String KEY_GAME_GENIE = "game_toolbar_app";
- public static final String VENDOR_FPS = "vendor.asus.dfps";
- public static final String TEMP_FPS = "temp_fps";
-
- public static final String DEFAULT_FPS_VALUE = "60";
- public static final String FPS_VALUE_90 = "90";
- public static final String FPS_VALUE_120 = "120";
-
- private static ListPreference mFrameModeRate;
- private static TwoStatePreference mGloveModeSwitch;
- private static Preference mGameGenie;
-
- @Override
- public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
- setPreferencesFromResource(R.xml.main, rootKey);
-
- mGloveModeSwitch = (TwoStatePreference) findPreference(KEY_GLOVE_SWITCH);
- mGloveModeSwitch.setEnabled(GloveModeSwitch.isSupported());
- mGloveModeSwitch.setChecked(GloveModeSwitch.isCurrentlyEnabled(this.getContext()));
- mGloveModeSwitch.setOnPreferenceChangeListener(new GloveModeSwitch(getContext()));
-
- mFrameModeRate = (ListPreference) findPreference(KEY_FRAME_MODE);
- mFrameModeRate.setOnPreferenceChangeListener(this);
- int frameMode = getFrameMode(0);
- int valueIndex = mFrameModeRate.findIndexOfValue(String.valueOf(frameMode));
- mFrameModeRate.setValueIndex(valueIndex);
- mFrameModeRate.setSummary(mFrameModeRate.getEntries()[valueIndex]);
-
- mGameGenie = findPreference(KEY_GAME_GENIE);
- mGameGenie.setEnabled(GameGenie.isGameGenieExist(this.getContext()));
-
- }
-
- @Override
- public boolean onPreferenceTreeClick(Preference preference) {
- return super.onPreferenceTreeClick(preference);
- }
-
- @Override
- public boolean onPreferenceChange(Preference preference, Object newValue) {
- if (preference == mFrameModeRate) {
- String value = (String) newValue;
- int frameMode = Integer.valueOf(value);
- setFrameMode(0, frameMode);
- int valueIndex = mFrameModeRate.findIndexOfValue(value);
- mFrameModeRate.setSummary(mFrameModeRate.getEntries()[valueIndex]);
- }
- return true;
- }
-
- private int getFrameMode(int position) {
-
- String value = Settings.System.getString(getContext().getContentResolver(), TEMP_FPS);
- final String defaultValue = DEFAULT_FPS_VALUE;
-
- if (value == null) {
- value = defaultValue;
- }
- try {
- String[] parts = value.split(",");
- return Integer.valueOf(parts[position]);
- } catch (Exception e) {
- }
- return 0;
- }
-
- private void setFrameMode(int position, int fps) {
-
- String value = Settings.System.getString(getContext().getContentResolver(), TEMP_FPS);
- final String defaultValue = DEFAULT_FPS_VALUE;
-
- if (value == null) {
- value = defaultValue;
- }
- try {
- String[] parts = value.split(",");
- parts[position] = String.valueOf(fps);
- String newValue = TextUtils.join(",", parts);
- Settings.System.putString(getContext().getContentResolver(), TEMP_FPS, newValue);
- SystemProperties.set(VENDOR_FPS, newValue);
- } catch (Exception e) {
- }
- }
-}
diff --git a/DeviceParts/src/org/omnirom/device/DeviceSettingsActivity.java b/DeviceParts/src/org/omnirom/device/DeviceSettingsActivity.java
deleted file mode 100644
index 0370685..0000000
--- a/DeviceParts/src/org/omnirom/device/DeviceSettingsActivity.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
-* Copyright (C) 2017 The OmniROM Project
-*
-* This program is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, either version 2 of the License, or
-* (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program. If not, see <http://www.gnu.org/licenses/>.
-*
-*/
-package org.omnirom.device;
-
-import android.app.Activity;
-import android.app.AlertDialog;
-import android.app.Dialog;
-import android.app.DialogFragment;
-import android.app.Fragment;
-import android.content.DialogInterface;
-import android.os.Bundle;
-import androidx.preference.PreferenceFragment;
-import androidx.preference.PreferenceManager;
-import android.view.Menu;
-import android.view.MenuInflater;
-import android.view.MenuItem;
-
-public class DeviceSettingsActivity extends Activity {
-
- private DeviceSettings mDeviceSettingsFragment;
-
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
-
- getActionBar().setDisplayHomeAsUpEnabled(true);
-
- Fragment fragment = getFragmentManager().findFragmentById(android.R.id.content);
- if (fragment == null) {
- mDeviceSettingsFragment = new DeviceSettings();
- getFragmentManager().beginTransaction()
- .add(android.R.id.content, mDeviceSettingsFragment)
- .commit();
- } else {
- mDeviceSettingsFragment = (DeviceSettings) fragment;
- }
- }
-
- @Override
- public boolean onOptionsItemSelected(MenuItem item) {
- switch (item.getItemId()) {
- case android.R.id.home:
- finish();
- return true;
- default:
- break;
- }
- return super.onOptionsItemSelected(item);
- }
-}
diff --git a/DeviceParts/src/org/omnirom/device/DozeSettings.java b/DeviceParts/src/org/omnirom/device/DozeSettings.java
deleted file mode 100644
index 9e05709..0000000
--- a/DeviceParts/src/org/omnirom/device/DozeSettings.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
-* Copyright (C) 2017 The OmniROM Project
-*
-* This program is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, either version 2 of the License, or
-* (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program. If not, see <http://www.gnu.org/licenses/>.
-*
-*/
-package org.omnirom.device;
-
-import android.app.AlertDialog;
-import android.app.Dialog;
-import android.content.res.Resources;
-import android.content.Intent;
-import android.os.Bundle;
-import androidx.preference.PreferenceFragment;
-import androidx.preference.ListPreference;
-import androidx.preference.Preference;
-import androidx.preference.PreferenceCategory;
-import androidx.preference.PreferenceScreen;
-import androidx.preference.TwoStatePreference;
-import android.provider.Settings;
-import android.text.TextUtils;
-import android.view.MenuItem;
-import android.view.View;
-import android.widget.AdapterView;
-import android.widget.AdapterView.OnItemClickListener;
-import android.widget.ListView;
-import android.util.Log;
-
-public class DozeSettings extends PreferenceFragment {
-
- private static final String KEY_WAVE_CHECK = "wave_check";
- private static final String KEY_POCKET_CHECK = "pocket_check";
- private static final String KEY_TILT_CHECK = "tilt_check";
- private static final String KEY_FOOTER = "footer";
-
- private boolean mUseTiltCheck;
- private boolean mUseWaveCheck;
- private boolean mUsePocketCheck;
-
- @Override
- public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
- setPreferencesFromResource(R.xml.doze_settings, rootKey);
-
- getDozeSettings();
-
- TwoStatePreference waveSwitch = (TwoStatePreference) findPreference(KEY_WAVE_CHECK);
- waveSwitch.setChecked(mUseWaveCheck);
- waveSwitch.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
- @Override
- public boolean onPreferenceChange(Preference preference, Object newValue) {
- mUseWaveCheck = (Boolean) newValue;
- setDozeSettings();
- return true;
- }
- });
- TwoStatePreference pocketSwitch = (TwoStatePreference) findPreference(KEY_POCKET_CHECK);
- pocketSwitch.setChecked(mUsePocketCheck);
- pocketSwitch.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
- @Override
- public boolean onPreferenceChange(Preference preference, Object newValue) {
- mUsePocketCheck = (Boolean) newValue;
- setDozeSettings();
- return true;
- }
- });
- TwoStatePreference tiltSwitch = (TwoStatePreference) findPreference(KEY_TILT_CHECK);
- tiltSwitch.setChecked(mUseTiltCheck);
- tiltSwitch.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
- @Override
- public boolean onPreferenceChange(Preference preference, Object newValue) {
- mUseTiltCheck = (Boolean) newValue;
- setDozeSettings();
- return true;
- }
- });
- Preference footer = findPreference(KEY_FOOTER);
- if (isAmbientDisplayEnabled()) {
- getPreferenceScreen().removePreference(footer);
- }
- }
-
- private void getDozeSettings() {
- String value = Settings.System.getString(getContext().getContentResolver(),
- Settings.System.OMNI_DEVICE_FEATURE_SETTINGS);
- if (!TextUtils.isEmpty(value)) {
- String[] parts = value.split(":");
- mUseWaveCheck = Boolean.valueOf(parts[0]);
- mUsePocketCheck = Boolean.valueOf(parts[1]);
- mUseTiltCheck = Boolean.valueOf(parts[2]);
- }
- }
-
- private void setDozeSettings() {
- String newValue = String.valueOf(mUseWaveCheck) + ":" + String.valueOf(mUsePocketCheck) + ":" + String.valueOf(mUseTiltCheck);
- Settings.System.putString(getContext().getContentResolver(), Settings.System.OMNI_DEVICE_FEATURE_SETTINGS, newValue);
- }
-
- private boolean isAmbientDisplayEnabled() {
- return Settings.Secure.getInt(getContext().getContentResolver(), Settings.Secure.DOZE_ENABLED, 1) == 1;
- }
-}
diff --git a/DeviceParts/src/org/omnirom/device/DozeSettingsActivity.java b/DeviceParts/src/org/omnirom/device/DozeSettingsActivity.java
deleted file mode 100644
index eed2e24..0000000
--- a/DeviceParts/src/org/omnirom/device/DozeSettingsActivity.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
-* Copyright (C) 2017 The OmniROM Project
-*
-* This program is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, either version 2 of the License, or
-* (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program. If not, see <http://www.gnu.org/licenses/>.
-*
-*/
-package org.omnirom.device;
-
-import android.app.Activity;
-import android.app.AlertDialog;
-import android.app.Dialog;
-import android.app.DialogFragment;
-import android.app.Fragment;
-import android.content.DialogInterface;
-import android.os.Bundle;
-import androidx.preference.PreferenceFragment;
-import androidx.preference.PreferenceManager;
-import android.view.Menu;
-import android.view.MenuInflater;
-import android.view.MenuItem;
-
-public class DozeSettingsActivity extends Activity {
-
- private DozeSettings mDozeSettingsFragment;
-
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
-
- getActionBar().setDisplayHomeAsUpEnabled(true);
-
- Fragment fragment = getFragmentManager().findFragmentById(android.R.id.content);
- if (fragment == null) {
- mDozeSettingsFragment = new DozeSettings();
- getFragmentManager().beginTransaction()
- .add(android.R.id.content, mDozeSettingsFragment)
- .commit();
- } else {
- mDozeSettingsFragment = (DozeSettings) fragment;
- }
- }
-
- @Override
- public boolean onOptionsItemSelected(MenuItem item) {
- switch (item.getItemId()) {
- case android.R.id.home:
- finish();
- return true;
- default:
- break;
- }
- return super.onOptionsItemSelected(item);
- }
-}
diff --git a/DeviceParts/src/org/omnirom/device/FrameRateTileService.java b/DeviceParts/src/org/omnirom/device/FrameRateTileService.java
deleted file mode 100644
index 687439c..0000000
--- a/DeviceParts/src/org/omnirom/device/FrameRateTileService.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Copyright (C) 2020 The OmniROM 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.omnirom.device;
-
-import android.graphics.drawable.Icon;
-import android.os.SystemProperties;
-import android.provider.Settings;
-import android.service.quicksettings.Tile;
-import android.service.quicksettings.TileService;
-
-public class FrameRateTileService extends TileService {
- private static String VENDOR_FPS = "vendor.asus.dfps";
-
- private static final String DEFAULT_FPS_VALUE = "60";
- private static final String FPS_VALUE_90 = "90";
- private static final String FPS_VALUE_120 = "120";
-
- @Override
- public void onDestroy() {
- super.onDestroy();
- }
-
- @Override
- public void onTileAdded() {
- super.onTileAdded();
- }
-
- @Override
- public void onTileRemoved() {
- super.onTileRemoved();
- }
-
- @Override
- public void onStartListening() {
- super.onStartListening();
-
- String value = Settings.System.getString(this.getContentResolver(), DeviceSettings.TEMP_FPS);
- switch (value) {
- case DEFAULT_FPS_VALUE:
- getQsTile().setIcon(Icon.createWithResource(this, R.drawable.ic_refresh_rate));
- break;
- case FPS_VALUE_90:
- getQsTile().setIcon(Icon.createWithResource(this, R.drawable.ic_refresh_rate_90));
- break;
- case FPS_VALUE_120:
- getQsTile().setIcon(Icon.createWithResource(this, R.drawable.ic_refresh_rate_120));
- break;
- }
- getQsTile().setState(Tile.STATE_ACTIVE);
- getQsTile().updateTile();
- }
-
- @Override
- public void onStopListening() {
- super.onStopListening();
- }
-
- @Override
- public void onClick() {
- super.onClick();
-
- String value = Settings.System.getString(this.getContentResolver(), DeviceSettings.TEMP_FPS);
-
- switch (value) {
- case DEFAULT_FPS_VALUE:
- Settings.System.putString(this.getContentResolver(), DeviceSettings.TEMP_FPS, FPS_VALUE_90);
- SystemProperties.set(VENDOR_FPS, FPS_VALUE_90);
- getQsTile().setIcon(Icon.createWithResource(this, R.drawable.ic_refresh_rate_90));
- break;
- case FPS_VALUE_90:
- Settings.System.putString(this.getContentResolver(), DeviceSettings.TEMP_FPS, FPS_VALUE_120);
- SystemProperties.set(VENDOR_FPS, FPS_VALUE_120);
- getQsTile().setIcon(Icon.createWithResource(this, R.drawable.ic_refresh_rate_120));
- break;
- case FPS_VALUE_120:
- Settings.System.putString(this.getContentResolver(), DeviceSettings.TEMP_FPS, DEFAULT_FPS_VALUE);
- SystemProperties.set(VENDOR_FPS, DEFAULT_FPS_VALUE);
- getQsTile().setIcon(Icon.createWithResource(this, R.drawable.ic_refresh_rate));
- break;
- }
- getQsTile().updateTile();
- }
-}
\ No newline at end of file
diff --git a/DeviceParts/src/org/omnirom/device/GameGenie.java b/DeviceParts/src/org/omnirom/device/GameGenie.java
deleted file mode 100644
index 15b2e1e..0000000
--- a/DeviceParts/src/org/omnirom/device/GameGenie.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
-* Copyright (C) 2020 The OmniROM Project
-*
-* This program is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, either version 2 of the License, or
-* (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program. If not, see <http://www.gnu.org/licenses/>.
-*
-*/
-package org.omnirom.device;
-
-import android.content.ActivityNotFoundException;
-import android.content.Context;
-import android.content.Intent;
-import android.content.SharedPreferences;
-import android.content.pm.ApplicationInfo;
-import android.content.pm.PackageManager;
-import android.util.Log;
-
-public class GameGenie {
-
- private static final String TAG = "GameGenieController";
- private static final String GAMEGENIE_PACKAGE_NAME = "com.asus.gamewidget";
-
- private Context mContext;
-
- public GameGenie(Context context) {
- mContext = context;
- }
-
- public static boolean isGameGenieExist(Context context) {
- try {
- ApplicationInfo applicationInfo = context.getPackageManager().getApplicationInfo(GAMEGENIE_PACKAGE_NAME, 0);
- if (!applicationInfo.enabled || (applicationInfo.flags & 1) == 0) {
- return false;
- }
- return true;
- } catch (PackageManager.NameNotFoundException e) {
- Log.e(TAG, "Game genie apk not found exception : " + e.toString());
- return false;
- }
- }
-}
\ No newline at end of file
diff --git a/DeviceParts/src/org/omnirom/device/GestureSettings.java b/DeviceParts/src/org/omnirom/device/GestureSettings.java
deleted file mode 100644
index efca300..0000000
--- a/DeviceParts/src/org/omnirom/device/GestureSettings.java
+++ /dev/null
@@ -1,290 +0,0 @@
-/*
-* Copyright (C) 2017 The OmniROM Project
-*
-* This program is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, either version 2 of the License, or
-* (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program. If not, see <http://www.gnu.org/licenses/>.
-*
-*/
-package org.omnirom.device;
-
-import android.app.AlertDialog;
-import android.app.Dialog;
-import android.app.DialogFragment;
-import android.content.ComponentName;
-import android.content.Intent;
-import android.content.pm.ActivityInfo;
-import android.content.pm.ApplicationInfo;
-import android.content.pm.PackageManager;
-import android.content.pm.ResolveInfo;
-import android.content.res.Resources;
-import android.os.AsyncTask;
-import android.os.Bundle;
-import androidx.preference.PreferenceFragment;
-import androidx.preference.ListPreference;
-import androidx.preference.Preference;
-import androidx.preference.PreferenceCategory;
-import androidx.preference.PreferenceScreen;
-import androidx.preference.TwoStatePreference;
-import android.provider.Settings;
-import android.text.TextUtils;
-import android.view.MenuItem;
-import android.view.View;
-import android.widget.AdapterView;
-import android.widget.AdapterView.OnItemClickListener;
-import android.widget.ListView;
-import android.util.Log;
-import static android.provider.Settings.Secure.SYSTEM_NAVIGATION_KEYS_ENABLED;
-import android.os.UserHandle;
-
-import java.util.Collections;
-import java.util.LinkedList;
-import java.util.List;
-
-public class GestureSettings extends PreferenceFragment implements
- Preference.OnPreferenceChangeListener {
-
- public static final String KEY_PROXI_SWITCH = "proxi";
- public static final String KEY_OFF_SCREEN_GESTURE_FEEDBACK_SWITCH = "off_screen_gesture_feedback";
- public static final String KEY_SWIPEUP_SWITCH = "swipeup";
- public static final String KEY_SETTINGS_SWIPEUP_PREFIX = "gesture_setting_";
-
- public static final String SETTINGS_GESTURE_KEY = KEY_SETTINGS_SWIPEUP_PREFIX + KEY_SWIPEUP_SWITCH;
-
- public static final String KEY_C_APP = "c_gesture_app";
- public static final String KEY_E_APP = "e_gesture_app";
- public static final String KEY_S_APP = "s_gesture_app";
- public static final String KEY_V_APP = "v_gesture_app";
- public static final String KEY_W_APP = "w_gesture_app";
- public static final String KEY_Z_APP = "z_gesture_app";
-
- public static final String DEVICE_GESTURE_MAPPING_0 = "device_gesture_mapping_0_0";
- public static final String DEVICE_GESTURE_MAPPING_1 = "device_gesture_mapping_1_0";
- public static final String DEVICE_GESTURE_MAPPING_2 = "device_gesture_mapping_2_0";
- public static final String DEVICE_GESTURE_MAPPING_3 = "device_gesture_mapping_3_0";
- public static final String DEVICE_GESTURE_MAPPING_4 = "device_gesture_mapping_4_0";
- public static final String DEVICE_GESTURE_MAPPING_5 = "device_gesture_mapping_5_0";
-
- private TwoStatePreference mProxiSwitch;
- private TwoStatePreference mSwipeUpSwitch;
- private AppSelectListPreference mLetterCGesture;
- private AppSelectListPreference mLetterEGesture;
- private AppSelectListPreference mLetterSGesture;
- private AppSelectListPreference mLetterVGesture;
- private AppSelectListPreference mLetterWGesture;
- private AppSelectListPreference mLetterZGesture;
-
- private static final String SWIPEUP_PATH = "/sys/devices/platform/goodix_ts.0/gesture/swipeup";
-
- private List<AppSelectListPreference.PackageItem> mInstalledPackages = new LinkedList<AppSelectListPreference.PackageItem>();
- private PackageManager mPm;
-
- @Override
- public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
- setPreferencesFromResource(R.xml.gesture_settings, rootKey);
- mPm = getContext().getPackageManager();
-
- mProxiSwitch = (TwoStatePreference) findPreference(KEY_PROXI_SWITCH);
- mProxiSwitch.setChecked(Settings.System.getInt(getContext().getContentResolver(),
- Settings.System.OMNI_DEVICE_PROXI_CHECK_ENABLED, 1) != 0);
-
- mLetterCGesture = (AppSelectListPreference) findPreference(KEY_C_APP);
- mLetterCGesture.setEnabled(isGestureSupported(KEY_C_APP));
- String value = Settings.System.getString(getContext().getContentResolver(), DEVICE_GESTURE_MAPPING_0);
- mLetterCGesture.setValue(value);
- mLetterCGesture.setOnPreferenceChangeListener(this);
-
- mLetterEGesture = (AppSelectListPreference) findPreference(KEY_E_APP);
- mLetterEGesture.setEnabled(isGestureSupported(KEY_E_APP));
- value = Settings.System.getString(getContext().getContentResolver(), DEVICE_GESTURE_MAPPING_1);
- mLetterEGesture.setValue(value);
- mLetterEGesture.setOnPreferenceChangeListener(this);
-
- mLetterSGesture = (AppSelectListPreference) findPreference(KEY_S_APP);
- mLetterSGesture.setEnabled(isGestureSupported(KEY_S_APP));
- value = Settings.System.getString(getContext().getContentResolver(), DEVICE_GESTURE_MAPPING_2);
- mLetterSGesture.setValue(value);
- mLetterSGesture.setOnPreferenceChangeListener(this);
-
- mLetterVGesture = (AppSelectListPreference) findPreference(KEY_V_APP);
- mLetterVGesture.setEnabled(isGestureSupported(KEY_V_APP));
- value = Settings.System.getString(getContext().getContentResolver(), DEVICE_GESTURE_MAPPING_3);
- mLetterVGesture.setValue(value);
- mLetterVGesture.setOnPreferenceChangeListener(this);
-
- mLetterWGesture = (AppSelectListPreference) findPreference(KEY_W_APP);
- mLetterWGesture.setEnabled(isGestureSupported(KEY_W_APP));
- value = Settings.System.getString(getContext().getContentResolver(), DEVICE_GESTURE_MAPPING_4);
- mLetterWGesture.setValue(value);
- mLetterWGesture.setOnPreferenceChangeListener(this);
-
- mLetterZGesture = (AppSelectListPreference) findPreference(KEY_Z_APP);
- mLetterZGesture.setEnabled(isGestureSupported(KEY_Z_APP));
- value = Settings.System.getString(getContext().getContentResolver(), DEVICE_GESTURE_MAPPING_5);
- mLetterZGesture.setValue(value);
- mLetterZGesture.setOnPreferenceChangeListener(this);
-
- mSwipeUpSwitch = (TwoStatePreference) findPreference(KEY_SWIPEUP_SWITCH);
- mSwipeUpSwitch.setChecked(Settings.System.getInt(getContext().getContentResolver(),
- KEY_SWIPEUP_SWITCH, 0) == 1);
-
- new FetchPackageInformationTask().execute();
- }
-
- private boolean areSystemNavigationKeysEnabled() {
- return Settings.Secure.getInt(getContext().getContentResolver(),
- Settings.Secure.SYSTEM_NAVIGATION_KEYS_ENABLED, 0) == 1;
- }
-
- @Override
- public boolean onPreferenceTreeClick(Preference preference) {
- if (preference == mProxiSwitch) {
- Settings.System.putInt(getContext().getContentResolver(),
- Settings.System.OMNI_DEVICE_PROXI_CHECK_ENABLED, mProxiSwitch.isChecked() ? 1 : 0);
- return true;
- }
- if (preference == mSwipeUpSwitch) {
- Settings.System.putInt(getContext().getContentResolver(), KEY_SWIPEUP_SWITCH, mSwipeUpSwitch.isChecked() ? 1 : 0);
- Utils.writeValue(getFile(), mSwipeUpSwitch.isChecked() ? "1" : "0");
- return true;
- }
- return super.onPreferenceTreeClick(preference);
- }
-
- @Override
- public boolean onPreferenceChange(Preference preference, Object newValue) {
- if (preference == mLetterCGesture) {
- String value = (String) newValue;
- boolean gestureDisabled = value.equals(AppSelectListPreference.DISABLED_ENTRY);
- setGestureEnabled(KEY_C_APP, !gestureDisabled);
- Settings.System.putString(getContext().getContentResolver(), DEVICE_GESTURE_MAPPING_0, value);
- } else if (preference == mLetterEGesture) {
- String value = (String) newValue;
- boolean gestureDisabled = value.equals(AppSelectListPreference.DISABLED_ENTRY);
- setGestureEnabled(KEY_E_APP, !gestureDisabled);
- Settings.System.putString(getContext().getContentResolver(), DEVICE_GESTURE_MAPPING_1, value);
- } else if (preference == mLetterSGesture) {
- String value = (String) newValue;
- boolean gestureDisabled = value.equals(AppSelectListPreference.DISABLED_ENTRY);
- setGestureEnabled(KEY_S_APP, !gestureDisabled);
- Settings.System.putString(getContext().getContentResolver(), DEVICE_GESTURE_MAPPING_2, value);
- } else if (preference == mLetterVGesture) {
- String value = (String) newValue;
- boolean gestureDisabled = value.equals(AppSelectListPreference.DISABLED_ENTRY);
- setGestureEnabled(KEY_W_APP, !gestureDisabled);
- Settings.System.putString(getContext().getContentResolver(), DEVICE_GESTURE_MAPPING_3, value);
- } else if (preference == mLetterWGesture) {
- String value = (String) newValue;
- boolean gestureDisabled = value.equals(AppSelectListPreference.DISABLED_ENTRY);
- setGestureEnabled(KEY_W_APP, !gestureDisabled);
- Settings.System.putString(getContext().getContentResolver(), DEVICE_GESTURE_MAPPING_4, value);
- } else if (preference == mLetterZGesture) {
- String value = (String) newValue;
- boolean gestureDisabled = value.equals(AppSelectListPreference.DISABLED_ENTRY);
- setGestureEnabled(KEY_Z_APP, !gestureDisabled);
- Settings.System.putString(getContext().getContentResolver(), DEVICE_GESTURE_MAPPING_5, value);
- }
- return true;
- }
-
- public static String getFile() {
- if (Utils.fileWritable(SWIPEUP_PATH)) {
- return SWIPEUP_PATH;
- }
- return null;
- }
-
- public static String getGestureFile(String key) {
- switch(key) {
- case KEY_C_APP:
- return "/sys/devices/platform/goodix_ts.0/gesture/gesture_c";
- case KEY_E_APP:
- return "/sys/devices/platform/goodix_ts.0/gesture/gesture_e";
- case KEY_S_APP:
- return "/sys/devices/platform/goodix_ts.0/gesture/gesture_s";
- case KEY_V_APP:
- return "/sys/devices/platform/goodix_ts.0/gesture/gesture_v";
- case KEY_W_APP:
- return "/sys/devices/platform/goodix_ts.0/gesture/gesture_w";
- case KEY_Z_APP:
- return "/sys/devices/platform/goodix_ts.0/gesture/gesture_z";
- case SWIPEUP_PATH:
- return "/sys/devices/platform/goodix_ts.0/gesture/swipeup";
- }
- return null;
- }
-
- private void setGestureEnabled(String key, boolean enabled) {
- Log.e("GestureSettings", "setGestureEnabled called with key="+key+", enabled="+enabled);
- Utils.writeValue(getGestureFile(key), enabled ? "1" : "0");
- }
-
- private boolean isGestureSupported(String key) {
- return Utils.fileWritable(getGestureFile(key));
- }
-
- @Override
- public void onDisplayPreferenceDialog(Preference preference) {
- if (!(preference instanceof AppSelectListPreference)) {
- super.onDisplayPreferenceDialog(preference);
- return;
- }
- DialogFragment fragment =
- AppSelectListPreference.AppSelectListPreferenceDialogFragment
- .newInstance(preference.getKey());
- fragment.setTargetFragment(this, 0);
- fragment.show(getFragmentManager(), "dialog_preference");
- }
-
- private void loadInstalledPackages() {
- final Intent mainIntent = new Intent(Intent.ACTION_MAIN, null);
- mainIntent.addCategory(Intent.CATEGORY_LAUNCHER);
- List<ResolveInfo> installedAppsInfo = mPm.queryIntentActivities(mainIntent, 0);
-
- for (ResolveInfo info : installedAppsInfo) {
- ActivityInfo activity = info.activityInfo;
- ApplicationInfo appInfo = activity.applicationInfo;
- ComponentName componentName = new ComponentName(appInfo.packageName, activity.name);
- CharSequence label = null;
- try {
- label = activity.loadLabel(mPm);
- } catch (Exception e) {
- }
- if (label != null) {
- final AppSelectListPreference.PackageItem item = new AppSelectListPreference.PackageItem(activity.loadLabel(mPm), 0, componentName);
- mInstalledPackages.add(item);
- }
- }
- Collections.sort(mInstalledPackages);
- }
-
- private class FetchPackageInformationTask extends AsyncTask<Void, Void, Void> {
- public FetchPackageInformationTask() {
- }
-
- @Override
- protected Void doInBackground(Void... params) {
- loadInstalledPackages();
- return null;
- }
-
- @Override
- protected void onPostExecute(Void feed) {
- mLetterCGesture.setPackageList(mInstalledPackages);
- mLetterEGesture.setPackageList(mInstalledPackages);
- mLetterSGesture.setPackageList(mInstalledPackages);
- mLetterVGesture.setPackageList(mInstalledPackages);
- mLetterWGesture.setPackageList(mInstalledPackages);
- mLetterZGesture.setPackageList(mInstalledPackages);
- }
- }
-}
diff --git a/DeviceParts/src/org/omnirom/device/GestureSettingsActivity.java b/DeviceParts/src/org/omnirom/device/GestureSettingsActivity.java
deleted file mode 100644
index d0a9917..0000000
--- a/DeviceParts/src/org/omnirom/device/GestureSettingsActivity.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
-* Copyright (C) 2017 The OmniROM Project
-*
-* This program is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, either version 2 of the License, or
-* (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program. If not, see <http://www.gnu.org/licenses/>.
-*
-*/
-package org.omnirom.device;
-
-import android.app.Activity;
-import android.app.AlertDialog;
-import android.app.Dialog;
-import android.app.DialogFragment;
-import android.app.Fragment;
-import android.content.DialogInterface;
-import android.os.Bundle;
-import androidx.preference.PreferenceFragment;
-import androidx.preference.Preference;
-import androidx.preference.PreferenceManager;
-import android.view.Menu;
-import android.view.MenuInflater;
-import android.view.MenuItem;
-
-public class GestureSettingsActivity extends Activity {
-
- private GestureSettings mGestureSettingsFragment;
-
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
-
- getActionBar().setDisplayHomeAsUpEnabled(true);
-
- Fragment fragment = getFragmentManager().findFragmentById(android.R.id.content);
- if (fragment == null) {
- mGestureSettingsFragment = new GestureSettings();
- getFragmentManager().beginTransaction()
- .add(android.R.id.content, mGestureSettingsFragment)
- .commit();
- } else {
- mGestureSettingsFragment = (GestureSettings) fragment;
- }
- }
-
- @Override
- public boolean onOptionsItemSelected(MenuItem item) {
- switch (item.getItemId()) {
- case android.R.id.home:
- finish();
- return true;
- default:
- break;
- }
- return super.onOptionsItemSelected(item);
- }
-}
diff --git a/DeviceParts/src/org/omnirom/device/GloveModeSwitch.java b/DeviceParts/src/org/omnirom/device/GloveModeSwitch.java
deleted file mode 100644
index a9eeebd..0000000
--- a/DeviceParts/src/org/omnirom/device/GloveModeSwitch.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
-* Copyright (C) 2020 The OmniROM Project
-*
-* This program is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, either version 2 of the License, or
-* (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program. If not, see <http://www.gnu.org/licenses/>.
-*
-*/
-package org.omnirom.device;
-
-import android.content.Context;
-import android.content.SharedPreferences;
-import android.provider.Settings;
-import androidx.preference.Preference;
-import androidx.preference.Preference.OnPreferenceChangeListener;
-import androidx.preference.PreferenceManager;
-
-public class GloveModeSwitch implements OnPreferenceChangeListener {
-
- private static final String FILE = "/sys/devices/platform/goodix_ts.0/glove_mode";
-
- public static final String SETTINGS_KEY = DeviceSettings.KEY_SETTINGS_PREFIX + DeviceSettings.KEY_GLOVE_SWITCH;
-
- private Context mContext;
-
- public GloveModeSwitch(Context context) {
- mContext = context;
- }
-
- public static String getFile() {
- if (Utils.fileWritable(FILE)) {
- return FILE;
- }
- return null;
- }
-
- public static boolean isSupported() {
- return Utils.fileWritable(getFile());
- }
-
- public static boolean isCurrentlyEnabled(Context context) {
- return Utils.getFileValueAsBoolean(getFile(), false);
- }
-
- @Override
- public boolean onPreferenceChange(Preference preference, Object newValue) {
- Boolean enabled = (Boolean) newValue;
- Settings.System.putInt(mContext.getContentResolver(), SETTINGS_KEY, enabled ? 1 : 0);
- Utils.writeValue(getFile(), enabled ? "1" : "0");
- return true;
- }
-}
\ No newline at end of file
diff --git a/DeviceParts/src/org/omnirom/device/GloveModeTileService.java b/DeviceParts/src/org/omnirom/device/GloveModeTileService.java
deleted file mode 100644
index 10bad91..0000000
--- a/DeviceParts/src/org/omnirom/device/GloveModeTileService.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
-* Copyright (C) 2018 The OmniROM Project
-*
-* This program is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, either version 2 of the License, or
-* (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program. If not, see <http://www.gnu.org/licenses/>.
-*
-*/
-package org.omnirom.device;
-
-import android.annotation.TargetApi;
-import android.content.Intent;
-import android.content.SharedPreferences;
-import android.service.quicksettings.Tile;
-import android.service.quicksettings.TileService;
-import androidx.preference.PreferenceManager;
-
-
-@TargetApi(24)
-public class GloveModeTileService extends TileService {
- private boolean enabled = false;
-
- @Override
- public void onDestroy() {
- super.onDestroy();
- }
-
- @Override
- public void onTileAdded() {
- super.onTileAdded();
- }
-
- @Override
- public void onTileRemoved() {
- super.onTileRemoved();
- }
-
- @Override
- public void onStartListening() {
- super.onStartListening();
- SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this);
- enabled = GloveModeSwitch.isCurrentlyEnabled(this);
- getQsTile().setState(enabled ? Tile.STATE_ACTIVE : Tile.STATE_INACTIVE);
- getQsTile().updateTile();
- }
-
- @Override
- public void onStopListening() {
- super.onStopListening();
- }
-
- @Override
- public void onClick() {
- super.onClick();
- SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this);
- enabled = GloveModeSwitch.isCurrentlyEnabled(this);
- Utils.writeValue(GloveModeSwitch.getFile(), enabled ? "0" : "1");
- sharedPrefs.edit().putBoolean(DeviceSettings.KEY_GLOVE_SWITCH, enabled ? false : true).commit();
- getQsTile().setState(enabled ? Tile.STATE_INACTIVE : Tile.STATE_ACTIVE);
- getQsTile().updateTile();
- }
-}
diff --git a/DeviceParts/src/org/omnirom/device/KeyHandler.java b/DeviceParts/src/org/omnirom/device/KeyHandler.java
deleted file mode 100644
index a4b08af..0000000
--- a/DeviceParts/src/org/omnirom/device/KeyHandler.java
+++ /dev/null
@@ -1,538 +0,0 @@
-/*
-* Copyright (C) 2016 The OmniROM Project
-*
-* This program is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, either version 2 of the License, or
-* (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program. If not, see <http://www.gnu.org/licenses/>.
-*
-*/
-package org.omnirom.device;
-
-import android.app.ActivityManagerNative;
-import android.app.NotificationManager;
-import android.content.BroadcastReceiver;
-import android.content.ComponentName;
-import android.content.Context;
-import android.content.Intent;
-import android.content.IntentFilter;
-import android.database.ContentObserver;
-import android.hardware.Sensor;
-import android.hardware.SensorEvent;
-import android.hardware.SensorEventListener;
-import android.hardware.SensorManager;
-import android.media.IAudioService;
-import android.media.AudioManager;
-import android.media.session.MediaSessionLegacyHelper;
-import android.net.Uri;
-import android.text.TextUtils;
-import android.os.FileObserver;
-import android.os.Handler;
-import android.os.Message;
-import android.os.PowerManager;
-import android.os.PowerManager.WakeLock;
-import android.os.RemoteException;
-import android.os.ServiceManager;
-import android.os.SystemClock;
-import android.os.SystemProperties;
-import android.os.UEventObserver;
-import android.os.UserHandle;
-import android.os.VibrationEffect;
-import android.os.Vibrator;
-import android.provider.Settings;
-import android.provider.Settings.Global;
-import android.provider.Settings.Secure;
-import android.telecom.PhoneAccountHandle;
-import android.telecom.TelecomManager;
-import android.telephony.SubscriptionInfo;
-import android.telephony.SubscriptionManager;
-import android.util.Log;
-import android.view.KeyEvent;
-import android.view.HapticFeedbackConstants;
-import android.view.WindowManagerGlobal;
-
-import com.android.internal.util.omni.DeviceKeyHandler;
-import com.android.internal.util.omni.PackageUtils;
-import com.android.internal.util.ArrayUtils;
-import com.android.internal.util.omni.OmniUtils;
-import org.omnirom.omnilib.utils.OmniVibe;
-import com.android.internal.statusbar.IStatusBarService;
-
-public class KeyHandler implements DeviceKeyHandler {
-
- private static final String TAG = "KeyHandler";
- private static final boolean DEBUG = true;
- private static final boolean DEBUG_SENSOR = true;
-
- protected static final int GESTURE_REQUEST = 1;
- private static final int GESTURE_WAKELOCK_DURATION = 2000;
-
- private static final int KEY_DOUBLE_TAP = 143;
- private static final int KEY_HOME = 102;
- private static final int KEY_BACK = 158;
- private static final int KEY_RECENTS = 580;
-
- private static final int KEY_GESTURE_C = 46;
- private static final int KEY_GESTURE_E = 18;
- private static final int KEY_GESTURE_S = 31;
- private static final int KEY_GESTURE_V = 47;
- private static final int KEY_GESTURE_W = 17;
- private static final int KEY_GESTURE_Z = 44;
- private static final int KEY_SWIPEUP_GESTURE = 103;
-
- private static final int MIN_PULSE_INTERVAL_MS = 2500;
- private static final String DOZE_INTENT = "com.android.systemui.doze.pulse";
- private static final int HANDWAVE_MAX_DELTA_MS = 1000;
- private static final int POCKET_MIN_DELTA_MS = 5000;
-
- private static final String DT2W_CONTROL_PATH = "/sys/devices/platform/goodix_ts.0/gesture/dclick";
-
- private static final int[] sSupportedGestures = new int[]{
- KEY_DOUBLE_TAP,
- KEY_GESTURE_C,
- KEY_GESTURE_E,
- KEY_GESTURE_S,
- KEY_GESTURE_V,
- KEY_GESTURE_W,
- KEY_GESTURE_Z
- };
-
- private static final int[] sProxiCheckedGestures = new int[]{
- KEY_DOUBLE_TAP,
- KEY_GESTURE_C,
- KEY_GESTURE_E,
- KEY_GESTURE_S,
- KEY_GESTURE_V,
- KEY_GESTURE_W,
- KEY_GESTURE_Z
- };
-
- protected final Context mContext;
- private final PowerManager mPowerManager;
- private EventHandler mEventHandler;
- private WakeLock mGestureWakeLock;
- private Handler mHandler = new Handler();
- private SettingsObserver mSettingsObserver;
- private static boolean mButtonDisabled;
- private final NotificationManager mNoMan;
- private final AudioManager mAudioManager;
- private SensorManager mSensorManager;
- private boolean mProxyIsNear;
- private boolean mUseProxiCheck;
- private Sensor mTiltSensor;
- private boolean mUseTiltCheck;
- private boolean mProxyWasNear;
- private long mProxySensorTimestamp;
- private boolean mUseWaveCheck;
- private Sensor mPocketSensor;
- private boolean mUsePocketCheck;
- private boolean mDispOn;
- private boolean isFpgesture;
- private boolean isOPCameraAvail;
- private boolean mRestoreUser;
- private boolean mDoubleTapToWake;
-
- private SensorEventListener mProximitySensor = new SensorEventListener() {
- @Override
- public void onSensorChanged(SensorEvent event) {
- mProxyIsNear = event.values[0] == 1;
-
- if (DEBUG_SENSOR) Log.i(TAG, "mProxyIsNear = " + mProxyIsNear + " mProxyWasNear = " + mProxyWasNear);
- if (mUseWaveCheck || mUsePocketCheck) {
- if (mProxyWasNear && !mProxyIsNear) {
- long delta = SystemClock.elapsedRealtime() - mProxySensorTimestamp;
- if (DEBUG_SENSOR) Log.i(TAG, "delta = " + delta);
- if (mUseWaveCheck && delta < HANDWAVE_MAX_DELTA_MS) {
- launchDozePulse();
- }
- if (mUsePocketCheck && delta > POCKET_MIN_DELTA_MS) {
- launchDozePulse();
- }
- }
- mProxySensorTimestamp = SystemClock.elapsedRealtime();
- mProxyWasNear = mProxyIsNear;
- }
- }
-
- @Override
- public void onAccuracyChanged(Sensor sensor, int accuracy) {
- }
- };
-
- private SensorEventListener mTiltSensorListener = new SensorEventListener() {
- @Override
- public void onSensorChanged(SensorEvent event) {
- if (event.values[0] == 1) {
- launchDozePulse();
- }
- }
-
- @Override
- public void onAccuracyChanged(Sensor sensor, int accuracy) {
- }
- };
-
- private class SettingsObserver extends ContentObserver {
- SettingsObserver(Handler handler) {
- super(handler);
- }
-
- void observe() {
- mContext.getContentResolver().registerContentObserver(Settings.System.getUriFor(
- Settings.System.OMNI_DEVICE_PROXI_CHECK_ENABLED),
- false, this);
- mContext.getContentResolver().registerContentObserver(Settings.System.getUriFor(
- Settings.System.OMNI_DEVICE_FEATURE_SETTINGS),
- false, this);
- mContext.getContentResolver().registerContentObserver(Settings.Secure.getUriFor(
- Settings.Secure.DOUBLE_TAP_TO_WAKE),
- false, this);
- update();
- updateDozeSettings();
- }
-
- @Override
- public void onChange(boolean selfChange) {
- update();
- }
-
- @Override
- public void onChange(boolean selfChange, Uri uri) {
- if (uri.equals(Settings.System.getUriFor(
- Settings.System.OMNI_DEVICE_FEATURE_SETTINGS))){
- updateDozeSettings();
- return;
- }
- update();
- }
-
- public void update() {
- mUseProxiCheck = Settings.System.getIntForUser(
- mContext.getContentResolver(), Settings.System.OMNI_DEVICE_PROXI_CHECK_ENABLED, 1,
- UserHandle.USER_CURRENT) == 1;
- mDoubleTapToWake = Settings.Secure.getInt(
- mContext.getContentResolver(), Settings.Secure.DOUBLE_TAP_TO_WAKE, 0) != 0;
- updateDoubleTapToWake();
- }
- }
-
- private BroadcastReceiver mSystemStateReceiver = new BroadcastReceiver() {
- @Override
- public void onReceive(Context context, Intent intent) {
- if (intent.getAction().equals(Intent.ACTION_SCREEN_ON)) {
- mDispOn = true;
- onDisplayOn();
- } else if (intent.getAction().equals(Intent.ACTION_SCREEN_OFF)) {
- mDispOn = false;
- onDisplayOff();
- } else if (intent.getAction().equals(Intent.ACTION_USER_SWITCHED)) {
- int userId = intent.getIntExtra(Intent.EXTRA_USER_HANDLE, UserHandle.USER_NULL);
- if (userId == UserHandle.USER_SYSTEM && mRestoreUser) {
- if (DEBUG) Log.i(TAG, "ACTION_USER_SWITCHED to system");
- Startup.restoreAfterUserSwitch(context);
- } else {
- mRestoreUser = true;
- }
- }
- }
- };
-
- public KeyHandler(Context context) {
- mContext = context;
- mDispOn = true;
- mEventHandler = new EventHandler();
- mPowerManager = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE);
- mGestureWakeLock = mPowerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK,
- "GestureWakeLock");
- mSettingsObserver = new SettingsObserver(mHandler);
- mSettingsObserver.observe();
- mNoMan = (NotificationManager) mContext.getSystemService(Context.NOTIFICATION_SERVICE);
- mAudioManager = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE);
- mSensorManager = (SensorManager) mContext.getSystemService(Context.SENSOR_SERVICE);
- mTiltSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_TILT_DETECTOR);
- mPocketSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_PROXIMITY);
- IntentFilter systemStateFilter = new IntentFilter(Intent.ACTION_SCREEN_ON);
- systemStateFilter.addAction(Intent.ACTION_SCREEN_OFF);
- systemStateFilter.addAction(Intent.ACTION_USER_SWITCHED);
- mContext.registerReceiver(mSystemStateReceiver, systemStateFilter);
- }
-
- private class EventHandler extends Handler {
- @Override
- public void handleMessage(Message msg) {
- }
- }
-
- @Override
- public boolean handleKeyEvent(KeyEvent event) {
- if (event.getAction() != KeyEvent.ACTION_UP) {
- return false;
- } else {
- return ArrayUtils.contains(sSupportedGestures, event.getScanCode());
- }
- }
-
- @Override
- public boolean canHandleKeyEvent(KeyEvent event) {
- return ArrayUtils.contains(sSupportedGestures, event.getScanCode());
- }
-
- @Override
- public boolean isDisabledKeyEvent(KeyEvent event) {
- boolean isProxyCheckRequired = mUseProxiCheck &&
- ArrayUtils.contains(sProxiCheckedGestures, event.getScanCode());
- if (mProxyIsNear && isProxyCheckRequired) {
- if (DEBUG) Log.i(TAG, "isDisabledKeyEvent: blocked by proxi sensor - scanCode=" + event.getScanCode());
- return true;
- }
- return false;
- }
-
- @Override
- public boolean isCameraLaunchEvent(KeyEvent event) {
- if (event.getAction() != KeyEvent.ACTION_UP) {
- return false;
- }
- String value = getGestureValueForScanCode(event.getScanCode());
- return !TextUtils.isEmpty(value) && value.equals(AppSelectListPreference.CAMERA_ENTRY);
- }
-
- @Override
- public boolean isWakeEvent(KeyEvent event){
- if (event.getAction() != KeyEvent.ACTION_UP) {
- return false;
- }
- if (event.getScanCode() == KEY_SWIPEUP_GESTURE) {
- return true;
- }
- String value = getGestureValueForScanCode(event.getScanCode());
- if (!TextUtils.isEmpty(value) && value.equals(AppSelectListPreference.WAKE_ENTRY)) {
- if (DEBUG) Log.i(TAG, "isWakeEvent " + event.getScanCode() + value);
- return true;
- }
- return event.getScanCode() == KEY_DOUBLE_TAP;
- }
-
- @Override
- public Intent isActivityLaunchEvent(KeyEvent event) {
- if (event.getAction() != KeyEvent.ACTION_UP) {
- return null;
- }
- String value = getGestureValueForScanCode(event.getScanCode());
- if (!TextUtils.isEmpty(value) && !value.equals(AppSelectListPreference.DISABLED_ENTRY)) {
- if (DEBUG) Log.i(TAG, "isActivityLaunchEvent " + event.getScanCode() + value);
- if (!launchSpecialActions(value)) {
- OmniVibe.performHapticFeedbackLw(HapticFeedbackConstants.LONG_PRESS, false, mContext);
- Intent intent = createIntent(value);
- return intent;
- }
- }
- return null;
- }
-
- private IAudioService getAudioService() {
- IAudioService audioService = IAudioService.Stub
- .asInterface(ServiceManager.checkService(Context.AUDIO_SERVICE));
- if (audioService == null) {
- Log.w(TAG, "Unable to find IAudioService interface.");
- }
- return audioService;
- }
-
- boolean isMusicActive() {
- return mAudioManager.isMusicActive();
- }
-
- private void dispatchMediaKeyWithWakeLockToAudioService(int keycode) {
- if (ActivityManagerNative.isSystemReady()) {
- IAudioService audioService = getAudioService();
- if (audioService != null) {
- KeyEvent event = new KeyEvent(SystemClock.uptimeMillis(),
- SystemClock.uptimeMillis(), KeyEvent.ACTION_DOWN,
- keycode, 0);
- dispatchMediaKeyEventUnderWakelock(event);
- event = KeyEvent.changeAction(event, KeyEvent.ACTION_UP);
- dispatchMediaKeyEventUnderWakelock(event);
- }
- }
- }
-
- private void dispatchMediaKeyEventUnderWakelock(KeyEvent event) {
- if (ActivityManagerNative.isSystemReady()) {
- MediaSessionLegacyHelper.getHelper(mContext).sendMediaButtonEvent(event, true);
- }
- }
-
- private void onDisplayOn() {
- if (DEBUG) Log.i(TAG, "Display on");
- if (enableProxiSensor()) {
- mSensorManager.unregisterListener(mProximitySensor, mPocketSensor);
- }
- if (mUseTiltCheck) {
- mSensorManager.unregisterListener(mTiltSensorListener, mTiltSensor);
- }
- }
-
- private void updateDoubleTapToWake() {
- Log.i(TAG, "udateDoubleTapToWake " + mDoubleTapToWake);
- if (Utils.fileWritable(DT2W_CONTROL_PATH)) {
- Utils.writeValue(DT2W_CONTROL_PATH, mDoubleTapToWake ? "1" : "0");
- }
- }
-
- private void onDisplayOff() {
- if (DEBUG) Log.i(TAG, "Display off");
- if (enableProxiSensor()) {
- mProxyWasNear = false;
- mSensorManager.registerListener(mProximitySensor, mPocketSensor,
- SensorManager.SENSOR_DELAY_NORMAL);
- mProxySensorTimestamp = SystemClock.elapsedRealtime();
- }
- if (mUseTiltCheck) {
- mSensorManager.registerListener(mTiltSensorListener, mTiltSensor,
- SensorManager.SENSOR_DELAY_NORMAL);
- }
- }
-
- private Intent createIntent(String value) {
- ComponentName componentName = ComponentName.unflattenFromString(value);
- Intent intent = new Intent(Intent.ACTION_MAIN);
- intent.addCategory(Intent.CATEGORY_LAUNCHER);
- intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK
- | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED);
- intent.setComponent(componentName);
- return intent;
- }
-
- private boolean launchSpecialActions(String value) {
- if (value.equals(AppSelectListPreference.TORCH_ENTRY)) {
- mGestureWakeLock.acquire(GESTURE_WAKELOCK_DURATION);
- IStatusBarService service = getStatusBarService();
- if (service != null) {
- try {
- service.toggleCameraFlash();
- OmniVibe.performHapticFeedbackLw(HapticFeedbackConstants.LONG_PRESS, false, mContext);
- } catch (RemoteException e) {
- // do nothing.
- }
- }
- return true;
- } else if (value.equals(AppSelectListPreference.MUSIC_PLAY_ENTRY)) {
- mGestureWakeLock.acquire(GESTURE_WAKELOCK_DURATION);
- OmniVibe.performHapticFeedbackLw(HapticFeedbackConstants.LONG_PRESS, false, mContext);
- dispatchMediaKeyWithWakeLockToAudioService(KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE);
- return true;
- } else if (value.equals(AppSelectListPreference.MUSIC_NEXT_ENTRY)) {
- if (isMusicActive()) {
- mGestureWakeLock.acquire(GESTURE_WAKELOCK_DURATION);
- OmniVibe.performHapticFeedbackLw(HapticFeedbackConstants.LONG_PRESS, false, mContext);
- dispatchMediaKeyWithWakeLockToAudioService(KeyEvent.KEYCODE_MEDIA_NEXT);
- }
- return true;
- } else if (value.equals(AppSelectListPreference.MUSIC_PREV_ENTRY)) {
- if (isMusicActive()) {
- mGestureWakeLock.acquire(GESTURE_WAKELOCK_DURATION);
- OmniVibe.performHapticFeedbackLw(HapticFeedbackConstants.LONG_PRESS, false, mContext);
- dispatchMediaKeyWithWakeLockToAudioService(KeyEvent.KEYCODE_MEDIA_PREVIOUS);
- }
- return true;
- } else if (value.equals(AppSelectListPreference.VOLUME_UP_ENTRY)) {
- OmniVibe.performHapticFeedbackLw(HapticFeedbackConstants.LONG_PRESS, false, mContext);
- mAudioManager.adjustSuggestedStreamVolume(AudioManager.ADJUST_RAISE,AudioManager.USE_DEFAULT_STREAM_TYPE,AudioManager.FLAG_SHOW_UI);
- return true;
- } else if (value.equals(AppSelectListPreference.VOLUME_DOWN_ENTRY)) {
- OmniVibe.performHapticFeedbackLw(HapticFeedbackConstants.LONG_PRESS, false, mContext);
- mAudioManager.adjustSuggestedStreamVolume(AudioManager.ADJUST_LOWER,AudioManager.USE_DEFAULT_STREAM_TYPE,AudioManager.FLAG_SHOW_UI);
- return true;
- } else if (value.equals(AppSelectListPreference.BROWSE_SCROLL_DOWN_ENTRY)) {
- OmniVibe.performHapticFeedbackLw(HapticFeedbackConstants.LONG_PRESS, false, mContext);
- OmniUtils.sendKeycode(KeyEvent.KEYCODE_PAGE_DOWN);
- return true;
- } else if (value.equals(AppSelectListPreference.BROWSE_SCROLL_UP_ENTRY)) {
- OmniVibe.performHapticFeedbackLw(HapticFeedbackConstants.LONG_PRESS, false, mContext);
- OmniUtils.sendKeycode(KeyEvent.KEYCODE_PAGE_UP);
- return true;
- } else if (value.equals(AppSelectListPreference.NAVIGATE_BACK_ENTRY)) {
- OmniVibe.performHapticFeedbackLw(HapticFeedbackConstants.LONG_PRESS, false, mContext);
- OmniUtils.sendKeycode(KeyEvent.KEYCODE_BACK);
- return true;
- } else if (value.equals(AppSelectListPreference.NAVIGATE_HOME_ENTRY)) {
- OmniVibe.performHapticFeedbackLw(HapticFeedbackConstants.LONG_PRESS, false, mContext);
- OmniUtils.sendKeycode(KeyEvent.KEYCODE_HOME);
- return true;
- } else if (value.equals(AppSelectListPreference.NAVIGATE_RECENT_ENTRY)) {
- OmniVibe.performHapticFeedbackLw(HapticFeedbackConstants.LONG_PRESS, false, mContext);
- OmniUtils.sendKeycode(KeyEvent.KEYCODE_APP_SWITCH);
- return true;
- }
- return false;
- }
-
- private String getGestureValueForScanCode(int scanCode) {
- switch(scanCode) {
- case KEY_GESTURE_C:
- return Settings.System.getStringForUser(mContext.getContentResolver(),
- GestureSettings.DEVICE_GESTURE_MAPPING_0, UserHandle.USER_CURRENT);
- case KEY_GESTURE_E:
- return Settings.System.getStringForUser(mContext.getContentResolver(),
- GestureSettings.DEVICE_GESTURE_MAPPING_1, UserHandle.USER_CURRENT);
- case KEY_GESTURE_S:
- return Settings.System.getStringForUser(mContext.getContentResolver(),
- GestureSettings.DEVICE_GESTURE_MAPPING_2, UserHandle.USER_CURRENT);
- case KEY_GESTURE_V:
- return Settings.System.getStringForUser(mContext.getContentResolver(),
- GestureSettings.DEVICE_GESTURE_MAPPING_3, UserHandle.USER_CURRENT);
- case KEY_GESTURE_W:
- return Settings.System.getStringForUser(mContext.getContentResolver(),
- GestureSettings.DEVICE_GESTURE_MAPPING_4, UserHandle.USER_CURRENT);
- case KEY_GESTURE_Z:
- return Settings.System.getStringForUser(mContext.getContentResolver(),
- GestureSettings.DEVICE_GESTURE_MAPPING_5, UserHandle.USER_CURRENT);
- }
- return null;
- }
-
- private void launchDozePulse() {
- if (DEBUG) Log.i(TAG, "Doze pulse");
- mContext.sendBroadcastAsUser(new Intent(DOZE_INTENT),
- new UserHandle(UserHandle.USER_CURRENT));
- }
-
- private boolean enableProxiSensor() {
- return mUsePocketCheck || mUseWaveCheck || mUseProxiCheck;
- }
-
- private void updateDozeSettings() {
- String value = Settings.System.getStringForUser(mContext.getContentResolver(),
- Settings.System.OMNI_DEVICE_FEATURE_SETTINGS,
- UserHandle.USER_CURRENT);
- if (DEBUG) Log.i(TAG, "Doze settings = " + value);
- if (!TextUtils.isEmpty(value)) {
- String[] parts = value.split(":");
- mUseWaveCheck = Boolean.valueOf(parts[0]);
- mUsePocketCheck = Boolean.valueOf(parts[1]);
- mUseTiltCheck = Boolean.valueOf(parts[2]);
- }
- }
-
- 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;
- }
-
- IStatusBarService getStatusBarService() {
- return IStatusBarService.Stub.asInterface(ServiceManager.getService("statusbar"));
- }
-}
\ No newline at end of file
diff --git a/DeviceParts/src/org/omnirom/device/Startup.java b/DeviceParts/src/org/omnirom/device/Startup.java
deleted file mode 100644
index 051a742..0000000
--- a/DeviceParts/src/org/omnirom/device/Startup.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
-* Copyright (C) 2013 The OmniROM Project
-*
-* This program is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, either version 2 of the License, or
-* (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program. If not, see <http://www.gnu.org/licenses/>.
-*
-*/
-package org.omnirom.device;
-
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.Intent;
-import android.content.SharedPreferences;
-import android.os.SystemProperties;
-import androidx.preference.PreferenceManager;
-import android.provider.Settings;
-import android.text.TextUtils;
-
-public class Startup extends BroadcastReceiver {
- private static void restore(String file, boolean enabled) {
- if (file == null) {
- return;
- }
- Utils.writeValue(file, enabled ? "1" : "0");
- }
-
- private static void restore(String file, String value) {
- if (file == null) {
- return;
- }
- Utils.writeValue(file, value);
- }
-
- private static String getGestureFile(String key) {
- return GestureSettings.getGestureFile(key);
- }
-
- private void maybeImportOldSettings(Context context) {
- boolean imported = Settings.System.getInt(context.getContentResolver(), "omni_device_setting_imported", 0) != 0;
- if (!imported) {
- SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(context);
- boolean enabled = sharedPrefs.getBoolean(DeviceSettings.KEY_GLOVE_SWITCH, false);
- Settings.System.putInt(context.getContentResolver(), GloveModeSwitch.SETTINGS_KEY, enabled ? 1 : 0);
-
- Settings.System.putInt(context.getContentResolver(), "omni_device_setting_imported", 1);
- }
- }
-
- @Override
- public void onReceive(final Context context, final Intent bootintent) {
- maybeImportOldSettings(context);
- restoreAfterUserSwitch(context);
- }
-
- public static void restoreAfterUserSwitch(Context context) {
-
- // C Gesture
- String mapping = GestureSettings.DEVICE_GESTURE_MAPPING_0;
- String value = Settings.System.getString(context.getContentResolver(), mapping);
- if (TextUtils.isEmpty(value)) {
- value = AppSelectListPreference.DISABLED_ENTRY;
- Settings.System.putString(context.getContentResolver(), mapping, value);
- }
- boolean enabled = !value.equals(AppSelectListPreference.DISABLED_ENTRY);
- restore(GestureSettings.getGestureFile(GestureSettings.KEY_C_APP), enabled);
-
- // E Gesture
- mapping = GestureSettings.DEVICE_GESTURE_MAPPING_1;
- value = Settings.System.getString(context.getContentResolver(), mapping);
- if (TextUtils.isEmpty(value)) {
- value = AppSelectListPreference.DISABLED_ENTRY;
- Settings.System.putString(context.getContentResolver(), mapping, value);
- }
- enabled = !value.equals(AppSelectListPreference.DISABLED_ENTRY);
- restore(GestureSettings.getGestureFile(GestureSettings.KEY_E_APP), enabled);
-
- // S Gesture
- mapping = GestureSettings.DEVICE_GESTURE_MAPPING_2;
- value = Settings.System.getString(context.getContentResolver(), mapping);
- if (TextUtils.isEmpty(value)) {
- value = AppSelectListPreference.DISABLED_ENTRY;
- Settings.System.putString(context.getContentResolver(), mapping, value);
- }
- enabled = !TextUtils.isEmpty(value) && !value.equals(AppSelectListPreference.DISABLED_ENTRY);
- restore(GestureSettings.getGestureFile(GestureSettings.KEY_S_APP), enabled);
-
- // V Gesture
- mapping = GestureSettings.DEVICE_GESTURE_MAPPING_3;
- value = Settings.System.getString(context.getContentResolver(), mapping);
- if (TextUtils.isEmpty(value)) {
- value = AppSelectListPreference.DISABLED_ENTRY;
- Settings.System.putString(context.getContentResolver(), mapping, value);
- }
- enabled = !value.equals(AppSelectListPreference.DISABLED_ENTRY);
- restore(GestureSettings.getGestureFile(GestureSettings.KEY_V_APP), enabled);
-
- // W Gesture
- mapping = GestureSettings.DEVICE_GESTURE_MAPPING_4;
- value = Settings.System.getString(context.getContentResolver(), mapping);
- if (TextUtils.isEmpty(value)) {
- value = AppSelectListPreference.DISABLED_ENTRY;
- Settings.System.putString(context.getContentResolver(), mapping, value);
- }
- enabled = !value.equals(AppSelectListPreference.DISABLED_ENTRY);
- restore(GestureSettings.getGestureFile(GestureSettings.KEY_W_APP), enabled);
-
- // Z Gesture
- mapping = GestureSettings.DEVICE_GESTURE_MAPPING_5;
- value = Settings.System.getString(context.getContentResolver(), mapping);
- if (TextUtils.isEmpty(value)) {
- value = AppSelectListPreference.DISABLED_ENTRY;
- Settings.System.putString(context.getContentResolver(), mapping, value);
- }
- enabled = !value.equals(AppSelectListPreference.DISABLED_ENTRY);
- restore(GestureSettings.getGestureFile(GestureSettings.KEY_Z_APP), enabled);
-
- value = Settings.System.getString(context.getContentResolver(), DeviceSettings.TEMP_FPS);
- if (TextUtils.isEmpty(value)) {
- value = DeviceSettings.DEFAULT_FPS_VALUE;
- Settings.System.putString(context.getContentResolver(), DeviceSettings.TEMP_FPS, value);
- SystemProperties.set(DeviceSettings.VENDOR_FPS, value);
- } else {
- Settings.System.putString(context.getContentResolver(), DeviceSettings.TEMP_FPS, value);
- SystemProperties.set(DeviceSettings.VENDOR_FPS, value);
- }
-
- enabled = Settings.System.getInt(context.getContentResolver(), GloveModeSwitch.SETTINGS_KEY, 0) != 0;
- if (enabled) {
- restore(GloveModeSwitch.getFile(), enabled);
- }
-
- enabled = Settings.System.getInt(context.getContentResolver(), GestureSettings.SETTINGS_GESTURE_KEY, 0) != 0;
- restore(GestureSettings.getFile(), enabled);
- }
-}
diff --git a/DeviceParts/src/org/omnirom/device/Utils.java b/DeviceParts/src/org/omnirom/device/Utils.java
deleted file mode 100644
index 75f01f5..0000000
--- a/DeviceParts/src/org/omnirom/device/Utils.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
-* Copyright (C) 2013 The OmniROM Project
-*
-* This program is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, either version 2 of the License, or
-* (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program. If not, see <http://www.gnu.org/licenses/>.
-*
-*/
-package org.omnirom.device;
-
-import android.util.Log;
-
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.BufferedReader;
-import java.io.BufferedWriter;
-import java.io.FileReader;
-import java.io.FileWriter;
-
-public class Utils {
-
- /**
- * Write a string value to the specified file.
- * @param filename The filename
- * @param value The value
- */
- public static void writeValue(String filename, String value) {
- if (filename == null) {
- return;
- }
- try {
- FileOutputStream fos = new FileOutputStream(new File(filename));
- fos.write(value.getBytes());
- fos.flush();
- fos.close();
- } catch (FileNotFoundException e) {
- e.printStackTrace();
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
-
- /**
- * Check if the specified file exists.
- * @param filename The filename
- * @return Whether the file exists or not
- */
- public static boolean fileExists(String filename) {
- if (filename == null) {
- return false;
- }
- return new File(filename).exists();
- }
-
- public static boolean fileWritable(String filename) {
- return fileExists(filename) && new File(filename).canWrite();
- }
-
- public static String readLine(String filename) {
- if (filename == null) {
- return null;
- }
- BufferedReader br = null;
- String line = null;
- try {
- br = new BufferedReader(new FileReader(filename), 1024);
- line = br.readLine();
- } catch (IOException e) {
- return null;
- } finally {
- if (br != null) {
- try {
- br.close();
- } catch (IOException e) {
- // ignore
- }
- }
- }
- return line;
- }
-
- public static boolean getFileValueAsBoolean(String filename, boolean defValue) {
- String fileValue = readLine(filename);
- if(fileValue!=null){
- return (fileValue.equals("0")?false:true);
- }
- return defValue;
- }
-
- public static boolean getLineValueAsBoolean(String filename, boolean defValue) {
- String fileValue = readLine(filename);
- if(fileValue!=null){
- return (fileValue.equals("Glove Mode: Off")?false:true);
- }
- return defValue;
- }
-
- public static String getFileValue(String filename, String defValue) {
- String fileValue = readLine(filename);
- if(fileValue!=null){
- return fileValue;
- }
- return defValue;
- }
-
- /**
- * 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("Utils", "No such file " + fileName + " for writing", e);
- return false;
- } catch (IOException e) {
- Log.e("Utils", "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;
- }
-}
diff --git a/DeviceParts/src/org/omnirom/device/VolumeTile.java b/DeviceParts/src/org/omnirom/device/VolumeTile.java
deleted file mode 100644
index c2126eb..0000000
--- a/DeviceParts/src/org/omnirom/device/VolumeTile.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Copyright (C) 2020 The OmniROM 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.omnirom.device;
-
-import android.content.Context;
-import android.content.Intent;
-import android.graphics.drawable.Icon;
-import android.media.AudioManager;
-import android.service.quicksettings.Tile;
-import android.service.quicksettings.TileService;
-
-public class VolumeTile extends TileService {
- private AudioManager mAudioManager;
-
- @Override
- public void onDestroy() {
- super.onDestroy();
- }
-
- @Override
- public void onTileAdded() {
- super.onTileAdded();
- }
-
- @Override
- public void onTileRemoved() {
- super.onTileRemoved();
- }
-
- @Override
- public void onStartListening() {
- super.onStartListening();
- mAudioManager = (AudioManager) this.getSystemService(Context.AUDIO_SERVICE);
-
- switch (mAudioManager.getRingerModeInternal()) {
- case AudioManager.RINGER_MODE_SILENT:
- getQsTile().setIcon(Icon.createWithResource(this, R.drawable.ic_volume_ringer_mute));
- getQsTile().setLabel(getString(R.string.mute_mode));
- break;
- case AudioManager.RINGER_MODE_VIBRATE:
- getQsTile().setIcon(Icon.createWithResource(this, R.drawable.ic_volume_ringer_vibrate));
- getQsTile().setLabel(getString(R.string.vibrate_mode));
- break;
- case AudioManager.RINGER_MODE_NORMAL:
- getQsTile().setIcon(Icon.createWithResource(this, R.drawable.ic_volume_ringer));
- getQsTile().setLabel(getString(R.string.volume_mode));
- break;
- }
- getQsTile().setState(Tile.STATE_ACTIVE);
- getQsTile().updateTile();
- }
-
- @Override
- public void onStopListening() {
- super.onStopListening();
- }
-
- @Override
- public void onClick() {
- super.onClick();
- mAudioManager = (AudioManager) this.getSystemService(Context.AUDIO_SERVICE);
-
- switch (mAudioManager.getRingerModeInternal()) {
- case AudioManager.RINGER_MODE_SILENT:
- mAudioManager.setRingerModeInternal(AudioManager.RINGER_MODE_NORMAL);
- getQsTile().setIcon(Icon.createWithResource(this, R.drawable.ic_volume_ringer));
- getQsTile().setLabel(getString(R.string.volume_mode));
- break;
- case AudioManager.RINGER_MODE_VIBRATE:
- mAudioManager.setRingerModeInternal(AudioManager.RINGER_MODE_SILENT);
- getQsTile().setIcon(Icon.createWithResource(this, R.drawable.ic_volume_ringer_mute));
- getQsTile().setLabel(getString(R.string.mute_mode));
- break;
- case AudioManager.RINGER_MODE_NORMAL:
- mAudioManager.setRingerModeInternal(AudioManager.RINGER_MODE_VIBRATE);
- getQsTile().setIcon(Icon.createWithResource(this, R.drawable.ic_volume_ringer_vibrate));
- getQsTile().setLabel(getString(R.string.vibrate_mode));
- break;
- }
- getQsTile().updateTile();
- }
-
-}
\ No newline at end of file
diff --git a/FrameworksResOverlay/Android.mk b/FrameworksResOverlay/Android.mk
deleted file mode 100644
index 2aa141d..0000000
--- a/FrameworksResOverlay/Android.mk
+++ /dev/null
@@ -1,8 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-include $(CLEAR_VARS)
-LOCAL_MODULE_TAGS := optional
-LOCAL_PACKAGE_NAME := FrameworksResOverlay
-LOCAL_MODULE_PATH := $(TARGET_OUT_PRODUCT)/overlay
-LOCAL_IS_RUNTIME_RESOURCE_OVERLAY := true
-LOCAL_PRIVATE_PLATFORM_APIS := true
-include $(BUILD_PACKAGE)
\ No newline at end of file
diff --git a/FrameworksResOverlay/AndroidManifest.xml b/FrameworksResOverlay/AndroidManifest.xml
deleted file mode 100644
index fbdbd31..0000000
--- a/FrameworksResOverlay/AndroidManifest.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="android.frameworks.overlay"
- android:versionCode="1"
- android:versionName="1.0">
- <overlay android:isStatic="true" android:priority="140" android:targetPackage="android"/>
-</manifest>
\ No newline at end of file
diff --git a/FrameworksResOverlay/res/values/bools.xml b/FrameworksResOverlay/res/values/bools.xml
deleted file mode 100644
index 455b2ca..0000000
--- a/FrameworksResOverlay/res/values/bools.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<resources>
- <bool name="config_enableMultiUserUI">true</bool>
-</resources>
diff --git a/FrameworksResOverlay/res/values/integers.xml b/FrameworksResOverlay/res/values/integers.xml
deleted file mode 100644
index 87cf27d..0000000
--- a/FrameworksResOverlay/res/values/integers.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<resources>
- <integer name="config_multiuserMaximumUsers">4</integer>
-
- <!-- Screen brightness when dozing -->
- <integer name="config_screenBrightnessDoze">6</integer>
-
- <!-- List supported color modes. -->
- <integer-array name="config_availableColorModes">
- <item>0</item> <!-- COLOR_MODE_NATURAL -->
- <item>1</item> <!-- COLOR_MODE_BOOSTED -->
- <item>2</item> <!-- COLOR_MODE_SATURATED -->
- <item>3</item> <!-- COLOR_MODE_AUTOMATIC -->
- </integer-array>
-
- <!-- Minimum screen brightness setting allowed by the power manager.
- The user is forbidden from setting the brightness below this level. -->
- <integer name="config_screenBrightnessSettingMinimum">2</integer>
-
- <!-- Default screen brightness setting.
- Must be in the range specified by minimum and maximum. -->
- <integer name="config_screenBrightnessSettingDefault">46</integer>
-</resources>
diff --git a/audio/audio_policy_configuration.xml b/audio/audio_policy_configuration_ZS661KS.xml
similarity index 94%
rename from audio/audio_policy_configuration.xml
rename to audio/audio_policy_configuration_ZS661KS.xml
index 843a744..d8da94e 100644
--- a/audio/audio_policy_configuration.xml
+++ b/audio/audio_policy_configuration_ZS661KS.xml
@@ -60,7 +60,7 @@
<defaultOutputDevice>Speaker</defaultOutputDevice>
<mixPorts>
<mixPort name="primary output" role="source" flags="AUDIO_OUTPUT_FLAG_FAST|AUDIO_OUTPUT_FLAG_PRIMARY">
- <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ <profile name="" format="AUDIO_FORMAT_PCM_32_BIT"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
</mixPort>
<mixPort name="raw" role="source"
@@ -146,12 +146,6 @@
samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000,64000,88200,96000"
channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_MONO"/>
</mixPort>
- <mixPort name="dsd_compress_passthrough" role="source"
- flags="AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD|AUDIO_OUTPUT_FLAG_NON_BLOCKING">
- <profile name="" format="AUDIO_FORMAT_DSD"
- samplingRates="2822400,5644800"
- channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_MONO"/>
- </mixPort>
<mixPort name="voice_tx" role="source">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="8000,16000,48000" channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO"/>
@@ -210,6 +204,17 @@
channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK,AUDIO_CHANNEL_INDEX_MASK_3"/>
</mixPort>
<mixPort name="hifi_input" role="sink" />
+ <mixPort name="fast input" role="sink"
+ flags="AUDIO_INPUT_FLAG_FAST">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
+ channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK"/>
+ </mixPort>
+ <mixPort name="quad mic" role="sink">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="48000"
+ channelMasks="AUDIO_CHANNEL_INDEX_MASK_4"/>
+ </mixPort>
</mixPorts>
<devicePorts>
@@ -328,11 +333,11 @@
<route type="mix" sink="Speaker"
sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload,voip_rx,mmap_no_irq_out"/>
<route type="mix" sink="Wired Headset"
- sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload,dsd_compress_passthrough,voip_rx,mmap_no_irq_out"/>
+ sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload,voip_rx,mmap_no_irq_out"/>
<route type="mix" sink="Wired Headphones"
- sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload,dsd_compress_passthrough,voip_rx,mmap_no_irq_out"/>
+ sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload,voip_rx,mmap_no_irq_out"/>
<route type="mix" sink="Line"
- sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload,dsd_compress_passthrough,voip_rx,mmap_no_irq_out"/>
+ sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload,voip_rx,mmap_no_irq_out"/>
<route type="mix" sink="HDMI"
sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload,compress_passthrough,voip_rx"/>
<route type="mix" sink="Proxy"
@@ -354,13 +359,13 @@
<route type="mix" sink="voice_rx"
sources="Telephony Rx"/>
<route type="mix" sink="primary input"
- sources="Wired Headset Mic,BT SCO Headset Mic,FM Tuner,USB Device In,USB Headset In,Telephony Rx"/>
- <route type="mix" sink="voip_tx"
- sources="Built-In Mic,Built-In Back Mic,BT SCO Headset Mic,USB Device In,USB Headset In"/>
+ sources="Wired Headset Mic,BT SCO Headset Mic,FM Tuner,Telephony Rx"/>
<route type="mix" sink="usb_surround_sound"
sources="USB Device In,USB Headset In"/>
+ <route type="mix" sink="voip_tx"
+ sources="Built-In Mic,Built-In Back Mic,BT SCO Headset Mic,USB Device In,USB Headset In,Wired Headset Mic"/>
<route type="mix" sink="record_24"
- sources="Built-In Mic,Built-In Back Mic,Wired Headset Mic"/>
+ sources="Built-In Mic,Built-In Back Mic,Wired Headset Mic,BT SCO Headset Mic"/>
<route type="mix" sink="mmap_no_irq_in"
sources="Built-In Mic,Built-In Back Mic,Wired Headset Mic,USB Device In,USB Headset In"/>
<route type="mix" sink="BT A2DP Out"
@@ -370,6 +375,10 @@
<route type="mix" sink="BT A2DP Speaker"
sources="primary output,deep_buffer,direct_pcm,compressed_offload,voip_rx"/>
<route type="mix" sink="hifi_input" sources="USB Device In,USB Headset In" />
+ <route type="mix" sink="fast input"
+ sources="Built-In Mic,Built-In Back Mic,BT SCO Headset Mic,USB Device In,USB Headset In,Wired Headset Mic"/>
+ <route type="mix" sink="quad mic"
+ sources="Built-In Mic,Built-In Back Mic,BT SCO Headset Mic,USB Device In,USB Headset In,Wired Headset Mic"/>
</routes>
</module>
@@ -417,15 +426,15 @@
</module>
<!-- Remote Submix Audio HAL -->
- <xi:include href="/vendor/etc/r_submix_audio_policy_configuration_ZS660KL_24bit.xml"/>
+ <xi:include href="/vendor/etc/r_submix_audio_policy_configuration_ZS661KS.xml"/>
</modules>
<!-- End of Modules section -->
<!-- Volume section -->
- <xi:include href="/vendor/etc/audio_policy_volumes_ZS660KL.xml"/>
- <xi:include href="/vendor/etc/default_volume_tables_ZS660KL.xml"/>
+ <xi:include href="/vendor/etc/audio_policy_volumes_ZS661KS.xml"/>
+ <xi:include href="/vendor/etc/default_volume_tables_ZS661KS.xml"/>
<!-- End of Volume section -->
diff --git a/audio/audio_policy_volumes_ZS660KL.xml b/audio/audio_policy_volumes_ZS661KS.xml
similarity index 87%
rename from audio/audio_policy_volumes_ZS660KL.xml
rename to audio/audio_policy_volumes_ZS661KS.xml
index c4dfe11..0a1f0ed 100644
--- a/audio/audio_policy_volumes_ZS660KL.xml
+++ b/audio/audio_policy_volumes_ZS661KS.xml
@@ -59,6 +59,12 @@
<point>66,-1400</point>
<point>100,0</point>
</volume>
+ <volume stream="AUDIO_STREAM_VOICE_CALL" deviceCategory="DEVICE_CATEGORY_ACCY_EU">
+ <point>0,-4200</point>
+ <point>33,-2800</point>
+ <point>66,-1400</point>
+ <point>100,0</point>
+ </volume>
<volume stream="AUDIO_STREAM_VOICE_CALL" deviceCategory="DEVICE_CATEGORY_EXT_MEDIA"
ref="DEFAULT_MEDIA_VOLUME_CURVE"/>
<volume stream="AUDIO_STREAM_VOICE_CALL" deviceCategory="DEVICE_CATEGORY_HEARING_AID"
@@ -70,10 +76,10 @@
<point>100,-1800</point>
</volume>
<volume stream="AUDIO_STREAM_SYSTEM" deviceCategory="DEVICE_CATEGORY_SPEAKER">
- <point>1,-3600</point>
- <point>33,-2800</point>
- <point>66,-2000</point>
- <point>100,-1200</point>
+ <point>1,-3900</point>
+ <point>33,-3100</point>
+ <point>66,-2300</point>
+ <point>100,-1500</point>
</volume>
<volume stream="AUDIO_STREAM_SYSTEM" deviceCategory="DEVICE_CATEGORY_EARPIECE"
ref="DEFAULT_SYSTEM_VOLUME_CURVE"/>
@@ -95,6 +101,12 @@
<point>66,-3200</point>
<point>100,-2400</point>
</volume>
+ <volume stream="AUDIO_STREAM_SYSTEM" deviceCategory="DEVICE_CATEGORY_ACCY_EU">
+ <point>1,-4800</point>
+ <point>33,-4000</point>
+ <point>66,-3200</point>
+ <point>100,-2400</point>
+ </volume>
<volume stream="AUDIO_STREAM_SYSTEM" deviceCategory="DEVICE_CATEGORY_EXT_MEDIA"
ref="DEFAULT_DEVICE_CATEGORY_EXT_MEDIA_VOLUME_CURVE"/>
<volume stream="AUDIO_STREAM_SYSTEM" deviceCategory="DEVICE_CATEGORY_HEARING_AID"
@@ -106,9 +118,9 @@
<point>100,0</point>
</volume>
<volume stream="AUDIO_STREAM_RING" deviceCategory="DEVICE_CATEGORY_SPEAKER">
- <point>1,-4800</point>
- <point>33,-3200</point>
- <point>66,-1600</point>
+ <point>1,-3900</point>
+ <point>33,-2600</point>
+ <point>66,-1300</point>
<point>100,0</point>
</volume>
<volume stream="AUDIO_STREAM_RING" deviceCategory="DEVICE_CATEGORY_EARPIECE"
@@ -131,6 +143,12 @@
<point>66,-1700</point>
<point>100,0</point>
</volume>
+ <volume stream="AUDIO_STREAM_RING" deviceCategory="DEVICE_CATEGORY_ACCY_EU">
+ <point>1,-4950</point>
+ <point>33,-3350</point>
+ <point>66,-1700</point>
+ <point>100,0</point>
+ </volume>
<volume stream="AUDIO_STREAM_RING" deviceCategory="DEVICE_CATEGORY_EXT_MEDIA"
ref="DEFAULT_DEVICE_CATEGORY_EXT_MEDIA_VOLUME_CURVE"/>
<volume stream="AUDIO_STREAM_RING" deviceCategory="DEVICE_CATEGORY_HEARING_AID"
@@ -167,6 +185,12 @@
<point>66,-2500</point>
<point>100,0</point>
</volume>
+ <volume stream="AUDIO_STREAM_MUSIC" deviceCategory="DEVICE_CATEGORY_ACCY_EU">
+ <point>1,-7305</point>
+ <point>33,-5155</point>
+ <point>66,-2930</point>
+ <point>100,-730</point>
+ </volume>
<volume stream="AUDIO_STREAM_MUSIC" deviceCategory="DEVICE_CATEGORY_EXT_MEDIA"
ref="DEFAULT_MEDIA_VOLUME_CURVE"/>
<volume stream="AUDIO_STREAM_MUSIC" deviceCategory="DEVICE_CATEGORY_HEARING_AID"
@@ -178,9 +202,9 @@
<point>100,0</point>
</volume>
<volume stream="AUDIO_STREAM_ALARM" deviceCategory="DEVICE_CATEGORY_SPEAKER">
- <point>1,-4500</point>
- <point>33,-3000</point>
- <point>66,-1500</point>
+ <point>1,-3600</point>
+ <point>33,-2400</point>
+ <point>66,-1200</point>
<point>100,0</point>
</volume>
<volume stream="AUDIO_STREAM_ALARM" deviceCategory="DEVICE_CATEGORY_EARPIECE"
@@ -203,6 +227,12 @@
<point>66,-1700</point>
<point>100,0</point>
</volume>
+ <volume stream="AUDIO_STREAM_ALARM" deviceCategory="DEVICE_CATEGORY_ACCY_EU">
+ <point>1,-4950</point>
+ <point>33,-3350</point>
+ <point>66,-1700</point>
+ <point>100,0</point>
+ </volume>
<volume stream="AUDIO_STREAM_ALARM" deviceCategory="DEVICE_CATEGORY_EXT_MEDIA"
ref="DEFAULT_NON_MUTABLE_EXT_VOLUME_CURVE"/>
<volume stream="AUDIO_STREAM_ALARM" deviceCategory="DEVICE_CATEGORY_HEARING_AID"
@@ -214,9 +244,9 @@
<point>100,-1800</point>
</volume>
<volume stream="AUDIO_STREAM_NOTIFICATION" deviceCategory="DEVICE_CATEGORY_SPEAKER">
- <point>1,-4200</point>
- <point>33,-3100</point>
- <point>66,-2000</point>
+ <point>1,-3900</point>
+ <point>33,-2900</point>
+ <point>66,-1900</point>
<point>100,-900</point>
</volume>
<volume stream="AUDIO_STREAM_NOTIFICATION" deviceCategory="DEVICE_CATEGORY_EARPIECE"
@@ -239,6 +269,12 @@
<point>66,-3600</point>
<point>100,-2400</point>
</volume>
+ <volume stream="AUDIO_STREAM_NOTIFICATION" deviceCategory="DEVICE_CATEGORY_ACCY_EU">
+ <point>1,-6000</point>
+ <point>33,-4800</point>
+ <point>66,-3600</point>
+ <point>100,-2400</point>
+ </volume>
<volume stream="AUDIO_STREAM_NOTIFICATION" deviceCategory="DEVICE_CATEGORY_EXT_MEDIA"
ref="DEFAULT_DEVICE_CATEGORY_EXT_MEDIA_VOLUME_CURVE"/>
<volume stream="AUDIO_STREAM_NOTIFICATION" deviceCategory="DEVICE_CATEGORY_HEARING_AID"
@@ -279,6 +315,12 @@
<point>66,-1400</point>
<point>100,0</point>
</volume>
+ <volume stream="AUDIO_STREAM_BLUETOOTH_SCO" deviceCategory="DEVICE_CATEGORY_ACCY_EU">
+ <point>0,-4200</point>
+ <point>33,-2800</point>
+ <point>66,-1400</point>
+ <point>100,0</point>
+ </volume>
<volume stream="AUDIO_STREAM_BLUETOOTH_SCO" deviceCategory="DEVICE_CATEGORY_EXT_MEDIA"
ref="DEFAULT_MEDIA_VOLUME_CURVE"/>
<volume stream="AUDIO_STREAM_BLUETOOTH_SCO" deviceCategory="DEVICE_CATEGORY_HEARING_AID"
@@ -311,6 +353,12 @@
<point>66,-2200</point>
<point>100,-1800</point>
</volume>
+ <volume stream="AUDIO_STREAM_ENFORCED_AUDIBLE" deviceCategory="DEVICE_CATEGORY_ACCY_EU">
+ <point>1,-3000</point>
+ <point>33,-2600</point>
+ <point>66,-2200</point>
+ <point>100,-1800</point>
+ </volume>
<volume stream="AUDIO_STREAM_ENFORCED_AUDIBLE" deviceCategory="DEVICE_CATEGORY_EXT_MEDIA"
ref="DEFAULT_DEVICE_CATEGORY_EXT_MEDIA_VOLUME_CURVE"/>
<volume stream="AUDIO_STREAM_ENFORCED_AUDIBLE" deviceCategory="DEVICE_CATEGORY_HEARING_AID"
@@ -322,10 +370,10 @@
<point>100,-2400</point>
</volume>
<volume stream="AUDIO_STREAM_DTMF" deviceCategory="DEVICE_CATEGORY_SPEAKER">
- <point>1,-4800</point>
- <point>33,-4000</point>
- <point>66,-3200</point>
- <point>100,-2400</point>
+ <point>1,-4900</point>
+ <point>33,-4100</point>
+ <point>66,-3300</point>
+ <point>100,-2500</point>
</volume>
<volume stream="AUDIO_STREAM_DTMF" deviceCategory="DEVICE_CATEGORY_EARPIECE"
ref="DEFAULT_SYSTEM_VOLUME_CURVE"/>
@@ -347,6 +395,12 @@
<point>66,-3600</point>
<point>100,-3000</point>
</volume>
+ <volume stream="AUDIO_STREAM_DTMF" deviceCategory="DEVICE_CATEGORY_ACCY_EU">
+ <point>1,-4800</point>
+ <point>33,-4200</point>
+ <point>66,-3600</point>
+ <point>100,-3000</point>
+ </volume>
<volume stream="AUDIO_STREAM_DTMF" deviceCategory="DEVICE_CATEGORY_EXT_MEDIA"
ref="DEFAULT_DEVICE_CATEGORY_EXT_MEDIA_VOLUME_CURVE"/>
<volume stream="AUDIO_STREAM_DTMF" deviceCategory="DEVICE_CATEGORY_HEARING_AID"
@@ -363,6 +417,8 @@
ref="SILENT_VOLUME_CURVE"/>
<volume stream="AUDIO_STREAM_TTS" deviceCategory="DEVICE_CATEGORY_USB_HEADSET"
ref="SILENT_VOLUME_CURVE"/>
+ <volume stream="AUDIO_STREAM_TTS" deviceCategory="DEVICE_CATEGORY_ACCY_EU"
+ ref="SILENT_VOLUME_CURVE"/>
<volume stream="AUDIO_STREAM_TTS" deviceCategory="DEVICE_CATEGORY_EXT_MEDIA"
ref="SILENT_VOLUME_CURVE"/>
<volume stream="AUDIO_STREAM_TTS" deviceCategory="DEVICE_CATEGORY_HEARING_AID"
@@ -379,6 +435,8 @@
ref="DEFAULT_NON_MUTABLE_VOLUME_CURVE"/>
<volume stream="AUDIO_STREAM_ACCESSIBILITY" deviceCategory="DEVICE_CATEGORY_USB_HEADSET"
ref="DEFAULT_NON_MUTABLE_VOLUME_CURVE"/>
+ <volume stream="AUDIO_STREAM_ACCESSIBILITY" deviceCategory="DEVICE_CATEGORY_ACCY_EU"
+ ref="DEFAULT_NON_MUTABLE_VOLUME_CURVE"/>
<volume stream="AUDIO_STREAM_ACCESSIBILITY" deviceCategory="DEVICE_CATEGORY_EXT_MEDIA"
ref="DEFAULT_NON_MUTABLE_VOLUME_CURVE"/>
<volume stream="AUDIO_STREAM_ACCESSIBILITY" deviceCategory="DEVICE_CATEGORY_HEARING_AID"
@@ -395,6 +453,8 @@
ref="FULL_SCALE_VOLUME_CURVE"/>
<volume stream="AUDIO_STREAM_REROUTING" deviceCategory="DEVICE_CATEGORY_USB_HEADSET"
ref="FULL_SCALE_VOLUME_CURVE"/>
+ <volume stream="AUDIO_STREAM_REROUTING" deviceCategory="DEVICE_CATEGORY_ACCY_EU"
+ ref="FULL_SCALE_VOLUME_CURVE"/>
<volume stream="AUDIO_STREAM_REROUTING" deviceCategory="DEVICE_CATEGORY_EXT_MEDIA"
ref="FULL_SCALE_VOLUME_CURVE"/>
<volume stream="AUDIO_STREAM_REROUTING" deviceCategory="DEVICE_CATEGORY_HEARING_AID"
@@ -411,6 +471,8 @@
ref="FULL_SCALE_VOLUME_CURVE"/>
<volume stream="AUDIO_STREAM_PATCH" deviceCategory="DEVICE_CATEGORY_USB_HEADSET"
ref="FULL_SCALE_VOLUME_CURVE"/>
+ <volume stream="AUDIO_STREAM_PATCH" deviceCategory="DEVICE_CATEGORY_ACCY_EU"
+ ref="FULL_SCALE_VOLUME_CURVE"/>
<volume stream="AUDIO_STREAM_PATCH" deviceCategory="DEVICE_CATEGORY_EXT_MEDIA"
ref="FULL_SCALE_VOLUME_CURVE"/>
<volume stream="AUDIO_STREAM_PATCH" deviceCategory="DEVICE_CATEGORY_HEARING_AID"
diff --git a/bluetooth/bdroid_buildcfg.h b/bluetooth/bdroid_buildcfg.h
index 193ac05..17fcb60 100644
--- a/bluetooth/bdroid_buildcfg.h
+++ b/bluetooth/bdroid_buildcfg.h
@@ -21,7 +21,7 @@
#ifndef _BDROID_BUILDCFG_H
#define _BDROID_BUILDCFG_H
-#define BTM_DEF_LOCAL_NAME "ROG Phone 2"
+#define BTM_DEF_LOCAL_NAME "ROG Phone 3"
// Disables read remote device feature
#define MAX_ACL_CONNECTIONS 16
#define MAX_L2CAP_CHANNELS 16
diff --git a/bootctrl/Android.bp b/bootctrl/Android.bp
deleted file mode 100644
index 963dc6b..0000000
--- a/bootctrl/Android.bp
+++ /dev/null
@@ -1,21 +0,0 @@
-//
-// Copyright (C) 2018 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-
-cc_library {
- name: "bootctrl.msmnile",
- defaults: ["bootctrl_hal_defaults"],
- static_libs: ["libgptutils.asus_msmnile"],
-}
diff --git a/config.fs b/config.fs
deleted file mode 100644
index 457a8e8..0000000
--- a/config.fs
+++ /dev/null
@@ -1,5 +0,0 @@
-[system/product/vendor_overlay/*/bin/*]
-mode: 0755
-user: AID_ROOT
-group: AID_SHELL
-caps: 0
\ No newline at end of file
diff --git a/configs/excluded-input-devices.xml b/configs/excluded-input-devices.xml
deleted file mode 100644
index 32aac2c..0000000
--- a/configs/excluded-input-devices.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (c) 2018 The Linux Foundation. All rights reserved. -->
-<!-- -->
-<!-- Redistribution and use in source and binary forms, with or without -->
-<!-- modification, are permitted provided that the following conditions are -->
-<!-- met: -->
-<!-- * Redistributions of source code must retain the above copyright -->
-<!-- notice, this list of conditions and the following disclaimer. -->
-<!-- * Redistributions in binary form must reproduce the above -->
-<!-- copyright notice, this list of conditions and the following -->
-<!-- disclaimer in the documentation and/or other materials provided -->
-<!-- with the distribution. -->
-<!-- * Neither the name of The Linux Foundation nor the names of its -->
-<!-- contributors may be used to endorse or promote products derived -->
-<!-- from this software without specific prior written permission. -->
-<!-- -->
-<!-- THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED -->
-<!-- WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -->
-<!-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT -->
-<!-- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS -->
-<!-- BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -->
-<!-- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -->
-<!-- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -->
-<!-- BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -->
-<!-- WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -->
-<!-- OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -->
-<!-- IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -->
-<devices>
- <device name="qti-haptics"/>
-</devices>
diff --git a/device.mk b/device.mk
index 27489ca..b9d3439 100755
--- a/device.mk
+++ b/device.mk
@@ -19,195 +19,37 @@
# device-specific aspects (drivers) with a device-agnostic
# product configuration (apps).
#
-$(call inherit-product, vendor/asus/rog2/rog2-vendor.mk)
-$(call inherit-product-if-exists, vendor/gapps/arm64/arm64-vendor.mk)
-# Enable updating of APEXes
-$(call inherit-product, $(SRC_TARGET_DIR)/product/updatable_apex.mk)
+# VNDK
+PRODUCT_TARGET_VNDK_VERSION := 29
# Overlays
DEVICE_PACKAGE_OVERLAYS += \
- $(LOCAL_PATH)/overlay \
- vendor/omni/overlay/CarrierConfig
-
-# A/B
-AB_OTA_UPDATER := true
-
-AB_OTA_PARTITIONS += \
- boot \
- dtbo \
- system \
- vbmeta
-
-AB_OTA_POSTINSTALL_CONFIG += \
- RUN_POSTINSTALL_system=true \
- POSTINSTALL_PATH_system=system/bin/omnipreopt_script \
- FILESYSTEM_TYPE_system=ext4 \
- POSTINSTALL_OPTIONAL_system=true
-
-PRODUCT_PACKAGES += \
- omnipreopt_script
-
-# ANT+
-PRODUCT_PACKAGES += \
- AntHalService
+ $(LOCAL_PATH)/overlay
# Api
-PRODUCT_SHIPPING_API_LEVEL := 28
+PRODUCT_SHIPPING_API_LEVEL := 29
# audio
PRODUCT_COPY_FILES += \
- $(LOCAL_PATH)/audio/audio_policy_configuration.xml:$(TARGET_COPY_OUT_PRODUCT)/vendor_overlay/29/etc/audio/audio_policy_configuration.xml \
- $(LOCAL_PATH)/audio/audio_policy_configuration.xml:$(TARGET_COPY_OUT_PRODUCT)/vendor_overlay/29/etc/audio_policy_configuration.xml \
- $(LOCAL_PATH)/audio/audio_policy_volumes_ZS660KL.xml:$(TARGET_COPY_OUT_PRODUCT)/vendor_overlay/29/etc/audio_policy_volumes_ZS660KL.xml
-
-# Boot control
-PRODUCT_PACKAGES += \
- android.hardware.boot@1.0-impl.recovery \
- bootctrl.msmnile.recovery
-
-PRODUCT_PACKAGES_DEBUG += \
- bootctl
-
-# Charger images
-PRODUCT_PACKAGES += \
- omni_charger_res_images \
- animation.txt \
- font_charger.png
-
-# DeviceParts
-PRODUCT_PACKAGES += \
- DeviceParts \
- OmniDisplayManager
-
-# Display
-PRODUCT_PACKAGES += \
- libdisplayconfig \
- libqdMetaData \
- libqdMetaData.system \
- libion \
- libtinyxml2
-
-PRODUCT_PACKAGES += \
- libtinyalsa
-
-# Exclude vibrator from InputManager
-PRODUCT_COPY_FILES += \
- $(LOCAL_PATH)/configs/excluded-input-devices.xml:system/etc/excluded-input-devices.xml
-
-# FM
-PRODUCT_PACKAGES += \
- FM2 \
- libqcomfm_jni \
- qcom.fmradio
-
-PRODUCT_BOOT_JARS += qcom.fmradio
-
-# Fingerprint
-PRODUCT_PACKAGES += \
- omni.biometrics.fingerprint.inscreen@1.0-service.asus_msmnile
-
-# Frameworks
-PRODUCT_PACKAGES += \
- FrameworksResOverlay
-
-# Init
-PRODUCT_PACKAGES += \
- libinit_rog2
-
-# Input
-PRODUCT_COPY_FILES += \
- $(LOCAL_PATH)/idc/goodix_ts.idc:system/usr/idc/goodix_ts.idc \
- $(LOCAL_PATH)/idc/goodix_ts_station.idc:system/usr/idc/goodix_ts_station.idc \
- $(LOCAL_PATH)/keychars/goodix_ts.kcm:system/usr/keychars/goodix_ts.kcm \
- $(LOCAL_PATH)/keylayout/goodix_ts.kl:system/usr/keylayout/goodix_ts.kl
-
-# Live Wallpapers
-PRODUCT_PACKAGES += \
- LiveWallpapers \
- LiveWallpapersPicker \
- VisualizationWallpapers \
- librs_jni
-
-# Lights
-PRODUCT_PACKAGES += \
- android.hardware.light@2.0-service.asus_msmnile
-
-# NFC - NQ (NXP)
-#PRODUCT_PACKAGES += \
- Tag \
- com.android.nfc_extras
-
-#PRODUCT_PACKAGES += \
- android.hardware.nfc@1.1 \
- android.hardware.nfc@1.0
+ $(LOCAL_PATH)/audio/audio_policy_configuration_ZS661KS.xml:$(TARGET_COPY_OUT_PRODUCT)/vendor_overlay/$(PRODUCT_TARGET_VNDK_VERSION)/etc/audio/audio_policy_configuration.xml \
+ $(LOCAL_PATH)/audio/audio_policy_configuration_ZS661KS.xml:$(TARGET_COPY_OUT_PRODUCT)/vendor_overlay/$(PRODUCT_TARGET_VNDK_VERSION)/etc/audio_policy_configuration.xml \
+ $(LOCAL_PATH)/audio/audio_policy_volumes_ZS661KS.xml:$(TARGET_COPY_OUT_PRODUCT)/vendor_overlay/$(PRODUCT_TARGET_VNDK_VERSION)/etc/audio_policy_volumes_ZS661KS.xml
# Prebuilt
PRODUCT_COPY_FILES += \
- $(call find-copy-subdir-files,*,device/asus/rog2/prebuilt/system,system) \
- $(call find-copy-subdir-files,*,device/asus/rog2/prebuilt/root,root)
+ $(call find-copy-subdir-files,*,device/asus/rog3/prebuilt/system,system) \
+ $(call find-copy-subdir-files,*,device/asus/rog3/prebuilt/root,root)
PRODUCT_AAPT_CONFIG := normal
PRODUCT_AAPT_PREF_CONFIG := xxhdpi
-# Properties
-BOARD_PROPERTY_OVERRIDES_SPLIT_ENABLED := true
-
-# Netutils
-PRODUCT_PACKAGES += \
- netutils-wrapper-1.0 \
- libandroid_net
-
-PRODUCT_PACKAGES += \
- vndk_package
-
-PRODUCT_PACKAGES += \
- android.hidl.base@1.0
-
-PRODUCT_PACKAGES += \
- vendor.display.config@1.5
-
-# Remove unwanted packages
-PRODUCT_PACKAGES += \
- RemovePackages
-
# Soong namespaces
PRODUCT_SOONG_NAMESPACES += \
$(LOCAL_PATH)
-# Telephony
-PRODUCT_PACKAGES += \
- ims-ext-common \
- ims_ext_common.xml \
- qti-telephony-hidl-wrapper \
- qti_telephony_hidl_wrapper.xml \
- qti-telephony-utils \
- qti_telephony_utils.xml \
- tcmiface
+# Inherit from asus sm8250-common
+$(call inherit-product, device/asus/sm8250-common/common.mk)
-# Update engine
-PRODUCT_PACKAGES += \
- otapreopt_script \
- update_engine \
- update_engine_sideload \
- update_verifier
-
-PRODUCT_HOST_PACKAGES += \
- brillo_update_payload
-
-PRODUCT_PACKAGES_DEBUG += \
- update_engine_client
-
-# Vibrator
-PRODUCT_PACKAGES += \
- android.hardware.vibrator@1.2-service.rog2
-
-PRODUCT_COPY_FILES += \
- $(LOCAL_PATH)/vintf/manifest.xml:$(TARGET_COPY_OUT_PRODUCT)/vendor_overlay/29/etc/vintf/manifest.xml
-
-# VNDK
-PRODUCT_TARGET_VNDK_VERSION := 29
-
-# WiFi Display
-PRODUCT_PACKAGES += \
- libnl
+# Inherit from vendor blobs
+$(call inherit-product, vendor/asus/rog3/rog3-vendor.mk)
\ No newline at end of file
diff --git a/extract-files.sh b/extract-files.sh
index 642f25e..242b524 100755
--- a/extract-files.sh
+++ b/extract-files.sh
@@ -18,48 +18,11 @@
set -e
-DEVICE=rog2
-VENDOR=asus
+# Required!
+export DEVICE=rog3
+export DEVICE_COMMON=sm8250-common
+export VENDOR=asus
-# Load extractutils and do some sanity checks
-MY_DIR="${BASH_SOURCE%/*}"
-if [[ ! -d "$MY_DIR" ]]; then MY_DIR="$PWD"; fi
+export DEVICE_BRINGUP_YEAR=2020
-CM_ROOT="$MY_DIR"/../../..
-
-HELPER="$CM_ROOT"/vendor/omni/build/tools/extract_utils.sh
-if [ ! -f "$HELPER" ]; then
- echo "Unable to find helper script at $HELPER"
- exit 1
-fi
-. "$HELPER"
-
-# Default to sanitizing the vendor folder before extraction
-CLEAN_VENDOR=true
-
-while [ "$1" != "" ]; do
- case $1 in
- -p | --path ) shift
- SRC=$1
- ;;
- -s | --section ) shift
- SECTION=$1
- CLEAN_VENDOR=false
- ;;
- -n | --no-cleanup ) CLEAN_VENDOR=false
- ;;
- esac
- shift
-done
-
-if [ -z "$SRC" ]; then
- SRC=adb
-fi
-
-# Initialize the helper
-setup_vendor "$DEVICE" "$VENDOR" "$CM_ROOT" false "$CLEAN_VENDOR"
-
-extract "$MY_DIR"/proprietary-files-product.txt "$SRC" "$SECTION"
-extract "$MY_DIR"/proprietary-files.txt "$SRC" "$SECTION"
-
-"$MY_DIR"/setup-makefiles.sh
+"./../../${VENDOR}/${DEVICE_COMMON}/extract-files.sh" "$@"
diff --git a/fod/Android.bp b/fod/Android.bp
deleted file mode 100644
index 339e303..0000000
--- a/fod/Android.bp
+++ /dev/null
@@ -1,32 +0,0 @@
-//
-// Copyright (C) 2019 The LineageOS Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-cc_binary {
- relative_install_path: "hw",
- defaults: ["hidl_defaults"],
- name: "omni.biometrics.fingerprint.inscreen@1.0-service.asus_msmnile",
- init_rc: ["omni.biometrics.fingerprint.inscreen@1.0-service.asus_msmnile.rc"],
- srcs: ["service.cpp", "FingerprintInscreen.cpp"],
- shared_libs: [
- "libbase",
- "libhardware",
- "libhidlbase",
- "libhidltransport",
- "liblog",
- "libhwbinder",
- "libutils",
- "vendor.omni.biometrics.fingerprint.inscreen@1.0",
- ],
-}
diff --git a/fod/FingerprintInscreen.cpp b/fod/FingerprintInscreen.cpp
deleted file mode 100644
index 2228987..0000000
--- a/fod/FingerprintInscreen.cpp
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Copyright (C) 2019 The LineageOS Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#define LOG_TAG "FingerprintInscreenService"
-
-#include "FingerprintInscreen.h"
-#include <hidl/HidlTransportSupport.h>
-#include <fstream>
-
-#define FOD_ENABLE_PATH "/sys/devices/platform/goodix_ts.0/gesture/aod_enable"
-
-namespace vendor {
-namespace omni {
-namespace biometrics {
-namespace fingerprint {
-namespace inscreen {
-namespace V1_0 {
-namespace implementation {
-
-/*
- * Write value to path and close file.
- */
-template <typename T>
-static void set(const std::string& path, const T& value) {
- std::ofstream file(path);
- file << value;
-}
-
-Return<void> FingerprintInscreen::onStartEnroll() {
- return Void();
-}
-
-Return<void> FingerprintInscreen::onFinishEnroll() {
- return Void();
-}
-
-Return<void> FingerprintInscreen::onPress() {
- return Void();
-}
-
-Return<void> FingerprintInscreen::onRelease() {
- return Void();
-}
-
-Return<void> FingerprintInscreen::onShowFODView() {
- set(FOD_ENABLE_PATH, 1);
- return Void();
-}
-
-Return<void> FingerprintInscreen::onHideFODView() {
- set(FOD_ENABLE_PATH, 0);
- return Void();
-}
-
-Return<bool> FingerprintInscreen::handleAcquired(int32_t, int32_t) {
- return false;
-}
-
-Return<bool> FingerprintInscreen::handleError(int32_t, int32_t) {
- return false;
-}
-
-Return<void> FingerprintInscreen::setLongPressEnabled(bool) {
- return Void();
-}
-
-Return<int32_t> FingerprintInscreen::getDimAmount(int32_t) {
- return 0;
-}
-
-Return<bool> FingerprintInscreen::shouldBoostBrightness() {
- return false;
-}
-
-Return<void> FingerprintInscreen::setCallback(const sp<IFingerprintInscreenCallback>&) {
- return Void();
-}
-
-Return<int32_t> FingerprintInscreen::getPositionX() {
- return 444;
-}
-
-Return<int32_t> FingerprintInscreen::getPositionY() {
- return 1930;
-}
-
-Return<int32_t> FingerprintInscreen::getSize() {
- return 190;
-}
-
-} // namespace implementation
-} // namespace V1_0
-} // namespace inscreen
-} // namespace fingerprint
-} // namespace biometrics
-} // namespace omni
-} // namespace vendor
diff --git a/fod/FingerprintInscreen.h b/fod/FingerprintInscreen.h
deleted file mode 100644
index 68a3041..0000000
--- a/fod/FingerprintInscreen.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (C) 2019 The LineageOS Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef VENDOR_OMNI_BIOMETRICS_FINGERPRINT_INSCREEN_V1_0_FINGERPRINTINSCREEN_H
-#define VENDOR_OMNI_BIOMETRICS_FINGERPRINT_INSCREEN_V1_0_FINGERPRINTINSCREEN_H
-
-#include <vendor/omni/biometrics/fingerprint/inscreen/1.0/IFingerprintInscreen.h>
-
-namespace vendor {
-namespace omni {
-namespace biometrics {
-namespace fingerprint {
-namespace inscreen {
-namespace V1_0 {
-namespace implementation {
-
-using ::android::sp;
-using ::android::hardware::Return;
-using ::android::hardware::Void;
-
-class FingerprintInscreen : public IFingerprintInscreen {
- public:
- FingerprintInscreen() = default;
-
- Return<void> onStartEnroll() override;
- Return<void> onFinishEnroll() override;
- Return<void> onPress() override;
- Return<void> onRelease() override;
- Return<void> onShowFODView() override;
- Return<void> onHideFODView() override;
- Return<bool> handleAcquired(int32_t acquiredInfo, int32_t vendorCode) override;
- Return<bool> handleError(int32_t error, int32_t vendorCode) override;
- Return<void> setLongPressEnabled(bool enabled) override;
- Return<int32_t> getDimAmount(int32_t cur_brightness) override;
- Return<bool> shouldBoostBrightness() override;
- Return<void> setCallback(const sp<IFingerprintInscreenCallback>& callback) override;
- Return<int32_t> getPositionX() override;
- Return<int32_t> getPositionY() override;
- Return<int32_t> getSize() override;
-};
-
-} // namespace implementation
-} // namespace V1_0
-} // namespace inscreen
-} // namespace fingerprint
-} // namespace biometrics
-} // namespace omni
-} // namespace vendor
-
-#endif // VENDOR_OMNI_BIOMETRICS_FINGERPRINT_INSCREEN_V1_0_FINGERPRINTINSCREEN_H
diff --git a/fod/omni.biometrics.fingerprint.inscreen@1.0-service.asus_msmnile.rc b/fod/omni.biometrics.fingerprint.inscreen@1.0-service.asus_msmnile.rc
deleted file mode 100644
index ec5935d..0000000
--- a/fod/omni.biometrics.fingerprint.inscreen@1.0-service.asus_msmnile.rc
+++ /dev/null
@@ -1,6 +0,0 @@
-service fingerprint-inscreen-1-0 /system/bin/hw/omni.biometrics.fingerprint.inscreen@1.0-service.asus_msmnile
- interface vendor.omni.biometrics.fingerprint.inscreen@1.0::IFingerprintInscreen default
- class hal
- user system
- group system
- shutdown critical
diff --git a/fod/service.cpp b/fod/service.cpp
deleted file mode 100644
index 4e1449c..0000000
--- a/fod/service.cpp
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (C) 2019 The LineageOS Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#define LOG_TAG "omni.biometrics.fingerprint.inscreen@1.0-service.asus_msmnile"
-
-#include <android-base/logging.h>
-#include <hidl/HidlTransportSupport.h>
-
-#include "FingerprintInscreen.h"
-
-using android::hardware::configureRpcThreadpool;
-using android::hardware::joinRpcThreadpool;
-
-using vendor::omni::biometrics::fingerprint::inscreen::V1_0::IFingerprintInscreen;
-using vendor::omni::biometrics::fingerprint::inscreen::V1_0::implementation::FingerprintInscreen;
-
-using android::OK;
-using android::status_t;
-
-int main() {
- android::sp<IFingerprintInscreen> service = new FingerprintInscreen();
-
- configureRpcThreadpool(1, true);
-
- status_t status = service->registerAsService();
- if (status != OK) {
- LOG(ERROR) << "Cannot register FOD HAL service.";
- return 1;
- }
-
- LOG(INFO) << "FOD HAL service ready.";
-
- joinRpcThreadpool();
-
- LOG(ERROR) << "FOD HAL service failed to join thread pool.";
- return 1;
-}
diff --git a/framework_manifest.xml b/framework_manifest.xml
deleted file mode 100644
index d9a33dd..0000000
--- a/framework_manifest.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<manifest version="1.0" type="framework">
- <hal format="hidl">
- <name>vendor.omni.biometrics.fingerprint.inscreen</name>
- <transport>hwbinder</transport>
- <version>1.0</version>
- <interface>
- <name>IFingerprintInscreen</name>
- <instance>default</instance>
- </interface>
- </hal>
- <hal format="hidl">
- <name>vendor.qti.hardware.sigma_miracast</name>
- <transport>hwbinder</transport>
- <version>1.0</version>
- <interface>
- <name>Isigma_miracast</name>
- <instance>sigmahal</instance>
- </interface>
- <fqname>@1.0::Isigma_miracast/sigmahal</fqname>
- </hal>
-</manifest>
\ No newline at end of file
diff --git a/gpt-utils/Android.bp b/gpt-utils/Android.bp
deleted file mode 100644
index 2d6d0c5..0000000
--- a/gpt-utils/Android.bp
+++ /dev/null
@@ -1,39 +0,0 @@
-//
-// Copyright (C) 2018 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-
-
-cc_library {
- name: "libgptutils.asus_msmnile",
- vendor: true,
- recovery_available: true,
- shared_libs: [
- "libcutils",
- "liblog",
- "libz",
- ],
- cflags: [
- "-Wall",
- "-Werror",
- ],
- srcs: [
- "gpt-utils.cpp",
- ],
- owner: "qti",
- header_libs: [
- "generated_kernel_headers",
- ],
- export_include_dirs: ["."],
-}
diff --git a/gpt-utils/gpt-utils.cpp b/gpt-utils/gpt-utils.cpp
deleted file mode 100644
index b368fa4..0000000
--- a/gpt-utils/gpt-utils.cpp
+++ /dev/null
@@ -1,1543 +0,0 @@
-/*
- * Copyright (c) 2013,2016, The Linux Foundation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided
- * with the distribution.
- * * Neither the name of The Linux Foundation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#define _LARGEFILE64_SOURCE /* enable lseek64() */
-
-/******************************************************************************
- * INCLUDE SECTION
- ******************************************************************************/
-#include <stdio.h>
-#include <fcntl.h>
-#include <string.h>
-#include <errno.h>
-#include <inttypes.h>
-#include <sys/stat.h>
-#include <sys/ioctl.h>
-#include <scsi/ufs/ioctl.h>
-#include <scsi/ufs/ufs.h>
-#include <unistd.h>
-#include <linux/fs.h>
-#include <limits.h>
-#include <dirent.h>
-#include <linux/kernel.h>
-#include <map>
-#include <vector>
-#include <string>
-#define LOG_TAG "gpt-utils"
-#include <log/log.h>
-#include <cutils/properties.h>
-#include "gpt-utils.h"
-#include <endian.h>
-#include <zlib.h>
-
-
-/******************************************************************************
- * DEFINE SECTION
- ******************************************************************************/
-#define BLK_DEV_FILE "/dev/block/mmcblk0"
-/* list the names of the backed-up partitions to be swapped */
-/* extension used for the backup partitions - tzbak, abootbak, etc. */
-#define BAK_PTN_NAME_EXT "bak"
-#define XBL_PRIMARY "/dev/block/bootdevice/by-name/xbl"
-#define XBL_BACKUP "/dev/block/bootdevice/by-name/xblbak"
-#define XBL_AB_PRIMARY "/dev/block/bootdevice/by-name/xbl_a"
-#define XBL_AB_SECONDARY "/dev/block/bootdevice/by-name/xbl_b"
-/* GPT defines */
-#define MAX_LUNS 26
-//Size of the buffer that needs to be passed to the UFS ioctl
-#define UFS_ATTR_DATA_SIZE 32
-//This will allow us to get the root lun path from the path to the partition.
-//i.e: from /dev/block/sdaXXX get /dev/block/sda. The assumption here is that
-//the boot critical luns lie between sda to sdz which is acceptable because
-//only user added external disks,etc would lie beyond that limit which do not
-//contain partitions that interest us here.
-#define PATH_TRUNCATE_LOC (sizeof("/dev/block/sda") - 1)
-
-//From /dev/block/sda get just sda
-#define LUN_NAME_START_LOC (sizeof("/dev/block/") - 1)
-#define BOOT_LUN_A_ID 1
-#define BOOT_LUN_B_ID 2
-/******************************************************************************
- * MACROS
- ******************************************************************************/
-
-
-#define GET_4_BYTES(ptr) ((uint32_t) *((uint8_t *)(ptr)) | \
- ((uint32_t) *((uint8_t *)(ptr) + 1) << 8) | \
- ((uint32_t) *((uint8_t *)(ptr) + 2) << 16) | \
- ((uint32_t) *((uint8_t *)(ptr) + 3) << 24))
-
-#define GET_8_BYTES(ptr) ((uint64_t) *((uint8_t *)(ptr)) | \
- ((uint64_t) *((uint8_t *)(ptr) + 1) << 8) | \
- ((uint64_t) *((uint8_t *)(ptr) + 2) << 16) | \
- ((uint64_t) *((uint8_t *)(ptr) + 3) << 24) | \
- ((uint64_t) *((uint8_t *)(ptr) + 4) << 32) | \
- ((uint64_t) *((uint8_t *)(ptr) + 5) << 40) | \
- ((uint64_t) *((uint8_t *)(ptr) + 6) << 48) | \
- ((uint64_t) *((uint8_t *)(ptr) + 7) << 56))
-
-#define PUT_4_BYTES(ptr, y) *((uint8_t *)(ptr)) = (y) & 0xff; \
- *((uint8_t *)(ptr) + 1) = ((y) >> 8) & 0xff; \
- *((uint8_t *)(ptr) + 2) = ((y) >> 16) & 0xff; \
- *((uint8_t *)(ptr) + 3) = ((y) >> 24) & 0xff;
-
-/******************************************************************************
- * TYPES
- ******************************************************************************/
-using namespace std;
-enum gpt_state {
- GPT_OK = 0,
- GPT_BAD_SIGNATURE,
- GPT_BAD_CRC
-};
-//List of LUN's containing boot critical images.
-//Required in the case of UFS devices
-struct update_data {
- char lun_list[MAX_LUNS][PATH_MAX];
- uint32_t num_valid_entries;
-};
-
-/******************************************************************************
- * FUNCTIONS
- ******************************************************************************/
-/**
- * ==========================================================================
- *
- * \brief Read/Write len bytes from/to block dev
- *
- * \param [in] fd block dev file descriptor (returned from open)
- * \param [in] rw RW flag: 0 - read, != 0 - write
- * \param [in] offset block dev offset [bytes] - RW start position
- * \param [in] buf Pointer to the buffer containing the data
- * \param [in] len RW size in bytes. Buf must be at least that big
- *
- * \return 0 on success
- *
- * ==========================================================================
- */
-static int blk_rw(int fd, int rw, int64_t offset, uint8_t *buf, unsigned len)
-{
- int r;
-
- if (lseek64(fd, offset, SEEK_SET) < 0) {
- fprintf(stderr, "block dev lseek64 %" PRId64 " failed: %s\n", offset,
- strerror(errno));
- return -1;
- }
-
- if (rw)
- r = write(fd, buf, len);
- else
- r = read(fd, buf, len);
-
- if (r < 0)
- fprintf(stderr, "block dev %s failed: %s\n", rw ? "write" : "read",
- strerror(errno));
- else
- r = 0;
-
- return r;
-}
-
-
-
-/**
- * ==========================================================================
- *
- * \brief Search within GPT for partition entry with the given name
- * or it's backup twin (name-bak).
- *
- * \param [in] ptn_name Partition name to seek
- * \param [in] pentries_start Partition entries array start pointer
- * \param [in] pentries_end Partition entries array end pointer
- * \param [in] pentry_size Single partition entry size [bytes]
- *
- * \return First partition entry pointer that matches the name or NULL
- *
- * ==========================================================================
- */
-static uint8_t *gpt_pentry_seek(const char *ptn_name,
- const uint8_t *pentries_start,
- const uint8_t *pentries_end,
- uint32_t pentry_size)
-{
- char *pentry_name;
- unsigned len = strlen(ptn_name);
-
- for (pentry_name = (char *) (pentries_start + PARTITION_NAME_OFFSET);
- pentry_name < (char *) pentries_end; pentry_name += pentry_size) {
- char name8[MAX_GPT_NAME_SIZE] = {0}; // initialize with null
- unsigned i;
-
- /* Partition names in GPT are UTF-16 - ignoring UTF-16 2nd byte */
- for (i = 0; i < sizeof(name8) / 2; i++)
- name8[i] = pentry_name[i * 2];
- if (!strncmp(ptn_name, name8, len))
- if (name8[len] == 0 || !strcmp(&name8[len], BAK_PTN_NAME_EXT))
- return (uint8_t *) (pentry_name - PARTITION_NAME_OFFSET);
- }
-
- return NULL;
-}
-
-
-
-/**
- * ==========================================================================
- *
- * \brief Swaps boot chain in GPT partition entries array
- *
- * \param [in] pentries_start Partition entries array start
- * \param [in] pentries_end Partition entries array end
- * \param [in] pentry_size Single partition entry size
- *
- * \return 0 on success, 1 if no backup partitions found
- *
- * ==========================================================================
- */
-static int gpt_boot_chain_swap(const uint8_t *pentries_start,
- const uint8_t *pentries_end,
- uint32_t pentry_size)
-{
- const char ptn_swap_list[][MAX_GPT_NAME_SIZE] = { PTN_SWAP_LIST };
-
- int backup_not_found = 1;
- unsigned i;
-
- for (i = 0; i < ARRAY_SIZE(ptn_swap_list); i++) {
- uint8_t *ptn_entry;
- uint8_t *ptn_bak_entry;
- uint8_t ptn_swap[PTN_ENTRY_SIZE];
- //Skip the xbl partition on UFS devices. That is handled
- //seperately.
- if (gpt_utils_is_ufs_device() && !strncmp(ptn_swap_list[i],
- PTN_XBL,
- strlen(PTN_XBL)))
- continue;
-
- ptn_entry = gpt_pentry_seek(ptn_swap_list[i], pentries_start,
- pentries_end, pentry_size);
- if (ptn_entry == NULL)
- continue;
-
- ptn_bak_entry = gpt_pentry_seek(ptn_swap_list[i],
- ptn_entry + pentry_size, pentries_end, pentry_size);
- if (ptn_bak_entry == NULL) {
- fprintf(stderr, "'%s' partition not backup - skip safe update\n",
- ptn_swap_list[i]);
- continue;
- }
-
- /* swap primary <-> backup partition entries */
- memcpy(ptn_swap, ptn_entry, PTN_ENTRY_SIZE);
- memcpy(ptn_entry, ptn_bak_entry, PTN_ENTRY_SIZE);
- memcpy(ptn_bak_entry, ptn_swap, PTN_ENTRY_SIZE);
- backup_not_found = 0;
- }
-
- return backup_not_found;
-}
-
-
-
-/**
- * ==========================================================================
- *
- * \brief Sets secondary GPT boot chain
- *
- * \param [in] fd block dev file descriptor
- * \param [in] boot Boot chain to switch to
- *
- * \return 0 on success
- *
- * ==========================================================================
- */
-static int gpt2_set_boot_chain(int fd, enum boot_chain boot)
-{
- int64_t gpt2_header_offset;
- uint64_t pentries_start_offset;
- uint32_t gpt_header_size;
- uint32_t pentry_size;
- uint32_t pentries_array_size;
-
- uint8_t *gpt_header = NULL;
- uint8_t *pentries = NULL;
- uint32_t crc;
- uint32_t blk_size = 0;
- int r;
-
- if (ioctl(fd, BLKSSZGET, &blk_size) != 0) {
- fprintf(stderr, "Failed to get GPT device block size: %s\n",
- strerror(errno));
- r = -1;
- goto EXIT;
- }
- gpt_header = (uint8_t*)malloc(blk_size);
- if (!gpt_header) {
- fprintf(stderr, "Failed to allocate memory to hold GPT block\n");
- r = -1;
- goto EXIT;
- }
- gpt2_header_offset = lseek64(fd, 0, SEEK_END) - blk_size;
- if (gpt2_header_offset < 0) {
- fprintf(stderr, "Getting secondary GPT header offset failed: %s\n",
- strerror(errno));
- r = -1;
- goto EXIT;
- }
-
- /* Read primary GPT header from block dev */
- r = blk_rw(fd, 0, blk_size, gpt_header, blk_size);
-
- if (r) {
- fprintf(stderr, "Failed to read primary GPT header from blk dev\n");
- goto EXIT;
- }
- pentries_start_offset =
- GET_8_BYTES(gpt_header + PENTRIES_OFFSET) * blk_size;
- pentry_size = GET_4_BYTES(gpt_header + PENTRY_SIZE_OFFSET);
- pentries_array_size =
- GET_4_BYTES(gpt_header + PARTITION_COUNT_OFFSET) * pentry_size;
-
- pentries = (uint8_t *) calloc(1, pentries_array_size);
- if (pentries == NULL) {
- fprintf(stderr,
- "Failed to alloc memory for GPT partition entries array\n");
- r = -1;
- goto EXIT;
- }
- /* Read primary GPT partititon entries array from block dev */
- r = blk_rw(fd, 0, pentries_start_offset, pentries, pentries_array_size);
- if (r)
- goto EXIT;
-
- crc = crc32(0, pentries, pentries_array_size);
- if (GET_4_BYTES(gpt_header + PARTITION_CRC_OFFSET) != crc) {
- fprintf(stderr, "Primary GPT partition entries array CRC invalid\n");
- r = -1;
- goto EXIT;
- }
-
- /* Read secondary GPT header from block dev */
- r = blk_rw(fd, 0, gpt2_header_offset, gpt_header, blk_size);
- if (r)
- goto EXIT;
-
- gpt_header_size = GET_4_BYTES(gpt_header + HEADER_SIZE_OFFSET);
- pentries_start_offset =
- GET_8_BYTES(gpt_header + PENTRIES_OFFSET) * blk_size;
-
- if (boot == BACKUP_BOOT) {
- r = gpt_boot_chain_swap(pentries, pentries + pentries_array_size,
- pentry_size);
- if (r)
- goto EXIT;
- }
-
- crc = crc32(0, pentries, pentries_array_size);
- PUT_4_BYTES(gpt_header + PARTITION_CRC_OFFSET, crc);
-
- /* header CRC is calculated with this field cleared */
- PUT_4_BYTES(gpt_header + HEADER_CRC_OFFSET, 0);
- crc = crc32(0, gpt_header, gpt_header_size);
- PUT_4_BYTES(gpt_header + HEADER_CRC_OFFSET, crc);
-
- /* Write the modified GPT header back to block dev */
- r = blk_rw(fd, 1, gpt2_header_offset, gpt_header, blk_size);
- if (!r)
- /* Write the modified GPT partititon entries array back to block dev */
- r = blk_rw(fd, 1, pentries_start_offset, pentries,
- pentries_array_size);
-
-EXIT:
- if(gpt_header)
- free(gpt_header);
- if (pentries)
- free(pentries);
- return r;
-}
-
-/**
- * ==========================================================================
- *
- * \brief Checks GPT state (header signature and CRC)
- *
- * \param [in] fd block dev file descriptor
- * \param [in] gpt GPT header to be checked
- * \param [out] state GPT header state
- *
- * \return 0 on success
- *
- * ==========================================================================
- */
-static int gpt_get_state(int fd, enum gpt_instance gpt, enum gpt_state *state)
-{
- int64_t gpt_header_offset;
- uint32_t gpt_header_size;
- uint8_t *gpt_header = NULL;
- uint32_t crc;
- uint32_t blk_size = 0;
-
- *state = GPT_OK;
-
- if (ioctl(fd, BLKSSZGET, &blk_size) != 0) {
- fprintf(stderr, "Failed to get GPT device block size: %s\n",
- strerror(errno));
- goto error;
- }
- gpt_header = (uint8_t*)malloc(blk_size);
- if (!gpt_header) {
- fprintf(stderr, "gpt_get_state:Failed to alloc memory for header\n");
- goto error;
- }
- if (gpt == PRIMARY_GPT)
- gpt_header_offset = blk_size;
- else {
- gpt_header_offset = lseek64(fd, 0, SEEK_END) - blk_size;
- if (gpt_header_offset < 0) {
- fprintf(stderr, "gpt_get_state:Seek to end of GPT part fail\n");
- goto error;
- }
- }
-
- if (blk_rw(fd, 0, gpt_header_offset, gpt_header, blk_size)) {
- fprintf(stderr, "gpt_get_state: blk_rw failed\n");
- goto error;
- }
- if (memcmp(gpt_header, GPT_SIGNATURE, sizeof(GPT_SIGNATURE)))
- *state = GPT_BAD_SIGNATURE;
- gpt_header_size = GET_4_BYTES(gpt_header + HEADER_SIZE_OFFSET);
-
- crc = GET_4_BYTES(gpt_header + HEADER_CRC_OFFSET);
- /* header CRC is calculated with this field cleared */
- PUT_4_BYTES(gpt_header + HEADER_CRC_OFFSET, 0);
- if (crc32(0, gpt_header, gpt_header_size) != crc)
- *state = GPT_BAD_CRC;
- free(gpt_header);
- return 0;
-error:
- if (gpt_header)
- free(gpt_header);
- return -1;
-}
-
-
-
-/**
- * ==========================================================================
- *
- * \brief Sets GPT header state (used to corrupt and fix GPT signature)
- *
- * \param [in] fd block dev file descriptor
- * \param [in] gpt GPT header to be checked
- * \param [in] state GPT header state to set (GPT_OK or GPT_BAD_SIGNATURE)
- *
- * \return 0 on success
- *
- * ==========================================================================
- */
-static int gpt_set_state(int fd, enum gpt_instance gpt, enum gpt_state state)
-{
- int64_t gpt_header_offset;
- uint32_t gpt_header_size;
- uint8_t *gpt_header = NULL;
- uint32_t crc;
- uint32_t blk_size = 0;
-
- if (ioctl(fd, BLKSSZGET, &blk_size) != 0) {
- fprintf(stderr, "Failed to get GPT device block size: %s\n",
- strerror(errno));
- goto error;
- }
- gpt_header = (uint8_t*)malloc(blk_size);
- if (!gpt_header) {
- fprintf(stderr, "Failed to alloc memory for gpt header\n");
- goto error;
- }
- if (gpt == PRIMARY_GPT)
- gpt_header_offset = blk_size;
- else {
- gpt_header_offset = lseek64(fd, 0, SEEK_END) - blk_size;
- if (gpt_header_offset < 0) {
- fprintf(stderr, "Failed to seek to end of GPT device\n");
- goto error;
- }
- }
- if (blk_rw(fd, 0, gpt_header_offset, gpt_header, blk_size)) {
- fprintf(stderr, "Failed to r/w gpt header\n");
- goto error;
- }
- if (state == GPT_OK)
- memcpy(gpt_header, GPT_SIGNATURE, sizeof(GPT_SIGNATURE));
- else if (state == GPT_BAD_SIGNATURE)
- *gpt_header = 0;
- else {
- fprintf(stderr, "gpt_set_state: Invalid state\n");
- goto error;
- }
-
- gpt_header_size = GET_4_BYTES(gpt_header + HEADER_SIZE_OFFSET);
-
- /* header CRC is calculated with this field cleared */
- PUT_4_BYTES(gpt_header + HEADER_CRC_OFFSET, 0);
- crc = crc32(0, gpt_header, gpt_header_size);
- PUT_4_BYTES(gpt_header + HEADER_CRC_OFFSET, crc);
-
- if (blk_rw(fd, 1, gpt_header_offset, gpt_header, blk_size)) {
- fprintf(stderr, "gpt_set_state: blk write failed\n");
- goto error;
- }
- return 0;
-error:
- if(gpt_header)
- free(gpt_header);
- return -1;
-}
-
-int get_scsi_node_from_bootdevice(const char *bootdev_path,
- char *sg_node_path,
- size_t buf_size)
-{
- char sg_dir_path[PATH_MAX] = {0};
- char real_path[PATH_MAX] = {0};
- DIR *scsi_dir = NULL;
- struct dirent *de;
- int node_found = 0;
- if (!bootdev_path || !sg_node_path) {
- fprintf(stderr, "%s : invalid argument\n",
- __func__);
- goto error;
- }
- if (readlink(bootdev_path, real_path, sizeof(real_path) - 1) < 0) {
- fprintf(stderr, "failed to resolve link for %s(%s)\n",
- bootdev_path,
- strerror(errno));
- goto error;
- }
- if(strlen(real_path) < PATH_TRUNCATE_LOC + 1){
- fprintf(stderr, "Unrecognized path :%s:\n",
- real_path);
- goto error;
- }
- //For the safe side in case there are additional partitions on
- //the XBL lun we truncate the name.
- real_path[PATH_TRUNCATE_LOC] = '\0';
- if(strlen(real_path) < LUN_NAME_START_LOC + 1){
- fprintf(stderr, "Unrecognized truncated path :%s:\n",
- real_path);
- goto error;
- }
- //This will give us /dev/block/sdb/device/scsi_generic
- //which contains a file sgY whose name gives us the path
- //to /dev/sgY which we return
- snprintf(sg_dir_path, sizeof(sg_dir_path) - 1,
- "/sys/block/%s/device/scsi_generic",
- &real_path[LUN_NAME_START_LOC]);
- scsi_dir = opendir(sg_dir_path);
- if (!scsi_dir) {
- fprintf(stderr, "%s : Failed to open %s(%s)\n",
- __func__,
- sg_dir_path,
- strerror(errno));
- goto error;
- }
- while((de = readdir(scsi_dir))) {
- if (de->d_name[0] == '.')
- continue;
- else if (!strncmp(de->d_name, "sg", 2)) {
- snprintf(sg_node_path,
- buf_size -1,
- "/dev/%s",
- de->d_name);
- fprintf(stderr, "%s:scsi generic node is :%s:\n",
- __func__,
- sg_node_path);
- node_found = 1;
- break;
- }
- }
- if(!node_found) {
- fprintf(stderr,"%s: Unable to locate scsi generic node\n",
- __func__);
- goto error;
- }
- closedir(scsi_dir);
- return 0;
-error:
- if (scsi_dir)
- closedir(scsi_dir);
- return -1;
-}
-
-int set_boot_lun(char *sg_dev, uint8_t boot_lun_id)
-{
- int fd = -1;
- int rc;
- struct ufs_ioctl_query_data *data = NULL;
- size_t ioctl_data_size = sizeof(struct ufs_ioctl_query_data) + UFS_ATTR_DATA_SIZE;
-
- data = (struct ufs_ioctl_query_data*)malloc(ioctl_data_size);
- if (!data) {
- fprintf(stderr, "%s: Failed to alloc query data struct\n",
- __func__);
- goto error;
- }
- memset(data, 0, ioctl_data_size);
- data->opcode = UPIU_QUERY_OPCODE_WRITE_ATTR;
- data->idn = QUERY_ATTR_IDN_BOOT_LU_EN;
- data->buf_size = UFS_ATTR_DATA_SIZE;
- data->buffer[0] = boot_lun_id;
- fd = open(sg_dev, O_RDWR);
- if (fd < 0) {
- fprintf(stderr, "%s: Failed to open %s(%s)\n",
- __func__,
- sg_dev,
- strerror(errno));
- goto error;
- }
- rc = ioctl(fd, UFS_IOCTL_QUERY, data);
- if (rc) {
- fprintf(stderr, "%s: UFS query ioctl failed(%s)\n",
- __func__,
- strerror(errno));
- goto error;
- }
- close(fd);
- free(data);
- return 0;
-error:
- if (fd >= 0)
- close(fd);
- if (data)
- free(data);
- return -1;
-}
-
-//Swtich betwieen using either the primary or the backup
-//boot LUN for boot. This is required since UFS boot partitions
-//cannot have a backup GPT which is what we use for failsafe
-//updates of the other 'critical' partitions. This function will
-//not be invoked for emmc targets and on UFS targets is only required
-//to be invoked for XBL.
-//
-//The algorithm to do this is as follows:
-//- Find the real block device(eg: /dev/block/sdb) that corresponds
-// to the /dev/block/bootdevice/by-name/xbl(bak) symlink
-//
-//- Once we have the block device 'node' name(sdb in the above example)
-// use this node to to locate the scsi generic device that represents
-// it by checking the file /sys/block/sdb/device/scsi_generic/sgY
-//
-//- Once we locate sgY we call the query ioctl on /dev/sgy to switch
-//the boot lun to either LUNA or LUNB
-int gpt_utils_set_xbl_boot_partition(enum boot_chain chain)
-{
- struct stat st;
- ///sys/block/sdX/device/scsi_generic/
- char sg_dev_node[PATH_MAX] = {0};
- uint8_t boot_lun_id = 0;
- const char *boot_dev = NULL;
-
- if (chain == BACKUP_BOOT) {
- boot_lun_id = BOOT_LUN_B_ID;
- if (!stat(XBL_BACKUP, &st))
- boot_dev = XBL_BACKUP;
- else if (!stat(XBL_AB_SECONDARY, &st))
- boot_dev = XBL_AB_SECONDARY;
- else {
- fprintf(stderr, "%s: Failed to locate secondary xbl\n",
- __func__);
- goto error;
- }
- } else if (chain == NORMAL_BOOT) {
- boot_lun_id = BOOT_LUN_A_ID;
- if (!stat(XBL_PRIMARY, &st))
- boot_dev = XBL_PRIMARY;
- else if (!stat(XBL_AB_PRIMARY, &st))
- boot_dev = XBL_AB_PRIMARY;
- else {
- fprintf(stderr, "%s: Failed to locate primary xbl\n",
- __func__);
- goto error;
- }
- } else {
- fprintf(stderr, "%s: Invalid boot chain id\n", __func__);
- goto error;
- }
- //We need either both xbl and xblbak or both xbl_a and xbl_b to exist at
- //the same time. If not the current configuration is invalid.
- if((stat(XBL_PRIMARY, &st) ||
- stat(XBL_BACKUP, &st)) &&
- (stat(XBL_AB_PRIMARY, &st) ||
- stat(XBL_AB_SECONDARY, &st))) {
- fprintf(stderr, "%s:primary/secondary XBL prt not found(%s)\n",
- __func__,
- strerror(errno));
- goto error;
- }
- fprintf(stderr, "%s: setting %s lun as boot lun\n",
- __func__,
- boot_dev);
- if (get_scsi_node_from_bootdevice(boot_dev,
- sg_dev_node,
- sizeof(sg_dev_node))) {
- fprintf(stderr, "%s: Failed to get scsi node path for xblbak\n",
- __func__);
- goto error;
- }
- if (set_boot_lun(sg_dev_node, boot_lun_id)) {
- fprintf(stderr, "%s: Failed to set xblbak as boot partition\n",
- __func__);
- goto error;
- }
- return 0;
-error:
- return -1;
-}
-
-int gpt_utils_is_ufs_device()
-{
- char bootdevice[PROPERTY_VALUE_MAX] = {0};
- property_get("ro.boot.bootdevice", bootdevice, "N/A");
- if (strlen(bootdevice) < strlen(".ufshc") + 1)
- return 0;
- return (!strncmp(&bootdevice[strlen(bootdevice) - strlen(".ufshc")],
- ".ufshc",
- sizeof(".ufshc")));
-}
-//dev_path is the path to the block device that contains the GPT image that
-//needs to be updated. This would be the device which holds one or more critical
-//boot partitions and their backups. In the case of EMMC this function would
-//be invoked only once on /dev/block/mmcblk1 since it holds the GPT image
-//containing all the partitions For UFS devices it could potentially be
-//invoked multiple times, once for each LUN containing critical image(s) and
-//their backups
-int prepare_partitions(enum boot_update_stage stage, const char *dev_path)
-{
- int r = 0;
- int fd = -1;
- int is_ufs = gpt_utils_is_ufs_device();
- enum gpt_state gpt_prim, gpt_second;
- enum boot_update_stage internal_stage;
- struct stat xbl_partition_stat;
-
- if (!dev_path) {
- fprintf(stderr, "%s: Invalid dev_path\n",
- __func__);
- r = -1;
- goto EXIT;
- }
- fd = open(dev_path, O_RDWR);
- if (fd < 0) {
- fprintf(stderr, "%s: Opening '%s' failed: %s\n",
- __func__,
- BLK_DEV_FILE,
- strerror(errno));
- r = -1;
- goto EXIT;
- }
- r = gpt_get_state(fd, PRIMARY_GPT, &gpt_prim) ||
- gpt_get_state(fd, SECONDARY_GPT, &gpt_second);
- if (r) {
- fprintf(stderr, "%s: Getting GPT headers state failed\n",
- __func__);
- goto EXIT;
- }
-
- /* These 2 combinations are unexpected and unacceptable */
- if (gpt_prim == GPT_BAD_CRC || gpt_second == GPT_BAD_CRC) {
- fprintf(stderr, "%s: GPT headers CRC corruption detected, aborting\n",
- __func__);
- r = -1;
- goto EXIT;
- }
- if (gpt_prim == GPT_BAD_SIGNATURE && gpt_second == GPT_BAD_SIGNATURE) {
- fprintf(stderr, "%s: Both GPT headers corrupted, aborting\n",
- __func__);
- r = -1;
- goto EXIT;
- }
-
- /* Check internal update stage according GPT headers' state */
- if (gpt_prim == GPT_OK && gpt_second == GPT_OK)
- internal_stage = UPDATE_MAIN;
- else if (gpt_prim == GPT_BAD_SIGNATURE)
- internal_stage = UPDATE_BACKUP;
- else if (gpt_second == GPT_BAD_SIGNATURE)
- internal_stage = UPDATE_FINALIZE;
- else {
- fprintf(stderr, "%s: Abnormal GPTs state: primary (%d), secondary (%d), "
- "aborting\n", __func__, gpt_prim, gpt_second);
- r = -1;
- goto EXIT;
- }
-
- /* Stage already set - ready for update, exitting */
- if ((int) stage == (int) internal_stage - 1)
- goto EXIT;
- /* Unexpected stage given */
- if (stage != internal_stage) {
- r = -1;
- goto EXIT;
- }
-
- switch (stage) {
- case UPDATE_MAIN:
- if (is_ufs) {
- if(stat(XBL_PRIMARY, &xbl_partition_stat)||
- stat(XBL_BACKUP, &xbl_partition_stat)){
- //Non fatal error. Just means this target does not
- //use XBL but relies on sbl whose update is handled
- //by the normal methods.
- fprintf(stderr, "%s: xbl part not found(%s).Assuming sbl in use\n",
- __func__,
- strerror(errno));
- } else {
- //Switch the boot lun so that backup boot LUN is used
- r = gpt_utils_set_xbl_boot_partition(BACKUP_BOOT);
- if(r){
- fprintf(stderr, "%s: Failed to set xbl backup partition as boot\n",
- __func__);
- goto EXIT;
- }
- }
- }
- //Fix up the backup GPT table so that it actually points to
- //the backup copy of the boot critical images
- fprintf(stderr, "%s: Preparing for primary partition update\n",
- __func__);
- r = gpt2_set_boot_chain(fd, BACKUP_BOOT);
- if (r) {
- if (r < 0)
- fprintf(stderr,
- "%s: Setting secondary GPT to backup boot failed\n",
- __func__);
- /* No backup partitions - do not corrupt GPT, do not flag error */
- else
- r = 0;
- goto EXIT;
- }
- //corrupt the primary GPT so that the backup(which now points to
- //the backup boot partitions is used)
- r = gpt_set_state(fd, PRIMARY_GPT, GPT_BAD_SIGNATURE);
- if (r) {
- fprintf(stderr, "%s: Corrupting primary GPT header failed\n",
- __func__);
- goto EXIT;
- }
- break;
- case UPDATE_BACKUP:
- if (is_ufs) {
- if(stat(XBL_PRIMARY, &xbl_partition_stat)||
- stat(XBL_BACKUP, &xbl_partition_stat)){
- //Non fatal error. Just means this target does not
- //use XBL but relies on sbl whose update is handled
- //by the normal methods.
- fprintf(stderr, "%s: xbl part not found(%s).Assuming sbl in use\n",
- __func__,
- strerror(errno));
- } else {
- //Switch the boot lun so that backup boot LUN is used
- r = gpt_utils_set_xbl_boot_partition(NORMAL_BOOT);
- if(r) {
- fprintf(stderr, "%s: Failed to set xbl backup partition as boot\n",
- __func__);
- goto EXIT;
- }
- }
- }
- //Fix the primary GPT header so that is used
- fprintf(stderr, "%s: Preparing for backup partition update\n",
- __func__);
- r = gpt_set_state(fd, PRIMARY_GPT, GPT_OK);
- if (r) {
- fprintf(stderr, "%s: Fixing primary GPT header failed\n",
- __func__);
- goto EXIT;
- }
- //Corrupt the scondary GPT header
- r = gpt_set_state(fd, SECONDARY_GPT, GPT_BAD_SIGNATURE);
- if (r) {
- fprintf(stderr, "%s: Corrupting secondary GPT header failed\n",
- __func__);
- goto EXIT;
- }
- break;
- case UPDATE_FINALIZE:
- //Undo the changes we had made in the UPDATE_MAIN stage so that the
- //primary/backup GPT headers once again point to the same set of
- //partitions
- fprintf(stderr, "%s: Finalizing partitions\n",
- __func__);
- r = gpt2_set_boot_chain(fd, NORMAL_BOOT);
- if (r < 0) {
- fprintf(stderr, "%s: Setting secondary GPT to normal boot failed\n",
- __func__);
- goto EXIT;
- }
-
- r = gpt_set_state(fd, SECONDARY_GPT, GPT_OK);
- if (r) {
- fprintf(stderr, "%s: Fixing secondary GPT header failed\n",
- __func__);
- goto EXIT;
- }
- break;
- default:;
- }
-
-EXIT:
- if (fd >= 0) {
- fsync(fd);
- close(fd);
- }
- return r;
-}
-
-int add_lun_to_update_list(char *lun_path, struct update_data *dat)
-{
- uint32_t i = 0;
- struct stat st;
- if (!lun_path || !dat){
- fprintf(stderr, "%s: Invalid data",
- __func__);
- return -1;
- }
- if (stat(lun_path, &st)) {
- fprintf(stderr, "%s: Unable to access %s. Skipping adding to list",
- __func__,
- lun_path);
- return -1;
- }
- if (dat->num_valid_entries == 0) {
- fprintf(stderr, "%s: Copying %s into lun_list[%d]\n",
- __func__,
- lun_path,
- i);
- strlcpy(dat->lun_list[0], lun_path,
- PATH_MAX * sizeof(char));
- dat->num_valid_entries = 1;
- } else {
- for (i = 0; (i < dat->num_valid_entries) &&
- (dat->num_valid_entries < MAX_LUNS - 1); i++) {
- //Check if the current LUN is not already part
- //of the lun list
- if (!strncmp(lun_path,dat->lun_list[i],
- strlen(dat->lun_list[i]))) {
- //LUN already in list..Return
- return 0;
- }
- }
- fprintf(stderr, "%s: Copying %s into lun_list[%d]\n",
- __func__,
- lun_path,
- dat->num_valid_entries);
- //Add LUN path lun list
- strlcpy(dat->lun_list[dat->num_valid_entries], lun_path,
- PATH_MAX * sizeof(char));
- dat->num_valid_entries++;
- }
- return 0;
-}
-
-int prepare_boot_update(enum boot_update_stage stage)
-{
- int is_ufs = gpt_utils_is_ufs_device();
- struct stat ufs_dir_stat;
- struct update_data data;
- int rcode = 0;
- uint32_t i = 0;
- int is_error = 0;
- const char ptn_swap_list[][MAX_GPT_NAME_SIZE] = { PTN_SWAP_LIST };
- //Holds /dev/block/bootdevice/by-name/*bak entry
- char buf[PATH_MAX] = {0};
- //Holds the resolved path of the symlink stored in buf
- char real_path[PATH_MAX] = {0};
-
- if (!is_ufs) {
- //emmc device. Just pass in path to mmcblk0
- return prepare_partitions(stage, BLK_DEV_FILE);
- } else {
- //Now we need to find the list of LUNs over
- //which the boot critical images are spread
- //and set them up for failsafe updates.To do
- //this we find out where the symlinks for the
- //each of the paths under
- ///dev/block/bootdevice/by-name/PTN_SWAP_LIST
- //actually point to.
- fprintf(stderr, "%s: Running on a UFS device\n",
- __func__);
- memset(&data, '\0', sizeof(struct update_data));
- for (i=0; i < ARRAY_SIZE(ptn_swap_list); i++) {
- //XBL on UFS does not follow the convention
- //of being loaded based on well known GUID'S.
- //We take care of switching the UFS boot LUN
- //explicitly later on.
- if (!strncmp(ptn_swap_list[i],
- PTN_XBL,
- strlen(PTN_XBL)))
- continue;
- snprintf(buf, sizeof(buf),
- "%s/%sbak",
- BOOT_DEV_DIR,
- ptn_swap_list[i]);
- if (stat(buf, &ufs_dir_stat)) {
- continue;
- }
- if (readlink(buf, real_path, sizeof(real_path) - 1) < 0)
- {
- fprintf(stderr, "%s: readlink error. Skipping %s",
- __func__,
- strerror(errno));
- } else {
- if(strlen(real_path) < PATH_TRUNCATE_LOC + 1){
- fprintf(stderr, "Unknown path.Skipping :%s:\n",
- real_path);
- } else {
- real_path[PATH_TRUNCATE_LOC] = '\0';
- add_lun_to_update_list(real_path, &data);
- }
- }
- memset(buf, '\0', sizeof(buf));
- memset(real_path, '\0', sizeof(real_path));
- }
- for (i=0; i < data.num_valid_entries; i++) {
- fprintf(stderr, "%s: Preparing %s for update stage %d\n",
- __func__,
- data.lun_list[i],
- stage);
- rcode = prepare_partitions(stage, data.lun_list[i]);
- if (rcode != 0)
- {
- fprintf(stderr, "%s: Failed to prepare %s.Continuing..\n",
- __func__,
- data.lun_list[i]);
- is_error = 1;
- }
- }
- }
- if (is_error)
- return -1;
- return 0;
-}
-
-//Given a parttion name(eg: rpm) get the path to the block device that
-//represents the GPT disk the partition resides on. In the case of emmc it
-//would be the default emmc dev(/dev/block/mmcblk0). In the case of UFS we look
-//through the /dev/block/bootdevice/by-name/ tree for partname, and resolve
-//the path to the LUN from there.
-static int get_dev_path_from_partition_name(const char *partname,
- char *buf,
- size_t buflen)
-{
- struct stat st;
- char path[PATH_MAX] = {0};
- if (!partname || !buf || buflen < ((PATH_TRUNCATE_LOC) + 1)) {
- ALOGE("%s: Invalid argument", __func__);
- goto error;
- }
- if (gpt_utils_is_ufs_device()) {
- //Need to find the lun that holds partition partname
- snprintf(path, sizeof(path),
- "%s/%s",
- BOOT_DEV_DIR,
- partname);
- if (stat(path, &st)) {
- goto error;
- }
- if (readlink(path, buf, buflen) < 0)
- {
- goto error;
- } else {
- buf[PATH_TRUNCATE_LOC] = '\0';
- }
- } else {
- snprintf(buf, buflen, BLK_DEV_FILE);
- }
- return 0;
-
-error:
- return -1;
-}
-
-int gpt_utils_get_partition_map(vector<string>& ptn_list,
- map<string, vector<string>>& partition_map) {
- char devpath[PATH_MAX] = {'\0'};
- map<string, vector<string>>::iterator it;
- if (ptn_list.size() < 1) {
- fprintf(stderr, "%s: Invalid ptn list\n", __func__);
- goto error;
- }
- //Go through the passed in list
- for (uint32_t i = 0; i < ptn_list.size(); i++)
- {
- //Key in the map is the path to the device that holds the
- //partition
- if (get_dev_path_from_partition_name(ptn_list[i].c_str(),
- devpath,
- sizeof(devpath))) {
- //Not necessarily an error. The partition may just
- //not be present.
- continue;
- }
- string path = devpath;
- it = partition_map.find(path);
- if (it != partition_map.end()) {
- it->second.push_back(ptn_list[i]);
- } else {
- vector<string> str_vec;
- str_vec.push_back( ptn_list[i]);
- partition_map.insert(pair<string, vector<string>>
- (path, str_vec));
- }
- memset(devpath, '\0', sizeof(devpath));
- }
- return 0;
-error:
- return -1;
-}
-
-//Get the block size of the disk represented by decsriptor fd
-static uint32_t gpt_get_block_size(int fd)
-{
- uint32_t block_size = 0;
- if (fd < 0) {
- ALOGE("%s: invalid descriptor",
- __func__);
- goto error;
- }
- if (ioctl(fd, BLKSSZGET, &block_size) != 0) {
- ALOGE("%s: Failed to get GPT dev block size : %s",
- __func__,
- strerror(errno));
- goto error;
- }
- return block_size;
-error:
- return 0;
-}
-
-//Write the GPT header present in the passed in buffer back to the
-//disk represented by fd
-static int gpt_set_header(uint8_t *gpt_header, int fd,
- enum gpt_instance instance)
-{
- uint32_t block_size = 0;
- off64_t gpt_header_offset = 0;
- if (!gpt_header || fd < 0) {
- ALOGE("%s: Invalid arguments",
- __func__);
- goto error;
- }
- block_size = gpt_get_block_size(fd);
- if (block_size == 0) {
- ALOGE("%s: Failed to get block size", __func__);
- goto error;
- }
- if (instance == PRIMARY_GPT)
- gpt_header_offset = block_size;
- else
- gpt_header_offset = lseek64(fd, 0, SEEK_END) - block_size;
- if (gpt_header_offset <= 0) {
- ALOGE("%s: Failed to get gpt header offset",__func__);
- goto error;
- }
- if (blk_rw(fd, 1, gpt_header_offset, gpt_header, block_size)) {
- ALOGE("%s: Failed to write back GPT header", __func__);
- goto error;
- }
- return 0;
-error:
- return -1;
-}
-
-//Read out the GPT header for the disk that contains the partition partname
-static uint8_t* gpt_get_header(const char *partname, enum gpt_instance instance)
-{
- uint8_t* hdr = NULL;
- char devpath[PATH_MAX] = {0};
- int64_t hdr_offset = 0;
- uint32_t block_size = 0;
- int fd = -1;
- if (!partname) {
- ALOGE("%s: Invalid partition name", __func__);
- goto error;
- }
- if (get_dev_path_from_partition_name(partname, devpath, sizeof(devpath))
- != 0) {
- ALOGE("%s: Failed to resolve path for %s",
- __func__,
- partname);
- goto error;
- }
- fd = open(devpath, O_RDWR);
- if (fd < 0) {
- ALOGE("%s: Failed to open %s : %s",
- __func__,
- devpath,
- strerror(errno));
- goto error;
- }
- block_size = gpt_get_block_size(fd);
- if (block_size == 0)
- {
- ALOGE("%s: Failed to get gpt block size for %s",
- __func__,
- partname);
- goto error;
- }
-
- hdr = (uint8_t*)malloc(block_size);
- if (!hdr) {
- ALOGE("%s: Failed to allocate memory for gpt header",
- __func__);
- }
- if (instance == PRIMARY_GPT)
- hdr_offset = block_size;
- else {
- hdr_offset = lseek64(fd, 0, SEEK_END) - block_size;
- }
- if (hdr_offset < 0) {
- ALOGE("%s: Failed to get gpt header offset",
- __func__);
- goto error;
- }
- if (blk_rw(fd, 0, hdr_offset, hdr, block_size)) {
- ALOGE("%s: Failed to read GPT header from device",
- __func__);
- goto error;
- }
- close(fd);
- return hdr;
-error:
- if (fd >= 0)
- close(fd);
- if (hdr)
- free(hdr);
- return NULL;
-}
-
-//Returns the partition entry array based on the
-//passed in buffer which contains the gpt header.
-//The fd here is the descriptor for the 'disk' which
-//holds the partition
-static uint8_t* gpt_get_pentry_arr(uint8_t *hdr, int fd)
-{
- uint64_t pentries_start = 0;
- uint32_t pentry_size = 0;
- uint32_t block_size = 0;
- uint32_t pentries_arr_size = 0;
- uint8_t *pentry_arr = NULL;
- int rc = 0;
- if (!hdr) {
- ALOGE("%s: Invalid header", __func__);
- goto error;
- }
- if (fd < 0) {
- ALOGE("%s: Invalid fd", __func__);
- goto error;
- }
- block_size = gpt_get_block_size(fd);
- if (!block_size) {
- ALOGE("%s: Failed to get gpt block size for",
- __func__);
- goto error;
- }
- pentries_start = GET_8_BYTES(hdr + PENTRIES_OFFSET) * block_size;
- pentry_size = GET_4_BYTES(hdr + PENTRY_SIZE_OFFSET);
- pentries_arr_size =
- GET_4_BYTES(hdr + PARTITION_COUNT_OFFSET) * pentry_size;
- pentry_arr = (uint8_t*)calloc(1, pentries_arr_size);
- if (!pentry_arr) {
- ALOGE("%s: Failed to allocate memory for partition array",
- __func__);
- goto error;
- }
- rc = blk_rw(fd, 0,
- pentries_start,
- pentry_arr,
- pentries_arr_size);
- if (rc) {
- ALOGE("%s: Failed to read partition entry array",
- __func__);
- goto error;
- }
- return pentry_arr;
-error:
- if (pentry_arr)
- free(pentry_arr);
- return NULL;
-}
-
-static int gpt_set_pentry_arr(uint8_t *hdr, int fd, uint8_t* arr)
-{
- uint32_t block_size = 0;
- uint64_t pentries_start = 0;
- uint32_t pentry_size = 0;
- uint32_t pentries_arr_size = 0;
- int rc = 0;
- if (!hdr || fd < 0 || !arr) {
- ALOGE("%s: Invalid argument", __func__);
- goto error;
- }
- block_size = gpt_get_block_size(fd);
- if (!block_size) {
- ALOGE("%s: Failed to get gpt block size for",
- __func__);
- goto error;
- }
- pentries_start = GET_8_BYTES(hdr + PENTRIES_OFFSET) * block_size;
- pentry_size = GET_4_BYTES(hdr + PENTRY_SIZE_OFFSET);
- pentries_arr_size =
- GET_4_BYTES(hdr + PARTITION_COUNT_OFFSET) * pentry_size;
- rc = blk_rw(fd, 1,
- pentries_start,
- arr,
- pentries_arr_size);
- if (rc) {
- ALOGE("%s: Failed to read partition entry array",
- __func__);
- goto error;
- }
- return 0;
-error:
- return -1;
-}
-
-
-
-//Allocate a handle used by calls to the "gpt_disk" api's
-struct gpt_disk * gpt_disk_alloc()
-{
- struct gpt_disk *disk;
- disk = (struct gpt_disk *)malloc(sizeof(struct gpt_disk));
- if (!disk) {
- ALOGE("%s: Failed to allocate memory", __func__);
- goto end;
- }
- memset(disk, 0, sizeof(struct gpt_disk));
-end:
- return disk;
-}
-
-//Free previously allocated/initialized handle
-void gpt_disk_free(struct gpt_disk *disk)
-{
- if (!disk)
- return;
- if (disk->hdr)
- free(disk->hdr);
- if (disk->hdr_bak)
- free(disk->hdr_bak);
- if (disk->pentry_arr)
- free(disk->pentry_arr);
- if (disk->pentry_arr_bak)
- free(disk->pentry_arr_bak);
- free(disk);
- return;
-}
-
-//fills up the passed in gpt_disk struct with information about the
-//disk represented by path dev. Returns 0 on success and -1 on error.
-int gpt_disk_get_disk_info(const char *dev, struct gpt_disk *dsk)
-{
- struct gpt_disk *disk = NULL;
- int fd = -1;
- uint32_t gpt_header_size = 0;
-
- if (!dsk || !dev) {
- ALOGE("%s: Invalid arguments", __func__);
- goto error;
- }
- disk = dsk;
- disk->hdr = gpt_get_header(dev, PRIMARY_GPT);
- if (!disk->hdr) {
- ALOGE("%s: Failed to get primary header", __func__);
- goto error;
- }
- gpt_header_size = GET_4_BYTES(disk->hdr + HEADER_SIZE_OFFSET);
- disk->hdr_crc = crc32(0, disk->hdr, gpt_header_size);
- disk->hdr_bak = gpt_get_header(dev, SECONDARY_GPT);
- if (!disk->hdr_bak) {
- ALOGE("%s: Failed to get backup header", __func__);
- goto error;
- }
- disk->hdr_bak_crc = crc32(0, disk->hdr_bak, gpt_header_size);
-
- //Descriptor for the block device. We will use this for further
- //modifications to the partition table
- if (get_dev_path_from_partition_name(dev,
- disk->devpath,
- sizeof(disk->devpath)) != 0) {
- ALOGE("%s: Failed to resolve path for %s",
- __func__,
- dev);
- goto error;
- }
- fd = open(disk->devpath, O_RDWR);
- if (fd < 0) {
- ALOGE("%s: Failed to open %s: %s",
- __func__,
- disk->devpath,
- strerror(errno));
- goto error;
- }
- disk->pentry_arr = gpt_get_pentry_arr(disk->hdr, fd);
- if (!disk->pentry_arr) {
- ALOGE("%s: Failed to obtain partition entry array",
- __func__);
- goto error;
- }
- disk->pentry_arr_bak = gpt_get_pentry_arr(disk->hdr_bak, fd);
- if (!disk->pentry_arr_bak) {
- ALOGE("%s: Failed to obtain backup partition entry array",
- __func__);
- goto error;
- }
- disk->pentry_size = GET_4_BYTES(disk->hdr + PENTRY_SIZE_OFFSET);
- disk->pentry_arr_size =
- GET_4_BYTES(disk->hdr + PARTITION_COUNT_OFFSET) *
- disk->pentry_size;
- disk->pentry_arr_crc = GET_4_BYTES(disk->hdr + PARTITION_CRC_OFFSET);
- disk->pentry_arr_bak_crc = GET_4_BYTES(disk->hdr_bak +
- PARTITION_CRC_OFFSET);
- disk->block_size = gpt_get_block_size(fd);
- close(fd);
- disk->is_initialized = GPT_DISK_INIT_MAGIC;
- return 0;
-error:
- if (fd >= 0)
- close(fd);
- return -1;
-}
-
-//Get pointer to partition entry from a allocated gpt_disk structure
-uint8_t* gpt_disk_get_pentry(struct gpt_disk *disk,
- const char *partname,
- enum gpt_instance instance)
-{
- uint8_t *ptn_arr = NULL;
- if (!disk || !partname || disk->is_initialized != GPT_DISK_INIT_MAGIC) {
- ALOGE("%s: Invalid argument",__func__);
- goto error;
- }
- ptn_arr = (instance == PRIMARY_GPT) ?
- disk->pentry_arr : disk->pentry_arr_bak;
- return (gpt_pentry_seek(partname, ptn_arr,
- ptn_arr + disk->pentry_arr_size ,
- disk->pentry_size));
-error:
- return NULL;
-}
-
-//Update CRC values for the various components of the gpt_disk
-//structure. This function should be called after any of the fields
-//have been updated before the structure contents are written back to
-//disk.
-int gpt_disk_update_crc(struct gpt_disk *disk)
-{
- uint32_t gpt_header_size = 0;
- if (!disk || (disk->is_initialized != GPT_DISK_INIT_MAGIC)) {
- ALOGE("%s: invalid argument", __func__);
- goto error;
- }
- //Recalculate the CRC of the primary partiton array
- disk->pentry_arr_crc = crc32(0,
- disk->pentry_arr,
- disk->pentry_arr_size);
- //Recalculate the CRC of the backup partition array
- disk->pentry_arr_bak_crc = crc32(0,
- disk->pentry_arr_bak,
- disk->pentry_arr_size);
- //Update the partition CRC value in the primary GPT header
- PUT_4_BYTES(disk->hdr + PARTITION_CRC_OFFSET, disk->pentry_arr_crc);
- //Update the partition CRC value in the backup GPT header
- PUT_4_BYTES(disk->hdr_bak + PARTITION_CRC_OFFSET,
- disk->pentry_arr_bak_crc);
- //Update the CRC value of the primary header
- gpt_header_size = GET_4_BYTES(disk->hdr + HEADER_SIZE_OFFSET);
- //Header CRC is calculated with its own CRC field set to 0
- PUT_4_BYTES(disk->hdr + HEADER_CRC_OFFSET, 0);
- PUT_4_BYTES(disk->hdr_bak + HEADER_CRC_OFFSET, 0);
- disk->hdr_crc = crc32(0, disk->hdr, gpt_header_size);
- disk->hdr_bak_crc = crc32(0, disk->hdr_bak, gpt_header_size);
- PUT_4_BYTES(disk->hdr + HEADER_CRC_OFFSET, disk->hdr_crc);
- PUT_4_BYTES(disk->hdr_bak + HEADER_CRC_OFFSET, disk->hdr_bak_crc);
- return 0;
-error:
- return -1;
-}
-
-//Write the contents of struct gpt_disk back to the actual disk
-int gpt_disk_commit(struct gpt_disk *disk)
-{
- int fd = -1;
- if (!disk || (disk->is_initialized != GPT_DISK_INIT_MAGIC)){
- ALOGE("%s: Invalid args", __func__);
- goto error;
- }
- fd = open(disk->devpath, O_RDWR);
- if (fd < 0) {
- ALOGE("%s: Failed to open %s: %s",
- __func__,
- disk->devpath,
- strerror(errno));
- goto error;
- }
- //Write the primary header
- if(gpt_set_header(disk->hdr, fd, PRIMARY_GPT) != 0) {
- ALOGE("%s: Failed to update primary GPT header",
- __func__);
- goto error;
- }
- //Write back the primary partition array
- if (gpt_set_pentry_arr(disk->hdr, fd, disk->pentry_arr)) {
- ALOGE("%s: Failed to write primary GPT partition arr",
- __func__);
- goto error;
- }
- //Write back the secondary header
- if(gpt_set_header(disk->hdr_bak, fd, SECONDARY_GPT) != 0) {
- ALOGE("%s: Failed to update secondary GPT header",
- __func__);
- goto error;
- }
- //Write back the secondary partition array
- if (gpt_set_pentry_arr(disk->hdr_bak, fd, disk->pentry_arr_bak)) {
- ALOGE("%s: Failed to write secondary GPT partition arr",
- __func__);
- goto error;
- }
- close(fd);
- return 0;
-error:
- if (fd >= 0)
- close(fd);
- return -1;
-}
diff --git a/gpt-utils/gpt-utils.h b/gpt-utils/gpt-utils.h
deleted file mode 100644
index a32ae88..0000000
--- a/gpt-utils/gpt-utils.h
+++ /dev/null
@@ -1,193 +0,0 @@
-/*
- * Copyright (c) 2013,2016, The Linux Foundation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided
- * with the distribution.
- * * Neither the name of The Linux Foundation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef __GPT_UTILS_H__
-#define __GPT_UTILS_H__
-#include <vector>
-#include <string>
-#include <map>
-#ifdef __cplusplus
-extern "C" {
-#endif
-#include <unistd.h>
-#include <stdlib.h>
-/******************************************************************************
- * GPT HEADER DEFINES
- ******************************************************************************/
-#define GPT_SIGNATURE "EFI PART"
-#define HEADER_SIZE_OFFSET 12
-#define HEADER_CRC_OFFSET 16
-#define PRIMARY_HEADER_OFFSET 24
-#define BACKUP_HEADER_OFFSET 32
-#define FIRST_USABLE_LBA_OFFSET 40
-#define LAST_USABLE_LBA_OFFSET 48
-#define PENTRIES_OFFSET 72
-#define PARTITION_COUNT_OFFSET 80
-#define PENTRY_SIZE_OFFSET 84
-#define PARTITION_CRC_OFFSET 88
-
-#define TYPE_GUID_OFFSET 0
-#define TYPE_GUID_SIZE 16
-#define PTN_ENTRY_SIZE 128
-#define UNIQUE_GUID_OFFSET 16
-#define FIRST_LBA_OFFSET 32
-#define LAST_LBA_OFFSET 40
-#define ATTRIBUTE_FLAG_OFFSET 48
-#define PARTITION_NAME_OFFSET 56
-#define MAX_GPT_NAME_SIZE 72
-
-/******************************************************************************
- * AB RELATED DEFINES
- ******************************************************************************/
-//Bit 48 onwords in the attribute field are the ones where we are allowed to
-//store our AB attributes.
-#define AB_FLAG_OFFSET (ATTRIBUTE_FLAG_OFFSET + 6)
-#define GPT_DISK_INIT_MAGIC 0xABCD
-#define AB_PARTITION_ATTR_SLOT_ACTIVE (0x1<<2)
-#define AB_PARTITION_ATTR_BOOT_SUCCESSFUL (0x1<<6)
-#define AB_PARTITION_ATTR_UNBOOTABLE (0x1<<7)
-#define AB_SLOT_ACTIVE_VAL 0x3F
-#define AB_SLOT_INACTIVE_VAL 0x0
-#define AB_SLOT_ACTIVE 1
-#define AB_SLOT_INACTIVE 0
-#define AB_SLOT_A_SUFFIX "_a"
-#define AB_SLOT_B_SUFFIX "_b"
-#define PTN_XBL "xbl"
-#define PTN_XBL_CFG "xbl_config"
-#define PTN_SWAP_LIST PTN_XBL, PTN_XBL_CFG, "sbl1", "rpm", "tz", "aboot", "abl", "hyp", "lksecapp", "keymaster", "cmnlib", "cmnlib32", "cmnlib64", "pmic", "apdp", "devcfg", "hosd", "keystore", "msadp", "mdtp", "mdtpsecapp", "dsp", "aop", "qupfw", "vbmeta", "dtbo", "ImageFv"
-#define AB_PTN_LIST PTN_SWAP_LIST, "boot", "system", "vendor", "modem", "bluetooth"
-#define BOOT_DEV_DIR "/dev/block/bootdevice/by-name"
-
-/******************************************************************************
- * HELPER MACROS
- ******************************************************************************/
-#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
-/******************************************************************************
- * TYPES
- ******************************************************************************/
-enum boot_update_stage {
- UPDATE_MAIN = 1,
- UPDATE_BACKUP,
- UPDATE_FINALIZE
-};
-
-enum gpt_instance {
- PRIMARY_GPT = 0,
- SECONDARY_GPT
-};
-
-enum boot_chain {
- NORMAL_BOOT = 0,
- BACKUP_BOOT
-};
-
-struct gpt_disk {
- //GPT primary header
- uint8_t *hdr;
- //primary header crc
- uint32_t hdr_crc;
- //GPT backup header
- uint8_t *hdr_bak;
- //backup header crc
- uint32_t hdr_bak_crc;
- //Partition entries array
- uint8_t *pentry_arr;
- //Partition entries array for backup table
- uint8_t *pentry_arr_bak;
- //Size of the pentry array
- uint32_t pentry_arr_size;
- //Size of each element in the pentry array
- uint32_t pentry_size;
- //CRC of the partition entry array
- uint32_t pentry_arr_crc;
- //CRC of the backup partition entry array
- uint32_t pentry_arr_bak_crc;
- //Path to block dev representing the disk
- char devpath[PATH_MAX];
- //Block size of disk
- uint32_t block_size;
- uint32_t is_initialized;
-};
-
-/******************************************************************************
- * FUNCTION PROTOTYPES
- ******************************************************************************/
-int prepare_boot_update(enum boot_update_stage stage);
-//GPT disk methods
-struct gpt_disk* gpt_disk_alloc();
-//Free previously allocated gpt_disk struct
-void gpt_disk_free(struct gpt_disk *disk);
-//Get the details of the disk holding the partition whose name
-//is passed in via dev
-int gpt_disk_get_disk_info(const char *dev, struct gpt_disk *disk);
-
-//Get pointer to partition entry from a allocated gpt_disk structure
-uint8_t* gpt_disk_get_pentry(struct gpt_disk *disk,
- const char *partname,
- enum gpt_instance instance);
-
-//Update the crc fields of the modified disk structure
-int gpt_disk_update_crc(struct gpt_disk *disk);
-
-//Write the contents of struct gpt_disk back to the actual disk
-int gpt_disk_commit(struct gpt_disk *disk);
-
-//Return if the current device is UFS based or not
-int gpt_utils_is_ufs_device();
-
-//Swtich betwieen using either the primary or the backup
-//boot LUN for boot. This is required since UFS boot partitions
-//cannot have a backup GPT which is what we use for failsafe
-//updates of the other 'critical' partitions. This function will
-//not be invoked for emmc targets and on UFS targets is only required
-//to be invoked for XBL.
-//
-//The algorithm to do this is as follows:
-//- Find the real block device(eg: /dev/block/sdb) that corresponds
-// to the /dev/block/bootdevice/by-name/xbl(bak) symlink
-//
-//- Once we have the block device 'node' name(sdb in the above example)
-// use this node to to locate the scsi generic device that represents
-// it by checking the file /sys/block/sdb/device/scsi_generic/sgY
-//
-//- Once we locate sgY we call the query ioctl on /dev/sgy to switch
-//the boot lun to either LUNA or LUNB
-int gpt_utils_set_xbl_boot_partition(enum boot_chain chain);
-
-//Given a vector of partition names as a input and a reference to a map,
-//populate the map to indicate which physical disk each of the partitions
-//sits on. The key in the map is the path to the block device where the
-//partiton lies and the value is a vector of strings indicating which of
-//the passed in partiton names sits on that device.
-int gpt_utils_get_partition_map(std::vector<std::string>& partition_list,
- std::map<std::string,std::vector<std::string>>& partition_map);
-#ifdef __cplusplus
-}
-#endif
-#endif /* __GPT_UTILS_H__ */
diff --git a/gpt-utils/sparse_crc32.cpp b/gpt-utils/sparse_crc32.cpp
deleted file mode 100644
index 267322c..0000000
--- a/gpt-utils/sparse_crc32.cpp
+++ /dev/null
@@ -1,97 +0,0 @@
-/*-
- * COPYRIGHT (C) 1986 Gary S. Brown. You may use this program, or
- * code or tables extracted from it, as desired without restriction.
- */
-
-/*
- * First, the polynomial itself and its table of feedback terms. The
- * polynomial is
- * X^32+X^26+X^23+X^22+X^16+X^12+X^11+X^10+X^8+X^7+X^5+X^4+X^2+X^1+X^0
- *
- * Note that we take it "backwards" and put the highest-order term in
- * the lowest-order bit. The X^32 term is "implied"; the LSB is the
- * X^31 term, etc. The X^0 term (usually shown as "+1") results in
- * the MSB being 1
- *
- * Note that the usual hardware shift register implementation, which
- * is what we're using (we're merely optimizing it by doing eight-bit
- * chunks at a time) shifts bits into the lowest-order term. In our
- * implementation, that means shifting towards the right. Why do we
- * do it this way? Because the calculated CRC must be transmitted in
- * order from highest-order term to lowest-order term. UARTs transmit
- * characters in order from LSB to MSB. By storing the CRC this way
- * we hand it to the UART in the order low-byte to high-byte; the UART
- * sends each low-bit to hight-bit; and the result is transmission bit
- * by bit from highest- to lowest-order term without requiring any bit
- * shuffling on our part. Reception works similarly
- *
- * The feedback terms table consists of 256, 32-bit entries. Notes
- *
- * The table can be generated at runtime if desired; code to do so
- * is shown later. It might not be obvious, but the feedback
- * terms simply represent the results of eight shift/xor opera
- * tions for all combinations of data and CRC register values
- *
- * The values must be right-shifted by eight bits by the "updcrc
- * logic; the shift must be unsigned (bring in zeroes). On some
- * hardware you could probably optimize the shift in assembler by
- * using byte-swap instructions
- * polynomial $edb88320
- *
- *
- * CRC32 code derived from work by Gary S. Brown.
- */
-
-/* Code taken from FreeBSD 8 */
-#include <stdint.h>
-#include <stdio.h>
-
-static uint32_t crc32_tab[] = {
- 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3,
- 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91,
- 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de, 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7,
- 0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9, 0xfa0f3d63, 0x8d080df5,
- 0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172, 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b,
- 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59,
- 0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599, 0xb8bda50f,
- 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d,
- 0x76dc4190, 0x01db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433,
- 0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01,
- 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457,
- 0x65b0d9c6, 0x12b7e950, 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65,
- 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb,
- 0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0, 0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9,
- 0x5005713c, 0x270241aa, 0xbe0b1010, 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f,
- 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad,
- 0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af, 0x04db2615, 0x73dc1683,
- 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8, 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1,
- 0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb, 0x196c3671, 0x6e6b06e7,
- 0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5,
- 0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b,
- 0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef, 0x4669be79,
- 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236, 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f,
- 0xc5ba3bbe, 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d,
- 0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a, 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713,
- 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, 0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21,
- 0x86d3d2d4, 0xf1d4e242, 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777,
- 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45,
- 0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db,
- 0xaed16a4a, 0xd9d65adc, 0x40df0b66, 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9,
- 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, 0xcdd70693, 0x54de5729, 0x23d967bf,
- 0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d};
-
-/*
- * A function that calculates the CRC-32 based on the table above is
- * given below for documentation purposes. An equivalent implementation
- * of this function that's actually used in the kernel can be found
- * in sys/libkern.h, where it can be inlined.
- */
-
-uint32_t sparse_crc32(uint32_t crc_in, const void* buf, size_t size) {
- const uint8_t* p = reinterpret_cast<const uint8_t*>(buf);
- uint32_t crc;
-
- crc = crc_in ^ ~0U;
- while (size--) crc = crc32_tab[(crc ^ *p++) & 0xFF] ^ (crc >> 8);
- return crc ^ ~0U;
-}
diff --git a/gpt-utils/sparse_crc32.h b/gpt-utils/sparse_crc32.h
deleted file mode 100644
index 2702c4f..0000000
--- a/gpt-utils/sparse_crc32.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Copyright (C) 2010 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef _LIBSPARSE_SPARSE_CRC32_H_
-#define _LIBSPARSE_SPARSE_CRC32_H_
-
-#include <stdint.h>
-
-uint32_t sparse_crc32(uint32_t crc, const void* buf, size_t size);
-
-#endif
diff --git a/idc/goodix_ts.idc b/idc/goodix_ts.idc
deleted file mode 100644
index 6cd7276..0000000
--- a/idc/goodix_ts.idc
+++ /dev/null
@@ -1,4 +0,0 @@
-device.internal = 1
-touch.deviceType = touchScreen
-touch.orientationAware = 1
-
diff --git a/idc/goodix_ts_station.idc b/idc/goodix_ts_station.idc
deleted file mode 100644
index 75676f2..0000000
--- a/idc/goodix_ts_station.idc
+++ /dev/null
@@ -1,4 +0,0 @@
-device.internal = 0
-touch.deviceType = touchScreen
-touch.orientationAware = 1
-touch.wake = 0
diff --git a/init/Android.bp b/init/Android.bp
deleted file mode 100644
index 965518c..0000000
--- a/init/Android.bp
+++ /dev/null
@@ -1,13 +0,0 @@
-cc_library_static {
- name: "libinit_rog2",
-
- include_dirs: [
- "system/core/base/include",
- "system/core/init",
- ],
- cflags: [
- "-Wall",
- ],
- srcs: ["init_rog2.cpp"],
- recovery_available: true,
-}
\ No newline at end of file
diff --git a/init/init_rog2.cpp b/init/init_rog2.cpp
deleted file mode 100644
index 73dedeb..0000000
--- a/init/init_rog2.cpp
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- Copyright (c) 2015, The Linux Foundation. All rights reserved.
- Copyright (C) 2020 The OmniRom Project.
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are
- met:
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above
- copyright notice, this list of conditions and the following
- disclaimer in the documentation and/or other materials provided
- with the distribution.
- * Neither the name of The Linux Foundation nor the names of its
- contributors may be used to endorse or promote products derived
- from this software without specific prior written permission.
- THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
- WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
- BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <android-base/properties.h>
-#include <android-base/logging.h>
-#include "property_service.h"
-#include <sys/resource.h>
-#define _REALLY_INCLUDE_SYS__SYSTEM_PROPERTIES_H_
-#include <sys/_system_properties.h>
-
-namespace android {
-namespace init {
-
-using android::base::GetProperty;
-using android::init::property_set;
-
-void property_override(const std::string& name, const std::string& value)
-{
- size_t valuelen = value.size();
-
- prop_info* pi = (prop_info*) __system_property_find(name.c_str());
- if (pi != nullptr) {
- __system_property_update(pi, value.c_str(), valuelen);
- }
- else {
- int rc = __system_property_add(name.c_str(), name.size(), value.c_str(), valuelen);
- if (rc < 0) {
- LOG(ERROR) << "property_set(\"" << name << "\", \"" << value << "\") failed: "
- << "__system_property_add failed";
- }
- }
-}
-
-void property_override_dual(char const prop[], char const system_prop[],
- const std::string& value)
-{
- property_override(prop, value);
- property_override(system_prop, value);
-}
-
-void vendor_load_properties()
-{
- std::string name;
- std::string country;
- std::string build_id;
- std::string build_number;
- std::ostringstream fp;
- std::string fingerprint;
- std::ostringstream desc;
- std::string description;
- std::ostringstream disp;
- std::string display_id;
- std::string region;
-
- LOG(INFO) << "Starting custom init";
-
- name = android::base::GetProperty("ro.product.vendor.name", "");
- region = name.substr (0,2);
- country = android::base::GetProperty("ro.boot.country_code", "");
-
- LOG(INFO) << name;
-
- // These should be the only things to change for OTA updates
- build_id = "QKQ1.190825.002";
- build_number = "17.0240.2007.27-0";
-
- // Create the correct stock props based on the above values
- desc << name << "-user 10 " << build_id << " " << build_number << " release-keys";
- description = desc.str();
-
- disp << build_id << ".WW_Phone-" << build_number;
- display_id = disp.str();
-
- fp << "asus/" << name << "/ASUS_I001_1:10/" << build_id << "/" << build_number << ":user/release-keys";
- fingerprint = fp.str();
-
- // These properties are the same for all variants
- property_override("ro.build.description", description);
- property_override("ro.build.display.id", display_id);
- property_override_dual("ro.build.fingerprint", "ro.system.build.fingerprint", fingerprint);
- property_override("ro.product.carrier", "ASUS-ASUS_I001D-WW");
-
- // Set below properties based on variant name
- if (name == "WW_I001D") {
- // Set properties for IN and US variants
- if (country == "IN") {
- property_override_dual("ro.product.model", "ro.product.system.model", "ASUS_I001DE");
- property_override("ro.config.versatility", "IN");
- } else if (country == "US") {
- property_override("ro.config.versatility", "US");
- } else {
- property_override_dual("ro.product.model", "ro.product.system.model", "ASUS_I001DA");
- }
- } else {
- property_override("ro.product.system.name", name);
- property_override("ro.config.versatility", region);
- }
- if (name == "RU_I001D") {
- property_override_dual("ro.product.model", "ro.product.system.model", "ASUS_I001DB");
- }
- if (name == "EU_I001D") {
- property_override_dual("ro.product.model", "ro.product.system.model", "ASUS_I001DC");
- }
- if (name == "CN_I001D") {
- property_override_dual("ro.product.model", "ro.product.system.model", "ASUS_I001DD");
- }
-}
-}
-}
diff --git a/keychars/goodix_ts.kcm b/keychars/goodix_ts.kcm
deleted file mode 100644
index a510228..0000000
--- a/keychars/goodix_ts.kcm
+++ /dev/null
@@ -1 +0,0 @@
-type SPECIAL_FUNCTION
diff --git a/keylayout/goodix_ts.kl b/keylayout/goodix_ts.kl
deleted file mode 100644
index b74f901..0000000
--- a/keylayout/goodix_ts.kl
+++ /dev/null
@@ -1,18 +0,0 @@
-#key 116 GESTURE_DOUBLE_CLICK WAKE VIRTUAL
-key 103 GESTURE_SWIPE_UP WAKE VIRTUAL
-key 158 BACK VIRTUAL
-#key 139 APP_SWITCH VIRTUAL
-key 102 HOME VIRTUAL
-key 258 GESTURE_UP_SWIPE WAKE VIRTUAL
-key 259 GESTURE_DOWN_SWIPE WAKE VIRTUAL
-key 260 GESTURE_LEFT_SWIPE WAKE VIRTUAL
-key 261 GESTURE_RIGHT_SWIPE WAKE VIRTUAL
-key 17 GESTURE_W WAKE VIRTUAL
-key 31 GESTURE_S WAKE VIRTUAL
-key 18 GESTURE_E WAKE VIRTUAL
-key 46 GESTURE_C WAKE VIRTUAL
-key 44 GESTURE_Z WAKE VIRTUAL
-key 47 GESTURE_V WAKE VIRTUAL
-key 33 FINGERPRINT_EARLYWAKEUP
-key 22 FINGERPRINT_SCREEN_OFF_LEAVE
-key 38 FINGERPRINT_SCREEN_OFF_TAP_IN_IDENTIFY_AREA
\ No newline at end of file
diff --git a/lights/.clang-format b/lights/.clang-format
deleted file mode 100644
index ae4a451..0000000
--- a/lights/.clang-format
+++ /dev/null
@@ -1,11 +0,0 @@
-BasedOnStyle: Google
-AccessModifierOffset: -2
-AllowShortFunctionsOnASingleLine: Inline
-ColumnLimit: 100
-CommentPragmas: NOLINT:.*
-DerivePointerAlignment: false
-IndentWidth: 4
-PointerAlignment: Left
-TabWidth: 4
-UseTab: Never
-PenaltyExcessCharacter: 32
diff --git a/lights/Android.bp b/lights/Android.bp
deleted file mode 100644
index 34491a6..0000000
--- a/lights/Android.bp
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright (C) 2018 The LineageOS Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-cc_binary {
- name: "android.hardware.light@2.0-service.asus_msmnile",
- defaults: ["hidl_defaults"],
- stem: "android.hardware.light@2.0-service",
- init_rc: ["android.hardware.light@2.0-service.rc"],
- vendor: false,
- product_overlay_specific: true,
- relative_install_path: "hw",
- srcs: ["service.cpp", "Light.cpp"],
- shared_libs: [
- "android.hardware.light@2.0",
- "libbase",
- "libhardware",
- "libhidlbase",
- "libhidltransport",
- "libhwbinder",
- "liblog",
- "libutils",
- ],
- overrides: [
- "light",
- ],
-}
\ No newline at end of file
diff --git a/lights/Light.cpp b/lights/Light.cpp
deleted file mode 100644
index 2ffa6b1..0000000
--- a/lights/Light.cpp
+++ /dev/null
@@ -1,179 +0,0 @@
-/*
- * Copyright (C) 2014, 2017-2018 The Linux Foundation. All rights reserved.
- * Not a contribution
- * Copyright (C) 2008 The Android Open Source Project
- * Copyright (C) 2018-2019 The LineageOS Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#define LOG_TAG "LightsService"
-
-#include "Light.h"
-#include <android-base/logging.h>
-#include <fstream>
-
-namespace {
-/*
- * Write value to path and close file.
- */
-template <typename T>
-static void set(const std::string& path, const T& value) {
- std::ofstream file(path);
-
- if (!file.is_open()) {
- LOG(DEBUG) << "failed to open path " << path;
- return;
- }
-
- file << value;
-
- if (file.fail()) {
- LOG(DEBUG) << "failed to write " << value
- << "to " << path;
- }
-}
-
-/*
- * Read from path and close file.
- * Return def in case of any failure.
- */
-template <typename T>
-static T get(const std::string& path, const T& def) {
- std::ifstream file(path);
- T result;
-
- if (!file.is_open()) {
- LOG(DEBUG) << "failed to open path " << path;
- return def;
- }
-
- file >> result;
-
- if (file.fail()) {
- LOG(DEBUG) << "failed to read from " << path;
- return def;
- }
-
- return result;
-}
-} // anonymous namespace
-
-namespace android {
-namespace hardware {
-namespace light {
-namespace V2_0 {
-namespace implementation {
-
-static constexpr int kDefaultMaxBrightness = 255;
-static constexpr char kBreath[] = "breath";
-static constexpr char kBrightness[] = "brightness";
-static constexpr char kDelayOff[] = "delay_off";
-static constexpr char kDelayOn[] = "delay_on";
-
-static uint32_t rgbToBrightness(const LightState& state) {
- uint32_t color = state.color & 0x00ffffff;
- return ((77 * ((color >> 16) & 0x00ff))
- + (150 * ((color >> 8) & 0x00ff))
- + (29 * (color & 0x00ff))) >> 8;
-}
-
-Light::Light() {
- mLights.emplace(Type::ATTENTION, std::bind(&Light::handleNotification, this, std::placeholders::_1, 0));
- mLights.emplace(Type::BACKLIGHT, std::bind(&Light::handleBacklight, this, std::placeholders::_1));
- mLights.emplace(Type::BATTERY, std::bind(&Light::handleNotification, this, std::placeholders::_1, 1));
- mLights.emplace(Type::NOTIFICATIONS, std::bind(&Light::handleNotification, this, std::placeholders::_1, 2));
-}
-
-void Light::handleBacklight(const LightState& state) {
- uint32_t maxBrightness = get("/sys/class/backlight/panel0-backlight/max_brightness", kDefaultMaxBrightness);
- uint32_t sentBrightness = rgbToBrightness(state);
- uint32_t brightness = sentBrightness * maxBrightness / kDefaultMaxBrightness;
- LOG(DEBUG) << "Writing backlight brightness " << brightness
- << " (orig " << sentBrightness << ")";
- set("/sys/class/backlight/panel0-backlight/brightness", brightness);
-}
-
-void Light::handleNotification(const LightState& state, size_t index) {
- mLightStates.at(index) = state;
-
- LightState stateToUse = mLightStates.front();
- for (const auto& lightState : mLightStates) {
- if (lightState.color & 0xffffff) {
- stateToUse = lightState;
- break;
- }
- }
-
- std::map<std::string, int> colorValues;
- colorValues["red"] = (stateToUse.color >> 16) & 0xff;
- colorValues["green"] = (stateToUse.color >> 8) & 0xff;
-
- auto makeLedPath = [](const std::string& led, const char op[]) -> std::string {
- return "/sys/class/leds/" + led + "/" + op;
- };
-
- // Disable all blinking before starting
- for (const auto& entry : colorValues) {
- set(makeLedPath(entry.first, kBreath), 0);
- }
-
- if (state.flashMode == Flash::TIMED) {
- for (const auto& entry : colorValues) {
- set(makeLedPath(entry.first, kDelayOff), state.flashOffMs);
- set(makeLedPath(entry.first, kDelayOn), state.flashOnMs);
- }
-
- // Start blinking
- for (const auto& entry : colorValues) {
- set(makeLedPath(entry.first, kBreath), entry.second);
- }
- } else {
- for (const auto& entry : colorValues) {
- set(makeLedPath(entry.first, kBrightness), entry.second);
- }
- }
-}
-
-Return<Status> Light::setLight(Type type, const LightState& state) {
- auto it = mLights.find(type);
-
- if (it == mLights.end()) {
- return Status::LIGHT_NOT_SUPPORTED;
- }
-
- // Lock global mutex until light state is updated.
- std::lock_guard<std::mutex> lock(mLock);
-
- it->second(state);
-
- return Status::SUCCESS;
-}
-
-Return<void> Light::getSupportedTypes(getSupportedTypes_cb _hidl_cb) {
- std::vector<Type> types;
-
- for (auto const& light : mLights) {
- types.push_back(light.first);
- }
-
- _hidl_cb(types);
-
- return Void();
-}
-
-} // namespace implementation
-} // namespace V2_0
-} // namespace light
-} // namespace hardware
-} // namespace android
diff --git a/lights/Light.h b/lights/Light.h
deleted file mode 100644
index a19d6e6..0000000
--- a/lights/Light.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (C) 2018 The LineageOS Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef ANDROID_HARDWARE_LIGHT_V2_0_LIGHT_H
-#define ANDROID_HARDWARE_LIGHT_V2_0_LIGHT_H
-
-#include <android/hardware/light/2.0/ILight.h>
-#include <hardware/lights.h>
-#include <hidl/Status.h>
-#include <unordered_map>
-#include <mutex>
-
-namespace android {
-namespace hardware {
-namespace light {
-namespace V2_0 {
-namespace implementation {
-
-using ::android::hardware::Return;
-using ::android::hardware::Void;
-using ::android::hardware::hidl_vec;
-using ::android::hardware::light::V2_0::ILight;
-using ::android::hardware::light::V2_0::LightState;
-using ::android::hardware::light::V2_0::Status;
-using ::android::hardware::light::V2_0::Type;
-
-class Light : public ILight {
- public:
- Light();
-
- Return<Status> setLight(Type type, const LightState& state) override;
- Return<void> getSupportedTypes(getSupportedTypes_cb _hidl_cb) override;
-
- private:
- void handleBacklight(const LightState& state);
- void handleNotification(const LightState& state, size_t index);
-
- std::mutex mLock;
- std::unordered_map<Type, std::function<void(const LightState&)>> mLights;
- std::array<LightState, 3> mLightStates;
-};
-
-} // namespace implementation
-} // namespace V2_0
-} // namespace light
-} // namespace hardware
-} // namespace android
-
-#endif // ANDROID_HARDWARE_LIGHT_V2_0_LIGHT_H
diff --git a/lights/android.hardware.light@2.0-service.rc b/lights/android.hardware.light@2.0-service.rc
deleted file mode 100644
index b54ca95..0000000
--- a/lights/android.hardware.light@2.0-service.rc
+++ /dev/null
@@ -1,7 +0,0 @@
-service vendor.light-hal-2-0 /vendor/bin/hw/android.hardware.light@2.0-service
- interface android.hardware.light@2.0::ILight default
- class hal
- user system
- group system
- # shutting off lights while powering-off
- shutdown critical
diff --git a/lights/service.cpp b/lights/service.cpp
deleted file mode 100644
index 423263d..0000000
--- a/lights/service.cpp
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (C) 2018 The LineageOS Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#define LOG_TAG "android.hardware.light@2.0-service.asus_msmnile"
-
-#include <android-base/logging.h>
-#include <hidl/HidlTransportSupport.h>
-
-#include "Light.h"
-
-using android::hardware::configureRpcThreadpool;
-using android::hardware::joinRpcThreadpool;
-
-using android::hardware::light::V2_0::ILight;
-using android::hardware::light::V2_0::implementation::Light;
-
-using android::OK;
-using android::sp;
-using android::status_t;
-
-int main() {
- status_t status;
- sp<ILight> service = nullptr;
-
- LOG(INFO) << "Light HAL service 2.0 is starting.";
-
- service = new Light();
- if (service == nullptr) {
- LOG(ERROR) << "Can not create an instance of Light HAL Iface, exiting.";
- goto shutdown;
- }
-
- configureRpcThreadpool(1, true /*callerWillJoin*/);
-
- status = service->registerAsService();
- if (status != OK) {
- LOG(ERROR) << "Could not register service for Light HAL Iface (" << status << ")";
- goto shutdown;
- }
-
- LOG(INFO) << "Light HAL service is ready.";
- joinRpcThreadpool();
- // Should not pass this line
-
-shutdown:
- // In normal operation, we don't expect the thread pool to exit
- LOG(ERROR) << "Light HAL service is shutting down.";
- return 1;
-}
diff --git a/meta/config.json b/meta/config.json
index 12843ef..b2173b4 100644
--- a/meta/config.json
+++ b/meta/config.json
@@ -1,8 +1,8 @@
{
- "model": "ROG Phone 2",
- "pageUrl":"https://dl.omnirom.org/rog2",
+ "model": "ROG Phone 3",
+ "pageUrl":"https://dl.omnirom.org/rog3",
"make": "Asus",
"image": "meta/device_image.jpg",
- "state": "official",
- "device": "rog2"
+ "state": "unofficial",
+ "device": "rog3"
}
\ No newline at end of file
diff --git a/omni.dependencies b/omni.dependencies
index f8ca643..371a2d3 100644
--- a/omni.dependencies
+++ b/omni.dependencies
@@ -1,20 +1,8 @@
[
{
"remote": "omnirom",
- "repository": "android_device_qcom_caf-sepolicy",
- "target_path": "device/qcom/sepolicy",
+ "repository": "android_device_asus_sm8250-common",
+ "target_path": "device/asus/sm8250-common"
"revision": "android-10"
- },
- {
- "remote": "github",
- "repository": "android_kernel_asus_rog2",
- "target_path": "kernel/asus/rog2",
- "revision": "android-10"
- },
- {
- "remote": "omnirom",
- "repository": "android_vendor_qcom_opensource_fm-commonsys",
- "target_path": "vendor/qcom/opensource/fm-commonsys",
- "revision": "android-10"
- }
+ }
]
diff --git a/omni_rog2.mk b/omni_rog3.mk
similarity index 74%
rename from omni_rog2.mk
rename to omni_rog3.mk
index 3b97439..816047b 100644
--- a/omni_rog2.mk
+++ b/omni_rog3.mk
@@ -36,30 +36,28 @@
$(call inherit-product, vendor/omni/config/common.mk)
# Inherit from hardware-specific part of the product configuration
-$(call inherit-product, device/asus/rog2/device.mk)
+$(call inherit-product, device/asus/rog3/device.mk)
# Discard inherited values and use our own instead.
-PRODUCT_DEVICE := rog2
-PRODUCT_NAME := omni_rog2
+PRODUCT_DEVICE := rog3
+PRODUCT_NAME := omni_rog3
PRODUCT_BRAND := asus
-PRODUCT_MODEL := ASUS_I001D
+PRODUCT_MODEL := ASUS_I003D
PRODUCT_MANUFACTURER := asus
PRODUCT_GMS_CLIENTID_BASE := android-asus
-TARGET_DEVICE := WW_I001D
-PRODUCT_SYSTEM_DEVICE := ASUS_I001_1
-PRODUCT_SYSTEM_NAME := WW_I001D
+TARGET_DEVICE := WW_I003D
+PRODUCT_SYSTEM_DEVICE := ASUS_I003_1
+PRODUCT_SYSTEM_NAME := WW_I003D
OMNI_PRODUCT_PROPERTIES += \
- ro.build.product=ZS660KL
+ ro.build.product=ZS661KS
-# Build properties from stock
-ASUS_BUILD_ID := QKQ1.190825.002
-ASUS_BUILD_NUMBER := 17.0240.2007.27-0
-
-VENDOR_RELEASE := 10/$(ASUS_BUILD_ID)/$(ASUS_BUILD_NUMBER):user/release-keys
-BUILD_FINGERPRINT := asus/WW_I001D/ASUS_I001_1:$(VENDOR_RELEASE)
+VENDOR_RELEASE := 10/QKQ1.200419.002/17.0823.2007.32-0:user/release-keys
+BUILD_FINGERPRINT := asus/WW_I003D/ASUS_I003_1:$(VENDOR_RELEASE)
+OMNI_BUILD_FINGERPRINT := asus/WW_I003D/ASUS_I003_1:$(VENDOR_RELEASE)
+OMNI_PRIVATE_BUILD_DESC := "'QKQ1.200419.002.WW_Phone-17.0823.2007.32-0'"
# Security patch level from stock
-PLATFORM_SECURITY_PATCH_OVERRIDE := 2020-07-05
+PLATFORM_SECURITY_PATCH_OVERRIDE := 2020-07-01
diff --git a/overlay/frameworks/base/core/res/res/values-mcc310-mnc590/config.xml b/overlay/frameworks/base/core/res/res/values-mcc310-mnc590/config.xml
deleted file mode 100644
index 88ff4b8..0000000
--- a/overlay/frameworks/base/core/res/res/values-mcc310-mnc590/config.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2012, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-
-<resources>
- <string-array translatable="false" name="config_gpsParameters">
- <item>SUPL_HOST=supl.google.com</item>
- <item>SUPL_PORT=7275</item>
- <item>SUPL_VER=0x20000</item>
- <item>SUPL_MODE=3</item>
- <item>SUPL_ES=0</item>
- <item>LPP_PROFILE=3</item>
- <item>USE_EMERGENCY_PDN_FOR_EMERGENCY_SUPL=1</item>
- <item>A_GLONASS_POS_PROTOCOL_SELECT=0</item>
- <item>GPS_LOCK=0</item>
- </string-array>
-</resources>
diff --git a/overlay/frameworks/base/core/res/res/values-mcc311-mnc480/config.xml b/overlay/frameworks/base/core/res/res/values-mcc311-mnc480/config.xml
deleted file mode 100644
index 88ff4b8..0000000
--- a/overlay/frameworks/base/core/res/res/values-mcc311-mnc480/config.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2012, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-
-<resources>
- <string-array translatable="false" name="config_gpsParameters">
- <item>SUPL_HOST=supl.google.com</item>
- <item>SUPL_PORT=7275</item>
- <item>SUPL_VER=0x20000</item>
- <item>SUPL_MODE=3</item>
- <item>SUPL_ES=0</item>
- <item>LPP_PROFILE=3</item>
- <item>USE_EMERGENCY_PDN_FOR_EMERGENCY_SUPL=1</item>
- <item>A_GLONASS_POS_PROTOCOL_SELECT=0</item>
- <item>GPS_LOCK=0</item>
- </string-array>
-</resources>
diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml
index 9018e4a..da3cf21 100644
--- a/overlay/frameworks/base/core/res/res/values/config.xml
+++ b/overlay/frameworks/base/core/res/res/values/config.xml
@@ -18,31 +18,31 @@
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- The list of vendor package signatures that should also be considered
+ <!-- The list of vendor package signatures that should also be considered
platform signatures, specifically for use on devices with a vendor partition. -->
<string-array name="config_vendorPlatformSignatures" translatable="false">
- <item>308203d5308202bda003020102020900f91bdd6e07ba5c4b300d06092a864886f70d01010b0500308180310b3009060355040613025457310f300d06035504080c0654616977616e310f300d06035504070c065461697065693110300e060355040a0c074173757354656b310e300c060355040b0c0550686f6e653110300e06035504030c075a533636304b4c311b301906092a864886f70d010901160c61646d40617375732e636f6d3020170d3139303331343130353235395a180f32303530303331353130353235395a308180310b3009060355040613025457310f300d06035504080c0654616977616e310f300d06035504070c065461697065693110300e060355040a0c074173757354656b310e300c060355040b0c0550686f6e653110300e06035504030c075a533636304b4c311b301906092a864886f70d010901160c61646d40617375732e636f6d30820120300d06092a864886f70d01010105000382010d00308201080282010100cb00506b2ef5424618b4e65475a9f1b4cf6bf7a216c06885e101721b231c8097bb84435aefe4bf6da634901ce932a091fe416bc97fe52890f08d8cd76febaf8dcff9886fee08fa05f0b99b2ffdebe78dce816b2bb10df8561a667a7baff7968cb56ea5c330302ec53080a4c72411097b27e88048a6255dcaf996e1f6fb9b23bb9409d3b5fb19a3927961a16b7a9fffb53954bed5a3502d9f3f94a27dcfc08ac4a90e967e940f7e05924f1b12262d14f72a6a486a908ad15dbde3298c5b013a58a02e962636600e2721ba901c22fef1431e3717df15c8108c74d03c082ea9ade6623137194209dbb8349c7bd41b1179d4b1a9a8a54323afdc3ab1a4cf16210079020103a350304e301d0603551d0e04160414d2d89d498059e655d118675321adba05b86ede0f301f0603551d23041830168014d2d89d498059e655d118675321adba05b86ede0f300c0603551d13040530030101ff300d06092a864886f70d01010b05000382010100ba7f913dcbbf45ab27f980f5df9d657ae47be1716dba2d57e8b3ff05774d0677754e03f53f4242b46d54d543caf3007a7ceb7401fa9b5e52039c11cb97426f59d058479e950b00f9a7eab85fcb0916960c8305d7fc79a03d056e3a9f1bc5c15e63e65d2476091b1b2a70bf6831e91f397ce660731562d79f8f783a30b63764a66a288062c849cdd0cd5f85568af5a0cb5ecc8d6a0e32f3d1d98cf214d6e70c7c509da4d3a7289d2f8def3c3cb9903f1a6250cc785359156caa8ff184cf2681b11cb0be0c07baf6748150e28a2004d9c8997aeb1b546c98ae33787ac1a54f228a57ff5af936979d517a6e1bef3eeeb44e3006eba11f1aa33bdc7fd3b29d4d5928</item>
+ <item>308203e1308202c9a003020102020900ac08b4b902e81104300d06092a864886f70d01010b0500308186310b3009060355040613025457310f300d06035504080c0654616977616e310f300d06035504070c065461697065693110300e060355040a0c074173757354656b3110300e060355040b0c0750686f6e6542553110300e06035504030c075a533636314b53311f301d06092a864886f70d0109011610737570706f727440617375732e636f6d3020170d3230303130383037303235345a180f32303531303130393037303235345a308186310b3009060355040613025457310f300d06035504080c0654616977616e310f300d06035504070c065461697065693110300e060355040a0c074173757354656b3110300e060355040b0c0750686f6e6542553110300e06035504030c075a533636314b53311f301d06092a864886f70d0109011610737570706f727440617375732e636f6d30820120300d06092a864886f70d01010105000382010d00308201080282010100cc6ee4f00dced3eeefb5b647f8582e196bce357b8852c29f4a66c836f8b457b816f7e4d96f10a02e435321c7464638be90f9de542eceab134d0c9d071d6011b4b519322b877cbd93ec86fedced6c102fc3b5fe87d18988689a8e3ad8f96ba7cea347547a66420790ee8c2d08850c9947abf12aff82c8ac634b7d2dc52e94553b62ea929313c2831d352f92242e1f1cec68f6ad07c1f3e778895ad95bd0c59eac916242d958e7a775740b489018e9e798590cd63193459da7ed865b0abe0334ca3bef5eb457899589f8f3b7b13579b29fea5ca76e62e3aba05d299b9d9fe585361fe909ba2575ce6821dc7aeed6a70ab0cbb2ecf63036a32a472840ef9d8915d9020103a350304e301d0603551d0e041604140970668cd57468b9f8faea33ae8200d8218a6f67301f0603551d230418301680140970668cd57468b9f8faea33ae8200d8218a6f67300c0603551d13040530030101ff300d06092a864886f70d01010b05000382010100aadbf7d21cf431d3ea6e656100e54dae7ba7db0fad919a4c247062f16b67b7b2c116028dd0154cca949685c62bcfffed15832bff756ed38fbbc191f7b3bff43c3d8884c04db00b05981b233e7e940397f70ac45793ba860b32ecf45361ba9199e361b99ec8cc197c57107c16549fa4696d516d0db927bb3956ba4aa141d96696a41f3b7ca06699bab59d2ed60384398a60e65a2202cef71ffa89e5227a632114c8dbb19ef4bd4673bae163bdea27b2dc9321b4d9a67e29abac35488e276be1e18e964ae6511ee83eb79f5724611fa52e63bcd6d4a552836063bbef12930698acfadc2916650f7f75fd818607b5e3247cfff4b683d714e2752501a6c35812d194</item>
</string-array>
- <!-- Flag indicating whether the we should enable the automatic brightness in Settings.
- Software implementation will be used if config_hardware_auto_brightness_available is not set -->
- <bool name="config_automatic_brightness_available">true</bool>
-
<!-- Array of light sensor lux values to define our levels for auto backlight brightness support.
The N entries of this array define N + 1 control points as follows:
(1-based arrays)
+
Point 1: (0, value[1]): lux <= 0
Point 2: (level[1], value[2]): 0 < lux <= level[1]
Point 3: (level[2], value[3]): level[2] < lux <= level[3]
...
Point N+1: (level[N], value[N+1]): level[N] < lux
+
The control points must be strictly increasing. Each control point
corresponds to an entry in the brightness backlight values arrays.
For example, if lux == level[1] (first element of the levels array)
then the brightness will be determined by value[2] (second element
of the brightness values array).
+
Spline interpolation is used to determine the auto-brightness
backlight values for lux levels between these control points.
+
Must be overridden in platform specific overlays -->
<integer-array name="config_autoBrightnessLevels">
<item>1</item>
@@ -66,15 +66,21 @@
<item>10000</item>
<item>12500</item>
<item>15000</item>
+ <item>17500</item>
+ <item>20000</item>
+ <item>50000</item>
</integer-array>
+
<!-- Array of desired screen brightness in nits corresponding to the lux values
in the config_autoBrightnessLevels array. As with config_screenBrightnessMinimumNits and
config_screenBrightnessMaximumNits, the display brightness is defined as the measured
brightness of an all-white image.
+
If this is defined then:
- config_autoBrightnessLcdBacklightValues should not be defined
- config_screenBrightnessNits must be defined
- config_screenBrightnessBacklight must be defined
+
This array should have size one greater than the size of the config_autoBrightnessLevels
array. The brightness values must be non-negative and non-decreasing. This must be
overridden in platform specific overlays -->
@@ -82,84 +88,104 @@
<item>8</item>
<item>11</item>
<item>35</item>
- <item>52</item>
+ <item>53</item>
<item>67</item>
- <item>81</item>
- <item>103</item>
- <item>119</item>
- <item>130</item>
+ <item>82</item>
+ <item>105</item>
+ <item>118</item>
+ <item>129</item>
<item>138</item>
- <item>151</item>
+ <item>152</item>
<item>164</item>
- <item>176</item>
- <item>229</item>
- <item>264</item>
+ <item>178</item>
+ <item>228</item>
+ <item>263</item>
<item>291</item>
- <item>303</item>
- <item>310</item>
+ <item>304</item>
+ <item>311</item>
<item>314</item>
<item>319</item>
<item>399</item>
<item>480</item>
+ <item>558</item>
+ <item>639</item>
+ <item>1600</item>
</array>
- <integer-array name="config_screenBrightnessBacklight">
- <item>4</item>
- <item>5</item>
- <item>7</item>
- <item>22</item>
- <item>33</item>
- <item>42</item>
- <item>51</item>
- <item>65</item>
- <item>75</item>
- <item>82</item>
- <item>87</item>
- <item>95</item>
- <item>103</item>
- <item>111</item>
- <item>144</item>
- <item>166</item>
- <item>183</item>
- <item>191</item>
- <item>195</item>
- <item>198</item>
- <item>201</item>
- <item>251</item>
- <item>255</item>
- </integer-array>
<!-- An array of floats describing the screen brightness in nits corresponding to the backlight
values in the config_screenBrightnessBacklight array. On OLED displays these values
should be measured with an all white image while the display is in the fully on state.
Note that this value should *not* reflect the maximum brightness value for any high
brightness modes but only the maximum brightness value obtainable in a sustainable manner.
+
This array should be equal in size to config_screenBrightnessBacklight -->
<array name="config_screenBrightnessNits">
<item>6</item>
<item>8</item>
<item>11</item>
<item>35</item>
- <item>52</item>
+ <item>53</item>
<item>67</item>
- <item>81</item>
- <item>103</item>
- <item>119</item>
- <item>130</item>
+ <item>82</item>
+ <item>105</item>
+ <item>118</item>
+ <item>129</item>
<item>138</item>
- <item>151</item>
+ <item>152</item>
<item>164</item>
- <item>176</item>
- <item>229</item>
- <item>264</item>
+ <item>178</item>
+ <item>228</item>
+ <item>263</item>
<item>291</item>
- <item>303</item>
- <item>310</item>
+ <item>304</item>
+ <item>311</item>
<item>314</item>
<item>319</item>
- <item>399</item>
- <item>405</item>
+ <item>387</item>
</array>
+ <!-- An array describing the screen's backlight values corresponding to the brightness
+ values in the config_screenBrightnessNits array.
+
+ This array should be equal in size to config_screenBrightnessBacklight. -->
+ <integer-array name="config_screenBrightnessBacklight">
+ <item>4</item>
+ <item>5</item>
+ <item>7</item>
+ <item>23</item>
+ <item>35</item>
+ <item>44</item>
+ <item>54</item>
+ <item>69</item>
+ <item>78</item>
+ <item>85</item>
+ <item>91</item>
+ <item>100</item>
+ <item>108</item>
+ <item>117</item>
+ <item>150</item>
+ <item>173</item>
+ <item>192</item>
+ <item>200</item>
+ <item>205</item>
+ <item>207</item>
+ <item>210</item>
+ <item>255</item>
+ </integer-array>
+
+ <!-- Screen brightness used to dim the screen when the user activity
+ timeout expires. May be less than the minimum allowed brightness setting
+ that can be set by the user. -->
+ <integer name="config_screenBrightnessDim">10</integer>
+
+ <!-- Default screen brightness setting.
+ Must be in the range specified by minimum and maximum. -->
+ <integer name="config_screenBrightnessSettingDefault">58</integer>
+
+ <!-- Minimum screen brightness setting allowed by the power manager.
+ The user is forbidden from setting the brightness below this level. -->
+ <integer name="config_screenBrightnessSettingMinimum">4</integer>
+
<!-- Stability requirements in milliseconds for accepting a new brightness level. This is used
for debouncing the light sensor. Different constants are used to debounce the light sensor
when adapting to brighter or darker environments. This parameter controls how quickly
@@ -168,463 +194,10 @@
<integer name="config_autoBrightnessBrighteningLightDebounce">2000</integer>
<integer name="config_autoBrightnessDarkeningLightDebounce">4000</integer>
- <!-- Minimum screen brightness setting allowed by the power manager.
- The user is forbidden from setting the brightness below this level. -->
- <integer name="config_screenBrightnessSettingMinimum">2</integer>
-
- <!-- Default screen brightness setting.
- Must be in the range specified by minimum and maximum. -->
- <integer name="config_screenBrightnessSettingDefault">46</integer>
-
- <!-- Array of allowable ConnectivityManager network types for tethering -->
- <!-- Common options are [1, 4] for TYPE_WIFI and TYPE_MOBILE_DUN or
- [0,1,5,7] for TYPE_MOBILE, TYPE_WIFI, TYPE_MOBILE_HIPRI and TYPE_BLUETOOTH -->
- <integer-array translatable="false" name="config_tether_upstream_types">
- <item>1</item>
- <item>7</item>
- <item>0</item>
- </integer-array>
-
- <!-- If this is true, the screen will come on when you unplug usb/power/whatever. -->
- <bool name="config_unplugTurnsOnScreen">true</bool>
-
- <!-- Boolean indicating whether the wifi chipset supports background scanning mechanism.
- This mechanism allows the host to remain in suspend state and the dongle to actively
- scan and wake the host when a configured SSID is detected by the dongle. This chipset
- capability can provide power savings when wifi needs to be always kept on. -->
- <bool translatable="false" name="config_wifi_background_scan_support">true</bool>
-
- <!-- Integer thresholds, do not connect to APs with RSSI lower than these values -->
- <integer translatable="false" name="config_wifi_framework_wifi_score_entry_rssi_threshold_5GHz">-82</integer>
- <integer translatable="false" name="config_wifi_framework_wifi_score_entry_rssi_threshold_24GHz">-85</integer>
-
- <!-- Integer thresholds for low network score, should be somewhat less than the entry threshholds -->
- <integer translatable="false" name="config_wifi_framework_wifi_score_bad_rssi_threshold_5GHz">-82</integer>
- <integer translatable="false" name="config_wifi_framework_wifi_score_bad_rssi_threshold_24GHz">-85</integer>
-
- <!-- Boolean indicating whether or not to revert to default country code when cellular
- radio is unable to find any MCC information to infer wifi country code from -->
- <bool translatable="false" name="config_wifi_revert_country_code_on_cellular_loss">false</bool>
-
- <!-- This string array should be overridden by the device to present a list of network
- attributes. This is used by the connectivity manager to decide which networks can coexist
- based on the hardware -->
- <!-- An Array of "[Connection name],[ConnectivityManager.TYPE_xxxx],
- [associated radio-type],[priority],[restoral-timer(ms)],[dependencyMet] -->
- <!-- the 5th element "resore-time" indicates the number of milliseconds to delay
- before automatically restore the default connection. Set -1 if the connection
- does not require auto-restore. -->
- <!-- the 6th element indicates boot-time dependency-met value. -->
- <string-array translatable="false" name="networkAttributes">
- <item>wifi,1,1,1,-1,true</item>
- <item>mobile,0,0,0,-1,true</item>
- <item>mobile_mms,2,0,2,60000,true</item>
- <item>mobile_supl,3,0,2,60000,true</item>
- <item>mobile_dun,4,0,2,60000,true</item>
- <item>mobile_hipri,5,0,3,60000,true</item>
- <item>mobile_fota,10,0,2,60000,true</item>
- <item>mobile_ims,11,0,2,60000,true</item>
- <item>mobile_cbs,12,0,2,60000,true</item>
- <item>wifi_p2p,13,1,0,-1,true</item>
- <item>mobile_ia,14,0,2,-1,true</item>
- <item>mobile_emergency,15,0,2,-1,true</item>
- </string-array>
-
- <!-- Whether to enable network location overlay which allows network
- location provider to be replaced by an app at run-time. When disabled,
- only the config_networkLocationProviderPackageName package will be
- searched for network location provider, otherwise packages whose
- signature matches the signatures of config_locationProviderPackageNames
- will be searched, and the service with the highest version number will
- be picked. Anyone who wants to disable the overlay mechanism can set it
- to false.
- -->
- <bool name="config_enableNetworkLocationOverlay" translatable="false">false</bool>
- <!-- Package name providing network location support. Used only when
- config_enableNetworkLocationOverlay is false. -->
- <string name="config_networkLocationProviderPackageName" translatable="false">com.qualcomm.location</string>
-
- <!-- Whether to enable fused location provider overlay which allows fused
- location provider to be replaced by an app at run-time. When disabled,
- only the config_fusedLocationProviderPackageName package will be
- searched for fused location provider, otherwise packages whose
- signature matches the signatures of config_locationProviderPackageNames
- will be searched, and the service with the highest version number will
- be picked. Anyone who wants to disable the overlay mechanism can set it
- to false.
- -->
- <bool name="config_enableFusedLocationOverlay" translatable="false">false</bool>
- <!-- Package name providing fused location support. Used only when
- config_enableFusedLocationOverlay is false. -->
- <string name="config_fusedLocationProviderPackageName" translatable="false">com.qualcomm.location</string>
-
- <!-- This string array should be overridden by the device to present a list of radio
- attributes. This is used by the connectivity manager to decide which networks can coexist
- based on the hardware -->
- <!-- An Array of "[ConnectivityManager connectionType],
- [# simultaneous connection types]" -->
- <string-array translatable="false" name="radioAttributes">
- <item>1,1</item>
- <item>0,1</item>
- </string-array>
-
- <!-- Enables or disables fading edges when marquee is enabled in TextView.
- Off by default, since the framebuffer readback used to implement the
- fading edges is prohibitively expensive on most GPUs. -->
- <bool name="config_ui_enableFadingMarquee">false</bool>
-
- <!-- Indicate whether to allow the device to suspend when the screen is off
- due to the proximity sensor. This resource should only be set to true
- if the sensor HAL correctly handles the proximity sensor as a wake-up source.
- Otherwise, the device may fail to wake out of suspend reliably.
- The default is false. -->
- <bool name="config_suspendWhenScreenOffDueToProximity">true</bool>
-
- <!-- Disable lockscreen translucent decor by default -->
- <bool name="config_enableLockScreenTranslucentDecor">true</bool>
-
- <!-- Maximum number of supported users -->
- <integer name="config_multiuserMaximumUsers">4</integer>
-
- <!-- Whether Multiuser UI should be shown -->
- <bool name="config_enableMultiUserUI">true</bool>
-
- <!-- Screen brightness when dozing -->
- <integer name="config_screenBrightnessDoze">10</integer>
-
- <!-- Dream of notifications -->
- <string name="config_dozeComponent">com.android.systemui/com.android.systemui.doze.DozeService</string>
-
- <!-- If true, the doze component is not started until after the screen has been
- turned off and the screen off animation has been performed. -->
- <bool name="config_dozeAfterScreenOffByDefault">true</bool>
-
<!-- Whether the always on display mode is available. -->
<bool name="config_dozeAlwaysOnDisplayAvailable">true</bool>
<!-- Control whether the always on display mode is enabled by default. This value will be used
during initialization when the setting is still null. -->
<bool name="config_dozeAlwaysOnEnabled">false</bool>
-
- <!-- Power Management: Specifies whether to decouple the auto-suspend state of the
- device from the display on/off state.
-
- When false, autosuspend_disable() will be called before the display is turned on
- and autosuspend_enable() will be called after the display is turned off.
- This mode provides best compatibility for devices using legacy power management
- features such as early suspend / late resume.
-
- When true, autosuspend_display() and autosuspend_enable() will be called
- independently of whether the display is being turned on or off. This mode
- enables the power manager to suspend the application processor while the
- display is on.
-
- This resource should be set to "true" when a doze component has been specified
- to maximize power savings but not all devices support it.
-
- Refer to autosuspend.h for details.
- -->
- <bool name="config_powerDecoupleAutoSuspendModeFromDisplay">true</bool>
-
- <!-- Control the behavior when the user long presses the home button.
- 0 - Nothing
- 1 - Recent apps view in SystemUI
- 2 - Launch assist intent
- This needs to match the constants in
- policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
- -->
- <integer name="config_longPressOnHomeBehavior">2</integer>
-
- <!-- Flag indicating if device supports EAP SIM, AKA, AKA' -->
- <bool name="config_eap_sim_based_auth_supported">true</bool>
-
- <!-- Whether device supports double tap to wake -->
- <bool name="config_supportDoubleTapWake">true</bool>
-
- <!-- Values for GPS configuration -->
- <string-array translatable="false" name="config_gpsParameters">
- <item>SUPL_HOST=supl.google.com</item>
- <item>SUPL_PORT=7275</item>
- <item>SUPL_VER=0x20000</item>
- <item>SUPL_MODE=1</item>
- <item>SUPL_ES=1</item>
- <item>LPP_PROFILE=0</item>
- <item>USE_EMERGENCY_PDN_FOR_EMERGENCY_SUPL=1</item>
- <item>A_GLONASS_POS_PROTOCOL_SELECT=0</item>
- <item>GPS_LOCK=0</item>
- </string-array>
-
- <!-- Configure wifi tcp buffersizes in the form:
- rmem_min,rmem_def,rmem_max,wmem_min,wmem_def,wmem_max -->
- <string name="config_wifi_tcp_buffers">524288,1048576,2097152,262144,524288,1048576</string>
-
- <!-- Flag specifying whether VoLTE TTY is supported -->
- <bool name="config_carrier_volte_tty_supported">true</bool>
-
- <!-- Vibrator pattern for feedback about a long screen/key press -->
- <integer-array name="config_longPressVibePattern">
- <item>0</item>
- <item>1</item>
- <item>20</item>
- <item>21</item>
- </integer-array>
-
- <!-- Vibrator pattern for feedback about touching a virtual key -->
- <integer-array name="config_virtualKeyVibePattern">
- <item>30</item>
- </integer-array>
-
- <!-- Vibrator pattern for a very short but reliable vibration for soft keyboard tap -->
- <integer-array name="config_keyboardTapVibePattern">
- <item>40</item>
- </integer-array>
-
- <!-- Should the pinner service pin the Camera application? -->
- <bool name="config_pinnerCameraApp">true</bool>
-
- <!-- Default list of files pinned by the Pinner Service -->
- <string-array translatable="false" name="config_defaultPinnerServiceFiles">
- <item>"/system/framework/arm64/boot-framework.oat"</item>
- <item>"/system/framework/framework.jar"</item>
- <item>"/system/framework/oat/arm64/services.odex"</item>
- <item>"/system/framework/services.jar"</item>
- <item>"/system/framework/arm64/boot.oat"</item>
- <item>"/system/framework/arm64/boot-core-libart.oat"</item>
- <item>"/apex/com.android.art/javalib/core-oj.jar"</item>
- <item>"/apex/com.android.art/javalib/core-libart.jar"</item>
- <item>"/apex/com.android.media/javalib/updatable-media.jar"</item>
- <item>"/product/priv-app/SystemUI/SystemUI.apk"</item>
- <item>"/product/priv-app/SystemUI/oat/arm64/SystemUI.odex"</item>
- <item>"/system/lib64/libsurfaceflinger.so"</item>
- </string-array>
-
- <!-- List of files pinned by the Pinner Service with the apex boot image b/119800099 -->
- <string-array translatable="false" name="config_apexBootImagePinnerServiceFiles">
- <item>"/system/framework/framework.jar"</item>
- <item>"/system/framework/services.jar"</item>
- <item>"/system/framework/arm64/apex.oat"</item>
- <item>"/system/framework/arm64/apex-core-libart.oat"</item>
- <item>"/apex/com.android.art/javalib/core-oj.jar"</item>
- <item>"/apex/com.android.art/javalib/core-libart.jar"</item>
- <item>"/apex/com.android.media/javalib/updatable-media.jar"</item>
- <item>"/product/priv-app/SystemUI/SystemUI.apk"</item>
- <item>"/system/lib64/libsurfaceflinger.so"</item>
- </string-array>
-
- <!-- Shutdown if the battery temperature exceeds (this value * 0.1) Celsius. -->
- <integer name="config_shutdownBatteryTemperature">650</integer>
-
- <!-- Screen brightness used to dim the screen when the user activity
- timeout expires. May be less than the minimum allowed brightness setting
- that can be set by the user. -->
- <integer name="config_screenBrightnessDim">10</integer>
-
- <!-- Whether a software navigation bar should be shown. NOTE: in the future this may be
- autodetected from the Configuration. -->
- <bool name="config_showNavigationBar">true</bool>
-
- <!-- Default color for notification LED is blue. -->
- <color name="config_defaultNotificationColor">#ff00ff00</color>
-
- <!-- Is the notification LED intrusive? Used to decide if there should be a disable option -->
- <bool name="config_intrusiveNotificationLed">true</bool>
-
- <!-- Is the battery LED intrusive? Used to decide if there should be a disable option -->
- <bool name="config_intrusiveBatteryLed">true</bool>
-
- <!-- Does the battery LED support multiple colors? Used to decide if the user can change the colors -->
- <bool name="config_multiColorBatteryLed">true</bool>
-
- <bool name="config_multiColorNotificationLed">true</bool>
-
- <!-- Does device supports fast charging ? -->
- <bool name="config_FastChargingLedSupported">true</bool>
-
- <!-- The list absolute paths of jar/apk files containing the device specific handlers,
- delimited by File.pathSeparator, which defaults to ":" on Android -->
- <string name="config_deviceKeyHandlerLib" translatable="false">/system/priv-app/DeviceParts/DeviceParts.apk</string>
- <!-- Full qualified name of the class that implements
- com.android.internal.os.DeviceKeyHandler interface. -->
- <string name="config_deviceKeyHandlerClass" translatable="false">org.omnirom.device.KeyHandler</string>
-
- <!-- enable support for configure max aspect ratio per app -->
- <bool name="config_haveHigherAspectRatioScreen">true</bool>
-
- <!-- Boolean indicating whether the HWC setColorTransform function can be performed efficiently
- in hardware. -->
- <bool name="config_setColorTransformAccelerated">true</bool>
-
- <bool name="config_proxiSensorWakupCheck">true</bool>
-
- <!-- Whether WiFi display is supported by this device.
- There are many prerequisites for this feature to work correctly.
- Here are a few of them:
- * The WiFi radio must support WiFi P2P.
- * The WiFi radio must support concurrent connections to the WiFi display and
- to an access point.
- * The Audio Flinger audio_policy.conf file must specify a rule for the "r_submix"
- remote submix module. This module is used to record and stream system
- audio output to the WiFi display encoder in the media server.
- * The remote submix module "audio.r_submix.default" must be installed on the device.
- * The device must be provisioned with HDCP keys (for protected content).
- -->
- <bool name="config_enableWifiDisplay">true</bool>
-
- <!-- Set to true if the wifi display supports compositing content stored
- in gralloc protected buffers. For this to be true, there must exist
- a protected hardware path for surface flinger to composite and send
- protected buffers to the wifi display video encoder.
- If this flag is false, we advise applications not to use protected
- buffers (if possible) when presenting content to a wifi display because
- the content may be blanked.
- This flag controls whether the {@link Display#FLAG_SUPPORTS_PROTECTED_BUFFERS}
- flag is set for wifi displays.
- -->
- <bool name="config_wifiDisplaySupportsProtectedBuffers">true</bool>
-
- <!-- Indicate whether closing the lid causes the device to go to sleep and opening
- it causes the device to wake up.
- The default is false. -->
- <bool name="config_lidControlsSleep">true</bool>
-
- <!-- ImsService package name to bind to by default, if config_dynamic_bind_ims is true -->
- <string name="config_ims_package">org.codeaurora.ims</string>
-
- <!-- Flag specifying whether or not IMS will use the ImsResolver dynamically -->
- <bool name="config_dynamic_bind_ims">true</bool>
-
- <!-- Boolean indicating if current platform supports BLE peripheral mode -->
- <bool name="config_bluetooth_le_peripheral_mode_supported">true</bool>
-
- <!-- Boolean indicating if current platform supports HFP inband ringing -->
- <bool name="config_bluetooth_hfp_inband_ringing_support">true</bool>
-
- <!-- Flag indicating if the speed up audio on mt call code should be executed -->
- <bool name="config_speed_up_audio_on_mt_calls">true</bool>
-
- <!-- Operating volatage for bluetooth controller. 0 by default-->
- <integer name="config_bluetooth_operating_voltage_mv">3300</integer>
-
- <!-- True if Unprocessed audio source supports the required frequency range and level -->
- <bool name="config_supportAudioSourceUnprocessed">true</bool>
-
- <!-- Hardware 'face' keys present on the device, stored as a bit field.
- This integer should equal the sum of the corresponding value for each
- of the following keys present:
- 1 - Home
- 2 - Back
- 4 - Menu
- 8 - Assistant (search)
- 16 - App switch
- For example, a device with Home, Back and Menu keys would set this
- config to 7. -->
- <integer name="config_deviceHardwareKeys">0</integer>
-
- <!-- Array of hysteresis constraint values for brightening, represented as tenths of a
- percent. The length of this array is assumed to be one greater than
- config_ambientThresholdLevels. The brightening threshold is calculated as
- lux * (1.0f + CONSTRAINT_VALUE). When the current lux is higher than this threshold,
- the screen brightness is recalculated. See the config_ambientThresholdLevels
- description for how the constraint value is chosen. -->
- <integer-array name="config_ambientBrighteningThresholds">
- <item>800</item>
- <item>3000</item>
- <item>2000</item>
- <item>500</item>
- </integer-array>
-
- <!-- Array of hysteresis constraint values for darkening, represented as tenths of a
- percent. The length of this array is assumed to be one greater than
- config_ambientThresholdLevels. The darkening threshold is calculated as
- lux * (1.0f - CONSTRAINT_VALUE). When the current lux is lower than this threshold,
- the screen brightness is recalculated. See the config_ambientThresholdLevels
- description for how the constraint value is chosen. -->
- <integer-array name="config_ambientDarkeningThresholds">
- <item>950</item>
- <item>950</item>
- <item>800</item>
- <item>800</item>
- </integer-array>
-
- <!-- Array of ambient lux threshold values. This is used for determining hysteresis constraint
- values by calculating the index to use for lookup and then setting the constraint value
- to the corresponding value of the array. The new brightening hysteresis constraint value
- is the n-th element of config_ambientBrighteningThresholds, and the new darkening
- hysteresis constraint value is the n-th element of config_ambientDarkeningThresholds.
-
- The (zero-based) index is calculated as follows: (MAX is the largest index of the array)
- condition calculated index
- value < level[0] 0
- level[n] <= value < level[n+1] n+1
- level[MAX] <= value MAX+1 -->
- <integer-array name="config_ambientThresholdLevels">
- <item>30</item>
- <item>300</item>
- <item>5000</item>
- </integer-array>
-
- <!-- The maximum range of gamma adjustment possible using the screen
- auto-brightness adjustment setting. -->
- <fraction name="config_autoBrightnessAdjustmentMaxGamma">300%</fraction>
-
- <!-- Sets the minimum and maximum tilt tolerance for each possible rotation.
- This array consists of 4 pairs of values which specify the minimum and maximum
- tilt angle at which the device will transition into each rotation.
-
- The tilt angle represents the direction in which the plane of the screen is facing;
- it is also known as the angle of elevation.
-
- -90 degree tilt means that the screen is facing straight down
- (the device is being held overhead upside-down)
- 0 degree tilt means that the screen is facing outwards
- (the device is being held vertically)
- 90 degree tilt means that the screen is facing straight up
- (the device is resting on a flat table)
-
- The default tolerances are set conservatively such that the device is more
- likely to remain in its natural orientation than rotate into a counterclockwise,
- clockwise, or reversed posture (with an especially strong bias against the latter)
- to prevent accidental rotation while carrying the device in hand.
-
- These thresholds may need to be tuned when the device is intended to be
- mounted into a dock with a particularly shallow profile wherein rotation
- would ordinarily have been suppressed.
-
- It is helpful to consider the desired behavior both when the device is being
- held at a positive tilt (typical case) vs. a negative tilt (reading overhead in
- bed) since they are quite different. In the overhead case, we typically want
- the device to more strongly prefer to retain its current configuration (in absence
- of a clear indication that a rotation is desired) since the user's head and neck may
- be held at an unusual angle.
- -->
- <integer-array name="config_autoRotationTiltTolerance">
- <!-- rotation: 0 (natural) --> <item>-45</item> <item>60</item>
- <!-- rotation: 90 (rotate CCW) --> <item>-45</item> <item>66</item>
- <!-- rotation: 180 (reverse) --> <item>-45</item> <item>60</item>
- <!-- rotation: 270 (rotate CW) --> <item>-45</item> <item>66</item>
- </integer-array>
-
- <!-- Flag specifying whether VoLTE is available on device -->
- <bool name="config_device_volte_available">true</bool>
-
- <!-- Flag specifying whether WFC over IMS is available on device -->
- <bool name="config_device_wfc_ims_available">true</bool>
-
- <!-- When true use the linux /dev/input/event subsystem to detect the switch changes
- on the headphone/microphone jack. When false use the older uevent framework. -->
- <bool name="config_useDevInputEventForAudioJack">true</bool>
-
- <!-- Is the device capable of hot swapping an ICC Card -->
- <bool name="config_hotswapCapable">true</bool>
-
- <!-- List supported color modes. -->
- <integer-array name="config_availableColorModes">
- <item>0</item> <!-- COLOR_MODE_NATURAL -->
- <item>1</item> <!-- COLOR_MODE_BOOSTED -->
- <item>3</item> <!-- COLOR_MODE_AUTOMATIC -->
- </integer-array>
-
- <!-- Show a custom view for FOD -->
- <bool name="config_usesFOD">true</bool>
-
-</resources>
+</resources>
\ No newline at end of file
diff --git a/overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml b/overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml
deleted file mode 100644
index 5b0aa2a..0000000
--- a/overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/**
- * Copyright (c) 2012, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
--->
-<resources>
- <!-- Set the automatic brightness mode on by default -->
- <bool name="def_screen_brightness_automatic_mode">true</bool>
- <!-- Default screen brightness, from 0 to 255. 87 is 34%. -->
- <integer name="def_screen_brightness">46</integer>
-</resources>
diff --git a/overlay/frameworks/base/packages/SystemUI/res-keyguard/values/dimens.xml b/overlay/frameworks/base/packages/SystemUI/res-keyguard/values/dimens.xml
deleted file mode 100644
index c23b859..0000000
--- a/overlay/frameworks/base/packages/SystemUI/res-keyguard/values/dimens.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-**
-** Copyright 2020, The OmniROM 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>
- <dimen name="keyguard_fod_switch_bottom_margin">20dp</dimen>
- <dimen name="keyguard_security_container_bottom_margin">88dp</dimen>
-</resources>
\ No newline at end of file
diff --git a/overlay/frameworks/base/packages/SystemUI/res/values/config.xml b/overlay/frameworks/base/packages/SystemUI/res/values/config.xml
deleted file mode 100644
index 47518dc..0000000
--- a/overlay/frameworks/base/packages/SystemUI/res/values/config.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2009, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-<!-- These resources are around just to allow their values to be customized
- for different hardware and product builds. -->
-<resources>
-
- <!-- Doze: does this device support STATE_DOZE? -->
- <bool name="doze_display_state_supported">true</bool>
-
- <!-- Max visible notification icons -->
- <integer name="config_maxVisibleNotificationIcons">8</integer>
- <integer name="config_maxVisibleNotificationIconsWhenDark">9</integer>
-
- <bool name="keyguard_security_container_force_bottom_margin">true</bool>
-
-</resources>
\ No newline at end of file
diff --git a/overlay/frameworks/base/packages/SystemUI/res/values/dimens.xml b/overlay/frameworks/base/packages/SystemUI/res/values/dimens.xml
deleted file mode 100644
index e18b8e2..0000000
--- a/overlay/frameworks/base/packages/SystemUI/res/values/dimens.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2012, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-
- <!-- the padding on the start of the statusbar -->
- <dimen name="status_bar_padding_start">52.5px</dimen>
-
- <!-- the padding on the end of the statusbar -->
- <dimen name="status_bar_padding_end">52.5px</dimen>
-
-</resources>
diff --git a/overlay/packages/apps/Bluetooth/res/values/config.xml b/overlay/packages/apps/Bluetooth/res/values/config.xml
deleted file mode 100644
index 68b18d8..0000000
--- a/overlay/packages/apps/Bluetooth/res/values/config.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (c) 2014, The Linux Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted (subject to the limitations in the
- disclaimer below) provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above
- copyright notice, this list of conditions and the following
- disclaimer in the documentation and/or other materials provided
- with the distribution.
- * Neither the name of the Linux Foundation nor the names of its
- contributors may be used to endorse or promote products derived
- from this software without specific prior written permission.
-
- NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
- GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
- HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
- WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--->
-<resources>
- <bool name="profile_supported_avrcp_controller">true</bool>
- <bool name="profile_supported_sap">true</bool>
- <bool name="profile_supported_hid_device">false</bool>
- <bool name="profile_supported_ba">true</bool>
-</resources>
diff --git a/overlay/packages/apps/CellBroadcastReceiver/res/values/config.xml b/overlay/packages/apps/CellBroadcastReceiver/res/values/config.xml
deleted file mode 100755
index 74a7c9d..0000000
--- a/overlay/packages/apps/CellBroadcastReceiver/res/values/config.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--Copyright (c) 2012, The Linux Foundation. All rights reserved.
-
- Not a Contribution, Apache license notifications and license are retained
- for attribution purposes only.
-
- 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>
- <!-- Whether to enable ETWS settings (Japan) -->
- <bool name="show_etws_settings">true</bool>
- <!-- Whether to enable CMAS settings (United States) -->
- <bool name="show_cmas_settings">true</bool>
- <!-- Whether to enable channel 50 settings (Brazil) -->
- <bool name="show_brazil_settings">true</bool>
-</resources>
diff --git a/overlay/packages/apps/Settings/res/values/config.xml b/overlay/packages/apps/Settings/res/values/config.xml
deleted file mode 100644
index 14ca168..0000000
--- a/overlay/packages/apps/Settings/res/values/config.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<!-- Copyright (C) 2007 The Android Open Source Project
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
- http://www.apache.org/licenses/LICENSE-2.0
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-
- <integer name="config_fingerprintSensorLocation">4</integer>
- <dimen name="fingerprint_find_sensor_padding_top">0px</dimen>
-
- <!-- Whether or not the device is capable of multiple levels of vibration intensity.
- Note that this is different from whether it can control the vibration amplitude as some
- devices will be able to vary their amplitude but do not possess enough dynamic range to
- have distinct intensity levels -->
- <bool name="config_vibration_supports_multiple_intensities">true</bool>
-
-</resources>
\ No newline at end of file
diff --git a/overlay/packages/services/Telephony/res/values/config.xml b/overlay/packages/services/Telephony/res/values/config.xml
deleted file mode 100644
index fe73120..0000000
--- a/overlay/packages/services/Telephony/res/values/config.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--Copyright (c) 2013, The Linux Foundation. All rights reserved.
-
- Not a Contribution, Apache license notifications and license are retained
- for attribution purposes only.
-
- 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. -->
-
-<!-- Phone app resources that may need to be customized
- for different hardware or product builds. -->
-<resources>
-
- <!-- Determine whether calls to mute the microphone in PhoneUtils
- are routed through the android.media.AudioManager class (true) or through
- the com.android.internal.telephony.Phone interface (false). -->
- <bool name="send_mic_mute_to_AudioManager">true</bool>
-
- <!-- Flag indicating if hac is enabled -->
- <bool name="hac_enabled">true</bool>
-
- <!-- Show enabled lte option for lte device -->
- <bool name="config_enabled_lte" translatable="false">true</bool>
-
-</resources>
diff --git a/overlay/packages/services/Telephony/res/xml/telephony_injection.xml b/overlay/packages/services/Telephony/res/xml/telephony_injection.xml
deleted file mode 100644
index 79aa8b1..0000000
--- a/overlay/packages/services/Telephony/res/xml/telephony_injection.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (c) 2019 The Linux Foundation. All rights reserved.
- Not a Contribution.
- Copyright (C) 2018 The Android Open Source Project
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
- http://www.apache.org/licenses/LICENSE-2.0
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<!-- package: customized component factory to inject,
- e.g. "example.package.exampleTelephonyComponentFactory"
- jar: jar path to customized jar which contains exampleTelephonyComponentFactory to inject, and
- "/system/framework/" should be the target directory.
- e.g. "/system/framework/eg-telephony-common.jar"
--->
-<injection package="com.qualcomm.qti.internal.telephony.QtiTelephonyComponentFactory"
- jar="/system/framework/qti-telephony-common.jar:/product/framework/qti-telephony-common.jar:/product/framework/qti-telephony-hidl-wrapper.jar:/product/framework/qti-telephony-utils.jar:/system/framework/qti-telephony-utils.jar">
- <components>
- <!-- Components use injected component factory,
- e.g. com.android.internal.telephony.ServiceStateTracker
- -->
- <!--<component>com.example.componentA</component>-->
- <!--<component>com.example.componentB</component>-->
- <component>com.android.internal.telephony.ServiceStateTracker</component>
- <component>com.android.internal.telephony.SubscriptionController</component>
- <component>com.android.internal.telephony.SubscriptionInfoUpdater</component>
- <component>com.android.internal.telephony.GsmCdmaPhone</component>
- <component>com.android.internal.telephony.PhoneSwitcher</component>
- <component>com.android.internal.telephony.IccPhoneBookInterfaceManager</component>
- <component>com.android.internal.telephony.dataconnection.DcTracker</component>
- <component>com.android.internal.telephony.RIL</component>
- <component>com.android.internal.telephony.TelephonyComponentFactory</component>
- <component>com.android.internal.telephony.MultiSimSettingController</component>
- </components>
-</injection>
\ No newline at end of file
diff --git a/policy_hal/APMConfigHelper.cpp b/policy_hal/APMConfigHelper.cpp
deleted file mode 100644
index 1815e77..0000000
--- a/policy_hal/APMConfigHelper.cpp
+++ /dev/null
@@ -1,320 +0,0 @@
-/*
- * Copyright (c) 2019, The Linux Foundation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided
- * with the distribution.
- * * Neither the name of The Linux Foundation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-//#define LOG_NDEBUG 0
-#define LOG_TAG "APMConfigHelper"
-
-#include "APMConfigHelper.h"
-#include <cutils/properties.h>
-#include <log/log.h>
-#include <stdlib.h>
-
-namespace android {
-
-void APMConfigHelper::retrieveConfigs()
-{
-#ifdef AHAL_EXT_ENABLED
- if (isRemote) {
- ALOGV("Already retrieved configs from remote");
- return;
- }
-
- ALOGV("Try retrieving configs from remote");
- mConfigs = getApmConfigs< IAudioHalExt,
- &IAudioHalExt::getApmConfigs>(mConfigs, isRemote);
-#endif /* AHAL_EXT_ENABLED */
-
- // apmconfig struct dump
- ALOGV("apmconfigs retrieved from %s", isRemote? "remote" : "local");
- ALOGV("audio_offload_video: %d", mConfigs.audio_offload_video);
- ALOGV("audio_offload_disable: %d", mConfigs.audio_offload_disable);
- ALOGV("audio_deepbuffer_media: %d", mConfigs.audio_deepbuffer_media);
- ALOGV("audio_av_streaming_offload_enable: %d", mConfigs.audio_av_streaming_offload_enable);
- ALOGV("audio_offload_track_enable: %d", mConfigs.audio_offload_track_enable);
- ALOGV("audio_offload_multiple_enabled: %d", mConfigs.audio_offload_multiple_enabled);
- ALOGV("voice_dsd_playback_conc_disabled: %d", mConfigs.voice_dsd_playback_conc_disabled);
- ALOGV("audio_sva_conc_enabled: %d", mConfigs.audio_sva_conc_enabled);
- ALOGV("audio_va_concurrency_enabled: %d", mConfigs.audio_va_concurrency_enabled);
- ALOGV("audio_rec_playback_conc_disabled: %d", mConfigs.audio_rec_playback_conc_disabled);
- ALOGV("voice_path_for_pcm_voip: %d", mConfigs.voice_path_for_pcm_voip);
- ALOGV("voice_playback_conc_disabled: %d", mConfigs.voice_playback_conc_disabled);
- ALOGV("voice_record_conc_disabled: %d", mConfigs.voice_record_conc_disabled);
- ALOGV("voice_voip_conc_disabled: %d", mConfigs.voice_voip_conc_disabled);
- ALOGV("audio_offload_min_duration_secs: %u", mConfigs.audio_offload_min_duration_secs);
- ALOGV("voice_conc_fallbackpath: %s", mConfigs.voice_conc_fallbackpath.c_str());
- ALOGV("audio_extn_hdmi_spk_enabled: %d", mConfigs.audio_extn_hdmi_spk_enabled);
- ALOGV("audio_extn_formats_enabled: %d", mConfigs.audio_extn_formats_enabled);
- ALOGV("audio_extn_afe_proxy_enabled: %d", mConfigs.audio_extn_afe_proxy_enabled);
- ALOGV("compress_voip_enabled: %d", mConfigs.compress_voip_enabled);
- ALOGV("fm_power_opt: %d", mConfigs.fm_power_opt);
- ALOGV("voice_concurrency: %d", mConfigs.voice_concurrency);
- ALOGV("record_play_concurrency: %d", mConfigs.record_play_concurrency);
- ALOGV("use_xml_audio_policy_conf: %d", mConfigs.use_xml_audio_policy_conf);
- return;
-}
-
-APMConfigHelper::APMConfigHelper()
- : isRemote(false)
-{
- uint32_t audio_offload_min_duration_secs = 0;
- char voice_conc_fallbackpath[PROPERTY_VALUE_MAX] = "\0";
-
- audio_offload_min_duration_secs =
- (uint32_t)property_get_int32("audio.offload.min.duration.secs", 0);
- property_get("vendor.voice.conc.fallbackpath", voice_conc_fallbackpath, NULL);
-
- mConfigs = {
- (bool) property_get_bool("audio.offload.video", true),
- (bool) property_get_bool("audio.offload.disable", false),
- (bool) property_get_bool("audio.deep_buffer.media", true),
- (bool) property_get_bool("vendor.audio.av.streaming.offload.enable", false),
- (bool) property_get_bool("vendor.audio.offload.track.enable", true),
- (bool) property_get_bool("vendor.audio.offload.multiple.enabled", false),
- (bool) property_get_bool("vendor.voice.dsd.playback.conc.disabled", true),
- (bool) property_get_bool("persist.vendor.audio.sva.conc.enabled", false),
- (bool) property_get_bool("persist.vendor.audio.va_concurrency_enabled", false),
- (bool) property_get_bool("vendor.audio.rec.playback.conc.disabled", false),
- (bool) property_get_bool("vendor.voice.path.for.pcm.voip", true),
- (bool) property_get_bool("vendor.voice.playback.conc.disabled", false),
- (bool) property_get_bool("vendor.voice.record.conc.disabled", false),
- (bool) property_get_bool("vendor.voice.voip.conc.disabled", false),
- audio_offload_min_duration_secs,
- voice_conc_fallbackpath,
-#ifdef AUDIO_EXTN_HDMI_SPK_ENABLED
- true,
-#else
- false,
-#endif
-#ifdef AUDIO_EXTN_FORMATS_ENABLED
- true,
-#else
- false,
-#endif
-#ifdef AUDIO_EXTN_AFE_PROXY_ENABLED
- true,
-#else
- false,
-#endif
-#ifdef COMPRESS_VOIP_ENABLED
- true,
-#else
- false,
-#endif
-#ifdef FM_POWER_OPT
- true,
-#else
- false,
-#endif
-#ifdef VOICE_CONCURRENCY
- true,
-#else
- false,
-#endif
-#ifdef RECORD_PLAY_CONCURRENCY
- true,
-#else
- false,
-#endif
-#ifdef USE_XML_AUDIO_POLICY_CONF
- true,
-#else
- false,
-#endif
- };
-}
-
-bool APMConfigHelper::isAudioOffloadVideoEnabled()
-{
- ALOGV("isAudioOffloadVideoEnabled enter");
- retrieveConfigs();
- return mConfigs.audio_offload_video;
-}
-
-bool APMConfigHelper::isAudioOffloadDisabled()
-{
- ALOGV("isAudioOffloadDisabled enter");
- retrieveConfigs();
- return mConfigs.audio_offload_disable;
-}
-
-bool APMConfigHelper::isAudioDeepbufferMediaEnabled()
-{
- ALOGV("isAudioDeepbufferMediaEnabled enter");
- retrieveConfigs();
- return mConfigs.audio_deepbuffer_media;
-}
-
-bool APMConfigHelper::isAVStreamingOffloadEnabled()
-{
- ALOGV("isAVStreamingOffloadEnabled enter");
- retrieveConfigs();
- return mConfigs.audio_av_streaming_offload_enable;
-}
-
-bool APMConfigHelper::isAudioTrackOffloadEnabled()
-{
- ALOGV("isAudioTrackOffloadEnabled enter");
- retrieveConfigs();
- return mConfigs.audio_offload_track_enable;
-}
-
-bool APMConfigHelper::isAudioMultipleOffloadEnable()
-{
- ALOGV("isAudioMultipleOffloadEnable enter");
- retrieveConfigs();
- return mConfigs.audio_offload_multiple_enabled;
-}
-
-bool APMConfigHelper::isVoiceDSDConcDisabled()
-{
- ALOGV("isVoiceDSDConcDisabled enter");
- retrieveConfigs();
- return mConfigs.voice_dsd_playback_conc_disabled;
-}
-
-bool APMConfigHelper::isSVAConcEnabled()
-{
- ALOGV("isSVAConcEnabled enter");
- retrieveConfigs();
- return mConfigs.audio_sva_conc_enabled;
-}
-
-bool APMConfigHelper::isVAConcEnabled()
-{
- ALOGV("isVAConcEnabled enter");
- retrieveConfigs();
- return mConfigs.audio_va_concurrency_enabled;
-}
-
-bool APMConfigHelper::isRecPlayConcDisabled()
-{
- ALOGV("isRecPlayConcDisabled enter");
- retrieveConfigs();
- return mConfigs.audio_rec_playback_conc_disabled;
-}
-
-bool APMConfigHelper::useVoicePathForPCMVOIP()
-{
- ALOGV("useVoicePathForPCMVOIP enter");
- retrieveConfigs();
- return mConfigs.voice_path_for_pcm_voip;
-}
-
-bool APMConfigHelper::isVoicePlayConcDisabled()
-{
- ALOGV("isVoicePlayConcDisabled enter");
- retrieveConfigs();
- return mConfigs.voice_playback_conc_disabled;
-}
-
-bool APMConfigHelper::isVoiceRecConcDisabled()
-{
- ALOGV("isVoiceRecConcDisabled enter");
- retrieveConfigs();
- return mConfigs.voice_record_conc_disabled;
-}
-
-bool APMConfigHelper::isVoiceVOIPConcDisabled()
-{
- ALOGV("isVoiceVOIPConcDisabled enter");
- retrieveConfigs();
- return mConfigs.voice_voip_conc_disabled;
-}
-
-uint32_t APMConfigHelper::getAudioOffloadMinDuration()
-{
- ALOGV("getAudioOffloadMinDuration enter");
- retrieveConfigs();
- return mConfigs.audio_offload_min_duration_secs;
-}
-
-string APMConfigHelper::getVoiceConcFallbackPath()
-{
- ALOGV("getVoiceConcFallbackPath enter");
- retrieveConfigs();
- return mConfigs.voice_conc_fallbackpath;
-}
-
-bool APMConfigHelper::isHDMISpkEnabled()
-{
- ALOGV("isHDMISpkEnabled enter");
- retrieveConfigs();
- return mConfigs.audio_extn_hdmi_spk_enabled;
-}
-
-bool APMConfigHelper::isExtnFormatsEnabled()
-{
- ALOGV("isExtnFormatsEnabled enter");
- retrieveConfigs();
- return mConfigs.audio_extn_formats_enabled;
-}
-
-bool APMConfigHelper::isAFEProxyEnabled()
-{
- ALOGV("isAFEProxyEnabled enter");
- retrieveConfigs();
- return mConfigs.audio_extn_afe_proxy_enabled;
-}
-
-bool APMConfigHelper::isCompressVOIPEnabled()
-{
- ALOGV("isCompressVOIPEnabled enter");
- retrieveConfigs();
- return mConfigs.compress_voip_enabled;
-}
-
-bool APMConfigHelper::isFMPowerOptEnabled()
-{
- ALOGV("isFMPowerOptEnabled enter");
- retrieveConfigs();
- return mConfigs.fm_power_opt;
-}
-
-bool APMConfigHelper::isVoiceConcEnabled()
-{
- ALOGV("isVoiceConcEnabled enter");
- retrieveConfigs();
- return mConfigs.voice_concurrency;
-}
-
-bool APMConfigHelper::isRecPlayConcEnabled()
-{
- ALOGV("isRecPlayConcEnabled enter");
- retrieveConfigs();
- return mConfigs.record_play_concurrency;
-}
-
-bool APMConfigHelper::useXMLAudioPolicyConf()
-{
- ALOGV("useXMLAudioPolicyConf enter");
- retrieveConfigs();
- return mConfigs.use_xml_audio_policy_conf;
-}
-
-}
diff --git a/policy_hal/APMConfigHelper.h b/policy_hal/APMConfigHelper.h
deleted file mode 100644
index 137f2d7..0000000
--- a/policy_hal/APMConfigHelper.h
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * Copyright (c) 2019, The Linux Foundation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided
- * with the distribution.
- * * Neither the name of The Linux Foundation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef _APM_CONFIG_HELPER_H_
-#define _APM_CONFIG_HELPER_H_
-
-#include <string>
-#include <media/stagefright/foundation/ABase.h>
-#include <utils/RefBase.h>
-
-#ifdef AHAL_EXT_ENABLED
-#include <vendor/qti/hardware/audiohalext/1.0/IAudioHalExt.h>
-#include <vendor/qti/hardware/audiohalext/1.0/types.h>
-#include <configstore/Utils.h>
-#endif
-
-namespace android {
-
-using namespace std;
-
-#ifdef AHAL_EXT_ENABLED
-using namespace vendor::qti::hardware::audiohalext::V1_0;
-using namespace vendor::qti::hardware::audiohalext;
-#else
-struct ApmValues {
- bool audio_offload_video;
- bool audio_offload_disable;
- bool audio_deepbuffer_media;
- bool audio_av_streaming_offload_enable;
- bool audio_offload_track_enable;
- bool audio_offload_multiple_enabled;
- bool voice_dsd_playback_conc_disabled;
- bool audio_sva_conc_enabled;
- bool audio_va_concurrency_enabled;
- bool audio_rec_playback_conc_disabled;
- bool voice_path_for_pcm_voip;
- bool voice_playback_conc_disabled;
- bool voice_record_conc_disabled;
- bool voice_voip_conc_disabled;
- uint32_t audio_offload_min_duration_secs;
- string voice_conc_fallbackpath;
- bool audio_extn_hdmi_spk_enabled;
- bool audio_extn_formats_enabled;
- bool audio_extn_afe_proxy_enabled;
- bool compress_voip_enabled;
- bool fm_power_opt;
- bool voice_concurrency;
- bool record_play_concurrency;
- bool use_xml_audio_policy_conf;
-};
-#endif
-
-class APMConfigHelper : public RefBase {
-public:
- APMConfigHelper();
-
- virtual ~APMConfigHelper() {};
-
- /* member functions to query settigns */
- bool isAudioOffloadVideoEnabled();
- bool isAudioOffloadDisabled();
- bool isAudioDeepbufferMediaEnabled();
- bool isAVStreamingOffloadEnabled();
- bool isAudioTrackOffloadEnabled();
- bool isAudioMultipleOffloadEnable();
- bool isVoiceDSDConcDisabled();
- bool isSVAConcEnabled();
- bool isVAConcEnabled();
- bool isRecPlayConcDisabled();
- bool useVoicePathForPCMVOIP();
- bool isVoicePlayConcDisabled();
- bool isVoiceRecConcDisabled();
- bool isVoiceVOIPConcDisabled();
-
- uint32_t getAudioOffloadMinDuration();
- string getVoiceConcFallbackPath();
-
- bool isHDMISpkEnabled();
- bool isExtnFormatsEnabled();
- bool isAFEProxyEnabled();
- bool isCompressVOIPEnabled();
- bool isFMPowerOptEnabled();
- bool isVoiceConcEnabled();
- bool isRecPlayConcEnabled();
- bool useXMLAudioPolicyConf();
-
-private:
- inline void retrieveConfigs();
-
- ApmValues mConfigs;
- bool isRemote; // configs specified from remote
-
- DISALLOW_EVIL_CONSTRUCTORS(APMConfigHelper);
-};
-
-}
-
-#endif /* _APM_CONFIG_HELPER_H_ */
diff --git a/policy_hal/Android.mk b/policy_hal/Android.mk
deleted file mode 100644
index 774d3eb..0000000
--- a/policy_hal/Android.mk
+++ /dev/null
@@ -1,83 +0,0 @@
-ifeq ($(TARGET_DEVICE),$(filter $(TARGET_DEVICE),rog2))
-ifneq ($(USE_LEGACY_AUDIO_POLICY), 1)
-ifeq ($(USE_CUSTOM_AUDIO_POLICY), 1)
-LOCAL_PATH := $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES := AudioPolicyManager.cpp \
- APMConfigHelper.cpp
-
-LOCAL_C_INCLUDES := $(TOPDIR)frameworks/av/services \
- $(TOPDIR)frameworks/av/services/audioflinger \
- $(call include-path-for, audio-effects) \
- $(call include-path-for, audio-utils) \
- $(TOPDIR)frameworks/av/services/audiopolicy/common/include \
- $(TOPDIR)frameworks/av/services/audiopolicy/engine/interface \
- $(TOPDIR)frameworks/av/services/audiopolicy \
- $(TOPDIR)frameworks/av/services/audiopolicy/common/managerdefinitions/include \
- $(call include-path-for, avextension) \
-
-LOCAL_HEADER_LIBRARIES := \
- libbase_headers \
- libstagefright_foundation_headers
-
-LOCAL_SHARED_LIBRARIES := \
- libcutils \
- libutils \
- liblog \
- libsoundtrigger \
- libaudiopolicymanagerdefault
-
-LOCAL_STATIC_LIBRARIES := \
- libmedia_helper \
-
-LOCAL_CFLAGS += -Wall -Werror
-
-
-ifeq ($(strip $(AUDIO_FEATURE_ENABLED_VOICE_CONCURRENCY)),true)
- LOCAL_CFLAGS += -DVOICE_CONCURRENCY
-endif
-
-ifeq ($(strip $(AUDIO_FEATURE_ENABLED_RECORD_PLAY_CONCURRENCY)),true)
- LOCAL_CFLAGS += -DRECORD_PLAY_CONCURRENCY
-endif
-
-ifeq ($(strip $(AUDIO_FEATURE_ENABLED_EXTN_FORMATS)),true)
- LOCAL_CFLAGS += -DAUDIO_EXTN_FORMATS_ENABLED
-endif
-
-ifeq ($(strip $(AUDIO_FEATURE_ENABLED_HDMI_SPK)),true)
- LOCAL_CFLAGS += -DAUDIO_EXTN_HDMI_SPK_ENABLED
-endif
-
-ifeq ($(strip $(AUDIO_FEATURE_ENABLED_PROXY_DEVICE)),true)
- LOCAL_CFLAGS += -DAUDIO_EXTN_AFE_PROXY_ENABLED
-endif
-
-ifeq ($(strip $(AUDIO_FEATURE_ENABLED_FM_POWER_OPT)),true)
- LOCAL_CFLAGS += -DFM_POWER_OPT
-endif
-
-ifeq ($(USE_XML_AUDIO_POLICY_CONF), 1)
- LOCAL_CFLAGS += -DUSE_XML_AUDIO_POLICY_CONF
-endif
-
-ifeq ($(strip $(AUDIO_FEATURE_ENABLED_COMPRESS_VOIP)),true)
- LOCAL_CFLAGS += -DCOMPRESS_VOIP_ENABLED
-endif
-
-ifeq ($(strip $(AUDIO_FEATURE_ENABLED_AHAL_EXT)), true)
- LOCAL_CFLAGS += -DAHAL_EXT_ENABLED
- LOCAL_SHARED_LIBRARIES += libhidlbase
- LOCAL_SHARED_LIBRARIES += libhidltransport
- LOCAL_SHARED_LIBRARIES += vendor.qti.hardware.audiohalext@1.0
- LOCAL_SHARED_LIBRARIES += vendor.qti.hardware.audiohalext-utils
-endif
-
-LOCAL_MODULE := libaudiopolicymanager
-
-include $(BUILD_SHARED_LIBRARY)
-
-endif
-endif
-endif
diff --git a/policy_hal/AudioPolicyManager.cpp b/policy_hal/AudioPolicyManager.cpp
deleted file mode 100755
index 34ccb90..0000000
--- a/policy_hal/AudioPolicyManager.cpp
+++ /dev/null
@@ -1,2140 +0,0 @@
-/*
- * Copyright (c) 2013-2019 The Linux Foundation. All rights reserved.
- * Not a contribution.
- *
- * Copyright (C) 2009 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#define LOG_TAG "AudioPolicyManagerCustom"
-//#define LOG_NDEBUG 0
-
-//#define VERY_VERBOSE_LOGGING
-#ifdef VERY_VERBOSE_LOGGING
-#define ALOGVV ALOGV
-#else
-#define ALOGVV(a...) do { } while(0)
-#endif
-
-// A device mask for all audio output devices that are considered "remote" when evaluating
-// active output devices in isStreamActiveRemotely()
-#define APM_AUDIO_OUT_DEVICE_REMOTE_ALL AUDIO_DEVICE_OUT_REMOTE_SUBMIX
-// A device mask for all audio input and output devices where matching inputs/outputs on device
-// type alone is not enough: the address must match too
-#define APM_AUDIO_DEVICE_MATCH_ADDRESS_ALL (AUDIO_DEVICE_IN_REMOTE_SUBMIX | \
- AUDIO_DEVICE_OUT_REMOTE_SUBMIX)
-#define SAMPLE_RATE_8000 8000
-#include <inttypes.h>
-#include <math.h>
-
-#include <cutils/properties.h>
-#include <utils/Log.h>
-#include <hardware/audio.h>
-#include <hardware/audio_effect.h>
-#include <media/AudioParameter.h>
-#include <soundtrigger/SoundTrigger.h>
-#include "AudioPolicyManager.h"
-#include <policy.h>
-
-namespace android {
-/*audio policy: workaround for truncated touch sounds*/
-//FIXME: workaround for truncated touch sounds
-// to be removed when the problem is handled by system UI
-#define TOUCH_SOUND_FIXED_DELAY_MS 100
-
-sp<APMConfigHelper> AudioPolicyManagerCustom::mApmConfigs = new APMConfigHelper();
-
-audio_output_flags_t AudioPolicyManagerCustom::getFallBackPath()
-{
- audio_output_flags_t flag = AUDIO_OUTPUT_FLAG_FAST;
- const char *fallback_path = mApmConfigs->getVoiceConcFallbackPath().c_str();
-
- if (strlen(fallback_path) > 0) {
- if (!strncmp(fallback_path, "deep-buffer", 11)) {
- flag = AUDIO_OUTPUT_FLAG_DEEP_BUFFER;
- }
- else if (!strncmp(fallback_path, "fast", 4)) {
- flag = AUDIO_OUTPUT_FLAG_FAST;
- }
- else {
- ALOGD("voice_conc:not a recognised path(%s) in prop vendor.voice.conc.fallbackpath",
- fallback_path);
- }
- }
- else {
- ALOGD("voice_conc:prop vendor.voice.conc.fallbackpath not set");
- }
-
- ALOGD("voice_conc:picked up flag(0x%x) from prop vendor.voice.conc.fallbackpath",
- flag);
-
- return flag;
-}
-
-// ----------------------------------------------------------------------------
-// AudioPolicyInterface implementation
-// ----------------------------------------------------------------------------
-extern "C" AudioPolicyInterface* createAudioPolicyManager(
- AudioPolicyClientInterface *clientInterface)
-{
- return new AudioPolicyManagerCustom(clientInterface);
-}
-
-extern "C" void destroyAudioPolicyManager(AudioPolicyInterface *interface)
-{
- delete interface;
-}
-
-status_t AudioPolicyManagerCustom::setDeviceConnectionStateInt(audio_devices_t deviceType,
- audio_policy_dev_state_t state,
- const char *device_address,
- const char *device_name,
- audio_format_t encodedFormat)
-{
- ALOGD("setDeviceConnectionStateInt() device: 0x%X, state %d, address %s name %s format 0x%X",
- deviceType, state, device_address, device_name, encodedFormat);
-
- // connect/disconnect only 1 device at a time
- if (!audio_is_output_device(deviceType) && !audio_is_input_device(deviceType)) return BAD_VALUE;
-
- sp<DeviceDescriptor> device =
- mHwModules.getDeviceDescriptor(deviceType, device_address, device_name, encodedFormat,
- state == AUDIO_POLICY_DEVICE_STATE_AVAILABLE);
- if (device == 0) {
- return INVALID_OPERATION;
- }
-
- // handle output devices
- if (audio_is_output_device(deviceType)) {
- SortedVector <audio_io_handle_t> outputs;
-
- ssize_t index = mAvailableOutputDevices.indexOf(device);
-
- // save a copy of the opened output descriptors before any output is opened or closed
- // by checkOutputsForDevice(). This will be needed by checkOutputForAllStrategies()
- mPreviousOutputs = mOutputs;
- switch (state)
- {
- // handle output device connection
- case AUDIO_POLICY_DEVICE_STATE_AVAILABLE: {
- if (index >= 0) {
- if (mApmConfigs->isHDMISpkEnabled() &&
- (popcount(deviceType) == 1) && (deviceType & AUDIO_DEVICE_OUT_AUX_DIGITAL)) {
- if (!strncmp(device_address, "hdmi_spkr", 9)) {
- mHdmiAudioDisabled = false;
- } else {
- mHdmiAudioEvent = true;
- }
- }
- ALOGW("setDeviceConnectionState() device already connected: %x", deviceType);
- return INVALID_OPERATION;
- }
- ALOGV("%s() connecting device %s format %x",
- __func__, device->toString().c_str(), encodedFormat);
-
- // register new device as available
- index = mAvailableOutputDevices.add(device);
- if (mApmConfigs->isHDMISpkEnabled() &&
- (popcount(deviceType) == 1) && (deviceType & AUDIO_DEVICE_OUT_AUX_DIGITAL)) {
- if (!strncmp(device_address, "hdmi_spkr", 9)) {
- mHdmiAudioDisabled = false;
- } else {
- mHdmiAudioEvent = true;
- }
- if (mHdmiAudioDisabled || !mHdmiAudioEvent) {
- mAvailableOutputDevices.remove(device);
- ALOGW("HDMI sink not connected, do not route audio to HDMI out");
- return INVALID_OPERATION;
- }
- }
- if (index >= 0) {
- sp<HwModule> module = mHwModules.getModuleForDevice(device, encodedFormat);
- if (module == 0) {
- ALOGD("setDeviceConnectionState() could not find HW module for device %s",
- device->toString().c_str());
- mAvailableOutputDevices.remove(device);
- return INVALID_OPERATION;
- }
- ALOGV("setDeviceConnectionState() module name=%s", module->getName());
- mAvailableOutputDevices[index]->attach(module);
- } else {
- return NO_MEMORY;
- }
-
- // Before checking outputs, broadcast connect event to allow HAL to retrieve dynamic
- // parameters on newly connected devices (instead of opening the outputs...)
- broadcastDeviceConnectionState(device, state);
-
- if (checkOutputsForDevice(device, state, outputs) != NO_ERROR) {
- mAvailableOutputDevices.remove(device);
-
- mHwModules.cleanUpForDevice(device);
-
- broadcastDeviceConnectionState(device, AUDIO_POLICY_DEVICE_STATE_UNAVAILABLE);
- return INVALID_OPERATION;
- }
- if (deviceType == AUDIO_DEVICE_OUT_AUX_DIGITAL) {
- chkDpConnAndAllowedForVoice();
- }
-
- // outputs should never be empty here
- ALOG_ASSERT(outputs.size() != 0, "setDeviceConnectionState():"
- "checkOutputsForDevice() returned no outputs but status OK");
- ALOGV("%s() checkOutputsForDevice() returned %zu outputs", __func__, outputs.size());
-
- } break;
- // handle output device disconnection
- case AUDIO_POLICY_DEVICE_STATE_UNAVAILABLE: {
- if (index < 0) {
- if (mApmConfigs->isHDMISpkEnabled() &&
- (popcount(deviceType) == 1) && (deviceType & AUDIO_DEVICE_OUT_AUX_DIGITAL)) {
- if (!strncmp(device_address, "hdmi_spkr", 9)) {
- mHdmiAudioDisabled = true;
- } else {
- mHdmiAudioEvent = false;
- }
- }
- ALOGW("setDeviceConnectionState() device not connected: %x", deviceType);
- return INVALID_OPERATION;
- }
-
- ALOGV("%s() disconnecting output device %s", __func__, device->toString().c_str());
-
- // Send Disconnect to HALs
- broadcastDeviceConnectionState(device, state);
-
- // remove device from available output devices
- mAvailableOutputDevices.remove(device);
-
- mOutputs.clearSessionRoutesForDevice(device);
- if (mApmConfigs->isHDMISpkEnabled() &&
- (popcount(deviceType) == 1) && (deviceType & AUDIO_DEVICE_OUT_AUX_DIGITAL)) {
- if (!strncmp(device_address, "hdmi_spkr", 9)) {
- mHdmiAudioDisabled = true;
- } else {
- mHdmiAudioEvent = false;
- }
- }
- checkOutputsForDevice(device, state, outputs);
-
- // Reset active device codec
- device->setEncodedFormat(AUDIO_FORMAT_DEFAULT);
-
- if (deviceType == AUDIO_DEVICE_OUT_AUX_DIGITAL) {
- mEngine->setDpConnAndAllowedForVoice(false);
- }
- } break;
-
- default:
- ALOGE("%s() invalid state: %x", __func__, state);
- return BAD_VALUE;
- }
-
- // Propagate device availability to Engine
- setEngineDeviceConnectionState(device, state);
-
- // No need to evaluate playback routing when connecting a remote submix
- // output device used by a dynamic policy of type recorder as no
- // playback use case is affected.
- bool doCheckForDeviceAndOutputChanges = true;
- if (device->type() == AUDIO_DEVICE_OUT_REMOTE_SUBMIX
- && strncmp(device_address, "0", AUDIO_DEVICE_MAX_ADDRESS_LEN) != 0) {
- for (audio_io_handle_t output : outputs) {
- sp<SwAudioOutputDescriptor> desc = mOutputs.valueFor(output);
- sp<AudioPolicyMix> policyMix = desc->mPolicyMix.promote();
- if (policyMix != nullptr
- && policyMix->mMixType == MIX_TYPE_RECORDERS
- && strncmp(device_address,
- policyMix->mDeviceAddress.string(),
- AUDIO_DEVICE_MAX_ADDRESS_LEN) == 0) {
- doCheckForDeviceAndOutputChanges = false;
- break;
- }
- }
- }
-
- auto checkCloseOutputs = [&]() {
- // outputs must be closed after checkOutputForAllStrategies() is executed
- if (!outputs.isEmpty()) {
- for (audio_io_handle_t output : outputs) {
- sp<SwAudioOutputDescriptor> desc = mOutputs.valueFor(output);
- // close unused outputs after device disconnection or direct outputs that have
- // been opened by checkOutputsForDevice() to query dynamic parameters
- if ((state == AUDIO_POLICY_DEVICE_STATE_UNAVAILABLE) ||
- (((desc->mFlags & AUDIO_OUTPUT_FLAG_DIRECT) != 0) &&
- (desc->mDirectOpenCount == 0))) {
- closeOutput(output);
- }
- }
- // check A2DP again after closing A2DP output to reset mA2dpSuspended if needed
- return true;
- }
- return false;
- };
-
- if (doCheckForDeviceAndOutputChanges) {
- checkForDeviceAndOutputChanges(checkCloseOutputs);
- } else {
- checkCloseOutputs();
- }
-
- if (mEngine->getPhoneState() == AUDIO_MODE_IN_CALL && hasPrimaryOutput()) {
- DeviceVector newDevices = getNewOutputDevices(mPrimaryOutput, false /*fromCache*/);
- updateCallRouting(newDevices);
- }
-
- for (size_t i = 0; i < mOutputs.size(); i++) {
- sp<SwAudioOutputDescriptor> desc = mOutputs.valueAt(i);
- if ((mEngine->getPhoneState() != AUDIO_MODE_IN_CALL) || (desc != mPrimaryOutput)) {
- DeviceVector newDevices = getNewOutputDevices(desc, true /*fromCache*/);
- // do not force device change on duplicated output because if device is 0, it will
- // also force a device 0 for the two outputs it is duplicated to which may override
- // a valid device selection on those outputs.
- bool force = !desc->isDuplicated()
- && (!device_distinguishes_on_address(deviceType)
- // always force when disconnecting (a non-duplicated device)
- || (state == AUDIO_POLICY_DEVICE_STATE_UNAVAILABLE));
- setOutputDevices(desc, newDevices, force, 0);
- }
- }
-
- if (state == AUDIO_POLICY_DEVICE_STATE_UNAVAILABLE) {
- cleanUpForDevice(device);
- }
-
- mpClientInterface->onAudioPortListUpdate();
- return NO_ERROR;
- } // end if is output device
-
- // handle input devices
- if (audio_is_input_device(deviceType)) {
- ssize_t index = mAvailableInputDevices.indexOf(device);
- switch (state)
- {
- // handle input device connection
- case AUDIO_POLICY_DEVICE_STATE_AVAILABLE: {
- if (index >= 0) {
- ALOGW("setDeviceConnectionState() device already connected: %d", deviceType);
- return INVALID_OPERATION;
- }
- sp<HwModule> module = mHwModules.getModuleForDevice(device, AUDIO_FORMAT_DEFAULT);
- if (module == NULL) {
- ALOGW("setDeviceConnectionState(): could not find HW module for device %08x",
- deviceType);
- return INVALID_OPERATION;
- }
-
- // Before checking intputs, broadcast connect event to allow HAL to retrieve dynamic
- // parameters on newly connected devices (instead of opening the inputs...)
- broadcastDeviceConnectionState(device, state);
-
- if (checkInputsForDevice(device, state) != NO_ERROR) {
- broadcastDeviceConnectionState(device, AUDIO_POLICY_DEVICE_STATE_UNAVAILABLE);
-
- mHwModules.cleanUpForDevice(device);
-
- return INVALID_OPERATION;
- }
-
- index = mAvailableInputDevices.add(device);
- if (index >= 0) {
- mAvailableInputDevices[index]->attach(module);
- } else {
- return NO_MEMORY;
- }
-
- } break;
-
- // handle input device disconnection
- case AUDIO_POLICY_DEVICE_STATE_UNAVAILABLE: {
- if (index < 0) {
- ALOGW("setDeviceConnectionState() device not connected: %d", deviceType);
- return INVALID_OPERATION;
- }
-
- ALOGV("setDeviceConnectionState() disconnecting input device %x", deviceType);
-
- // Set Disconnect to HALs
- broadcastDeviceConnectionState(device, state);
-
- checkInputsForDevice(device, state);
- mAvailableInputDevices.remove(device);
-
- } break;
-
- default:
- ALOGE("setDeviceConnectionState() invalid state: %x", state);
- return BAD_VALUE;
- }
-
- // Propagate device availability to Engine
- setEngineDeviceConnectionState(device, state);
-
- checkCloseInputs();
- /*audio policy: fix call volume over USB*/
- // As the input device list can impact the output device selection, update
- // getDeviceForStrategy() cache
- updateDevicesAndOutputs();
-
- if (mEngine->getPhoneState() == AUDIO_MODE_IN_CALL && hasPrimaryOutput()) {
- DeviceVector newDevices = getNewOutputDevices(mPrimaryOutput, false /*fromCache*/);
- updateCallRouting(newDevices);
- }
-
- if (state == AUDIO_POLICY_DEVICE_STATE_UNAVAILABLE) {
- cleanUpForDevice(device);
- }
-
- mpClientInterface->onAudioPortListUpdate();
- return NO_ERROR;
- } // end if is input device
-
- ALOGW("setDeviceConnectionState() invalid device: %x", deviceType);
- return BAD_VALUE;
-}
-
-
-
-void AudioPolicyManagerCustom::chkDpConnAndAllowedForVoice()
-{
- String8 value;
- bool connAndAllowed = false;
- String8 valueStr = mpClientInterface->getParameters((audio_io_handle_t)0,
- String8("dp_for_voice"));
-
- AudioParameter result = AudioParameter(valueStr);
- if (result.get(String8("dp_for_voice"), value) == NO_ERROR) {
- connAndAllowed = value.contains("true");
- }
- mEngine->setDpConnAndAllowedForVoice(connAndAllowed);
-}
-
-bool AudioPolicyManagerCustom::isInvalidationOfMusicStreamNeeded(const audio_attributes_t &attr)
-{
- if (followsSameRouting(attr, attributes_initializer(AUDIO_USAGE_MEDIA))) {
- for (size_t i = 0; i < mOutputs.size(); i++) {
- sp<SwAudioOutputDescriptor> newOutputDesc = mOutputs.valueAt(i);
- if (newOutputDesc->mFormat == AUDIO_FORMAT_DSD)
- return false;
- }
- }
- return true;
-}
-
-
-void AudioPolicyManagerCustom::checkOutputForAttributes(const audio_attributes_t &attr)
-{
-
- DeviceVector oldDevices = mEngine->getOutputDevicesForAttributes(attr, 0, true /*fromCache*/);
- DeviceVector newDevices = mEngine->getOutputDevicesForAttributes(attr, 0, false /*fromCache*/);
- SortedVector<audio_io_handle_t> srcOutputs = getOutputsForDevices(oldDevices, mPreviousOutputs);
- SortedVector<audio_io_handle_t> dstOutputs = getOutputsForDevices(newDevices, mOutputs);
-
- // also take into account external policy-related changes: add all outputs which are
- // associated with policies in the "before" and "after" output vectors
- ALOGVV("%s(): policy related outputs", __func__);
- for (size_t i = 0 ; i < mPreviousOutputs.size() ; i++) {
- const sp<SwAudioOutputDescriptor> desc = mPreviousOutputs.valueAt(i);
- if (desc != 0 && desc->mPolicyMix != NULL) {
- srcOutputs.add(desc->mIoHandle);
- ALOGVV(" previous outputs: adding %d", desc->mIoHandle);
- }
- }
- for (size_t i = 0 ; i < mOutputs.size() ; i++) {
- const sp<SwAudioOutputDescriptor> desc = mOutputs.valueAt(i);
- if (desc != 0 && desc->mPolicyMix != NULL) {
- dstOutputs.add(desc->mIoHandle);
- ALOGVV(" new outputs: adding %d", desc->mIoHandle);
- }
- }
-
- if ((srcOutputs != dstOutputs) && isInvalidationOfMusicStreamNeeded(attr)) {
- AudioPolicyManager::checkOutputForAttributes(attr);
- }
-}
-
-// This function checks for the parameters which can be offloaded.
-// This can be enhanced depending on the capability of the DSP and policy
-// of the system.
-bool AudioPolicyManagerCustom::isOffloadSupported(const audio_offload_info_t& offloadInfo)
-{
- DeviceVector primaryInputDevices = availablePrimaryModuleInputDevices();
- ALOGV("isOffloadSupported: SR=%u, CM=0x%x, Format=0x%x, StreamType=%d,"
- " BitRate=%u, duration=%" PRId64 " us, has_video=%d",
- offloadInfo.sample_rate, offloadInfo.channel_mask,
- offloadInfo.format,
- offloadInfo.stream_type, offloadInfo.bit_rate, offloadInfo.duration_us,
- offloadInfo.has_video);
-
- if (mMasterMono) {
- return false; // no offloading if mono is set.
- }
-
- if (mApmConfigs->isVoiceConcEnabled()) {
- if (mApmConfigs->isVoicePlayConcDisabled() && isInCall()) {
- ALOGD("\n copl: blocking compress offload on call mode\n");
- return false;
- }
- }
- if (mApmConfigs->isVoiceDSDConcDisabled() &&
- isInCall() && (offloadInfo.format == AUDIO_FORMAT_DSD)) {
- ALOGD("blocking DSD compress offload on call mode");
- return false;
- }
- if (mApmConfigs->isRecPlayConcEnabled()) {
- if (mApmConfigs->isRecPlayConcDisabled() &&
- ((true == mIsInputRequestOnProgress) ||
- (mInputs.activeInputsCountOnDevices(primaryInputDevices) > 0))) {
- ALOGD("copl: blocking compress offload for record concurrency");
- return false;
- }
- }
- // Check if stream type is music, then only allow offload as of now.
- if (offloadInfo.stream_type != AUDIO_STREAM_MUSIC)
- {
- ALOGV("isOffloadSupported: stream_type != MUSIC, returning false");
- return false;
- }
-
- // Check if offload has been disabled
- bool offloadDisabled = mApmConfigs->isAudioOffloadDisabled();
- if (offloadDisabled) {
- ALOGI("offload disabled by audio.offload.disable=%d", offloadDisabled);
- return false;
- }
-
- //check if it's multi-channel AAC (includes sub formats) and FLAC format
- if ((popcount(offloadInfo.channel_mask) > 2) &&
- (((offloadInfo.format & AUDIO_FORMAT_MAIN_MASK) == AUDIO_FORMAT_AAC) ||
- ((offloadInfo.format & AUDIO_FORMAT_MAIN_MASK) == AUDIO_FORMAT_VORBIS))) {
- ALOGD("offload disabled for multi-channel AAC,FLAC and VORBIS format");
- return false;
- }
-
- if (mApmConfigs->isExtnFormatsEnabled()) {
- //check if it's multi-channel FLAC/ALAC/WMA format with sample rate > 48k
- if ((popcount(offloadInfo.channel_mask) > 2) &&
- (((offloadInfo.format & AUDIO_FORMAT_MAIN_MASK) == AUDIO_FORMAT_FLAC) ||
- (((offloadInfo.format & AUDIO_FORMAT_MAIN_MASK) == AUDIO_FORMAT_ALAC) && (offloadInfo.sample_rate > 48000)) ||
- (((offloadInfo.format & AUDIO_FORMAT_MAIN_MASK) == AUDIO_FORMAT_WMA) && (offloadInfo.sample_rate > 48000)) ||
- (((offloadInfo.format & AUDIO_FORMAT_MAIN_MASK) == AUDIO_FORMAT_WMA_PRO) && (offloadInfo.sample_rate > 48000)) ||
- ((offloadInfo.format & AUDIO_FORMAT_MAIN_MASK) == AUDIO_FORMAT_AAC_ADTS))) {
- ALOGD("offload disabled for multi-channel FLAC/ALAC/WMA/AAC_ADTS clips with sample rate > 48kHz");
- return false;
- }
-
- // check against wma std bit rate restriction
- if ((offloadInfo.format & AUDIO_FORMAT_MAIN_MASK) == AUDIO_FORMAT_WMA) {
- int32_t sr_id = -1;
- uint32_t min_bitrate, max_bitrate;
- for (int i = 0; i < WMA_STD_NUM_FREQ; i++) {
- if (offloadInfo.sample_rate == wmaStdSampleRateTbl[i]) {
- sr_id = i;
- break;
- }
- }
- if ((sr_id < 0) || (popcount(offloadInfo.channel_mask) > 2)
- || (popcount(offloadInfo.channel_mask) <= 0)) {
- ALOGE("invalid sample rate or channel count");
- return false;
- }
-
- min_bitrate = wmaStdMinAvgByteRateTbl[sr_id][popcount(offloadInfo.channel_mask) - 1];
- max_bitrate = wmaStdMaxAvgByteRateTbl[sr_id][popcount(offloadInfo.channel_mask) - 1];
- if ((offloadInfo.bit_rate > max_bitrate) || (offloadInfo.bit_rate < min_bitrate)) {
- ALOGD("offload disabled for WMA clips with unsupported bit rate");
- ALOGD("bit_rate %d, max_bitrate %d, min_bitrate %d", offloadInfo.bit_rate, max_bitrate, min_bitrate);
- return false;
- }
- }
-
- // Safely choose the min bitrate as threshold and leave the restriction to NT decoder as we can't distinguish wma pro and wma lossless here.
- if ((((offloadInfo.format & AUDIO_FORMAT_MAIN_MASK) == AUDIO_FORMAT_WMA_PRO) && (offloadInfo.bit_rate > MAX_BITRATE_WMA_PRO)) ||
- (((offloadInfo.format & AUDIO_FORMAT_MAIN_MASK) == AUDIO_FORMAT_WMA_PRO) && (offloadInfo.bit_rate > MAX_BITRATE_WMA_LOSSLESS))) {
- ALOGD("offload disabled for WMA_PRO/WMA_LOSSLESS clips with bit rate over maximum supported value");
- return false;
- }
- }
-
- //TODO: enable audio offloading with video when ready
- if (offloadInfo.has_video && !mApmConfigs->isAudioOffloadVideoEnabled()) {
- ALOGV("isOffloadSupported: has_video == true, returning false");
- return false;
- }
-
- if (offloadInfo.has_video && offloadInfo.is_streaming &&
- !mApmConfigs->isAVStreamingOffloadEnabled()) {
- ALOGW("offload disabled by vendor.audio.av.streaming.offload.enable %d",
- mApmConfigs->isAVStreamingOffloadEnabled());
- return false;
- }
-
- //If duration is less than minimum value defined in property, return false
- if (mApmConfigs->getAudioOffloadMinDuration() > 0) {
- if (offloadInfo.duration_us < (mApmConfigs->getAudioOffloadMinDuration() * 1000000 )) {
- ALOGV("Offload denied by duration < audio.offload.min.duration.secs(=%u)", mApmConfigs->getAudioOffloadMinDuration());
- return false;
- }
- } else if (offloadInfo.duration_us < OFFLOAD_DEFAULT_MIN_DURATION_SECS * 1000000) {
- ALOGV("Offload denied by duration < default min(=%u)", OFFLOAD_DEFAULT_MIN_DURATION_SECS);
- //duration checks only valid for MP3/AAC/ formats,
- //do not check duration for other audio formats, e.g. AAC/AC3 and amrwb+ formats
- if ((offloadInfo.format == AUDIO_FORMAT_MP3) ||
- ((offloadInfo.format & AUDIO_FORMAT_MAIN_MASK) == AUDIO_FORMAT_AAC) ||
- ((offloadInfo.format & AUDIO_FORMAT_MAIN_MASK) == AUDIO_FORMAT_FLAC) ||
- ((offloadInfo.format & AUDIO_FORMAT_MAIN_MASK) == AUDIO_FORMAT_VORBIS))
- return false;
-
- if (mApmConfigs->isExtnFormatsEnabled()) {
- if (((offloadInfo.format & AUDIO_FORMAT_MAIN_MASK) == AUDIO_FORMAT_WMA) ||
- ((offloadInfo.format & AUDIO_FORMAT_MAIN_MASK) == AUDIO_FORMAT_WMA_PRO) ||
- ((offloadInfo.format & AUDIO_FORMAT_MAIN_MASK) == AUDIO_FORMAT_ALAC) ||
- ((offloadInfo.format & AUDIO_FORMAT_MAIN_MASK) == AUDIO_FORMAT_APE) ||
- ((offloadInfo.format & AUDIO_FORMAT_MAIN_MASK) == AUDIO_FORMAT_DSD) ||
- ((offloadInfo.format & AUDIO_FORMAT_MAIN_MASK) == AUDIO_FORMAT_AAC_ADTS))
- return false;
- }
- }
-
- // Do not allow offloading if one non offloadable effect is enabled. This prevents from
- // creating an offloaded track and tearing it down immediately after start when audioflinger
- // detects there is an active non offloadable effect.
- // FIXME: We should check the audio session here but we do not have it in this context.
- // This may prevent offloading in rare situations where effects are left active by apps
- // in the background.
- if (mEffects.isNonOffloadableEffectEnabled()) {
- return false;
- }
-
- // See if there is a profile to support this.
- // AUDIO_DEVICE_NONE
- sp<IOProfile> profile = getProfileForOutput(DeviceVector() /*ignore device */,
- offloadInfo.sample_rate,
- offloadInfo.format,
- offloadInfo.channel_mask,
- AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD,
- true /*directOnly*/);
- ALOGV("isOffloadSupported() profile %sfound", profile != 0 ? "" : "NOT ");
- return (profile != 0);
-}
-
-void AudioPolicyManagerCustom::setPhoneState(audio_mode_t state)
-{
- ALOGD("setPhoneState() state %d", state);
- // store previous phone state for management of sonification strategy below
- int oldState = mEngine->getPhoneState();
-
- if (mEngine->setPhoneState(state) != NO_ERROR) {
- ALOGW("setPhoneState() invalid or same state %d", state);
- return;
- }
- /// Opens: can these line be executed after the switch of volume curves???
- if (isStateInCall(oldState)) {
- ALOGV("setPhoneState() in call state management: new state is %d", state);
-
- // force reevaluating accessibility routing when call stops
- mpClientInterface->invalidateStream(AUDIO_STREAM_ACCESSIBILITY);
- }
-
- /**
- * Switching to or from incall state or switching between telephony and VoIP lead to force
- * routing command.
- */
- bool force = ((is_state_in_call(oldState) != is_state_in_call(state))
- || (is_state_in_call(state) && (state != oldState)));
-
- // check for device and output changes triggered by new phone state
- checkForDeviceAndOutputChanges();
-
- sp<SwAudioOutputDescriptor> hwOutputDesc = mPrimaryOutput;
- if (mApmConfigs->isVoiceConcEnabled()) {
- bool prop_playback_enabled = mApmConfigs->isVoicePlayConcDisabled();
- bool prop_rec_enabled = mApmConfigs->isVoiceRecConcDisabled();
- bool prop_voip_enabled = mApmConfigs->isVoiceVOIPConcDisabled();
-
- if ((AUDIO_MODE_IN_CALL != oldState) && (AUDIO_MODE_IN_CALL == state)) {
- ALOGD("voice_conc:Entering to call mode oldState :: %d state::%d ",
- oldState, state);
- mvoice_call_state = state;
- if (prop_rec_enabled) {
- //Close all active inputs
- Vector<sp <AudioInputDescriptor> > activeInputs = mInputs.getActiveInputs();
- if (activeInputs.size() != 0) {
- for (size_t i = 0; i < activeInputs.size(); i++) {
- sp<AudioInputDescriptor> activeInput = activeInputs[i];
- switch(activeInput->source()) {
- case AUDIO_SOURCE_VOICE_UPLINK:
- case AUDIO_SOURCE_VOICE_DOWNLINK:
- case AUDIO_SOURCE_VOICE_CALL:
- ALOGD("voice_conc:FOUND active input during call active: %d",
- activeInput->source());
- break;
-
- case AUDIO_SOURCE_VOICE_COMMUNICATION:
- if (prop_voip_enabled) {
- ALOGD("voice_conc:CLOSING VoIP input source on call setup :%d ",
- activeInput->source());
- RecordClientVector activeClients = activeInput->clientsList(true /*activeOnly*/);
- for (const auto& activeClient : activeClients) {
- closeClient(activeClient->portId());
- }
- }
- break;
-
- default:
- ALOGD("voice_conc:CLOSING input on call setup for inputSource: %d",
- activeInput->source());
- RecordClientVector activeClients = activeInput->clientsList(true /*activeOnly*/);
- for (const auto& activeClient : activeClients) {
- closeClient(activeClient->portId());
- }
- break;
- }
- }
- }
- } else if (prop_voip_enabled) {
- Vector<sp <AudioInputDescriptor> > activeInputs = mInputs.getActiveInputs();
- if (activeInputs.size() != 0) {
- for (size_t i = 0; i < activeInputs.size(); i++) {
- sp<AudioInputDescriptor> activeInput = activeInputs[i];
- if (AUDIO_SOURCE_VOICE_COMMUNICATION == activeInput->source()) {
- ALOGD("voice_conc:CLOSING VoIP on call setup : %d",activeInput->source());
- RecordClientVector activeClients = activeInput->clientsList(true /*activeOnly*/);
- for (const auto& activeClient : activeClients) {
- closeClient(activeClient->portId());
- }
- }
- }
- }
- }
- if (prop_playback_enabled) {
- // Move tracks associated to this strategy from previous output to new output
- for (int i = AUDIO_STREAM_SYSTEM; i < AUDIO_STREAM_FOR_POLICY_CNT; i++) {
- ALOGV("voice_conc:Invalidate on call mode for stream :: %d ", i);
- if (AUDIO_OUTPUT_FLAG_DEEP_BUFFER == mFallBackflag) {
- if ((AUDIO_STREAM_MUSIC == i) ||
- (AUDIO_STREAM_VOICE_CALL == i) ) {
- ALOGD("voice_conc:Invalidate stream type %d", i);
- mpClientInterface->invalidateStream((audio_stream_type_t)i);
- }
- } else if (AUDIO_OUTPUT_FLAG_FAST == mFallBackflag) {
- ALOGD("voice_conc:Invalidate stream type %d", i);
- mpClientInterface->invalidateStream((audio_stream_type_t)i);
- }
- }
- }
-
- for (size_t i = 0; i < mOutputs.size(); i++) {
- sp<SwAudioOutputDescriptor> outputDesc = mOutputs.valueAt(i);
- if ( (outputDesc == NULL) || (outputDesc->mProfile == NULL)) {
- ALOGD("voice_conc:ouput desc / profile is NULL");
- continue;
- }
-
- bool isFastFallBackNeeded =
- ((AUDIO_OUTPUT_FLAG_DEEP_BUFFER | AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD | AUDIO_OUTPUT_FLAG_DIRECT_PCM) & outputDesc->mProfile->getFlags());
-
- if ((AUDIO_OUTPUT_FLAG_FAST == mFallBackflag) && isFastFallBackNeeded) {
- if (((!outputDesc->isDuplicated() && outputDesc->mProfile->getFlags() & AUDIO_OUTPUT_FLAG_PRIMARY))
- && prop_playback_enabled) {
- ALOGD("voice_conc:calling suspendOutput on call mode for primary output");
- mpClientInterface->suspendOutput(mOutputs.keyAt(i));
- } //Close compress all sessions
- else if ((outputDesc->mProfile->getFlags() & AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD)
- && prop_playback_enabled) {
- ALOGD("voice_conc:calling closeOutput on call mode for COMPRESS output");
- closeOutput(mOutputs.keyAt(i));
- }
- else if ((outputDesc->mProfile->getFlags() & AUDIO_OUTPUT_FLAG_VOIP_RX)
- && prop_voip_enabled) {
- ALOGD("voice_conc:calling closeOutput on call mode for DIRECT output");
- closeOutput(mOutputs.keyAt(i));
- }
- } else if (AUDIO_OUTPUT_FLAG_DEEP_BUFFER == mFallBackflag) {
- if (outputDesc->mProfile->getFlags() & AUDIO_OUTPUT_FLAG_VOIP_RX) {
- if (prop_voip_enabled) {
- ALOGD("voice_conc:calling closeOutput on call mode for DIRECT output");
- closeOutput(mOutputs.keyAt(i));
- }
- }
- else if (prop_playback_enabled
- && (outputDesc->mProfile->getFlags() & AUDIO_OUTPUT_FLAG_DIRECT)) {
- ALOGD("voice_conc:calling closeOutput on call mode for COMPRESS output");
- closeOutput(mOutputs.keyAt(i));
- }
- }
- }
- }
-
- if ((AUDIO_MODE_IN_CALL == oldState || AUDIO_MODE_IN_COMMUNICATION == oldState) &&
- (AUDIO_MODE_NORMAL == state) && prop_playback_enabled && mvoice_call_state) {
- ALOGD("voice_conc:EXITING from call mode oldState :: %d state::%d \n",oldState, state);
- mvoice_call_state = 0;
- if (AUDIO_OUTPUT_FLAG_FAST == mFallBackflag) {
- //restore PCM (deep-buffer) output after call termination
- for (size_t i = 0; i < mOutputs.size(); i++) {
- sp<SwAudioOutputDescriptor> outputDesc = mOutputs.valueAt(i);
- if ( (outputDesc == NULL) || (outputDesc->mProfile == NULL)) {
- ALOGD("voice_conc:ouput desc / profile is NULL");
- continue;
- }
- if (!outputDesc->isDuplicated() && outputDesc->mProfile->getFlags() & AUDIO_OUTPUT_FLAG_PRIMARY) {
- ALOGD("voice_conc:calling restoreOutput after call mode for primary output");
- mpClientInterface->restoreOutput(mOutputs.keyAt(i));
- }
- }
- }
- //call invalidate tracks so that any open streams can fall back to deep buffer/compress path from ULL
- for (int i = AUDIO_STREAM_SYSTEM; i < AUDIO_STREAM_FOR_POLICY_CNT; i++) {
- ALOGV("voice_conc:Invalidate on call mode for stream :: %d ", i);
- if (AUDIO_OUTPUT_FLAG_DEEP_BUFFER == mFallBackflag) {
- if ((AUDIO_STREAM_MUSIC == i) ||
- (AUDIO_STREAM_VOICE_CALL == i) ) {
- mpClientInterface->invalidateStream((audio_stream_type_t)i);
- }
- } else if (AUDIO_OUTPUT_FLAG_FAST == mFallBackflag) {
- mpClientInterface->invalidateStream((audio_stream_type_t)i);
- }
- }
- }
- }
-
- sp<SwAudioOutputDescriptor> outputDesc = NULL;
- for (size_t i = 0; i < mOutputs.size(); i++) {
- outputDesc = mOutputs.valueAt(i);
- if ((outputDesc == NULL) || (outputDesc->mProfile == NULL)) {
- ALOGD("voice_conc:ouput desc / profile is NULL");
- continue;
- }
-
- if (mApmConfigs->isVoiceDSDConcDisabled() &&
- (outputDesc->mFlags & AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD) &&
- (outputDesc->mFormat == AUDIO_FORMAT_DSD)) {
- ALOGD("voice_conc:calling closeOutput on call mode for DSD COMPRESS output");
- closeOutput(mOutputs.keyAt(i));
- // call invalidate for music, so that DSD compress will fallback to deep-buffer.
- mpClientInterface->invalidateStream(AUDIO_STREAM_MUSIC);
- }
-
- }
-
- if (mApmConfigs->isRecPlayConcEnabled()) {
- if (mApmConfigs->isRecPlayConcDisabled()) {
- if (AUDIO_MODE_IN_COMMUNICATION == mEngine->getPhoneState()) {
- ALOGD("phone state changed to MODE_IN_COMM invlaidating music and voice streams");
- // call invalidate for voice streams, so that it can use deepbuffer with VoIP out device from HAL
- mpClientInterface->invalidateStream(AUDIO_STREAM_VOICE_CALL);
- // call invalidate for music, so that compress will fallback to deep-buffer with VoIP out device
- mpClientInterface->invalidateStream(AUDIO_STREAM_MUSIC);
-
- // close compress output to make sure session will be closed before timeout(60sec)
- for (size_t i = 0; i < mOutputs.size(); i++) {
-
- sp<SwAudioOutputDescriptor> outputDesc = mOutputs.valueAt(i);
- if ((outputDesc == NULL) || (outputDesc->mProfile == NULL)) {
- ALOGD("ouput desc / profile is NULL");
- continue;
- }
-
- if (outputDesc->mProfile->getFlags() & AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD) {
- ALOGD("calling closeOutput on call mode for COMPRESS output");
- closeOutput(mOutputs.keyAt(i));
- }
- }
- } else if ((oldState == AUDIO_MODE_IN_COMMUNICATION) &&
- (mEngine->getPhoneState() == AUDIO_MODE_NORMAL)) {
- // call invalidate for music so that music can fallback to compress
- mpClientInterface->invalidateStream(AUDIO_STREAM_MUSIC);
- }
- }
- }
- mPrevPhoneState = oldState;
- int delayMs = 0;
- if (isStateInCall(state)) {
- nsecs_t sysTime = systemTime();
- auto musicStrategy = streamToStrategy(AUDIO_STREAM_MUSIC);
- auto sonificationStrategy = streamToStrategy(AUDIO_STREAM_ALARM);
-
- for (size_t i = 0; i < mOutputs.size(); i++) {
- sp<SwAudioOutputDescriptor> desc = mOutputs.valueAt(i);
- // mute media and sonification strategies and delay device switch by the largest
- // latency of any output where either strategy is active.
- // This avoid sending the ring tone or music tail into the earpiece or headset.
- if ((desc->isStrategyActive(musicStrategy,
- SONIFICATION_HEADSET_MUSIC_DELAY,
- sysTime) ||
- desc->isStrategyActive(sonificationStrategy,
- SONIFICATION_HEADSET_MUSIC_DELAY,
- sysTime)) &&
- (delayMs < (int)desc->latency()*2)) {
- delayMs = desc->latency()*2;
- }
- setStrategyMute(musicStrategy, true, desc);
- setStrategyMute(musicStrategy, false, desc, MUTE_TIME_MS,
- mEngine->getOutputDevicesForAttributes(attributes_initializer(AUDIO_USAGE_MEDIA),
- nullptr, true /*fromCache*/).types());
- setStrategyMute(sonificationStrategy, true, desc);
- setStrategyMute(sonificationStrategy, false, desc, MUTE_TIME_MS,
- mEngine->getOutputDevicesForAttributes(attributes_initializer(AUDIO_USAGE_ALARM),
- nullptr, true /*fromCache*/).types());
- }
- }
-
- if (hasPrimaryOutput()) {
- // Note that despite the fact that getNewOutputDevice() is called on the primary output,
- // the device returned is not necessarily reachable via this output
- DeviceVector rxDevices = getNewOutputDevices(mPrimaryOutput, false /*fromCache*/);
- // force routing command to audio hardware when ending call
- // even if no device change is needed
- if (isStateInCall(oldState) && rxDevices.isEmpty()) {
- rxDevices = mPrimaryOutput->devices();
- }
-
- if (state == AUDIO_MODE_IN_CALL) {
- updateCallRouting(rxDevices, delayMs);
- } else if (oldState == AUDIO_MODE_IN_CALL) {
- if (mCallRxPatch != 0) {
- mpClientInterface->releaseAudioPatch(mCallRxPatch->mAfPatchHandle, 0);
- mCallRxPatch.clear();
- }
- if (mCallTxPatch != 0) {
- mpClientInterface->releaseAudioPatch(mCallTxPatch->mAfPatchHandle, 0);
- mCallTxPatch.clear();
- }
- setOutputDevices(mPrimaryOutput, rxDevices, force, 0);
- } else {
- setOutputDevices(mPrimaryOutput, rxDevices, force, 0);
- }
- }
- //update device for all non-primary outputs
- for (size_t i = 0; i < mOutputs.size(); i++) {
- audio_io_handle_t output = mOutputs.keyAt(i);
- if (output != mPrimaryOutput->mIoHandle) {
- DeviceVector newDevices = getNewOutputDevices(mOutputs.valueFor(output), false /*fromCache*/);
- setOutputDevices(mOutputs.valueFor(output), newDevices, !newDevices.isEmpty());
- }
- }
- if (isStateInCall(state)) {
- ALOGV("setPhoneState() in call state management: new state is %d", state);
-
- // force reevaluating accessibility routing when call starts
- mpClientInterface->invalidateStream(AUDIO_STREAM_ACCESSIBILITY);
- }
-
- // Flag that ringtone volume must be limited to music volume until we exit MODE_RINGTONE
- mLimitRingtoneVolume = (state == AUDIO_MODE_RINGTONE &&
- isStreamActive(AUDIO_STREAM_MUSIC, SONIFICATION_HEADSET_MUSIC_DELAY));
-}
-
-void AudioPolicyManagerCustom::setForceUse(audio_policy_force_use_t usage,
- audio_policy_forced_cfg_t config)
-{
- ALOGD("setForceUse() usage %d, config %d, mPhoneState %d", usage, config, mEngine->getPhoneState());
- if (config == mEngine->getForceUse(usage)) {
- return;
- }
-
- if (mEngine->setForceUse(usage, config) != NO_ERROR) {
- ALOGW("setForceUse() could not set force cfg %d for usage %d", config, usage);
- return;
- }
- bool forceVolumeReeval = (usage == AUDIO_POLICY_FORCE_FOR_COMMUNICATION) ||
- (usage == AUDIO_POLICY_FORCE_FOR_DOCK) ||
- (usage == AUDIO_POLICY_FORCE_FOR_SYSTEM);
-
- // check for device and output changes triggered by new force usage
- checkForDeviceAndOutputChanges();
-
- /*audio policy: workaround for truncated touch sounds*/
- //FIXME: workaround for truncated touch sounds
- // to be removed when the problem is handled by system UI
- uint32_t delayMs = 0;
- uint32_t waitMs = 0;
- if (usage == AUDIO_POLICY_FORCE_FOR_COMMUNICATION) {
- delayMs = TOUCH_SOUND_FIXED_DELAY_MS;
- }
- if (mEngine->getPhoneState() == AUDIO_MODE_IN_CALL && hasPrimaryOutput()) {
- DeviceVector newDevices = getNewOutputDevices(mPrimaryOutput, true /*fromCache*/);
- if (forceVolumeReeval && !newDevices.isEmpty()) {
- applyStreamVolumes(mPrimaryOutput, newDevices.types(), delayMs, true);
- }
- waitMs = updateCallRouting(newDevices, delayMs);
- }
- // Use reverse loop to make sure any low latency usecases (generally tones)
- // are not routed before non LL usecases (generally music).
- // We can safely assume that LL output would always have lower index,
- // and use this work-around to avoid routing of output with music stream
- // from the context of short lived LL output.
- // Note: in case output's share backend(HAL sharing is implicit) all outputs
- // gets routing update while processing first output itself.
- for (size_t i = mOutputs.size(); i > 0; i--) {
- sp<SwAudioOutputDescriptor> outputDesc = mOutputs.valueAt(i-1);
- DeviceVector newDevices = getNewOutputDevices(outputDesc, true /*fromCache*/);
- if (outputDesc->isActive() && ((mEngine->getPhoneState() != AUDIO_MODE_IN_CALL) ||
- (outputDesc != mPrimaryOutput))) {
- waitMs = setOutputDevices(outputDesc, newDevices, !newDevices.isEmpty(),
- delayMs);
-
- if (forceVolumeReeval && !newDevices.isEmpty()) {
- applyStreamVolumes(outputDesc, newDevices.types(), waitMs, true);
- }
- }
- }
-
- for (const auto& activeDesc : mInputs.getActiveInputs()) {
- // Skip for hotword recording as the input device switch
- // is handled within sound trigger HAL
- if (activeDesc->isSoundTrigger() &&
- activeDesc->source() == AUDIO_SOURCE_HOTWORD) {
- continue;
- }
- auto newDevice = getNewInputDevice(activeDesc);
- // Force new input selection if the new device can not be reached via current input
- if (activeDesc->mProfile->getSupportedDevices().contains(newDevice)) {
- setInputDevice(activeDesc->mIoHandle, newDevice);
- } else {
- closeInput(activeDesc->mIoHandle);
- }
- }
-}
-
-status_t AudioPolicyManagerCustom::stopSource(const sp<SwAudioOutputDescriptor>& outputDesc,
- const sp<TrackClientDescriptor>& client)
-{
- audio_stream_type_t stream = client->stream();
- auto clientVolSrc = client->volumeSource();
-
- if (stream < 0 || stream >= AUDIO_STREAM_CNT) {
- ALOGW("stopSource() invalid stream %d", stream);
- return INVALID_OPERATION;
- }
- // always handle stream stop, check which stream type is stopping
- handleEventForBeacon(stream == AUDIO_STREAM_TTS ? STOPPING_BEACON : STOPPING_OUTPUT);
-
- if (outputDesc->getActivityCount(clientVolSrc) > 0) {
- if (outputDesc->getActivityCount(clientVolSrc) == 1) {
- // Automatically disable the remote submix input when output is stopped on a
- // re routing mix of type MIX_TYPE_RECORDERS
- sp<AudioPolicyMix> policyMix = outputDesc->mPolicyMix.promote();
- if (audio_is_remote_submix_device(outputDesc->devices().types()) &&
- policyMix != NULL &&
- policyMix->mMixType == MIX_TYPE_RECORDERS) {
- setDeviceConnectionStateInt(AUDIO_DEVICE_IN_REMOTE_SUBMIX,
- AUDIO_POLICY_DEVICE_STATE_UNAVAILABLE,
- policyMix->mDeviceAddress,
- "remote-submix", AUDIO_FORMAT_DEFAULT);
- }
- }
- bool forceDeviceUpdate = false;
- if (client->hasPreferredDevice(true)) {
- checkStrategyRoute(client->strategy(), AUDIO_IO_HANDLE_NONE);
- forceDeviceUpdate = true;
- }
-
- // decrement usage count of this stream on the output
- outputDesc->setClientActive(client, false);
-
- // store time at which the stream was stopped - see isStreamActive()
- if (outputDesc->getActivityCount(clientVolSrc) == 0 || forceDeviceUpdate) {
- outputDesc->setStopTime(client, systemTime());
- DeviceVector prevDevices = outputDesc->devices();
- DeviceVector newDevices = getNewOutputDevices(outputDesc, false /*fromCache*/);
- // delay the device switch by twice the latency because stopOutput() is executed when
- // the track stop() command is received and at that time the audio track buffer can
- // still contain data that needs to be drained. The latency only covers the audio HAL
- // and kernel buffers. Also the latency does not always include additional delay in the
- // audio path (audio DSP, CODEC ...)
- setOutputDevices(outputDesc, newDevices, false, outputDesc->latency()*2);
-
- // force restoring the device selection on other active outputs if it differs from the
- // one being selected for this output
- for (size_t i = 0; i < mOutputs.size(); i++) {
- audio_io_handle_t curOutput = mOutputs.keyAt(i);
- sp<SwAudioOutputDescriptor> desc = mOutputs.valueAt(i);
- if (desc != outputDesc &&
- desc->isActive() &&
- outputDesc->sharesHwModuleWith(desc) &&
- (newDevices != desc->devices())) {
- DeviceVector dev = getNewOutputDevices(mOutputs.valueFor(curOutput), false /*fromCache*/);
- bool force = prevDevices != dev;
- uint32_t delayMs;
- if (dev == prevDevices) {
- delayMs = 0;
- } else {
- delayMs = outputDesc->latency()*2;
- }
- setOutputDevices(desc,
- dev,
- force,
- delayMs);
- /*audio policy: fix media volume after ringtone*/
- // re-apply device specific volume if not done by setOutputDevice()
- if (!force) {
- applyStreamVolumes(desc, dev.types(), delayMs);
- }
- }
- }
- // update the outputs if stopping one with a stream that can affect notification routing
- handleNotificationRoutingForStream(stream);
- }
-
- if (stream == AUDIO_STREAM_ENFORCED_AUDIBLE &&
- mEngine->getForceUse(AUDIO_POLICY_FORCE_FOR_SYSTEM) == AUDIO_POLICY_FORCE_SYSTEM_ENFORCED) {
- setStrategyMute(streamToStrategy(AUDIO_STREAM_ALARM), false, outputDesc);
- }
-
- if (followsSameRouting(client->attributes(), attributes_initializer(AUDIO_USAGE_MEDIA))) {
- selectOutputForMusicEffects();
- }
- return NO_ERROR;
- } else {
- ALOGW("stopOutput() refcount is already 0");
- return INVALID_OPERATION;
- }
-}
-
-status_t AudioPolicyManagerCustom::startSource(const sp<SwAudioOutputDescriptor>& outputDesc,
- const sp<TrackClientDescriptor>& client,
- uint32_t *delayMs)
-{
- // cannot start playback of STREAM_TTS if any other output is being used
- uint32_t beaconMuteLatency = 0;
- audio_stream_type_t stream = client->stream();
- auto clientVolSrc = client->volumeSource();
- auto clientStrategy = client->strategy();
- auto clientAttr = client->attributes();
-
- if (stream < 0 || stream >= AUDIO_STREAM_CNT) {
- ALOGW("startSource() invalid stream %d", stream);
- return INVALID_OPERATION;
- }
-
- *delayMs = 0;
- if (stream == AUDIO_STREAM_TTS) {
- ALOGV("\t found BEACON stream");
- if (!mTtsOutputAvailable && mOutputs.isAnyOutputActive(
- toVolumeSource(AUDIO_STREAM_TTS) /*sourceToIgnore*/)) {
- return INVALID_OPERATION;
- } else {
- beaconMuteLatency = handleEventForBeacon(STARTING_BEACON);
- }
- } else {
- // some playback other than beacon starts
- beaconMuteLatency = handleEventForBeacon(STARTING_OUTPUT);
- }
-
- // force device change if the output is inactive and no audio patch is already present.
- // check active before incrementing usage count
- bool force = !outputDesc->isActive() &&
- (outputDesc->getPatchHandle() == AUDIO_PATCH_HANDLE_NONE);
-
- DeviceVector devices;
- sp<AudioPolicyMix> policyMix = outputDesc->mPolicyMix.promote();
- const char *address = NULL;
- if (policyMix != NULL) {
- audio_devices_t newDeviceType;
- address = policyMix->mDeviceAddress.string();
- if ((policyMix->mRouteFlags & MIX_ROUTE_FLAG_LOOP_BACK) == MIX_ROUTE_FLAG_LOOP_BACK) {
- newDeviceType = AUDIO_DEVICE_OUT_REMOTE_SUBMIX;
- } else {
- newDeviceType = policyMix->mDeviceType;
- }
- sp device = mAvailableOutputDevices.getDevice(newDeviceType, String8(address),
- AUDIO_FORMAT_DEFAULT);
- ALOG_ASSERT(device, "%s: no device found t=%u, a=%s", __func__, newDeviceType, address);
- devices.add(device);
- }
-
- // requiresMuteCheck is false when we can bypass mute strategy.
- // It covers a common case when there is no materially active audio
- // and muting would result in unnecessary delay and dropped audio.
- const uint32_t outputLatencyMs = outputDesc->latency();
- bool requiresMuteCheck = outputDesc->isActive(outputLatencyMs * 2); // account for drain
-
- // increment usage count for this stream on the requested output:
- // NOTE that the usage count is the same for duplicated output and hardware output which is
- // necessary for a correct control of hardware output routing by startOutput() and stopOutput()
- outputDesc->setClientActive(client, true);
-
- if (client->hasPreferredDevice(true)) {
- devices = getNewOutputDevices(outputDesc, false /*fromCache*/);
- if (devices != outputDesc->devices()) {
- checkStrategyRoute(clientStrategy, outputDesc->mIoHandle);
- }
- }
-
- if (followsSameRouting(clientAttr, attributes_initializer(AUDIO_USAGE_MEDIA))) {
- selectOutputForMusicEffects();
- }
-
- if (outputDesc->getActivityCount(clientVolSrc) == 1 || !devices.isEmpty()) {
- // starting an output being rerouted?
- if (devices.isEmpty()) {
- devices = getNewOutputDevices(outputDesc, false /*fromCache*/);
- }
- bool shouldWait =
- (followsSameRouting(clientAttr, attributes_initializer(AUDIO_USAGE_ALARM)) ||
- followsSameRouting(clientAttr, attributes_initializer(AUDIO_USAGE_NOTIFICATION)) ||
- (beaconMuteLatency > 0));
- uint32_t waitMs = beaconMuteLatency;
- for (size_t i = 0; i < mOutputs.size(); i++) {
- sp<SwAudioOutputDescriptor> desc = mOutputs.valueAt(i);
- if (desc != outputDesc) {
- // An output has a shared device if
- // - managed by the same hw module
- // - supports the currently selected device
- const bool sharedDevice = outputDesc->sharesHwModuleWith(desc)
- && (!desc->filterSupportedDevices(devices).isEmpty());
-
- // force a device change if any other output is:
- // - managed by the same hw module
- // - supports currently selected device
- // - has a current device selection that differs from selected device.
- // - has an active audio patch
- // In this case, the audio HAL must receive the new device selection so that it can
- // change the device currently selected by the other output.
- if (sharedDevice &&
- desc->devices() != devices &&
- desc->getPatchHandle() != AUDIO_PATCH_HANDLE_NONE) {
- force = true;
- }
- // wait for audio on other active outputs to be presented when starting
- // a notification so that audio focus effect can propagate, or that a mute/unmute
- // event occurred for beacon
- const uint32_t latencyMs = desc->latency();
- const bool isActive = desc->isActive(latencyMs * 2); // account for drain
-
- if (shouldWait && isActive && (waitMs < latencyMs)) {
- waitMs = latencyMs;
- }
-
- // Require mute check if another output is on a shared device
- // and currently active to have proper drain and avoid pops.
- // Note restoring AudioTracks onto this output needs to invoke
- // a volume ramp if there is no mute.
- requiresMuteCheck |= sharedDevice && isActive;
- }
- }
- const uint32_t muteWaitMs =
- setOutputDevices(outputDesc, devices, force, 0, NULL, requiresMuteCheck);
-
- // apply volume rules for current stream and device if necessary
- auto &curves = getVolumeCurves(client->attributes());
- checkAndSetVolume(curves, client->volumeSource(),
- getVolumeCurves(stream).getVolumeIndex(outputDesc->devices().types()),
- outputDesc,
- outputDesc->devices().types());
-
- // update the outputs if starting an output with a stream that can affect notification
- // routing
- handleNotificationRoutingForStream(stream);
-
- // force reevaluating accessibility routing when ringtone or alarm starts
- if (followsSameRouting(clientAttr, attributes_initializer(AUDIO_USAGE_ALARM))) {
- mpClientInterface->invalidateStream(AUDIO_STREAM_ACCESSIBILITY);
- }
- if (waitMs > muteWaitMs) {
- *delayMs = waitMs - muteWaitMs;
- }
-
- }
-
- if (stream == AUDIO_STREAM_ENFORCED_AUDIBLE &&
- mEngine->getForceUse(AUDIO_POLICY_FORCE_FOR_SYSTEM) == AUDIO_POLICY_FORCE_SYSTEM_ENFORCED) {
- setStrategyMute(streamToStrategy(AUDIO_STREAM_ALARM), true, outputDesc);
- }
-
- // Automatically enable the remote submix input when output is started on a re routing mix
- // of type MIX_TYPE_RECORDERS
- if (audio_is_remote_submix_device(devices.types()) && policyMix != NULL &&
- policyMix->mMixType == MIX_TYPE_RECORDERS) {
- setDeviceConnectionStateInt(AUDIO_DEVICE_IN_REMOTE_SUBMIX,
- AUDIO_POLICY_DEVICE_STATE_AVAILABLE,
- address,
- "remote-submix",
- AUDIO_FORMAT_DEFAULT);
- }
-
- return NO_ERROR;
-}
-
-status_t AudioPolicyManagerCustom::checkAndSetVolume(IVolumeCurves &curves,
- VolumeSource volumeSource,
- int index,
- const sp<AudioOutputDescriptor>& outputDesc,
- audio_devices_t device,
- int delayMs,
- bool force)
-{
- // do not change actual stream volume if the stream is muted
- if (outputDesc->isMuted(volumeSource)) {
- ALOGVV("%s: volume source %d muted count %d active=%d", __func__, volumeSource,
- outputDesc->getMuteCount(volumeSource), outputDesc->isActive(volumeSource));
- return NO_ERROR;
- }
-
- VolumeSource callVolSrc = toVolumeSource(AUDIO_STREAM_VOICE_CALL);
- VolumeSource btScoVolSrc = toVolumeSource(AUDIO_STREAM_BLUETOOTH_SCO);
- bool isVoiceVolSrc = callVolSrc == volumeSource;
- bool isBtScoVolSrc = btScoVolSrc == volumeSource;
-
- audio_policy_forced_cfg_t forceUseForComm =
- mEngine->getForceUse(AUDIO_POLICY_FORCE_FOR_COMMUNICATION);
- // do not change in call volume if bluetooth is connected and vice versa
- if ((callVolSrc != btScoVolSrc) &&
- ((isVoiceVolSrc && forceUseForComm == AUDIO_POLICY_FORCE_BT_SCO) ||
- (isBtScoVolSrc && forceUseForComm != AUDIO_POLICY_FORCE_BT_SCO))) {
- ALOGV("checkAndSetVolume() cannot set stream %d volume with force use = %d for comm",
- volumeSource, forceUseForComm);
- return INVALID_OPERATION;
- }
-
- if (device == AUDIO_DEVICE_NONE) {
- device = outputDesc->devices().types();
- }
-
- float volumeDb = computeVolume(curves, volumeSource, index, device);
- if (outputDesc->isFixedVolume(device)) {
- volumeDb = 0.0f;
- }
-
- outputDesc->setVolume(volumeDb, volumeSource, curves.getStreamTypes(), device, delayMs, force);
-
- if (isVoiceVolSrc || isBtScoVolSrc) {
- float voiceVolume;
- // Force voice volume to max for bluetooth SCO as volume is managed by the headset
- if (isVoiceVolSrc) {
- voiceVolume = (float)index/(float)curves.getVolumeIndexMax();
- } else {
- voiceVolume = 1.0;
- }
-
- if (voiceVolume != mLastVoiceVolume) {
- mpClientInterface->setVoiceVolume(voiceVolume, delayMs);
- mLastVoiceVolume = voiceVolume;
- }
- }
- return NO_ERROR;
-}
-
-bool static tryForDirectPCM(audio_output_flags_t flags)
-{
- bool trackDirectPCM = false; // Output request for track created by other apps
-
- if (flags == AUDIO_OUTPUT_FLAG_NONE) {
- if (AudioPolicyManagerCustom::mApmConfigs != NULL)
- trackDirectPCM = AudioPolicyManagerCustom::mApmConfigs->isAudioTrackOffloadEnabled();
- }
- return trackDirectPCM;
-}
-
-status_t AudioPolicyManagerCustom::getOutputForAttr(const audio_attributes_t *attr,
- audio_io_handle_t *output,
- audio_session_t session,
- audio_stream_type_t *stream,
- uid_t uid,
- const audio_config_t *config,
- audio_output_flags_t *flags,
- audio_port_handle_t *selectedDeviceId,
- audio_port_handle_t *portId,
- std::vector<audio_io_handle_t> *secondaryOutputs)
-{
- audio_offload_info_t tOffloadInfo = AUDIO_INFO_INITIALIZER;
- audio_config_t tConfig;
-
- uint32_t bitWidth = (audio_bytes_per_sample(config->format) * 8);
-
- memcpy(&tConfig, config, sizeof(audio_config_t));
- if ((*flags == AUDIO_OUTPUT_FLAG_DIRECT || tryForDirectPCM(*flags)) &&
- (!memcmp(&config->offload_info, &tOffloadInfo, sizeof(audio_offload_info_t)))) {
- tConfig.offload_info.sample_rate = config->sample_rate;
- tConfig.offload_info.channel_mask = config->channel_mask;
- tConfig.offload_info.format = config->format;
- tConfig.offload_info.stream_type = *stream;
- tConfig.offload_info.bit_width = bitWidth;
- if (attr != NULL) {
- ALOGV("found attribute .. setting usage %d ", attr->usage);
- tConfig.offload_info.usage = attr->usage;
- } else {
- ALOGI("%s:: attribute is NULL .. no usage set", __func__);
- }
- }
-
- return AudioPolicyManager::getOutputForAttr(attr, output, session, stream,
- (uid_t)uid, &tConfig,
- flags,
- (audio_port_handle_t*)selectedDeviceId,
- portId,
- secondaryOutputs);
-}
-
-audio_io_handle_t AudioPolicyManagerCustom::getOutputForDevices(
- const DeviceVector &devices,
- audio_session_t session,
- audio_stream_type_t stream,
- const audio_config_t *config,
- audio_output_flags_t *flags,
- bool forceMutingHaptic)
-{
- audio_io_handle_t output = AUDIO_IO_HANDLE_NONE;
- status_t status;
-
- // Discard haptic channel mask when forcing muting haptic channels.
- audio_channel_mask_t channelMask = forceMutingHaptic
- ? (config->channel_mask & ~AUDIO_CHANNEL_HAPTIC_ALL) : config->channel_mask;
-
- if (stream < AUDIO_STREAM_MIN || stream >= AUDIO_STREAM_CNT) {
- ALOGE("%s: invalid stream %d", __func__, stream);
- return AUDIO_IO_HANDLE_NONE;
- }
-
- if (((*flags & AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD) != 0) &&
- (stream != AUDIO_STREAM_MUSIC)) {
- // compress should not be used for non-music streams
- ALOGE("Offloading only allowed with music stream");
- return 0;
- }
-
- if (mApmConfigs->isCompressVOIPEnabled()) {
- if (stream == AUDIO_STREAM_VOICE_CALL &&
- audio_is_linear_pcm(config->format)) {
- // let voice stream to go with primary output by default
- // in case direct voip is bypassed
- bool use_primary_out = true;
-
- if ((channelMask == 1) &&
- (config->sample_rate == 8000 || config->sample_rate == 16000 ||
- config->sample_rate == 32000 || config->sample_rate == 48000)) {
- // Allow Voip direct output only if:
- // audio mode is MODE_IN_COMMUNCATION; AND
- // voip output is not opened already; AND
- // requested sample rate matches with that of voip input stream (if opened already)
- int value = 0;
- uint32_t voipOutCount = 1, voipSampleRate = 1;
-
- String8 valueStr = mpClientInterface->getParameters((audio_io_handle_t)0,
- String8("voip_out_stream_count"));
- AudioParameter result = AudioParameter(valueStr);
- if (result.getInt(String8("voip_out_stream_count"), value) == NO_ERROR) {
- voipOutCount = value;
- }
-
- valueStr = mpClientInterface->getParameters((audio_io_handle_t)0,
- String8("voip_sample_rate"));
- result = AudioParameter(valueStr);
- if (result.getInt(String8("voip_sample_rate"), value) == NO_ERROR) {
- voipSampleRate = value;
- }
-
- if ((voipOutCount == 0) &&
- ((voipSampleRate == 0) || (voipSampleRate == config->sample_rate))) {
- if (mApmConfigs->useVoicePathForPCMVOIP()
- && (config->format == AUDIO_FORMAT_PCM_16_BIT)) {
- *flags = (audio_output_flags_t)(AUDIO_OUTPUT_FLAG_VOIP_RX |
- AUDIO_OUTPUT_FLAG_DIRECT);
- ALOGD("Set VoIP and Direct output flags for PCM format");
- use_primary_out = false;
- }
- }
- }
-
- if (use_primary_out) {
- *flags = (audio_output_flags_t)(AUDIO_OUTPUT_FLAG_FAST|AUDIO_OUTPUT_FLAG_PRIMARY);
- }
- }
- } else {
- if (stream == AUDIO_STREAM_VOICE_CALL &&
- audio_is_linear_pcm(config->format) &&
- (config->channel_mask == 1) &&
- (config->sample_rate == 8000 || config->sample_rate == 16000 ||
- config->sample_rate == 32000 || config->sample_rate == 48000)) {
- //check if VoIP output is not opened already
- bool voip_pcm_already_in_use = false;
- for (size_t i = 0; i < mOutputs.size(); i++) {
- sp<SwAudioOutputDescriptor> desc = mOutputs.valueAt(i);
- if (desc->mFlags == (AUDIO_OUTPUT_FLAG_VOIP_RX | AUDIO_OUTPUT_FLAG_DIRECT)) {
- if (desc->mDirectClientSession != session) {
- voip_pcm_already_in_use = true;
- ALOGD("VoIP PCM already in use");
- break;
- }
- }
- }
-
- if (!voip_pcm_already_in_use) {
- *flags = (audio_output_flags_t)(AUDIO_OUTPUT_FLAG_VOIP_RX |
- AUDIO_OUTPUT_FLAG_DIRECT);
- ALOGV("Set VoIP and Direct output flags for PCM format");
- }
- }
- } /* compress_voip_enabled */
-
- //IF VOIP is going to be started at the same time as when
- //vr is enabled, get VOIP to fallback to low latency
- String8 vr_value;
- String8 value_Str;
- bool is_vr_mode_on = false;
- AudioParameter ret;
-
- value_Str = mpClientInterface->getParameters((audio_io_handle_t)0,
- String8("vr_audio_mode_on"));
- ret = AudioParameter(value_Str);
- if (ret.get(String8("vr_audio_mode_on"), vr_value) == NO_ERROR) {
- is_vr_mode_on = vr_value.contains("true");
- ALOGI("VR mode is %d, switch to primary output if request is for fast|raw",
- is_vr_mode_on);
- }
-
- if (is_vr_mode_on) {
- //check the flags being requested for, and clear FAST|RAW
- *flags = (audio_output_flags_t)(*flags &
- (~(AUDIO_OUTPUT_FLAG_FAST|AUDIO_OUTPUT_FLAG_RAW)));
-
- }
-
- if (mApmConfigs->isVoiceConcEnabled()) {
- bool prop_play_enabled = false, prop_voip_enabled = false;
- prop_play_enabled = mApmConfigs->isVoicePlayConcDisabled();
- prop_voip_enabled = mApmConfigs->isVoiceVOIPConcDisabled();
-
- bool isDeepBufferFallBackNeeded =
- ((AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD | AUDIO_OUTPUT_FLAG_DIRECT_PCM) & *flags);
- bool isFastFallBackNeeded =
- ((AUDIO_OUTPUT_FLAG_DEEP_BUFFER | AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD | AUDIO_OUTPUT_FLAG_DIRECT_PCM) & *flags);
-
- if (prop_play_enabled && mvoice_call_state) {
- //check if voice call is active / running in background
- if ((AUDIO_MODE_IN_CALL == mEngine->getPhoneState()) ||
- ((AUDIO_MODE_IN_CALL == mPrevPhoneState)
- && (AUDIO_MODE_IN_COMMUNICATION == mEngine->getPhoneState())))
- {
- if (AUDIO_OUTPUT_FLAG_VOIP_RX & *flags) {
- if (prop_voip_enabled) {
- ALOGD("voice_conc:getoutput:IN call mode return no o/p for VoIP %x",
- *flags );
- return 0;
- }
- }
- else {
- if (isFastFallBackNeeded &&
- (AUDIO_OUTPUT_FLAG_FAST == mFallBackflag)) {
- ALOGD("voice_conc:IN call mode adding ULL flags .. flags: %x ", *flags );
- *flags = AUDIO_OUTPUT_FLAG_FAST;
- } else if (isDeepBufferFallBackNeeded &&
- (AUDIO_OUTPUT_FLAG_DEEP_BUFFER == mFallBackflag)) {
- if (AUDIO_STREAM_MUSIC == stream) {
- *flags = AUDIO_OUTPUT_FLAG_DEEP_BUFFER;
- ALOGD("voice_conc:IN call mode adding deep-buffer flags %x ", *flags );
- }
- else {
- *flags = AUDIO_OUTPUT_FLAG_FAST;
- ALOGD("voice_conc:IN call mode adding fast flags %x ", *flags );
- }
- }
- }
- }
- } else if (prop_voip_enabled && mvoice_call_state) {
- //check if voice call is active / running in background
- //some of VoIP apps(like SIP2SIP call) supports resume of VoIP call when call in progress
- //return only ULL ouput
- if ((AUDIO_MODE_IN_CALL == mEngine->getPhoneState()) ||
- ((AUDIO_MODE_IN_CALL == mPrevPhoneState)
- && (AUDIO_MODE_IN_COMMUNICATION == mEngine->getPhoneState())))
- {
- if (AUDIO_OUTPUT_FLAG_VOIP_RX & *flags) {
- ALOGD("voice_conc:getoutput:IN call mode return no o/p for VoIP %x",
- *flags );
- return 0;
- }
- }
- }
- }
- if (mApmConfigs->isRecPlayConcEnabled()) {
- bool prop_rec_play_enabled = mApmConfigs->isRecPlayConcDisabled();
- DeviceVector primaryInputDevices = availablePrimaryModuleInputDevices();
- if ((prop_rec_play_enabled) &&
- ((true == mIsInputRequestOnProgress) ||
- (mInputs.activeInputsCountOnDevices(primaryInputDevices) > 0))) {
- if (AUDIO_MODE_IN_COMMUNICATION == mEngine->getPhoneState()) {
- if (AUDIO_OUTPUT_FLAG_VOIP_RX & *flags) {
- // allow VoIP using voice path
- // Do nothing
- } else if ((*flags & AUDIO_OUTPUT_FLAG_FAST) == 0) {
- ALOGD("voice_conc:MODE_IN_COMM is setforcing deep buffer output for non ULL... flags: %x", *flags);
- // use deep buffer path for all non ULL outputs
- *flags = AUDIO_OUTPUT_FLAG_DEEP_BUFFER;
- }
- } else if ((*flags & AUDIO_OUTPUT_FLAG_FAST) == 0) {
- ALOGD("voice_conc:Record mode is on forcing deep buffer output for non ULL... flags: %x ", *flags);
- // use deep buffer path for all non ULL outputs
- *flags = AUDIO_OUTPUT_FLAG_DEEP_BUFFER;
- }
- }
- if (prop_rec_play_enabled &&
- (stream == AUDIO_STREAM_ENFORCED_AUDIBLE)) {
- ALOGD("Record conc is on forcing ULL output for ENFORCED_AUDIBLE");
- *flags = AUDIO_OUTPUT_FLAG_FAST;
- }
- }
-
- /*
- * WFD audio routes back to target speaker when starting a ringtone playback.
- * This is because primary output is reused for ringtone, so output device is
- * updated based on SONIFICATION strategy for both ringtone and music playback.
- * The same issue is not seen on remoted_submix HAL based WFD audio because
- * primary output is not reused and a new output is created for ringtone playback.
- * Issue is fixed by updating output flag to AUDIO_OUTPUT_FLAG_FAST when there is
- * a non-music stream playback on WFD, so primary output is not reused for ringtone.
- */
- if (mApmConfigs->isAFEProxyEnabled()) {
- audio_devices_t availableOutputDeviceTypes = mAvailableOutputDevices.types();
- if ((availableOutputDeviceTypes & AUDIO_DEVICE_OUT_PROXY)
- && (stream != AUDIO_STREAM_MUSIC)) {
- ALOGD("WFD audio: use OUTPUT_FLAG_FAST for non music stream. flags:%x", *flags );
- //For voip paths
- if (*flags & AUDIO_OUTPUT_FLAG_DIRECT)
- *flags = AUDIO_OUTPUT_FLAG_DIRECT;
- else //route every thing else to ULL path
- *flags = AUDIO_OUTPUT_FLAG_FAST;
- }
- }
-
- // open a direct output if required by specified parameters
- // force direct flag if offload flag is set: offloading implies a direct output stream
- // and all common behaviors are driven by checking only the direct flag
- // this should normally be set appropriately in the policy configuration file
- if ((*flags & AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD) != 0) {
- *flags = (audio_output_flags_t)(*flags | AUDIO_OUTPUT_FLAG_DIRECT);
- }
- if ((*flags & AUDIO_OUTPUT_FLAG_HW_AV_SYNC) != 0) {
- *flags = (audio_output_flags_t)(*flags | AUDIO_OUTPUT_FLAG_DIRECT);
- }
-
- // Do internal direct magic here
- bool offload_disabled = mApmConfigs->isAudioOffloadDisabled();
- if ((*flags == AUDIO_OUTPUT_FLAG_NONE) &&
- (stream == AUDIO_STREAM_MUSIC) &&
- ( !offload_disabled) &&
- ((config->offload_info.usage == AUDIO_USAGE_MEDIA) ||
- (config->offload_info.usage == AUDIO_USAGE_GAME))) {
- audio_output_flags_t old_flags = *flags;
- *flags = (audio_output_flags_t)(AUDIO_OUTPUT_FLAG_DIRECT);
- ALOGD("Force Direct Flag .. old flags(0x%x)", old_flags);
- } else if (*flags == AUDIO_OUTPUT_FLAG_DIRECT &&
- (offload_disabled || stream != AUDIO_STREAM_MUSIC)) {
- ALOGD("Offloading is disabled or Stream is not music --> Force Remove Direct Flag");
- *flags = (audio_output_flags_t)(AUDIO_OUTPUT_FLAG_NONE);
- }
-
- // check if direct output for pcm/track offload or compress offload already exist
- bool direct_pcm_already_in_use = false;
- bool compress_offload_already_in_use = false;
- if (*flags & AUDIO_OUTPUT_FLAG_DIRECT) {
- for (size_t i = 0; i < mOutputs.size(); i++) {
- sp<SwAudioOutputDescriptor> desc = mOutputs.valueAt(i);
- if (desc->mFlags == AUDIO_OUTPUT_FLAG_DIRECT) {
- direct_pcm_already_in_use = true;
- ALOGD("Direct PCM already in use");
- }
- if (desc->mFlags & AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD) {
- compress_offload_already_in_use = true;
- ALOGD("Compress Offload already in use");
- }
- }
- // prevent direct pcm for non-music stream blindly if direct pcm already in use
- // for other music stream concurrency is handled after checking direct ouput usage
- // and checking client
- if (direct_pcm_already_in_use == true && stream != AUDIO_STREAM_MUSIC) {
- ALOGD("disabling offload for non music stream as direct pcm is already in use");
- *flags = (audio_output_flags_t)(AUDIO_OUTPUT_FLAG_NONE);
- }
- }
-
- bool forced_deep = false;
- // only allow deep buffering for music stream type
- if (stream != AUDIO_STREAM_MUSIC) {
- *flags = (audio_output_flags_t)(*flags & ~AUDIO_OUTPUT_FLAG_DEEP_BUFFER);
- } else if (/* stream == AUDIO_STREAM_MUSIC && */
- (*flags == AUDIO_OUTPUT_FLAG_NONE || *flags == AUDIO_OUTPUT_FLAG_DIRECT ||
- (*flags & AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD)) &&
- mApmConfigs->isAudioDeepbufferMediaEnabled() && !isInCall()) {
- forced_deep = true;
- }
-
- if (stream == AUDIO_STREAM_TTS) {
- *flags = AUDIO_OUTPUT_FLAG_TTS;
- } else if (devices.types() == AUDIO_DEVICE_OUT_TELEPHONY_TX &&
- stream == AUDIO_STREAM_MUSIC &&
- audio_is_linear_pcm(config->format) &&
- isInCall()) {
- *flags = (audio_output_flags_t)AUDIO_OUTPUT_FLAG_INCALL_MUSIC;
- }
-
- sp<IOProfile> profile;
-
- // skip direct output selection if the request can obviously be attached to a mixed output
- // and not explicitly requested
- if (((*flags & AUDIO_OUTPUT_FLAG_DIRECT) == 0) &&
- audio_is_linear_pcm(config->format) && config->sample_rate <= SAMPLE_RATE_HZ_MAX &&
- audio_channel_count_from_out_mask(channelMask) <= 2) {
- goto non_direct_output;
- }
-
- if (property_get_bool("vendor.audio.pcm.direct.disable", false /* default_value */) &&
- audio_is_linear_pcm(config->format)) {
- ALOGD(":%s Force route mch pcm to deep buffer", __func__);
- forced_deep = true;
- goto non_direct_output;
- }
-
- // Do not allow offloading if one non offloadable effect is enabled or MasterMono is enabled.
- // This prevents creating an offloaded track and tearing it down immediately after start
- // when audioflinger detects there is an active non offloadable effect.
- // FIXME: We should check the audio session here but we do not have it in this context.
- // This may prevent offloading in rare situations where effects are left active by apps
- // in the background.
- //
- // Supplementary annotation:
- // For sake of track offload introduced, we need a rollback for both compress offload
- // and track offload use cases.
- if ((*flags & (AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD|AUDIO_OUTPUT_FLAG_DIRECT)) &&
- (mEffects.isNonOffloadableEffectEnabled() || mMasterMono)) {
- ALOGD("non offloadable effect is enabled, try with non direct output");
- goto non_direct_output;
- }
-
- profile = getProfileForOutput(devices,
- config->sample_rate,
- config->format,
- channelMask,
- (audio_output_flags_t)*flags,
- true /* directOnly */);
-
- if (profile != 0) {
-
- if (!(*flags & AUDIO_OUTPUT_FLAG_DIRECT) &&
- (profile->getFlags() & AUDIO_OUTPUT_FLAG_DIRECT)) {
- ALOGI("got Direct without requesting ... reject ");
- profile = NULL;
- goto non_direct_output;
- }
-
- sp<SwAudioOutputDescriptor> outputDesc = NULL;
- // if multiple concurrent offload decode is supported
- // do no check for reuse and also don't close previous output if its offload
- // previous output will be closed during track destruction
- if (!mApmConfigs->isAudioMultipleOffloadEnable() &&
- ((*flags & AUDIO_OUTPUT_FLAG_DIRECT) != 0)) {
- for (size_t i = 0; i < mOutputs.size(); i++) {
- sp<SwAudioOutputDescriptor> desc = mOutputs.valueAt(i);
- if (!desc->isDuplicated() && (profile == desc->mProfile)) {
- outputDesc = desc;
- // reuse direct output if currently open by the same client
- // and configured with same parameters
- if ((config->sample_rate == desc->mSamplingRate) &&
- (config->format == desc->mFormat) &&
- (channelMask == desc->mChannelMask) &&
- (session == desc->mDirectClientSession)) {
- desc->mDirectOpenCount++;
- ALOGV("getOutputForDevice() reusing direct output %d for session %d",
- mOutputs.keyAt(i), session);
- return mOutputs.keyAt(i);
- }
- }
- }
- if (outputDesc != NULL) {
- if ((((*flags == AUDIO_OUTPUT_FLAG_DIRECT) && direct_pcm_already_in_use) ||
- ((*flags & AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD) &&
- compress_offload_already_in_use)) &&
- session != outputDesc->mDirectClientSession) {
- ALOGV("getOutput() do not reuse direct pcm output because current client (%d) "
- "is not the same as requesting client (%d) for different output conf",
- outputDesc->mDirectClientSession, session);
- goto non_direct_output;
- }
- closeOutput(outputDesc->mIoHandle);
- }
- }
- if (!profile->canOpenNewIo()) {
- goto non_direct_output;
- }
-
- outputDesc =
- new SwAudioOutputDescriptor(profile, mpClientInterface);
- DeviceVector outputDevices = mAvailableOutputDevices.getDevicesFromTypeMask(devices.types());
- String8 address = outputDevices.size() > 0 ? outputDevices.itemAt(0)->address()
- : String8("");
- status = outputDesc->open(config, devices, stream, *flags, &output);
-
- // only accept an output with the requested parameters
- if (status != NO_ERROR ||
- (config->sample_rate != 0 && config->sample_rate != outputDesc->mSamplingRate) ||
- (config->format != AUDIO_FORMAT_DEFAULT && config->format != outputDesc->mFormat) ||
- (channelMask != 0 && channelMask != outputDesc->mChannelMask)) {
- ALOGV("getOutputForDevice() failed opening direct output: output %d sample rate %d %d,"
- "format %d %d, channel mask %04x %04x", output, config->sample_rate,
- outputDesc->mSamplingRate, config->format, outputDesc->mFormat,
- channelMask, outputDesc->mChannelMask);
- //Only close o/p descriptor if successfully opened
- if (status == NO_ERROR) {
- outputDesc->close();
- }
- // fall back to mixer output if possible when the direct output could not be open
- if (audio_is_linear_pcm(config->format) && config->sample_rate <= SAMPLE_RATE_HZ_MAX) {
- goto non_direct_output;
- }
- return AUDIO_IO_HANDLE_NONE;
- }
- outputDesc->mDirectOpenCount = 1;
- outputDesc->mDirectClientSession = session;
-
- addOutput(output, outputDesc);
- mPreviousOutputs = mOutputs;
- ALOGV("getOutputForDevice() returns new direct output %d", output);
- mpClientInterface->onAudioPortListUpdate();
- return output;
- }
-
-non_direct_output:
-
- // A request for HW A/V sync cannot fallback to a mixed output because time
- // stamps are embedded in audio data
- if ((*flags & (AUDIO_OUTPUT_FLAG_HW_AV_SYNC | AUDIO_OUTPUT_FLAG_MMAP_NOIRQ)) != 0) {
- return AUDIO_IO_HANDLE_NONE;
- }
-
- // ignoring channel mask due to downmix capability in mixer
-
- // open a non direct output
-
- // for non direct outputs, only PCM is supported
- if (audio_is_linear_pcm(config->format)) {
- // get which output is suitable for the specified stream. The actual
- // routing change will happen when startOutput() will be called
- SortedVector<audio_io_handle_t> outputs = getOutputsForDevices(devices, mOutputs);
-
- // at this stage we should ignore the DIRECT flag as no direct output could be found earlier
- *flags = (audio_output_flags_t)(*flags & ~AUDIO_OUTPUT_FLAG_DIRECT);
-
- if (forced_deep) {
- *flags = (audio_output_flags_t)(AUDIO_OUTPUT_FLAG_DEEP_BUFFER);
- ALOGI("setting force DEEP buffer now ");
- } else if (*flags == AUDIO_OUTPUT_FLAG_NONE) {
- // no deep buffer playback is requested hence fallback to primary
- *flags = (audio_output_flags_t)(AUDIO_OUTPUT_FLAG_PRIMARY);
- ALOGI("FLAG None hence request for a primary output");
- }
-
- output = selectOutput(outputs, *flags, config->format);
- }
-
- ALOGW_IF((output == 0), "getOutputForDevice() could not find output for stream %d, "
- "sampling rate %d, format %#x, channels %#x, flags %#x",
- stream, config->sample_rate, config->format, channelMask, *flags);
-
- ALOGV("getOutputForDevice() returns output %d", output);
-
- return output;
-}
-
-status_t AudioPolicyManagerCustom::getInputForAttr(const audio_attributes_t *attr,
- audio_io_handle_t *input,
- audio_unique_id_t riid,
- audio_session_t session,
- uid_t uid,
- const audio_config_base_t *config,
- audio_input_flags_t flags,
- audio_port_handle_t *selectedDeviceId,
- input_type_t *inputType,
- audio_port_handle_t *portId)
-{
- audio_source_t inputSource;
- inputSource = attr->source;
-
- if (mApmConfigs->isVoiceConcEnabled()) {
- bool prop_rec_enabled = false, prop_voip_enabled = false;
- prop_rec_enabled = mApmConfigs->isVoiceRecConcDisabled();
- prop_voip_enabled = mApmConfigs->isVoiceVOIPConcDisabled();
-
- if (prop_rec_enabled && mvoice_call_state) {
- //check if voice call is active / running in background
- //some of VoIP apps(like SIP2SIP call) supports resume of VoIP call when call in progress
- //Need to block input request
- if ((AUDIO_MODE_IN_CALL == mEngine->getPhoneState()) ||
- ((AUDIO_MODE_IN_CALL == mPrevPhoneState) &&
- (AUDIO_MODE_IN_COMMUNICATION == mEngine->getPhoneState())))
- {
- switch(inputSource) {
- case AUDIO_SOURCE_VOICE_UPLINK:
- case AUDIO_SOURCE_VOICE_DOWNLINK:
- case AUDIO_SOURCE_VOICE_CALL:
- ALOGD("voice_conc:Creating input during incall mode for inputSource: %d",
- inputSource);
- break;
-
- case AUDIO_SOURCE_VOICE_COMMUNICATION:
- if (prop_voip_enabled) {
- ALOGD("voice_conc:BLOCK VoIP requst incall mode for inputSource: %d",
- inputSource);
- return NO_INIT;
- }
- break;
- default:
- ALOGD("voice_conc:BLOCK VoIP requst incall mode for inputSource: %d",
- inputSource);
- return NO_INIT;
- }
- }
- }//check for VoIP flag
- else if (prop_voip_enabled && mvoice_call_state) {
- //check if voice call is active / running in background
- //some of VoIP apps(like SIP2SIP call) supports resume of VoIP call when call in progress
- //Need to block input request
- if ((AUDIO_MODE_IN_CALL == mEngine->getPhoneState()) ||
- ((AUDIO_MODE_IN_CALL == mPrevPhoneState) &&
- (AUDIO_MODE_IN_COMMUNICATION == mEngine->getPhoneState())))
- {
- if (inputSource == AUDIO_SOURCE_VOICE_COMMUNICATION) {
- ALOGD("BLOCKING VoIP request during incall mode for inputSource: %d ",inputSource);
- return NO_INIT;
- }
- }
- }
- }
-
-
- return AudioPolicyManager::getInputForAttr(attr,
- input,
- riid,
- session,
- uid,
- config,
- flags,
- selectedDeviceId,
- inputType,
- portId);
-}
-
-uint32_t AudioPolicyManagerCustom::activeNonSoundTriggerInputsCountOnDevices(audio_devices_t devices) const
-{
- uint32_t count = 0;
- for (size_t i = 0; i < mInputs.size(); i++) {
- const sp<AudioInputDescriptor> inputDescriptor = mInputs.valueAt(i);
- if (inputDescriptor->isActive() && !inputDescriptor->isSoundTrigger() &&
- ((devices == AUDIO_DEVICE_IN_DEFAULT) ||
- ((inputDescriptor->getDeviceType() & devices & ~AUDIO_DEVICE_BIT_IN) != 0))) {
- count++;
- }
- }
- return count;
-}
-
-status_t AudioPolicyManagerCustom::startInput(audio_port_handle_t portId)
-{
- ALOGV("%s portId %d", __FUNCTION__, portId);
-
- sp<AudioInputDescriptor> inputDesc = mInputs.getInputForClient(portId);
- if (inputDesc == 0) {
- ALOGW("%s no input for client %d", __FUNCTION__, portId);
- return BAD_VALUE;
- }
-
- audio_io_handle_t input = inputDesc->mIoHandle;
- sp<RecordClientDescriptor> client = inputDesc->getClient(portId);
- if (client == NULL) {
- ALOGW("%s invalid client desc for %d", __FUNCTION__, portId);
- return BAD_VALUE;
- }
-
- if (client->active()) {
- ALOGW("%s input %d client %d already started", __FUNCTION__, input, client->portId());
- return INVALID_OPERATION;
- }
-
- audio_session_t session = client->session();
-
- ALOGV("%s input:%d, session:%d)", __FUNCTION__, input, session);
-
-
-// FIXME: disable concurrent capture until UI is ready
-#if 0
- if (!isConcurentCaptureAllowed(inputDesc, audioSession)) {
- ALOGW("startInput(%d) failed: other input already started", input);
- return INVALID_OPERATION;
- }
-
- if (isInCall()) {
- *concurrency |= API_INPUT_CONCURRENCY_CALL;
- }
-
- if (mInputs.activeInputsCountOnDevices() != 0) {
- *concurrency |= API_INPUT_CONCURRENCY_CAPTURE;
- }
-#endif
-
- if (mApmConfigs->isRecPlayConcEnabled()) {
- mIsInputRequestOnProgress = true;
- DeviceVector primaryInputDevices = availablePrimaryModuleInputDevices();
- if (mApmConfigs->isRecPlayConcDisabled() && (mInputs.activeInputsCountOnDevices(primaryInputDevices) == 0)) {
- // send update to HAL on record playback concurrency
- AudioParameter param = AudioParameter();
- param.add(String8("rec_play_conc_on"), String8("true"));
- ALOGD("startInput() setParameters rec_play_conc is setting to ON ");
- mpClientInterface->setParameters(0, param.toString());
-
- // Call invalidate to reset all opened non ULL audio tracks
- // Move tracks associated to this strategy from previous output to new output
- for (int i = AUDIO_STREAM_SYSTEM; i < AUDIO_STREAM_FOR_POLICY_CNT; i++) {
- // Do not call invalidate for ENFORCED_AUDIBLE (otherwise pops are seen for camcorder)
- if (i != AUDIO_STREAM_ENFORCED_AUDIBLE) {
- ALOGD("Invalidate on releaseInput for stream :: %d ", i);
- //FIXME see fixme on name change
- mpClientInterface->invalidateStream((audio_stream_type_t)i);
- }
- }
- // close compress tracks
- for (size_t i = 0; i < mOutputs.size(); i++) {
- sp<SwAudioOutputDescriptor> outputDesc = mOutputs.valueAt(i);
- if ((outputDesc == NULL) || (outputDesc->mProfile == NULL)) {
- ALOGD("ouput desc / profile is NULL");
- continue;
- }
- if (outputDesc->mProfile->getFlags()
- & AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD) {
- // close compress sessions
- ALOGD("calling closeOutput on record conc for COMPRESS output");
- closeOutput(mOutputs.keyAt(i));
- }
- }
- }
- }
- status_t status = inputDesc->start();
- if (status != NO_ERROR) {
- return status;
- }
-
- // increment activity count before calling getNewInputDevice() below as only active sessions
- // are considered for device selection
- inputDesc->setClientActive(client, true);
-
- // indicate active capture to sound trigger service if starting capture from a mic on
- // primary HW module
- sp<DeviceDescriptor> device = getNewInputDevice(inputDesc);
- setInputDevice(input, device, true /* force */);
-
- if (inputDesc->activeCount() == 1) {
- sp<AudioPolicyMix> policyMix = inputDesc->mPolicyMix.promote();
- // if input maps to a dynamic policy with an activity listener, notify of state change
- if ((policyMix != NULL)
- && ((policyMix->mCbFlags & AudioMix::kCbFlagNotifyActivity) != 0)) {
- mpClientInterface->onDynamicPolicyMixStateUpdate(policyMix->mDeviceAddress,
- MIX_STATE_MIXING);
- }
-
- DeviceVector primaryInputDevices = availablePrimaryModuleInputDevices();
- if ((primaryInputDevices.contains(device) && (device->type() & ~AUDIO_DEVICE_BIT_IN)) != 0) {
- if (mApmConfigs->isVAConcEnabled()) {
- if (activeNonSoundTriggerInputsCountOnDevices(primaryInputDevices.types()) == 1)
- SoundTrigger::setCaptureState(true);
- } else if (mInputs.activeInputsCountOnDevices(primaryInputDevices) == 1)
- SoundTrigger::setCaptureState(true);
- }
-
- // automatically enable the remote submix output when input is started if not
- // used by a policy mix of type MIX_TYPE_RECORDERS
- // For remote submix (a virtual device), we open only one input per capture request.
- if (audio_is_remote_submix_device(inputDesc->getDeviceType())) {
- String8 address = String8("");
- if (policyMix == NULL) {
- address = String8("0");
- } else if (policyMix->mMixType == MIX_TYPE_PLAYERS) {
- address = policyMix->mDeviceAddress;
- }
- if (address != "") {
- setDeviceConnectionStateInt(AUDIO_DEVICE_OUT_REMOTE_SUBMIX,
- AUDIO_POLICY_DEVICE_STATE_AVAILABLE,
- address, "remote-submix", AUDIO_FORMAT_DEFAULT);
- }
- }
- }
-
- ALOGV("%s input %d source = %d exit", __FUNCTION__, input, client->source());
-
- if (mApmConfigs->isRecPlayConcEnabled())
- mIsInputRequestOnProgress = false;
- return NO_ERROR;
-}
-
-status_t AudioPolicyManagerCustom::stopInput(audio_port_handle_t portId)
-{
- status_t status;
- status = AudioPolicyManager::stopInput(portId);
- sp<AudioInputDescriptor> inputDesc = mInputs.getInputForClient(portId);
- if (inputDesc == 0) {
- ALOGW("stopInput() no input for client %d", portId);
- return BAD_VALUE;
- }
- sp<RecordClientDescriptor> client = inputDesc->getClient(portId);
- audio_io_handle_t input = inputDesc->mIoHandle;
-
- ALOGV("stopInput() input %d", input);
- DeviceVector primaryInputDevices = availablePrimaryModuleInputDevices();
- if (mApmConfigs->isVAConcEnabled()) {
- sp<AudioInputDescriptor> inputDesc = mInputs.getInputForClient(portId);
- if ((primaryInputDevices.contains(inputDesc->getDevice()) &&
- activeNonSoundTriggerInputsCountOnDevices(primaryInputDevices.types())) == 0) {
- SoundTrigger::setCaptureState(false);
- }
- }
- if (mApmConfigs->isRecPlayConcEnabled()) {
- if (mApmConfigs->isRecPlayConcDisabled() &&
- (mInputs.activeInputsCountOnDevices(primaryInputDevices) == 0)) {
- //send update to HAL on record playback concurrency
- AudioParameter param = AudioParameter();
- param.add(String8("rec_play_conc_on"), String8("false"));
- ALOGD("stopInput() setParameters rec_play_conc is setting to OFF ");
- mpClientInterface->setParameters(0, param.toString());
-
- //call invalidate tracks so that any open streams can fall back to deep buffer/compress path from ULL
- for (int i = AUDIO_STREAM_SYSTEM; i < (int)AUDIO_STREAM_CNT; i++) {
- //Do not call invalidate for ENFORCED_AUDIBLE (otherwise pops are seen for camcorder stop tone)
- if ((i != AUDIO_STREAM_ENFORCED_AUDIBLE) && (i != AUDIO_STREAM_PATCH)) {
- ALOGD(" Invalidate on stopInput for stream :: %d ", i);
- //FIXME see fixme on name change
- mpClientInterface->invalidateStream((audio_stream_type_t)i);
- }
- }
- }
- }
- return status;
-}
-
-AudioPolicyManagerCustom::AudioPolicyManagerCustom(AudioPolicyClientInterface *clientInterface)
- : AudioPolicyManager(clientInterface),
- mFallBackflag(AUDIO_OUTPUT_FLAG_NONE),
- mHdmiAudioDisabled(false),
- mHdmiAudioEvent(false),
- mPrevPhoneState(0),
- mIsInputRequestOnProgress(false)
-{
- if (mApmConfigs->useXMLAudioPolicyConf())
- ALOGD("USE_XML_AUDIO_POLICY_CONF is TRUE");
- else
- ALOGD("USE_XML_AUDIO_POLICY_CONF is FALSE");
-
- if (mApmConfigs->isVoiceConcEnabled())
- mFallBackflag = getFallBackPath();
-}
-
-}
diff --git a/policy_hal/AudioPolicyManager.h b/policy_hal/AudioPolicyManager.h
deleted file mode 100755
index 61f9821..0000000
--- a/policy_hal/AudioPolicyManager.h
+++ /dev/null
@@ -1,188 +0,0 @@
-/*
- * Copyright (c) 2013-2019 The Linux Foundation. All rights reserved.
- * Not a contribution.
- *
- * Copyright (C) 2009 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-#include <audiopolicy/managerdefault/AudioPolicyManager.h>
-#include <audio_policy_conf.h>
-#include <Volume.h>
-#include "APMConfigHelper.h"
-
-
-namespace android {
-#ifndef AUDIO_EXTN_FORMATS_ENABLED
-#define AUDIO_FORMAT_WMA 0x12000000UL
-#define AUDIO_FORMAT_WMA_PRO 0x13000000UL
-#define AUDIO_FORMAT_FLAC 0x1B000000UL
-#define AUDIO_FORMAT_ALAC 0x1C000000UL
-#define AUDIO_FORMAT_APE 0x1D000000UL
-#endif
-
-#define WMA_STD_NUM_FREQ 7
-#define WMA_STD_NUM_CHANNELS 2
-static uint32_t wmaStdSampleRateTbl[WMA_STD_NUM_FREQ] =
-{
- 8000, 11025, 16000, 22050, 32000, 44100, 48000
-};
-
-static uint32_t wmaStdMinAvgByteRateTbl[WMA_STD_NUM_FREQ][WMA_STD_NUM_CHANNELS] =
-{
- {128, 12000},
- {8016, 8016},
- {10000, 16000},
- {16016, 20008},
- {20000, 24000},
- {20008, 31960},
- {63000, 63000}
-};
-
-static uint32_t wmaStdMaxAvgByteRateTbl[WMA_STD_NUM_FREQ][WMA_STD_NUM_CHANNELS] =
-{
- {8000, 12000},
- {10168, 10168},
- {16000, 20000},
- {20008, 32048},
- {20000, 48000},
- {48024, 320032},
- {256008, 256008}
-};
-
-#define MAX_BITRATE_WMA_PRO 1536000
-#define MAX_BITRATE_WMA_LOSSLESS 1152000
-
-#ifndef AAC_ADTS_OFFLOAD_ENABLED
-#define AUDIO_FORMAT_AAC_ADTS 0x1E000000UL
-#endif
-
-#ifndef AUDIO_EXTN_AFE_PROXY_ENABLED
-#define AUDIO_DEVICE_OUT_PROXY 0x1000000
-#endif
-
-// ----------------------------------------------------------------------------
-
-class AudioPolicyManagerCustom: public AudioPolicyManager
-{
-
-public:
- AudioPolicyManagerCustom(AudioPolicyClientInterface *clientInterface);
-
- virtual ~AudioPolicyManagerCustom() {}
-
- status_t setDeviceConnectionStateInt(audio_devices_t device,
- audio_policy_dev_state_t state,
- const char *device_address,
- const char *device_name,
- audio_format_t encodedFormat);
- virtual void setPhoneState(audio_mode_t state);
- virtual void setForceUse(audio_policy_force_use_t usage,
- audio_policy_forced_cfg_t config);
-
- virtual bool isOffloadSupported(const audio_offload_info_t& offloadInfo);
-
- virtual status_t getInputForAttr(const audio_attributes_t *attr,
- audio_io_handle_t *input,
- audio_unique_id_t riid,
- audio_session_t session,
- uid_t uid,
- const audio_config_base_t *config,
- audio_input_flags_t flags,
- audio_port_handle_t *selectedDeviceId,
- input_type_t *inputType,
- audio_port_handle_t *portId);
- /* count active capture sessions (that are not sound trigger) using one of
- the specified devices. Ignore devices if AUDIO_DEVICE_IN_DEFAULT is passed */
- uint32_t activeNonSoundTriggerInputsCountOnDevices(
- audio_devices_t devices = AUDIO_DEVICE_IN_DEFAULT) const;
- // indicates to the audio policy manager that the input starts being used.
- virtual status_t startInput(audio_port_handle_t portId);
- // indicates to the audio policy manager that the input stops being used.
- virtual status_t stopInput(audio_port_handle_t portId);
-
- static sp<APMConfigHelper> mApmConfigs;
-
-protected:
- // check that volume change is permitted, compute and send new volume to audio hardware
- virtual status_t checkAndSetVolume(IVolumeCurves &curves,
- VolumeSource volumeSource, int index,
- const sp<AudioOutputDescriptor>& outputDesc,
- audio_devices_t device,
- int delayMs = 0, bool force = false);
-
- // avoid invalidation for active music stream on previous outputs
- // which is supported on the new device.
-
- bool isInvalidationOfMusicStreamNeeded(const audio_attributes_t &attr);
-
- // Must be called before updateDevicesAndOutputs()
- void checkOutputForAttributes(const audio_attributes_t &attr);
-
- // if argument "device" is different from AUDIO_DEVICE_NONE, startSource() will force
- // the re-evaluation of the output device.
- status_t startSource(const sp<SwAudioOutputDescriptor>& outputDesc,
- const sp<TrackClientDescriptor>& client,
- uint32_t *delayMs);
- status_t stopSource(const sp<SwAudioOutputDescriptor>& outputDesc,
- const sp<TrackClientDescriptor>& client);
- // event is one of STARTING_OUTPUT, STARTING_BEACON, STOPPING_OUTPUT, STOPPING_BEACON
- // returns 0 if no mute/unmute event happened, the largest latency of the device where
- // the mute/unmute happened
-
- uint32_t handleEventForBeacon(int){return 0;}
- uint32_t setBeaconMute(bool){return 0;}
- static audio_output_flags_t getFallBackPath();
- int mFallBackflag;
- //parameter indicates of HDMI speakers disabled
- bool mHdmiAudioDisabled;
- //parameter indicates if HDMI plug in/out detected
- bool mHdmiAudioEvent;
-
-private:
- // internal method to return the output handle for the given device and format
- audio_io_handle_t getOutputForDevices(
- const DeviceVector &devices,
- audio_session_t session,
- audio_stream_type_t stream,
- const audio_config_t *config,
- audio_output_flags_t *flags,
- bool forceMutingHaptic = false);
-
- // internal method to fill offload info in case of Direct PCM
- status_t getOutputForAttr(const audio_attributes_t *attr,
- audio_io_handle_t *output,
- audio_session_t session,
- audio_stream_type_t *stream,
- uid_t uid,
- const audio_config_t *config,
- audio_output_flags_t *flags,
- audio_port_handle_t *selectedDeviceId,
- audio_port_handle_t *portId,
- std::vector<audio_io_handle_t> *secondaryOutputs);
-
-
-
-
- // internal method to query hal for whether display-port is connected
- // and can be used for voip/voice call
- void chkDpConnAndAllowedForVoice();
- // Used for voip + voice concurrency usecase
- int mPrevPhoneState;
- int mvoice_call_state;
- // Used for record + playback concurrency
- bool mIsInputRequestOnProgress;
-};
-};
diff --git a/prebuilt/root/init.recovery.qcom.rc b/prebuilt/root/init.recovery.qcom.rc
deleted file mode 100755
index 71e6ce7..0000000
--- a/prebuilt/root/init.recovery.qcom.rc
+++ /dev/null
@@ -1,60 +0,0 @@
-# Copyright (c) 2017-2018, The Linux Foundation. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are met:
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# * Neither the name of The Linux Foundation nor
-# the names of its contributors may be used to endorse or promote
-# products derived from this software without specific prior written
-# permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
-# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
-# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-
-on init
- write /sys/class/backlight/panel0-backlight/brightness 200
-
- mkdir /config
- mount configfs none /config
- mkdir /config/usb_gadget/g1 0770 shell shell
- write /config/usb_gadget/g1/bcdUSB 0x0200
- write /config/usb_gadget/g1/idVendor 0x18d1
- write /config/usb_gadget/g1/idProduct 0xd001
- mkdir /config/usb_gadget/g1/strings/0x409 0770 shell shell
- write /config/usb_gadget/g1/strings/0x409/serialnumber ${ro.serialno}
- write /config/usb_gadget/g1/strings/0x409/manufacturer ${ro.product.manufacturer}
- write /config/usb_gadget/g1/strings/0x409/product ${ro.product.model}
- mkdir /config/usb_gadget/g1/functions/ffs.adb
- write /config/usb_gadget/g1/os_desc/use 1
- write /config/usb_gadget/g1/os_desc/b_vendor_code 0x1
- write /config/usb_gadget/g1/os_desc/qw_sign "MSFT100"
- setprop sys.usb.configfs 1
-
-on property:ro.boot.usbcontroller=*
- setprop sys.usb.controller ${ro.boot.usbcontroller}
-
-on property:sys.usb.ffs.ready=1
- mkdir /config/usb_gadget/g1/configs/b.1 0777 shell shell
- symlink /config/usb_gadget/g1/configs/b.1 /config/usb_gadget/g1/os_desc/b.1
- mkdir /config/usb_gadget/g1/configs/b.1/strings/0x409 0770 shell shell
- write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "adb"
- symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f1
- write /config/usb_gadget/g1/UDC ${sys.usb.controller}
-
-on fs
- wait /dev/block/platform/soc/${ro.boot.bootdevice}
- symlink /dev/block/platform/soc/${ro.boot.bootdevice} /dev/block/bootdevice
diff --git a/prebuilt/root/init.usb.configfs.rc b/prebuilt/root/init.usb.configfs.rc
deleted file mode 100755
index 1b7eb4f..0000000
--- a/prebuilt/root/init.usb.configfs.rc
+++ /dev/null
@@ -1,190 +0,0 @@
-on property:sys.usb.config=none && property:sys.usb.configfs=1
- write /config/usb_gadget/g1/UDC "none"
- stop adbd
- setprop sys.usb.ffs.ready 0
- write /config/usb_gadget/g1/bDeviceClass 0
- write /config/usb_gadget/g1/bDeviceSubClass 0
- write /config/usb_gadget/g1/bDeviceProtocol 0
- rm /config/usb_gadget/g1/configs/b.1/f1
- rm /config/usb_gadget/g1/configs/b.1/f2
- rm /config/usb_gadget/g1/configs/b.1/f3
- rm /config/usb_gadget/g1/configs/b.1/f4
- rm /config/usb_gadget/g1/configs/b.1/f5
- rmdir /config/usb_gadget/g1/functions/rndis.gs4
- setprop sys.usb.state ${sys.usb.config}
-
-on property:init.svc.adbd=stopped
- setprop sys.usb.ffs.ready 0
-
-on property:sys.usb.config=adb && property:sys.usb.configfs=1
- start adbd
-
-on property:sys.usb.ffs.ready=1 && property:sys.usb.config=adb && property:sys.usb.configfs=1
- write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "adb"
- rm /config/usb_gadget/g1/configs/b.1/f1
- rm /config/usb_gadget/g1/configs/b.1/f2
- rm /config/usb_gadget/g1/configs/b.1/f3
- rm /config/usb_gadget/g1/configs/b.1/f4
- rm /config/usb_gadget/g1/configs/b.1/f5
- symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f1
- write /config/usb_gadget/g1/UDC ${sys.usb.controller}
- setprop sys.usb.state ${sys.usb.config}
-
-on property:sys.usb.config=mtp && property:sys.usb.configfs=1
- write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "mtp"
- rm /config/usb_gadget/g1/configs/b.1/f1
- rm /config/usb_gadget/g1/configs/b.1/f2
- rm /config/usb_gadget/g1/configs/b.1/f3
- rm /config/usb_gadget/g1/configs/b.1/f4
- rm /config/usb_gadget/g1/configs/b.1/f5
- symlink /config/usb_gadget/g1/functions/mtp.gs0 /config/usb_gadget/g1/configs/b.1/f1
- write /config/usb_gadget/g1/UDC ${sys.usb.controller}
- setprop sys.usb.state ${sys.usb.config}
-
-on property:sys.usb.config=mtp,adb && property:sys.usb.configfs=1
- start adbd
-
-on property:sys.usb.ffs.ready=1 && property:sys.usb.config=mtp,adb && property:sys.usb.configfs=1
- write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "mtp_adb"
- rm /config/usb_gadget/g1/configs/b.1/f1
- rm /config/usb_gadget/g1/configs/b.1/f2
- rm /config/usb_gadget/g1/configs/b.1/f3
- rm /config/usb_gadget/g1/configs/b.1/f4
- rm /config/usb_gadget/g1/configs/b.1/f5
- symlink /config/usb_gadget/g1/functions/mtp.gs0 /config/usb_gadget/g1/configs/b.1/f1
- symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2
- write /config/usb_gadget/g1/UDC ${sys.usb.controller}
- setprop sys.usb.state ${sys.usb.config}
-
-on property:sys.usb.config=ptp && property:sys.usb.configfs=1
- write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "ptp"
- rm /config/usb_gadget/g1/configs/b.1/f1
- rm /config/usb_gadget/g1/configs/b.1/f2
- rm /config/usb_gadget/g1/configs/b.1/f3
- rm /config/usb_gadget/g1/configs/b.1/f4
- rm /config/usb_gadget/g1/configs/b.1/f5
- symlink /config/usb_gadget/g1/functions/ptp.gs1 /config/usb_gadget/g1/configs/b.1/f1
- write /config/usb_gadget/g1/UDC ${sys.usb.controller}
- setprop sys.usb.state ${sys.usb.config}
-
-on property:sys.usb.config=ptp,adb && property:sys.usb.configfs=1
- start adbd
-
-on property:sys.usb.ffs.ready=1 && property:sys.usb.config=ptp,adb && property:sys.usb.configfs=1
- write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "ptp_adb"
- rm /config/usb_gadget/g1/configs/b.1/f1
- rm /config/usb_gadget/g1/configs/b.1/f2
- rm /config/usb_gadget/g1/configs/b.1/f3
- rm /config/usb_gadget/g1/configs/b.1/f4
- rm /config/usb_gadget/g1/configs/b.1/f5
- symlink /config/usb_gadget/g1/functions/ptp.gs1 /config/usb_gadget/g1/configs/b.1/f1
- symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2
- write /config/usb_gadget/g1/UDC ${sys.usb.controller}
- setprop sys.usb.state ${sys.usb.config}
-
-on property:sys.usb.config=accessory && property:sys.usb.configfs=1
- write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "accessory"
- rm /config/usb_gadget/g1/configs/b.1/f1
- rm /config/usb_gadget/g1/configs/b.1/f2
- rm /config/usb_gadget/g1/configs/b.1/f3
- rm /config/usb_gadget/g1/configs/b.1/f4
- rm /config/usb_gadget/g1/configs/b.1/f5
- symlink /config/usb_gadget/g1/functions/accessory.gs2 /config/usb_gadget/g1/configs/b.1/f1
- write /config/usb_gadget/g1/UDC ${sys.usb.controller}
- setprop sys.usb.state ${sys.usb.config}
-
-on property:sys.usb.config=accessory,adb && property:sys.usb.configfs=1
- start adbd
-
-on property:sys.usb.ffs.ready=1 && property:sys.usb.config=accessory,adb && property:sys.usb.configfs=1
- write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "accessory_adb"
- rm /config/usb_gadget/g1/configs/b.1/f1
- rm /config/usb_gadget/g1/configs/b.1/f2
- rm /config/usb_gadget/g1/configs/b.1/f3
- rm /config/usb_gadget/g1/configs/b.1/f4
- rm /config/usb_gadget/g1/configs/b.1/f5
- symlink /config/usb_gadget/g1/functions/accessory.gs2 /config/usb_gadget/g1/configs/b.1/f1
- symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2
- write /config/usb_gadget/g1/UDC ${sys.usb.controller}
- setprop sys.usb.state ${sys.usb.config}
-
-on property:sys.usb.config=audio_source && property:sys.usb.configfs=1
- write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "audiosource"
- rm /config/usb_gadget/g1/configs/b.1/f1
- rm /config/usb_gadget/g1/configs/b.1/f2
- rm /config/usb_gadget/g1/configs/b.1/f3
- rm /config/usb_gadget/g1/configs/b.1/f4
- rm /config/usb_gadget/g1/configs/b.1/f5
- symlink /config/usb_gadget/g1/functions/audio_source.gs3 /config/usb_gadget/g1/configs/b.1/f1
- write /config/usb_gadget/g1/UDC ${sys.usb.controller}
- setprop sys.usb.state ${sys.usb.config}
-
-on property:sys.usb.config=audio_source,adb && property:sys.usb.configfs=1
- start adbd
-
-on property:sys.usb.ffs.ready=1 && property:sys.usb.config=audio_source,adb && property:sys.usb.configfs=1
- write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "audiosource_adb"
- rm /config/usb_gadget/g1/configs/b.1/f1
- rm /config/usb_gadget/g1/configs/b.1/f2
- rm /config/usb_gadget/g1/configs/b.1/f3
- rm /config/usb_gadget/g1/configs/b.1/f4
- rm /config/usb_gadget/g1/configs/b.1/f5
- symlink /config/usb_gadget/g1/functions/audio_source.gs3 /config/usb_gadget/g1/configs/b.1/f1
- symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2
- write /config/usb_gadget/g1/UDC ${sys.usb.controller}
- setprop sys.usb.state ${sys.usb.config}
-
-on property:sys.usb.config=accessory,audio_source && property:sys.usb.configfs=1
- write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "accessory_audiosource"
- rm /config/usb_gadget/g1/configs/b.1/f1
- rm /config/usb_gadget/g1/configs/b.1/f2
- rm /config/usb_gadget/g1/configs/b.1/f3
- rm /config/usb_gadget/g1/configs/b.1/f4
- rm /config/usb_gadget/g1/configs/b.1/f5
- symlink /config/usb_gadget/g1/functions/accessory.gs2 /config/usb_gadget/g1/configs/b.1/f1
- symlink /config/usb_gadget/g1/functions/audio_source.gs3 /config/usb_gadget/g1/configs/b.1/f2
- write /config/usb_gadget/g1/UDC ${sys.usb.controller}
- setprop sys.usb.state ${sys.usb.config}
-
-on property:sys.usb.config=accessory,audio_source,adb && property:sys.usb.configfs=1
- start adbd
-
-on property:sys.usb.ffs.ready=1 && property:sys.usb.config=accessory,audio_source,adb && property:sys.usb.configfs=1
- write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "accessory_audiosource_adb"
- rm /config/usb_gadget/g1/configs/b.1/f1
- rm /config/usb_gadget/g1/configs/b.1/f2
- rm /config/usb_gadget/g1/configs/b.1/f3
- rm /config/usb_gadget/g1/configs/b.1/f4
- rm /config/usb_gadget/g1/configs/b.1/f5
- symlink /config/usb_gadget/g1/functions/accessory.gs2 /config/usb_gadget/g1/configs/b.1/f1
- symlink /config/usb_gadget/g1/functions/audio_source.gs3 /config/usb_gadget/g1/configs/b.1/f2
- symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f3
- write /config/usb_gadget/g1/UDC ${sys.usb.controller}
- setprop sys.usb.state ${sys.usb.config}
-
-on property:sys.usb.config=midi && property:sys.usb.configfs=1
- write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "midi"
- rm /config/usb_gadget/g1/configs/b.1/f1
- rm /config/usb_gadget/g1/configs/b.1/f2
- rm /config/usb_gadget/g1/configs/b.1/f3
- rm /config/usb_gadget/g1/configs/b.1/f4
- rm /config/usb_gadget/g1/configs/b.1/f5
- symlink /config/usb_gadget/g1/functions/midi.gs5 /config/usb_gadget/g1/configs/b.1/f1
- write /config/usb_gadget/g1/UDC ${sys.usb.controller}
- setprop sys.usb.state ${sys.usb.config}
-
-on property:sys.usb.config=midi,adb && property:sys.usb.configfs=1
- start adbd
-
-on property:sys.usb.ffs.ready=1 && property:sys.usb.config=midi,adb && property:sys.usb.configfs=1
- write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "midi_adb"
- rm /config/usb_gadget/g1/configs/b.1/f1
- rm /config/usb_gadget/g1/configs/b.1/f2
- rm /config/usb_gadget/g1/configs/b.1/f3
- rm /config/usb_gadget/g1/configs/b.1/f4
- rm /config/usb_gadget/g1/configs/b.1/f5
- symlink /config/usb_gadget/g1/functions/midi.gs5 /config/usb_gadget/g1/configs/b.1/f1
- symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2
- write /config/usb_gadget/g1/UDC ${sys.usb.controller}
- setprop sys.usb.state ${sys.usb.config}
-
diff --git a/prebuilt/root/ueventd.rc b/prebuilt/root/ueventd.rc
deleted file mode 100644
index 72b1956..0000000
--- a/prebuilt/root/ueventd.rc
+++ /dev/null
@@ -1,73 +0,0 @@
-firmware_directories /etc/firmware/ /odm/firmware/ /vendor/firmware/ /firmware/image/
-uevent_socket_rcvbuf_size 16M
-
-subsystem graphics
- devname uevent_devpath
- dirname /dev/graphics
-
-subsystem drm
- devname uevent_devpath
- dirname /dev/dri
-
-subsystem input
- devname uevent_devpath
- dirname /dev/input
-
-subsystem sound
- devname uevent_devpath
- dirname /dev/snd
-
-# ueventd can only set permissions on device nodes and their associated
-# sysfs attributes, not on arbitrary paths.
-#
-# format for /dev rules: devname mode uid gid
-# format for /sys rules: nodename attr mode uid gid
-# shortcut: "mtd@NN" expands to "/dev/mtd/mtdNN"
-
-/dev/null 0666 root root
-/dev/zero 0666 root root
-/dev/full 0666 root root
-/dev/ptmx 0666 root root
-/dev/tty 0666 root root
-/dev/random 0666 root root
-/dev/urandom 0666 root root
-# Make HW RNG readable by group system to let EntropyMixer read it.
-/dev/hw_random 0440 root system
-/dev/ashmem 0666 root root
-/dev/binder 0666 root root
-/dev/hwbinder 0666 root root
-/dev/vndbinder 0666 root root
-
-/dev/pmsg0 0222 root log
-
-# kms driver for drm based gpu
-/dev/dri/* 0666 root graphics
-
-# these should not be world writable
-/dev/uhid 0660 uhid uhid
-/dev/uinput 0660 uhid uhid
-/dev/rtc0 0640 system system
-/dev/tty0 0660 root system
-/dev/graphics/* 0660 root graphics
-/dev/input/* 0660 root input
-/dev/v4l-touch* 0660 root input
-/dev/snd/* 0660 system audio
-/dev/bus/usb/* 0660 root usb
-/dev/mtp_usb 0660 root mtp
-/dev/usb_accessory 0660 root usb
-/dev/tun 0660 system vpn
-
-# CDMA radio interface MUX
-/dev/ppp 0660 radio vpn
-
-# sysfs properties
-/sys/devices/platform/trusty.* trusty_version 0440 root log
-/sys/devices/virtual/input/input* enable 0660 root input
-/sys/devices/virtual/input/input* poll_delay 0660 root input
-/sys/devices/virtual/usb_composite/* enable 0664 root system
-/sys/devices/system/cpu/cpu* cpufreq/scaling_max_freq 0664 system system
-/sys/devices/system/cpu/cpu* cpufreq/scaling_min_freq 0664 system system
-
-# Begin Immersion changes
-/dev/tspdrv 0660 system system
-# End Immersion changes
diff --git a/prebuilt/system/etc/bluetooth/bt_configstore.conf b/prebuilt/system/etc/bluetooth/bt_configstore.conf
deleted file mode 100644
index b52fb64..0000000
--- a/prebuilt/system/etc/bluetooth/bt_configstore.conf
+++ /dev/null
@@ -1,263 +0,0 @@
-# platform configuration
-[platform1]
-
-# platform name
-platformName = SDM845
-
-# Soc Name
-socName = cherokee
-
-# Split A2dp support - true(default) or false
-spiltA2dpSupported = true
-
-# AAC Frame Control support - true or false (default)
-aacFrameCtlEnabled = false
-
-# A2dp offload Capability support
-a2dpOffloadCapability = sbc-aptx-aptxtws-aptxhd-aac-ldac
-
-# Wipower Support - true(default) or false
-wiPowerSupported = true
-
-# TWS+ state processing
-twspStateSupported = false;
-#=================================================================================================#
-# platform configuration
-[platform2]
-
-# platform name
-platformName = SDM855
-
-# Soc Name
-socName = cherokee
-
-# Split A2dp support - true(default) or false
-spiltA2dpSupported = true
-
-# AAC Frame Control support - true or false (default)
-aacFrameCtlEnabled = false
-
-# A2dp offload Capability support
-a2dpOffloadCapability = sbc-aptx-aptxtws-aptxhd-aac-ldac
-
-# Wipower Support - true(default) or false
-wiPowerSupported = true
-
-# TWS+ state processing
-twspStateSupported = false;
-#=================================================================================================#
-# platform configuration
-[platform3]
-
-# platform name
-platformName = SM6150
-
-# Soc Name
-socName = cherokee
-
-# Split A2dp support - true(default) or false
-spiltA2dpSupported = true
-
-# AAC Frame Control support - true or false (default)
-aacFrameCtlEnabled = false
-
-# A2dp offload Capability support
-a2dpOffloadCapability = sbc-aptx-aptxtws-aptxhd-aac-ldac
-
-# Wipower Support - true(default) or false
-wiPowerSupported = true
-
-# TWS+ state processing
-twspStateSupported = false;
-#=================================================================================================#
-# platform configuration
-[platform4]
-
-# platform name
-platformName = SDM670
-
-# Soc Name
-socName = cherokee
-
-# AAC Frame Control support - true or false (default)
-aacFrameCtlEnabled = false
-
-# AAC Frame Control support - true(default) or false
-aacFrameCtlEnabled = true
-
-# A2dp offload Capability support
-a2dpOffloadCapability = sbc-aptx-aptxtws-aptxhd-aac-ldac
-
-# Wipower Support - true(default) or false
-wiPowerSupported = true
-
-# TWS+ state processing
-twspStateSupported = false;
-#=================================================================================================#
-# platform configuration
-[platform5]
-
-# platform name
-platformName = SDM660
-
-# Soc Name
-socName = cherokee
-
-# Split A2dp support - true(default) or false
-spiltA2dpSupported = true
-
-# AAC Frame Control support - true or false (default)
-aacFrameCtlEnabled = false
-
-# A2dp offload Capability support
-a2dpOffloadCapability = sbc-aptx-aptxhd-aac
-
-# Wipower Support - true(default) or false
-wiPowerSupported = true
-
-#=================================================================================================#
-# platform configuration
-[platform6]
-
-# platform name
-platformName = SDA865
-
-# Soc Name
-socName = hastings
-
-# Split A2dp support - true(default) or false
-spiltA2dpSupported = true
-
-# AAC Frame Control support - true(default) or false
-aacFrameCtlEnabled = true
-
-# A2dp offload Capability support
-a2dpOffloadCapability = sbc-aptx-aptxtws-aptxhd-aac-ldac
-
-# Wipower Support - true(default) or false
-wiPowerSupported = true
-
-#A2dp Multicast support
-a2dpMcastSupported = false;
-
-# TWS+ state processing
-twspStateSupported = false;
-#=================================================================================================#
-# platform configuration
-[platform7]
-
-# platform name
-platformName = MSM8998
-
-# Soc Name
-socName = cherokee
-
-# Split A2dp support - true(default) or false
-spiltA2dpSupported = true
-
-# AAC Frame Control support - true or false (default)
-aacFrameCtlEnabled = false
-
-# A2dp offload Capability support
-a2dpOffloadCapability = sbc-aptx-aptxhd-aac
-
-# Wipower Support - true(default) or false
-wiPowerSupported = true
-
-#=================================================================================================#
-# platform configuration
-[platform8]
-
-# platform name
-platformName = MSM8996
-
-# Soc Name
-socName = rome
-
-# Split A2dp support - true(default) or false
-spiltA2dpSupported = true
-
-# AAC Frame Control support - true or false (default)
-aacFrameCtlEnabled = false
-
-# A2dp offload Capability support
-a2dpOffloadCapability = sbc-aptx-aptxhd-aac
-
-# Wipower Support - true(default) or false
-wiPowerSupported = true
-
-#=================================================================================================#
-# platform configuration
-[platform9]
-
-# platform name
-platformName = MSM8937
-
-# Soc Name
-socName = pronto
-
-# Split A2dp support - true or false (default)
-spiltA2dpSupported = false
-
-# AAC Frame Control support - true or false (default)
-aacFrameCtlEnabled = false
-
-# Wipower Support - true or false (default)
-wiPowerSupported = false
-
-#=================================================================================================#
-# platform configuration
-[platform10]
-
-# platform name
-platformName = MSM8953
-
-# Soc Name
-socName = pronto
-
-# Split A2dp support - true or false (default)
-spiltA2dpSupported = false
-
-# AAC Frame Control support - true or false (default)
-aacFrameCtlEnabled = false
-
-# Wipower Support - true or false (default)
-wiPowerSupported = false
-
-#=================================================================================================#
-# platform configuration
-[platform11]
-
-# platform name
-platformName = MSM8909
-
-# Soc Name
-socName = pronto
-
-# Split A2dp support - true or false (default)
-spiltA2dpSupported = false
-
-# AAC Frame Control support - true or false (default)
-aacFrameCtlEnabled = false
-
-# Wipower Support - true or false (default)
-wiPowerSupported = false
-
-#=================================================================================================#
-# platform configuration
-[platform12]
-
-# platform name
-platformName = MSM8952
-
-# Soc Name
-socName = pronto
-
-# Split A2dp support - true or false (default)
-spiltA2dpSupported = false
-
-# AAC Frame Control support - true or false (default)
-aacFrameCtlEnabled = false
-
-# Wipower Support - true or false (default)
-wiPowerSupported = false
diff --git a/prebuilt/system/etc/bluetooth/bt_profile.conf b/prebuilt/system/etc/bluetooth/bt_profile.conf
deleted file mode 100644
index d3fd677..0000000
--- a/prebuilt/system/etc/bluetooth/bt_profile.conf
+++ /dev/null
@@ -1,45 +0,0 @@
-# Below are the guidelines/instructions for editing this conf file.
-# Note 1: User should turn of the BT, before updating this conf file.
-# Note 2: Line started with the # is treated as comments.
-# Note 3: Comment lines in between the entries are not allowed.
-#
-# Below is the profile list for configuration
-# 1.AVRCP
-# 2.PBAP
-# 3.MAP
-# 4.MAX_POW
-#
-# ******************************* Start of config Database *******************
-#AVRCP profile and its configurable features
-#avrcp_coverart_support default value true
-#To enable avrcp coverart support avrcp version should
-#be set to 1.6 from developer options in settings menu
-[AVRCP]
-avrcp_0103_support = false
-avrcp_coverart_support = true
-
-#PBAP profile and its configurable features
-#Default version 1.2 = 0x0102
-#to downgrade to versions 1.1 = 0x0101 ,pbap_0102_support should be set to false
-# use_sim_support default value true
-[PBAP]
-pbap_0102_support = true
-use_sim_support = true
-
-#MAP profile and its configurable features
-# map_email_support default value true
-[MAP]
-map_email_support = true
-map_0104_support = true
-
-#Configurable BT MAX_POW based on BT Technology
-#Host can specify different max. power for different Technology/packet type
-#Currently BR,EDR and BLE packet type are supported
-#Power value 0x80 is meant to disable the max power restriction for particular technology
-# BR_max_pow_support default value 0x80
-# EDR_max_pow_support default value 0x80
-# BLE_max_pow_support default value 0x80
-[MAX_POW]
-#BR_max_pow_support = 0x80
-#EDR_max_pow_support = 0x80
-BLE_max_pow_support = 0x18
diff --git a/prebuilt/system/etc/bluetooth/bt_stack_debug.conf b/prebuilt/system/etc/bluetooth/bt_stack_debug.conf
deleted file mode 100644
index 8c67724..0000000
--- a/prebuilt/system/etc/bluetooth/bt_stack_debug.conf
+++ /dev/null
@@ -1,70 +0,0 @@
-# Enable trace level reconfiguration function
-# Must be present before any TRC_ trace level settings
-TraceConf=true
-
-# Trace level configuration
-# BT_TRACE_LEVEL_NONE 0 ( No trace messages to be generated )
-# BT_TRACE_LEVEL_ERROR 1 ( Error condition trace messages )
-# BT_TRACE_LEVEL_WARNING 2 ( Warning condition trace messages )
-# BT_TRACE_LEVEL_API 3 ( API traces )
-# BT_TRACE_LEVEL_EVENT 4 ( Debug messages for events )
-# BT_TRACE_LEVEL_DEBUG 5 ( Full debug messages )
-# BT_TRACE_LEVEL_VERBOSE 6 ( Verbose messages ) - Currently supported for TRC_BTAPP only.
-TRC_BTM=5
-TRC_HCI=5
-TRC_L2CAP=2
-TRC_RFCOMM=2
-TRC_OBEX=2
-TRC_AVCT=2
-TRC_AVDT=2
-TRC_AVRC=2
-TRC_AVDT_SCB=2
-TRC_AVDT_CCB=2
-TRC_A2D=2
-TRC_SDP=2
-TRC_SMP=2
-TRC_BTAPP=2
-TRC_BTIF=5
-TRC_BNEP=2
-TRC_PAN=2
-TRC_HID_HOST=2
-TRC_HID_DEV=2
-
-# This is Log configuration for new C++ code using LOG() macros.
-# See libchrome/base/logging.h for description on how to configure your logs.
-# sample configuration:
-#LoggingV=--v=0
-#LoggingVModule=--vmodule=*/btm/*=1,btm_ble_multi*=2,btif_*=1
-
-# PTS testing helpers
-
-# Secure connections only mode.
-# PTS_SecurePairOnly=true
-
-# Disable LE Connection updates
-#PTS_DisableConnUpdates=true
-
-# Disable BR/EDR discovery after LE pairing to avoid cross key derivation errors
-#PTS_DisableSDPOnLEPair=true
-
-# SMP Pair options (formatted as hex bytes) auth, io, ikey, rkey, ksize
-#PTS_SmpOptions=0xD,0x4,0xf,0xf,0x10
-
-# PTS AVRCP Test mode
-#PTS_AvrcpTest=true
-
-# SMP Certification Failure Cases
-# Set any of the following SMP error values (from smp_api_types.h)
-# to induce pairing failues for various PTS SMP test cases.
-# Setting PTS_SmpFailureCase to 0 means normal operation.
-# Failure modes:
-#
-# SMP_PASSKEY_ENTRY_FAIL = 1
-# SMP_PAIR_AUTH_FAIL = 3
-# SMP_CONFIRM_VALUE_ERR = 4
-# SMP_PAIR_NOT_SUPPORT = 5
-# SMP_PAIR_FAIL_UNKNOWN = 8
-# SMP_REPEATED_ATTEMPTS = 9
-# SMP_NUMERIC_COMPAR_FAIL = 12
-#PTS_SmpFailureCase=0
-
diff --git a/prebuilt/system/etc/bluetooth/interop_database.conf b/prebuilt/system/etc/bluetooth/interop_database.conf
deleted file mode 100644
index 8ab463a..0000000
--- a/prebuilt/system/etc/bluetooth/interop_database.conf
+++ /dev/null
@@ -1,527 +0,0 @@
-# Below are the guidelines/instructions for editing this database file.
-# Note 1: User should turn of the BT, before updating this database file.
-# Note 2: Maximum length of the line should not be more than 1023 characters.
-# Note 3: Line started with the # is treated as comments.
-# Note 4: Comment lines in between the entries are not allowed.
-# Note 5: All duplicated entries including main BL types will be ignored.
-#
-#1. Below are the four tags for blacklist
-# A. Address_Based C. Manufacturer_based
-# B. Name_Based D. Vndr_Prdt_Based
-# E. SSR_Max_Lat_Based F: Version_Based
-##
-# A. Address_Based : This tag refers to Address based blacklist
-# Input Type : Input value should be only 3 to 6 bytes of BD address
-# Format Type : Address should be in XX:XX:XX format
-# Examples : 00:01:03 = Address_Based
-###
-# B. Name_Based : This tag refers to Name based blacklist.
-# Input type : Input should be only string and length of the string
-# should not be more than 248 characters.
-# Format Type : string
-# Examples : Sample Headset name = Name_Based
-####
-# C. Manufacturer_Based : This tag refers to Manufacturer based blacklist
-# Input type : Input should be in Hexadecimal Number of Manufacturer
-# Format Type : 2 Bytes Hexadecimal Value
-# Examples : 0X0023 = Manufacturer_Based
-#####
-# D. Vndr_Prdt_Based : This tag refers to vendor and product based blacklist
-# Input type : Input should be in Hexadecimal value
-# Format Type : 4 bytes hex value( 2 bytes of vendor and 2 bytes of product),
-# Vendor and product hex values should be separated with delimiter(-).
-# Examples : 0X00AB-0X00BC = Vndr_Prdt_Based
-#####
-# E. SSR_Max_Lat_Based : This tag refers to SSR Max Latency based blacklist
-# Input type : Input value should be combination of first 3 bytes of BD address and
-# Hexadecimal value of SSR Max Latency
-# Format Type : Address should be in XX:XX:XX format followed by 2 bytes hex value
-# of max latency Address and Max Latency should be separated with delimiter(-).
-# Examples : 00:01:03-0X00AB = SSR_Max_Lat_Based
-#####
-# F. Version_Based : This tag refers to DID Version based blacklist
-# Input type : Input value should be Hexadecimal value
-# Format Type : 2 bytes hex value
-# Examples : 0X00AB = Version_Based
-# ******************************* Start of Blacklist Database ********************************
-#Disable secure connections
-#This is for pre BT 4.1/2 devices that do not handle secure mode very well.
-[INTEROP_DISABLE_LE_SECURE_CONNECTIONS]
-08:62:66 = Address_Based
-38:2C:4A:C9 = Address_Based
-38:2C:4A:E6 = Address_Based
-54:A0:50:D9 = Address_Based
-AC:9E:17 = Address_Based
-F0:79:59 = Address_Based
-80:E4:DA:70 = Address_Based
-1C:96:5A = Address_Based
-80:EA:CA = Address_Based
-51:01:00 = Address_Based
-61:01:00 = Address_Based
-9C:5C:8E = Address_Based
-2C:56:DC = Address_Based
-30:5A:3A = Address_Based
-1C:B7:2C = Address_Based
-14:DD:A9 = Address_Based
-1C:87:2C = Address_Based
-
-# Devices requiring this workaround do not handle Bluetooth Absolute Volume
-# control correctly, leading to undesirable (potentially harmful) volume levels
-# or general lack of controlability.
-[INTEROP_DISABLE_ABSOLUTE_VOLUME]
-A0:E9:DB = Address_Based
-00:14:02 = Address_Based
-1C:48:F9 = Address_Based
-44:5E:F3 = Address_Based
-D4:9C:28 = Address_Based
-00:18:6B = Address_Based
-B8:AD:3E = Address_Based
-00:11:B1 = Address_Based
-A4:15:66 = Address_Based
-00:14:F1 = Address_Based
-00:26:7E = Address_Based
-90:03:B7 = Address_Based
-04:F8:C2 = Address_Based
-00:18:91 = Address_Based
-00:24:1C = Address_Based
-00:08:8b = Address_Based
-94:16:25 = Address_Based
-D0:5F:B8 = Address_Based
-C8:FD:19 = Address_Based
-00:10:01 = Address_Based
-AC:E6:4B = Address_Based
-MiPow_Vox500 = Name_Based
-
-# Disable automatic pairing with headsets/car-kits
-# Some car kits do not react kindly to a failed pairing attempt and
-# do not allow immediate re-pairing. Blacklist these so that the initial
-# pairing attempt makes it to the user instead
-[INTEROP_DISABLE_AUTO_PAIRING]
-34:C7:31 = Address_Based
-00:07:04 = Address_Based
-E0:75:0A = Address_Based
-00:13:E0 = Address_Based
-00:21:E8 = Address_Based
-90:03:B7 = Address_Based
-Audi = Name_Based
-BMW = Name_Based
-Parrot = Name_Based
-Car = Name_Based
-NISSAN = Name_Based
-
-# Use a fixed pin for specific keyboards
-# Keyboards should use a variable pin at all times. However, some keyboards
-# require a fixed pin of all 0000. This workaround enables auto pairing for
-# those keyboards.
-[INTEROP_KEYBOARD_REQUIRES_FIXED_PIN]
-00:0F:F6 = Address_Based
-
-# Some headsets have audio jitter issues because of increased re-transmissions as the
-# 3 Mbps packets have a lower link margin, and are more prone to interference. We can
-# disable 3DH packets (use only 2DH packets) for the ACL link to improve sensitivity
-# when streaming A2DP audio to the headset. Air sniffer logs show reduced
-# re-transmissions after switching to 2DH packets.
-# Disable 3Mbps packets and use only 2Mbps packets for ACL links when streaming audio.
-[INTEROP_2MBPS_LINK_ONLY]
-00:18:91 = Address_Based
-00:21:4F = Address_Based
-20:15:06 = Address_Based
-9C:DF:03 = Address_Based
-04:52:C7 = Address_Based
-30:14:4A = Address_Based
-00:54:AF = Address_Based
-7C:1C:4E = Address_Based
-50:65:83 = Address_Based
-00:1E:7C = Address_Based
-C8:84:47 = Address_Based
-D0:8A:55 = Address_Based
-48:F0:7B = Address_Based
-00:0A:08 = Address_Based
-00:11:2D = Address_Based
-
-# Some HID pointing devices have proven problematic behaviour if pairing is initiated with
-# them, resulting in no response for authentication request and ultimately resulting
-# in connection failure.
-# To avoid degrading the user experience with those devices, authentication request
-# is not requested explictly.
-[INTEROP_DISABLE_AUTH_FOR_HID_POINTING]
-00:12:A1 = Address_Based
-Targus BT Laser Notebook Mouse = Name_Based
-
-# HID Keyboards that claim support for multitouch functionality have issue with
-# normal functioning of keyboard because of issues in USB HID kernel driver.
-# To avoid degrading the user experience with those devices, digitizer record
-# is removed from the report descriptor.
-[INTEROP_REMOVE_HID_DIG_DESCRIPTOR]
-Motorola Keyboard KZ500 = Name_Based
-Motorola Keyboard KZ500 v122 = Name_Based
-0x22b8-0x093D = Vndr_Prdt_Based
-
-# Some HID devices have problematic behaviour where when hid link is in Sniff
-# and DUT is in Slave role for SCO link ( not eSCO) any solution cannot maintain
-# the link as SCO scheduling over a short period will overlap with Sniff link due to
-# slave drift.
-# To avoid degrading the user experience with those devices, sniff is disabled from
-# link policy when sco is active, and enabled when sco is disabled.
-[INTEROP_DISABLE_SNIFF_DURING_SCO]
-20:4C:10 = Address_Based
-0x004C = Manufacturer_Based
-
-# Few carkits take long time to start sending AT commands
-# Increase AG_CONN TIMEOUT so that AG connection go through
-[INTEROP_INCREASE_AG_CONN_TIMEOUT]
-00:14:09 = Address_Based
-
-# Some HOGP devices do not respond well when we switch from default LE conn parameters
-# to preferred conn params immediately post connection. Disable automatic switching to
-# preferred conn params for such devices and allow them to explicity ask for it.
-[INTEROP_DISABLE_LE_CONN_PREFERRED_PARAMS]
-BSMBB09DS = Name_Based
-ELECOM = Name_Based
-
-# Few remote devices do not understand AVRCP version greater than 1.3. For these
-# devices, we would like to blacklist them and advertise AVRCP version as 1.3
-[INTEROP_ADV_AVRCP_VER_1_3]
-38:C0:96 = Address_Based
-CAR LS460L = Name_Based
-
-# Fallback to AVRCP version 1.4 for remote to initiate browse connection
-[INTEROP_STORE_REMOTE_AVRCP_VERSION_1_4]
-00:02:5B:4A = Address_Based
-
-# Disable role switch for headsets/car-kits
-# Some car kits allow role switch but when DUT initiates role switch
-# Remote will go to bad state and its leads to LMP time out.
-[INTEROP_DISABLE_ROLE_SWITCH]
-FC:C2:DE = Address_Based
-00:26:B4 = Address_Based
-00:04:3E = Address_Based
-00:23:01 = Address_Based
-1C:48:F9 = Address_Based
-00:54:AF = Address_Based
-00:26:E8 = Address_Based
-00:37:6D = Address_Based
-9C:3A:AF = Address_Based
-00:18:91 = Address_Based
-0C:E0:E4 = Address_Based
-00:07:04 = Address_Based
-A4:15:66 = Address_Based
-D0:13:1E = Address_Based
-8F:20:B4 = Address_Based
-A8:B9:B3 = Address_Based
-00:0D:F0 = Address_Based
-00:08:E0 = Address_Based
-00:25:52 = Address_Based
-1C:52:16 = Address_Based
-00:06:66 = Address_Based
-00:24:E4 = address_Based
-00:1C:D8 = Address_Based
-AC:FD:CE = Address_Based
-08:76:95 = Address_Based
-00:00:45 = Address_Based
-EB:06:EF = Address_Based
-74:95:EC = Address_Based
-00:08:8A = Address_Based
-C0:7A:A5 = Address_Based
-00:01:95 = Address_Based
-00:1A:7D = Address_Based
-00:11:13 = Address_Based
-00:1B:41 = Address_Based
-30:FA:B7 = Address_Based
-
-# Disable role switch policy for headsets/car-kits
-# Some car kits initiate a role switch but won't initiate encryption
-# after role switch complete
-[INTEROP_DISABLE_ROLE_SWITCH_POLICY]
-00:0D:FD = Address_Based
-00:1B:DC = Address_Based
-00:07:04 = Address_Based
-A4:15:66 = Address_Based
-00:54:AF = Address_Based
-00:23:7F = Address_Based
-
-# certain remote A2DP sinks have issue playing back Music in AAC format.
-# disable AAC for those headsets so that it switch to SBC
-# 1. byte alignment issues with encoder (solo3::20:3c:ae,airpods::4c:32:75)
-# 2. remote sending 128 instead of 128k as bitrate (cadillac::28:a1:83, Chevrolet Tahoe,
-# buick_verano::ac:7a:4d(moved to name based, maruti_brezzai:28:a1:83,
-# cadillac cue::e0:75:0a, 30:C3:D9)
-# 3. remote supporting only 44.1Khz (BIG-JAM-BOX::00-21-3c,JVC CK::00:1D:86,BMW CK::9C:DF:03)
-[INTEROP_DISABLE_AAC_CODEC]
-28:A1:83 = Address_Based
-A0:14:3D = Address_Based
-90:03:B7 = Address_Based
-00:21:3c = Address_Based
-9C:DF:03 = Address_Based
-E0:75:0A = Address_Based
-48:F0:7B = Address_Based
-04:52:C7 = Address_Based
-30:C3:D9 = Address_Based
-00:E0:4C = Address_Based
-48:A9:D2 = Address_Based
-abramtek M1 = Name_Based
-Buick Verano = Name_Based
-
-#Enable AAC encoder only for whitelist devices
-
-#0xb8-ad-3e-d2-4b-4b ==> Name: LG HBSA100
-#0xb8-ad-3e-e7-13-84 ==> Name: LG HBS1100
-#0x00-18-09-95-04-c1 ==> Name: MDR-XB80BS
-#0x7c-04-d0-9a-75-ad ==> Name: AirPods
-#24:F6:77:A7:57:F7 ==> Name: AirPods
-#A8:BE:27:03:4A:2F ==> Name: BeatsX
-#E0:D1:E6:09:AB:B2 ==> Name: MINIJAMBOX by Jawbone
-#2C:41:A1:3D:2B:B9 ==> Name: Bose SoundSport
-#2C:41:A1:48:FB:9A ==> Name: Bose QC35 II
-#94:B2:CC:42:C9:59 ==> Name: AVH-A208BT
-#DC:A4:CA:C0:C6:0B ==> Name: Beats Solo³
-#0x48-d6-d5-bc-79-43 ==> Name: Pixel Buds 7943
-#0x8c-de-52-df-79-8e ==> Name: SRS-X33
-#0x04-5d-4b-ec-2c-4c ==> Name: WH-1000XM2
-#0x04-5d-4b-40-e7-1e ==> Name: h.ear (MDR-100ABN)
-#0x04-5d-4b-df-3e-70 ==> Name: WI-1000X
-#0x04-5d-4b-eb-69-87 ==> Name: WH-H800 (h.ear)
-#0x04-5d-4b-66-bd-26 ==> Name: MDR-1000X
-#0x04-5d-4b-66-c1-f6 ==> Name: WI-H700 (h.ear)
-#0x04-5d-4b-99-f0-5d ==> Name: WH-H900N (h.ear)
-#0x10-4f-a8-e9-79-eb ==> Name: MDR-1ABT
-#0x10-4f-a8-15-b9-5a ==> Name: h.ear (MDR-EX750BT)
-#0xac-9b-0a-bd-1f-20 ==> Name: MDR-ZX770BN
-#0x04-52-c7-c5-d2-94 ==> Name: Bose QuietComfort 35
-#0x0c-e0-e4-64-26-a3 ==> Name: PLT_BBTPRO
-#0xa4-15-66-4b-4d-24 ==> Name: Tracks Air
-#0x00-1a-7d-82-36-4b ==> Name: 66 Audio BTS
-#0x88-e6-03-80-48-6b ==> Name: XB10
-#0xb8-69-c2-eb-ae-66 ==> Name: SRS-XB3
-#0x58-e2-8f-e9-09-7b ==> Name: BeatsStudio Wireless
-#CarKits
-#0x94-b2-cc-28-99-77 ==> Name: AVH-X5890BT ==>pioneer
-#0x74-5e-1c-98-88-64 ==> Name: AVH-X5790BT ==>pioneer
-#0x00-1d-86-a4-ea-a6 ==> Name: Car Multimedia ===>JVC
-#0x00-1d-86-a0-79-c2 ==> Name: DDX6 ==>kenwood
-#0x90-03-b7-6c-89-aa ==> Name: Parrot ASTEROID
-#0x30-c3-d9-85-34-ce ==> Name: MB Bluetooth 84389
-#0x00-02-5b-00-85-ca ==> Naae: HATS_00025B0085E9
-
-[INTEROP_ENABLE_AAC_CODEC]
-B8:AD:3E = Address_Based
-LG HBSA100 = Name_Based
-LG HBS1100 = Name_Based
-00:18:09 = Address_Based
-MDR-XB80BS = Name_Based
-7C:04:D0 = Address_Based
-24:F6:77 = Address_Based
-AirPods = Name_Based
-48:D6:D5 = Address_Based
-Pixel Buds 7943 = Name_Based
-8C:DE:52 = Address_Based
-SRS-X33 = Name_Based
-04:5D:4B = Address_Based
-WH-1000XM2 = Name_Based
-h.ear (MDR-100ABN) = Name_Based
-WI-1000X = Name_Based
-WH-H800 (h.ear) = Name_Based
-MDR-1000X = Name_Based
-WI-H700 (h.ear) = Name_Based
-WH-H900N (h.ear) = Name_Based
-10:4F:A8 = Address_Based
-MDR-1ABT = Name_Based
-h.ear (MDR-EX750BT) = Name_Based
-AC:9B:0A = Address_Based
-MDR-ZX770BN = Name_Based
-04:52:C7 = Address_Based
-Bose QuietComfort 35 = Name_Based
-94:B2:CC = Address_Based
-AVH-X5890BT = Name_Based
-AVH-A208BT = Name_Based
-74:5E:1C = Address_Based
-AVH-X5790BT = Name_Based
-00:1D:86 = Address_Based
-Car Multimedia = Name_Based
-DDX6 = Name_Based
-90:03:B7 = Address_Based
-Parrot ASTEROID = Name_Based
-0C:E0:E4 = Address_Based
-PLT_BBTPRO = Name_Based
-A4:15:66 = Address_Based
-Tracks Air = Name_Based
-00:1A:7D = Address_Based
-66 Audio BTS = Name_Based
-88:E6:03 = Address_Based
-XB10 = Name_Based
-B8:69:C2 = Address_Based
-SRS-XB3 = Name_Based
-30:C3:D9 = Address_Based
-MB Bluetooth 84389 = Name_Based
-00:02:5B = Address_Based
-HATS_00025B0085E9 = Name_Based
-A8:BE:27 = Address_Based
-BeatsX = Name_Based
-E0:D1:E6 = Address_Based
-MINIJAMBOX by Jawbone = Name_Based
-2C:41:A1 = Address_Based
-Bose SoundSport = Name_Based
-Bose QC35 II = Name_Based
-DC:A4:CA = Address_Based
-Beats Solo³ = Name_Based
-58:E2:8F = Address_Based
-BeatsStudio Wireless = Name_Based
-FC:4B:BC = Address_Based
-XAV-AX100 = Name_Based
-00:18:6b = Address_Based
-LG HBS730 = Name_Based
-8C:57:9B = Address_Based
-h.ear go (SRS-HG1) = Name_Based
-40:ED:98 = Address_Based
-FiiO BTR1K = Name_Based
-0C:A6:94 = Address_Based
-HK Soho Wireless = Name_Based
-00:09:A7 = Address_Based
-Beoplay H4 = Name_Based
-70:26:05 = Address_Based
-WF-SP700N = Name_Based
-48:D6:D5 = Address_Based
-Pixel Buds = Name_Based
-00:09:a7 = Address_Based
-Beoplay E8 = Name_Based
-2C:41:A1 = Address_Based
-Bose SoundWear = Name_Based
-2C:41:A1 = Address_Based
-Bose Free SoundSport = Name_Based
-00:18:09 = Address_Based
-Samsung Level On = Name_Based
-
-
-#E0:D1:E6 = Address_Based
-#00:18:6b = Address_Based
-#20:3c:ae = Address_Based
-#04:88:e2 = Address_Based
-#4c:32:75 = Address_Based
-#00:14:07 = Address_Based
-#94:20:53 = Address_Based
-
-# Devices requiring this workaround do not handle Bluetooth PBAP 1.2
-# version correctly, leading them to go in bad state. So for better
-# interoperability respond with PBAP 1.1 as supported version.
-[INTEROP_ADV_PBAP_VER_1_1]
-
-# Devices requiring this workaround do not handle Bluetooth PBAP 1.1
-# version correctly, leading them to go in bad state. So for better
-# interoperability respond with PBAP 1.2 as supported version.
-[INTEROP_ADV_PBAP_VER_1_2]
-
-# Devices requiring this workaround do not handle SSR max latency values as mentioned,
-# in their SDP HID Record properly and lead to connection timeout or lags. To prevent
-# such scenarios, device requiring this workaorund need to use specific ssr max latency
-# values.
-[INTEROP_UPDATE_HID_SSR_MAX_LAT]
-00:1B:DC-0x0012 = SSR_Max_Lat_Based
-DC:2C:26-0x0000 = SSR_Max_Lat_Based
-54:46:6B-0x0001 = SSR_Max_Lat_Based
-
-#Some device reports support for hf indicator, but it's HFP version as 1.5. The
-#behaviour violates spec and shall cause problem when DUT support HFP1.7, thus
-#blacklisting such devices and remove remote's hf indicator bit if not support HFP1.7.
-[INTEROP_DISABLE_HF_INDICATOR]
-98:7b:f3 = Address_Based
-
-#Ensure that call active indicator is sent prior to SCO connection
-#request by adding some delay. Some remotes are very strict in the
-#order of call indicator and SCO connection request.
-#1 04:52:c7 - Bose Mini II sound link
-[INTEROP_DELAY_SCO_FOR_MT_CALL]
-04:52:c7 = Address_Based
-08:df:1f = Address_Based
-Bose Mini II SoundLink = Name_Based
-
-# Some remotes ara taking longer to respond to +BCS during codec negotiation.
-# Disable codec negotiation and directly initiate SCO connection for those.
-# 1. M12 - 00:08:8a:f0:1d:8a
-[INTEROP_DISABLE_CODEC_NEGOTIATION]
-00:08:8a = Address_Based
-00:1A:7D = Address_Based
-66 Audio BTS = Name_Based
-JABRA EASYGO = Name_Based
-
-# Disallow sending Player Application Setting Commands for some CK as they are unable
-# to send Passthrough Command while Streaming is in progress
-# Porsche Panamera :: 74:6f:f7:8c:bf:61
-# BMW X3 :: a0:56:b2:4f:86:a8
-[INTEROP_DISABLE_PLAYER_APPLICATION_SETTING_CMDS]
-00:09:93 = Address_Based
-74:6f:f7 = Address_Based
-A0:56:B2:4F = Address_Based
-00:54:AF = Address_Based
-
-[INTEROP_DISABLE_CONNECTION_AFTER_COLLISION]
-A0:14:3D
-
-# Do not use supervision timeout value received from preferred connection
-# parameters, use 3s instead. Use with HID only.
-[INTEROP_HID_PREF_CONN_SUP_TIMEOUT_3S]
-08:62:66 = Address_Based
-38:2C:4A:C9 = Address_Based
-38:2C:4A:E6 = Address_Based
-54:A0:50:D9 = Address_Based
-AC:9E:17 = Address_Based
-F0:79:59 = Address_Based
-
-# Do not use AVDTP RECONFIGURE when reconfiguring A2DP streams.
-# Some A2DP Sink devices report SUCCESS to the AVDTP RECONFIGURE command,
-# but fail to play the reconfigured audio stream.
-[INTEROP_DISABLE_AVDTP_RECONFIGURE]
-00:1D:86 = Address_Based
-KMM-BT51*HD = Name_Based
-
-[INTEROP_GATTC_NO_SERVICE_CHANGED_IND]
-Pixel C Keyboard = Name_Based
-MiMouse = Name_Based
-HTC Fetch = Name_Based
-
-#Some LE devices have proven problematic behaviour if LE connection update is initiated with
-#them, resulting in no response after initiating LE connection update and ultimately resulting
-#in connection timeout. To avoid degrading the user experience with those devices,
-#LE connection update is not requested explictly for those devices.
-[INTEROP_DISABLE_LE_CONN_UPDATES]
-LG Lighting = Name_Based
-KS_5w4Zu = Name_Based
-ZUK = Name_Based
-ITAG = Name_Based
-Pokemon GO Plus = Name_Based
-
-#Few remote sends avrcp browsing request just after host sends avrcp browsing request leading
-#collision which results in browsing channel open failure. For such devices, collision timer
-#of 1 sec is used avoid collision.
-#Porsche Macan 2018 :: 2c:dc:ad:08:91:89
-#Porsche Panamera :: 74:6f:f7:8c:bf:61
-[INTEROP_AVRCP_BROWSE_OPEN_CHANNEL_COLLISION]
-2c:dc:ad:08 = Address_Based
-74:6f:f7 = Address_Based
-90:03:b7 = Address_Based
-00:06:F5 = Address_Based
-
-#Some remote devices don't support sniff mode when the SCO is connected.
-#For such devices, disable sniff mode after SCO is connected and make
-#the link as active.
-#Benz Car kit :: 50:65:83:8e:1d:43
-#Sony Ear Duo :: 28:3f:69:ff:50:bd
-#AirPods
-[INTEROP_DISABLE_SNIFF_LINK_DURING_SCO]
-50:65:83 = Address_Based
-28:3f:69 = Address_Based
-AirPods = Name_Based
-
-#Enable power level 10 adaptive control in FW side for remote devices
-#in this whitelist item.
-[INTEROP_ENABLE_PL10_ADAPTIVE_CONTROL]
-
-#For some remote devices, disable sniff mode during the call
-#as some remotes need call indicators in active mode
-#Leviathan Mini :: 10:b7:f6:03:38:b0
-[INTEROP_DISABLE_SNIFF_DURING_CALL]
-10:b7:f6 = Address_Based
-
-#Nintendo Switch Pro Controller - does not set sniff interval dynamically.
-#Requires custom HID report command to change mode.
-[INTEROP_HID_HOST_LIMIT_SNIFF_INTERVAL]
-98:B6:E9 = Address_Based
diff --git a/prebuilt/system/etc/firmware/Phone_vivid.txt b/prebuilt/system/etc/firmware/Phone_vivid.txt
deleted file mode 100644
index 343b508..0000000
--- a/prebuilt/system/etc/firmware/Phone_vivid.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-0xCA
-0x01
-0x00
-0x95
-0x8B
-0x9B
-0xAF
-0x9C
-0x94
-0x20
-0x1A
-0x0F
-0x8E
-0x0A
-0x4A
-0x37
-0xA0
-0x55
-0xF8
-0x0C
-0x10
-0x20
-0x20
-0x3F
-0x3F
-0x00
-0x02
-0x10
-0x10
-0x3F
-0x3F
-0x3F
-0x3F
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMC01.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMC01.txt
deleted file mode 100644
index ca329e0..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMC01.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.80883 0.17958 0.00041
-0.03217 0.96346 0.00041
-0.01533 0.06683 0.92214
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMC02.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMC02.txt
deleted file mode 100644
index ea82637..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMC02.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.79439 0.17803 0.00041
-0.03160 0.95517 0.00041
-0.01505 0.06625 0.92227
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMC03.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMC03.txt
deleted file mode 100644
index 265043d..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMC03.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.78121 0.17675 0.00041
-0.03107 0.94829 0.00041
-0.01480 0.06577 0.92365
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMC04.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMC04.txt
deleted file mode 100644
index ae2ba27..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMC04.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.76733 0.17529 0.00041
-0.03052 0.94045 0.00041
-0.01454 0.06523 0.92401
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMC05.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMC05.txt
deleted file mode 100644
index af56cf4..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMC05.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.75430 0.17400 0.00041
-0.03000 0.93355 0.00041
-0.01429 0.06475 0.92519
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMC06.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMC06.txt
deleted file mode 100644
index cd94672..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMC06.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.74058 0.17254 0.00041
-0.02946 0.92568 0.00041
-0.01403 0.06421 0.92532
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMC07.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMC07.txt
deleted file mode 100644
index 9b94fea..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMC07.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.72808 0.17133 0.00041
-0.02896 0.91923 0.00041
-0.01380 0.06376 0.92676
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMC08.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMC08.txt
deleted file mode 100644
index 854c9d1..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMC08.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.71527 0.17004 0.00041
-0.02845 0.91228 0.00041
-0.01355 0.06328 0.92763
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMC09.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMC09.txt
deleted file mode 100644
index 764f2f2..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMC09.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.70179 0.16856 0.00041
-0.02791 0.90437 0.00041
-0.01330 0.06273 0.92742
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMC10.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMC10.txt
deleted file mode 100644
index eee1a0d..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMC10.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.68951 0.16735 0.00041
-0.02743 0.89787 0.00041
-0.01306 0.06228 0.92856
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMC11.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMC11.txt
deleted file mode 100644
index 6e1a014..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMC11.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.67729 0.16614 0.00041
-0.02694 0.89137 0.00041
-0.01283 0.06183 0.92961
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMC12.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMC12.txt
deleted file mode 100644
index ef249fa..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMC12.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.66478 0.16484 0.00041
-0.02644 0.88437 0.00041
-0.01260 0.06134 0.93005
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMC13.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMC13.txt
deleted file mode 100644
index 8bda228..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMC13.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.65270 0.16362 0.00041
-0.02596 0.87784 0.00041
-0.01237 0.06089 0.93090
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMC14.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMC14.txt
deleted file mode 100644
index 55b063d..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMC14.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.64070 0.16240 0.00041
-0.02548 0.87129 0.00041
-0.01214 0.06043 0.93164
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMC15.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMC15.txt
deleted file mode 100644
index cd2b621..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMC15.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.62876 0.16118 0.00041
-0.02501 0.86474 0.00041
-0.01191 0.05998 0.93229
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMC16.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMC16.txt
deleted file mode 100644
index 8f5c2f8..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMC16.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.61690 0.15995 0.00041
-0.02454 0.85816 0.00041
-0.01169 0.05952 0.93283
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMC17.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMC17.txt
deleted file mode 100644
index 66b8518..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMC17.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.60545 0.15881 0.00042
-0.02408 0.85206 0.00042
-0.01147 0.05910 0.93380
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMC18.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMC18.txt
deleted file mode 100644
index cb0b74c..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMC18.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.59373 0.15758 0.00042
-0.02362 0.84547 0.00042
-0.01125 0.05864 0.93415
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMC19.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMC19.txt
deleted file mode 100644
index b14fdb4..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMC19.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.58208 0.15635 0.00042
-0.02315 0.83886 0.00042
-0.01103 0.05818 0.93439
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMC20.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMC20.txt
deleted file mode 100644
index 650a8f6..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMC20.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.57126 0.15532 0.00042
-0.02272 0.83332 0.00042
-0.01082 0.05780 0.93574
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMC21.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMC21.txt
deleted file mode 100644
index d54bc78..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMC21.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.56000 0.15415 0.00042
-0.02227 0.82705 0.00042
-0.01061 0.05736 0.93619
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMC22.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMC22.txt
deleted file mode 100644
index 0b6f355..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMC22.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.54889 0.15300 0.00042
-0.02183 0.82089 0.00042
-0.01040 0.05694 0.93668
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMC23.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMC23.txt
deleted file mode 100644
index 765c526..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMC23.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.53822 0.15195 0.00042
-0.02141 0.81526 0.00042
-0.01020 0.05655 0.93771
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCC01.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCC01.txt
deleted file mode 100644
index d2c29be..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCC01.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.98882 -0.00000 -0.00000
-0.00000 0.99604 0.00000
-0.00000 0.00000 1.00429
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCC02.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCC02.txt
deleted file mode 100644
index 306b7c3..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCC02.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.97283 -0.00000 -0.00000
-0.00000 0.98718 0.00000
-0.00000 0.00000 1.00357
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCC03.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCC03.txt
deleted file mode 100644
index c1d3aa3..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCC03.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.95837 -0.00000 -0.00000
-0.00000 0.97978 0.00000
-0.00000 0.00000 1.00423
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCC04.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCC04.txt
deleted file mode 100644
index bfa81a9..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCC04.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.94303 -0.00000 -0.00000
-0.00000 0.97139 0.00000
-0.00000 0.00000 1.00378
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCC05.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCC05.txt
deleted file mode 100644
index df94837..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCC05.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.92871 -0.00000 -0.00000
-0.00000 0.96396 0.00000
-0.00000 0.00000 1.00423
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCC06.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCC06.txt
deleted file mode 100644
index 2e7d5fb..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCC06.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.91353 -0.00000 0.00000
-0.00000 0.95555 -0.00000
-0.00000 0.00000 1.00356
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCC07.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCC07.txt
deleted file mode 100644
index 80db7ce..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCC07.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.89982 -0.00000 0.00000
-0.00000 0.94860 -0.00000
-0.00000 0.00000 1.00432
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCC08.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCC08.txt
deleted file mode 100644
index 66b6ed8..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCC08.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.88572 -0.00000 -0.00000
-0.00000 0.94114 -0.00000
-0.00000 0.00000 1.00446
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCC09.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCC09.txt
deleted file mode 100644
index 93d524a..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCC09.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.87077 -0.00000 -0.00000
-0.00000 0.93270 0.00000
-0.00000 0.00000 1.00344
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCC10.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCC10.txt
deleted file mode 100644
index 9340d4c..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCC10.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.85727 -0.00000 0.00000
-0.00000 0.92571 0.00000
-0.00000 0.00000 1.00390
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCC11.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCC11.txt
deleted file mode 100644
index d76025d..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCC11.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.84384 -0.00000 0.00000
-0.00000 0.91872 0.00000
-0.00000 0.00000 1.00427
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCC12.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCC12.txt
deleted file mode 100644
index baba164..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCC12.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.83003 -0.00000 0.00000
-0.00000 0.91123 -0.00000
-0.00000 0.00000 1.00399
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCC13.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCC13.txt
deleted file mode 100644
index d41a473..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCC13.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.81673 -0.00000 0.00000
-0.00000 0.90421 -0.00000
-0.00000 0.00000 1.00415
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCC14.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCC14.txt
deleted file mode 100644
index b38a3b4..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCC14.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.80351 -0.00000 -0.00000
-0.00000 0.89719 0.00000
-0.00000 0.00000 1.00422
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCC15.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCC15.txt
deleted file mode 100644
index e4a03c9..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCC15.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.79035 -0.00000 0.00000
-0.00000 0.89016 0.00000
-0.00000 0.00000 1.00418
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCC16.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCC16.txt
deleted file mode 100644
index 18567c5..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCC16.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.77726 -0.00000 0.00000
-0.00000 0.88312 0.00000
-0.00000 0.00000 1.00404
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCC17.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCC17.txt
deleted file mode 100644
index 46e3825..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCC17.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.76468 -0.00000 0.00000
-0.00000 0.87656 0.00000
-0.00000 0.00000 1.00438
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCC18.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCC18.txt
deleted file mode 100644
index 71552a1..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCC18.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.75173 -0.00000 -0.00000
-0.00000 0.86950 0.00000
-0.00000 0.00000 1.00404
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCC19.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCC19.txt
deleted file mode 100644
index 9fcca77..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCC19.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.73885 -0.00000 0.00000
-0.00000 0.86243 0.00000
-0.00000 0.00000 1.00360
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCC20.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCC20.txt
deleted file mode 100644
index 30e2d75..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCC20.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.72700 -0.00000 -0.00000
-0.00000 0.85646 0.00000
-0.00000 0.00000 1.00437
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCC21.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCC21.txt
deleted file mode 100644
index ab9d6b0..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCC21.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.71457 -0.00000 -0.00000
-0.00000 0.84974 0.00000
-0.00000 0.00000 1.00417
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCC22.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCC22.txt
deleted file mode 100644
index f25b521..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCC22.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.70231 -0.00000 -0.00000
-0.00000 0.84314 0.00000
-0.00000 0.00000 1.00402
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCC23.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCC23.txt
deleted file mode 100644
index c670c5f..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCC23.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.69059 -0.00000 0.00000
-0.00000 0.83709 -0.00000
-0.00000 0.00000 1.00445
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCDEF.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCDEF.txt
deleted file mode 100644
index 97805fd..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCDEF.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-1.00000 -0.00000 -0.00000
-0.00000 1.00000 0.00000
-0.00000 0.00000 1.00000
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCW01.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCW01.txt
deleted file mode 100644
index 7140175..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCW01.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-1.00335 -0.00000 -0.00000
-0.00000 1.00061 0.00000
-0.00000 0.00000 0.98625
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCW02.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCW02.txt
deleted file mode 100644
index b862ff1..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCW02.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-1.00371 -0.00000 -0.00000
-0.00000 0.99828 0.00000
-0.00000 0.00000 0.96979
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCW03.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCW03.txt
deleted file mode 100644
index f5acde9..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCW03.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-1.00426 -0.00000 0.00000
-0.00000 0.99619 -0.00000
-0.00000 0.00000 0.95380
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCW04.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCW04.txt
deleted file mode 100644
index b3a1378..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCW04.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-1.00427 -0.00000 -0.00000
-0.00000 0.99359 0.00000
-0.00000 0.00000 0.93755
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCW05.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCW05.txt
deleted file mode 100644
index 3fe20e6..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCW05.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-1.00348 -0.00000 -0.00000
-0.00000 0.99026 0.00000
-0.00000 0.00000 0.92084
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCW06.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCW06.txt
deleted file mode 100644
index 641e5d7..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCW06.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-1.00412 -0.00000 0.00000
-0.00000 0.98838 -0.00000
-0.00000 0.00000 0.90571
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCW07.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCW07.txt
deleted file mode 100644
index c459fb1..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCW07.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-1.00372 -0.00000 0.00000
-0.00000 0.98551 -0.00000
-0.00000 0.00000 0.88990
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCW08.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCW08.txt
deleted file mode 100644
index 913fceb..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCW08.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-1.00427 -0.00000 0.00000
-0.00000 0.98361 0.00000
-0.00000 0.00000 0.87517
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCW09.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCW09.txt
deleted file mode 100644
index eb33818..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCW09.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-1.00376 -0.00000 0.00000
-0.00000 0.98073 -0.00000
-0.00000 0.00000 0.85977
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCW10.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCW10.txt
deleted file mode 100644
index 995f379..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCW10.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-1.00422 -0.00000 -0.00000
-0.00000 0.97881 0.00000
-0.00000 0.00000 0.84544
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCW11.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCW11.txt
deleted file mode 100644
index d6dbf51..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCW11.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-1.00361 -0.00000 0.00000
-0.00000 0.97591 0.00000
-0.00000 0.00000 0.83045
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCW12.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCW12.txt
deleted file mode 100644
index ce8c418..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCW12.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-1.00397 -0.00000 0.00000
-0.00000 0.97398 -0.00000
-0.00000 0.00000 0.81649
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCW13.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCW13.txt
deleted file mode 100644
index e342ea0..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCW13.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-1.00442 -0.00000 -0.00000
-0.00000 0.97217 0.00000
-0.00000 0.00000 0.80281
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCW14.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCW14.txt
deleted file mode 100644
index b7a59f0..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCW14.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-1.00406 -0.00000 0.00000
-0.00000 0.96961 -0.00000
-0.00000 0.00000 0.78870
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCW15.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCW15.txt
deleted file mode 100644
index 4b741db..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCW15.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-1.00429 -0.00000 0.00000
-0.00000 0.96765 0.00000
-0.00000 0.00000 0.77527
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCW16.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCW16.txt
deleted file mode 100644
index a1526ce..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCW16.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-1.00345 -0.00000 -0.00000
-0.00000 0.96470 0.00000
-0.00000 0.00000 0.76124
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCW17.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCW17.txt
deleted file mode 100644
index a560735..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCW17.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-1.00411 -0.00000 0.00000
-0.00000 0.96323 -0.00000
-0.00000 0.00000 0.74854
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCW18.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCW18.txt
deleted file mode 100644
index 8fd0192..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCW18.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-1.00422 -0.00000 -0.00000
-0.00000 0.96125 -0.00000
-0.00000 0.00000 0.73562
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCW19.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCW19.txt
deleted file mode 100644
index 152697c..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCW19.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-1.00442 -0.00000 0.00000
-0.00000 0.95939 -0.00000
-0.00000 0.00000 0.72296
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCW20.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCW20.txt
deleted file mode 100644
index 101ba2f..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCW20.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-1.00380 -0.00000 -0.00000
-0.00000 0.95678 0.00000
-0.00000 0.00000 0.70991
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCW21.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCW21.txt
deleted file mode 100644
index 6214a05..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCW21.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-1.00431 -0.00000 0.00000
-0.00000 0.95528 -0.00000
-0.00000 0.00000 0.69784
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCW22.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCW22.txt
deleted file mode 100644
index b1a4456..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCW22.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-1.00426 -0.00000 0.00000
-0.00000 0.95328 0.00000
-0.00000 0.00000 0.68555
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCW23.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCW23.txt
deleted file mode 100644
index 78a5502..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMCW23.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-1.00444 -0.00000 0.00000
-0.00000 0.95151 -0.00000
-0.00000 0.00000 0.67360
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMDEF.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMDEF.txt
deleted file mode 100644
index 2fed739..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMDEF.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.81935 0.18024 0.00041
-0.03259 0.96700 0.00041
-0.01552 0.06707 0.91740
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPC01.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPC01.txt
deleted file mode 100644
index d2c29be..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPC01.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.98882 -0.00000 -0.00000
-0.00000 0.99604 0.00000
-0.00000 0.00000 1.00429
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPC02.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPC02.txt
deleted file mode 100644
index 306b7c3..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPC02.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.97283 -0.00000 -0.00000
-0.00000 0.98718 0.00000
-0.00000 0.00000 1.00357
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPC03.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPC03.txt
deleted file mode 100644
index c1d3aa3..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPC03.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.95837 -0.00000 -0.00000
-0.00000 0.97978 0.00000
-0.00000 0.00000 1.00423
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPC04.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPC04.txt
deleted file mode 100644
index bfa81a9..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPC04.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.94303 -0.00000 -0.00000
-0.00000 0.97139 0.00000
-0.00000 0.00000 1.00378
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPC05.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPC05.txt
deleted file mode 100644
index df94837..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPC05.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.92871 -0.00000 -0.00000
-0.00000 0.96396 0.00000
-0.00000 0.00000 1.00423
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPC06.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPC06.txt
deleted file mode 100644
index 2e7d5fb..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPC06.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.91353 -0.00000 0.00000
-0.00000 0.95555 -0.00000
-0.00000 0.00000 1.00356
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPC07.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPC07.txt
deleted file mode 100644
index 80db7ce..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPC07.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.89982 -0.00000 0.00000
-0.00000 0.94860 -0.00000
-0.00000 0.00000 1.00432
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPC08.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPC08.txt
deleted file mode 100644
index 66b6ed8..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPC08.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.88572 -0.00000 -0.00000
-0.00000 0.94114 -0.00000
-0.00000 0.00000 1.00446
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPC09.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPC09.txt
deleted file mode 100644
index 93d524a..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPC09.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.87077 -0.00000 -0.00000
-0.00000 0.93270 0.00000
-0.00000 0.00000 1.00344
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPC10.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPC10.txt
deleted file mode 100644
index 9340d4c..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPC10.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.85727 -0.00000 0.00000
-0.00000 0.92571 0.00000
-0.00000 0.00000 1.00390
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPC11.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPC11.txt
deleted file mode 100644
index d76025d..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPC11.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.84384 -0.00000 0.00000
-0.00000 0.91872 0.00000
-0.00000 0.00000 1.00427
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPC12.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPC12.txt
deleted file mode 100644
index baba164..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPC12.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.83003 -0.00000 0.00000
-0.00000 0.91123 -0.00000
-0.00000 0.00000 1.00399
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPC13.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPC13.txt
deleted file mode 100644
index d41a473..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPC13.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.81673 -0.00000 0.00000
-0.00000 0.90421 -0.00000
-0.00000 0.00000 1.00415
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPC14.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPC14.txt
deleted file mode 100644
index b38a3b4..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPC14.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.80351 -0.00000 -0.00000
-0.00000 0.89719 0.00000
-0.00000 0.00000 1.00422
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPC15.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPC15.txt
deleted file mode 100644
index e4a03c9..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPC15.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.79035 -0.00000 0.00000
-0.00000 0.89016 0.00000
-0.00000 0.00000 1.00418
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPC16.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPC16.txt
deleted file mode 100644
index 18567c5..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPC16.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.77726 -0.00000 0.00000
-0.00000 0.88312 0.00000
-0.00000 0.00000 1.00404
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPC17.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPC17.txt
deleted file mode 100644
index 46e3825..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPC17.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.76468 -0.00000 0.00000
-0.00000 0.87656 0.00000
-0.00000 0.00000 1.00438
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPC18.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPC18.txt
deleted file mode 100644
index 71552a1..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPC18.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.75173 -0.00000 -0.00000
-0.00000 0.86950 0.00000
-0.00000 0.00000 1.00404
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPC19.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPC19.txt
deleted file mode 100644
index 9fcca77..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPC19.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.73885 -0.00000 0.00000
-0.00000 0.86243 0.00000
-0.00000 0.00000 1.00360
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPC20.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPC20.txt
deleted file mode 100644
index 30e2d75..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPC20.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.72700 -0.00000 -0.00000
-0.00000 0.85646 0.00000
-0.00000 0.00000 1.00437
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPC21.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPC21.txt
deleted file mode 100644
index ab9d6b0..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPC21.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.71457 -0.00000 -0.00000
-0.00000 0.84974 0.00000
-0.00000 0.00000 1.00417
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPC22.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPC22.txt
deleted file mode 100644
index f25b521..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPC22.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.70231 -0.00000 -0.00000
-0.00000 0.84314 0.00000
-0.00000 0.00000 1.00402
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPC23.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPC23.txt
deleted file mode 100644
index c670c5f..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPC23.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.69059 -0.00000 0.00000
-0.00000 0.83709 -0.00000
-0.00000 0.00000 1.00445
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPDEF.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPDEF.txt
deleted file mode 100644
index 97805fd..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPDEF.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-1.00000 -0.00000 -0.00000
-0.00000 1.00000 0.00000
-0.00000 0.00000 1.00000
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPRd01.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPRd01.txt
deleted file mode 100644
index 5801e60..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPRd01.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.90687 0.08100 0.01573
-0.04004 0.91858 0.01535
-0.03290 0.06460 0.70286
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPRd02.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPRd02.txt
deleted file mode 100644
index 88d5d7d..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPRd02.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.88083 0.10314 0.02003
-0.05075 0.89979 0.01943
-0.03992 0.07838 0.64469
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPRd03.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPRd03.txt
deleted file mode 100644
index 5949283..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPRd03.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.85454 0.12525 0.02432
-0.06137 0.88105 0.02347
-0.04619 0.09068 0.59007
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPRdStrong.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPRdStrong.txt
deleted file mode 100644
index 7715ac0..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPRdStrong.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.82805 0.14734 0.02861
-0.07189 0.86238 0.02748
-0.05174 0.10157 0.53882
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPRdWeak.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPRdWeak.txt
deleted file mode 100644
index cd542a6..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPRdWeak.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.93404 0.05896 0.01145
-0.02928 0.93883 0.01125
-0.02513 0.04933 0.76589
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPRdWeak01.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPRdWeak01.txt
deleted file mode 100644
index c8f9de1..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPRdWeak01.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.93329 0.05891 0.01144
-0.02949 0.94561 0.01133
-0.02571 0.05047 0.78355
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPRdWeak02.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPRdWeak02.txt
deleted file mode 100644
index 053399f..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPRdWeak02.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.93375 0.05894 0.01145
-0.02975 0.95382 0.01143
-0.02633 0.05170 0.80270
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPRdWeak03.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPRdWeak03.txt
deleted file mode 100644
index 6a8e877..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPRdWeak03.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.93404 0.05896 0.01145
-0.03001 0.96204 0.01153
-0.02697 0.05295 0.82219
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPRdWeak04.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPRdWeak04.txt
deleted file mode 100644
index 4f02794..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPRdWeak04.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.92685 0.05851 0.01136
-0.03003 0.96273 0.01154
-0.02741 0.05381 0.83547
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPRdWeak05.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPRdWeak05.txt
deleted file mode 100644
index dfde925..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPRdWeak05.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.91892 0.05801 0.01127
-0.03003 0.96272 0.01154
-0.02783 0.05463 0.84827
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPW01.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPW01.txt
deleted file mode 100644
index 7140175..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPW01.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-1.00335 -0.00000 -0.00000
-0.00000 1.00061 0.00000
-0.00000 0.00000 0.98625
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPW02.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPW02.txt
deleted file mode 100644
index b862ff1..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPW02.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-1.00371 -0.00000 -0.00000
-0.00000 0.99828 0.00000
-0.00000 0.00000 0.96979
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPW03.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPW03.txt
deleted file mode 100644
index f5acde9..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPW03.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-1.00426 -0.00000 0.00000
-0.00000 0.99619 -0.00000
-0.00000 0.00000 0.95380
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPW04.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPW04.txt
deleted file mode 100644
index b3a1378..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPW04.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-1.00427 -0.00000 -0.00000
-0.00000 0.99359 0.00000
-0.00000 0.00000 0.93755
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPW05.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPW05.txt
deleted file mode 100644
index 3fe20e6..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPW05.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-1.00348 -0.00000 -0.00000
-0.00000 0.99026 0.00000
-0.00000 0.00000 0.92084
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPW06.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPW06.txt
deleted file mode 100644
index 641e5d7..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPW06.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-1.00412 -0.00000 0.00000
-0.00000 0.98838 -0.00000
-0.00000 0.00000 0.90571
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPW07.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPW07.txt
deleted file mode 100644
index c459fb1..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPW07.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-1.00372 -0.00000 0.00000
-0.00000 0.98551 -0.00000
-0.00000 0.00000 0.88990
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPW08.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPW08.txt
deleted file mode 100644
index 913fceb..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPW08.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-1.00427 -0.00000 0.00000
-0.00000 0.98361 0.00000
-0.00000 0.00000 0.87517
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPW09.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPW09.txt
deleted file mode 100644
index eb33818..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPW09.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-1.00376 -0.00000 0.00000
-0.00000 0.98073 -0.00000
-0.00000 0.00000 0.85977
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPW10.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPW10.txt
deleted file mode 100644
index 995f379..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPW10.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-1.00422 -0.00000 -0.00000
-0.00000 0.97881 0.00000
-0.00000 0.00000 0.84544
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPW11.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPW11.txt
deleted file mode 100644
index d6dbf51..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPW11.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-1.00361 -0.00000 0.00000
-0.00000 0.97591 0.00000
-0.00000 0.00000 0.83045
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPW12.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPW12.txt
deleted file mode 100644
index ce8c418..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPW12.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-1.00397 -0.00000 0.00000
-0.00000 0.97398 -0.00000
-0.00000 0.00000 0.81649
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPW13.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPW13.txt
deleted file mode 100644
index e342ea0..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPW13.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-1.00442 -0.00000 -0.00000
-0.00000 0.97217 0.00000
-0.00000 0.00000 0.80281
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPW14.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPW14.txt
deleted file mode 100644
index b7a59f0..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPW14.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-1.00406 -0.00000 0.00000
-0.00000 0.96961 -0.00000
-0.00000 0.00000 0.78870
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPW15.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPW15.txt
deleted file mode 100644
index 4b741db..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPW15.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-1.00429 -0.00000 0.00000
-0.00000 0.96765 0.00000
-0.00000 0.00000 0.77527
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPW16.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPW16.txt
deleted file mode 100644
index a1526ce..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPW16.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-1.00345 -0.00000 -0.00000
-0.00000 0.96470 0.00000
-0.00000 0.00000 0.76124
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPW17.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPW17.txt
deleted file mode 100644
index a560735..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPW17.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-1.00411 -0.00000 0.00000
-0.00000 0.96323 -0.00000
-0.00000 0.00000 0.74854
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPW18.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPW18.txt
deleted file mode 100644
index 8fd0192..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPW18.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-1.00422 -0.00000 -0.00000
-0.00000 0.96125 -0.00000
-0.00000 0.00000 0.73562
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPW19.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPW19.txt
deleted file mode 100644
index 152697c..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPW19.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-1.00442 -0.00000 0.00000
-0.00000 0.95939 -0.00000
-0.00000 0.00000 0.72296
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPW20.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPW20.txt
deleted file mode 100644
index 101ba2f..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPW20.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-1.00380 -0.00000 -0.00000
-0.00000 0.95678 0.00000
-0.00000 0.00000 0.70991
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPW21.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPW21.txt
deleted file mode 100644
index 6214a05..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPW21.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-1.00431 -0.00000 0.00000
-0.00000 0.95528 -0.00000
-0.00000 0.00000 0.69784
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPW22.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPW22.txt
deleted file mode 100644
index b1a4456..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPW22.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-1.00426 -0.00000 0.00000
-0.00000 0.95328 0.00000
-0.00000 0.00000 0.68555
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPW23.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPW23.txt
deleted file mode 100644
index 78a5502..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMPW23.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-1.00444 -0.00000 0.00000
-0.00000 0.95151 -0.00000
-0.00000 0.00000 0.67360
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMW01.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMW01.txt
deleted file mode 100644
index 3b735e8..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMW01.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.82262 0.18033 0.00040
-0.03272 0.96749 0.00040
-0.01559 0.06711 0.90356
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMW02.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMW02.txt
deleted file mode 100644
index 0401d8b..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMW02.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.82342 0.17989 0.00039
-0.03275 0.96513 0.00039
-0.01560 0.06694 0.88725
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMW03.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMW03.txt
deleted file mode 100644
index 2113116..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMW03.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.82438 0.17949 0.00039
-0.03279 0.96301 0.00039
-0.01562 0.06679 0.87138
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMW04.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMW04.txt
deleted file mode 100644
index 7388272..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMW04.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.82488 0.17901 0.00038
-0.03281 0.96040 0.00038
-0.01563 0.06661 0.85530
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMW05.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMW05.txt
deleted file mode 100644
index 1db51e8..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMW05.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.82472 0.17839 0.00037
-0.03280 0.95708 0.00037
-0.01563 0.06638 0.83883
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMW06.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMW06.txt
deleted file mode 100644
index 0dbcde6..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMW06.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.82572 0.17803 0.00037
-0.03284 0.95517 0.00037
-0.01565 0.06625 0.82382
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMW07.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMW07.txt
deleted file mode 100644
index c73e4b2..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMW07.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.82586 0.17750 0.00036
-0.03285 0.95230 0.00036
-0.01565 0.06605 0.80820
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMW08.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMW08.txt
deleted file mode 100644
index 955f9fb..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMW08.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.82678 0.17714 0.00035
-0.03289 0.95038 0.00035
-0.01567 0.06592 0.79359
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMW09.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMW09.txt
deleted file mode 100644
index 037675c..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMW09.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.82682 0.17660 0.00035
-0.03289 0.94750 0.00035
-0.01567 0.06572 0.77839
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMW10.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMW10.txt
deleted file mode 100644
index c87946b..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMW10.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.82764 0.17624 0.00034
-0.03292 0.94556 0.00034
-0.01568 0.06558 0.76417
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMW11.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMW11.txt
deleted file mode 100644
index 97279e1..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMW11.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.82758 0.17570 0.00033
-0.03292 0.94266 0.00033
-0.01568 0.06538 0.74938
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMW12.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMW12.txt
deleted file mode 100644
index 370749e..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMW12.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.82831 0.17534 0.00033
-0.03295 0.94071 0.00033
-0.01569 0.06525 0.73555
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMW13.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMW13.txt
deleted file mode 100644
index 1a1654a..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMW13.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.82910 0.17499 0.00032
-0.03298 0.93887 0.00032
-0.01571 0.06512 0.72198
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMW14.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMW14.txt
deleted file mode 100644
index ad9e15b..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMW14.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.82923 0.17452 0.00031
-0.03298 0.93631 0.00031
-0.01571 0.06494 0.70805
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMW15.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMW15.txt
deleted file mode 100644
index ba365ca..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMW15.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.82983 0.17415 0.00031
-0.03301 0.93434 0.00031
-0.01572 0.06481 0.69474
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMW16.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMW16.txt
deleted file mode 100644
index 89fba3a..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMW16.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.82955 0.17360 0.00030
-0.03300 0.93141 0.00030
-0.01572 0.06460 0.68092
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMW17.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMW17.txt
deleted file mode 100644
index 21906d2..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMW17.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.83049 0.17332 0.00030
-0.03303 0.92990 0.00030
-0.01574 0.06450 0.66831
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMW18.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMW18.txt
deleted file mode 100644
index d9dca9c..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMW18.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.83098 0.17295 0.00029
-0.03305 0.92791 0.00029
-0.01575 0.06436 0.65552
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMW19.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMW19.txt
deleted file mode 100644
index 7907a09..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMW19.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.83153 0.17260 0.00029
-0.03307 0.92603 0.00029
-0.01576 0.06423 0.64298
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMW20.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMW20.txt
deleted file mode 100644
index 958740c..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMW20.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.83140 0.17212 0.00028
-0.03307 0.92344 0.00028
-0.01575 0.06405 0.63010
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMW21.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMW21.txt
deleted file mode 100644
index 7790866..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMW21.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.83220 0.17183 0.00027
-0.03310 0.92190 0.00027
-0.01577 0.06394 0.61812
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMW22.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMW22.txt
deleted file mode 100644
index 76a3fd7..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMW22.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.83254 0.17146 0.00027
-0.03311 0.91989 0.00027
-0.01577 0.06380 0.60598
diff --git a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMW23.txt b/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMW23.txt
deleted file mode 100644
index ea57e26..0000000
--- a/prebuilt/system/etc/firmware/phone_ct/BOE/LUT_GMW23.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-0.83305 0.17112 0.00026
-0.03313 0.91811 0.00026
-0.01578 0.06368 0.59414
diff --git a/prebuilt/system/etc/firmware/tru2life/ADInitParam.xml b/prebuilt/system/etc/firmware/tru2life/ADInitParam.xml
deleted file mode 100644
index f91d077..0000000
--- a/prebuilt/system/etc/firmware/tru2life/ADInitParam.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?>
-<Group id='ADConfiguration'>
-
- <ADIridixControl0 units="hex">7</ADIridixControl0>
- <ADIridixControl1 units="uint">198</ADIridixControl1>
- <ADBlackLevel units="hex">0</ADBlackLevel>
- <ADWhiteLevel units="hex">3FF</ADWhiteLevel>
- <ADVariance units="hex">65</ADVariance>
- <ADLimitAmpl units="uint">240</ADLimitAmpl>
- <ADIridixDither units="hex">0</ADIridixDither>
- <ADSlopeMax units="hex">60</ADSlopeMax>
- <ADSlopeMin units="uint">32</ADSlopeMin>
- <ADDitherControl units="hex">5</ADDitherControl>
- <ADFormat units="hex">3</ADFormat>
- <ADAutoSize units="hex">0</ADAutoSize>
- <ADFrameWidth units="uint">1080</ADFrameWidth>
- <ADFrameHeight units="hex">780</ADFrameHeight>
- <ADLutFI units="uint">
- 0 69 147 234 328
- 429 537 650 768 897
- 1043 1201 1368 1540 1713
- 1884 2048 2212 2383 2556
- 2728 2895 3052 3199 3328
- 3446 3559 3666 3768 3862
- 3948 4026 4095
- </ADLutFI>
- <ADLutCC units="hex">
- 000000FF 00000116 0000012E 00000146 0000015E
- 00000176 0000018E 000001A6 000001BE 000001D6
- 000001EE 00000205 0000021D 00000235 0000024D
- 00000265 0000027D 00000295 000002AC 000002C4
- 000002DC 000002F3 0000030B 00000323 0000033A
- 00000352 0000036A 00000381 00000399 000003B1
- 000003C8 000003E0 000003F8
- </ADLutCC>
-
-</Group>
diff --git a/prebuilt/system/etc/init/init.qcom.rc b/prebuilt/system/etc/init/init.qcom.rc
deleted file mode 100644
index 19bb201..0000000
--- a/prebuilt/system/etc/init/init.qcom.rc
+++ /dev/null
@@ -1,2 +0,0 @@
-service vendor.vibrator-1-0 /system/bin/true
- disabled
\ No newline at end of file
diff --git a/prebuilt/system/etc/permissions/android.hardware.fod.xml b/prebuilt/system/etc/permissions/android.hardware.fod.xml
deleted file mode 100644
index fc750d9..0000000
--- a/prebuilt/system/etc/permissions/android.hardware.fod.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2019 The LineageOS Project
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
- http://www.apache.org/licenses/LICENSE-2.0
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<permissions>
- <feature name="android.hardware.fod" />
-</permissions>
\ No newline at end of file
diff --git a/prebuilt/system/etc/permissions/privapp-permissions-ASUS_I01WD.xml b/prebuilt/system/etc/permissions/privapp-permissions-ASUS_I003D.xml
similarity index 62%
rename from prebuilt/system/etc/permissions/privapp-permissions-ASUS_I01WD.xml
rename to prebuilt/system/etc/permissions/privapp-permissions-ASUS_I003D.xml
index 3a5fdc2..d65cb40 100644
--- a/prebuilt/system/etc/permissions/privapp-permissions-ASUS_I01WD.xml
+++ b/prebuilt/system/etc/permissions/privapp-permissions-ASUS_I003D.xml
@@ -1,20 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<permissions>
- <privapp-permissions package="com.asus.camera">
- <permission name="android.permission.WRITE_MEDIA_STORAGE"/>
- <permission name="android.permission.WRITE_SECURE_SETTINGS"/>
- <permission name="com.asus.permission.HARDWARE_PROPERTIES"/>
- </privapp-permissions>
- <privapp-permissions package="com.asus.ephotoburst">
- <permission name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS"/>
- <permission name="android.permission.WRITE_MEDIA_STORAGE"/>
- </privapp-permissions>
- <privapp-permissions package="com.asus.gallery">
- <permission name="android.permission.DELETE_PACKAGES"/>
- <permission name="android.permission.LOCAL_MAC_ADDRESS"/>
- <permission name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS"/>
- <permission name="android.permission.WRITE_MEDIA_STORAGE"/>
- </privapp-permissions>
<privapp-permissions package="com.asus.gamecenter">
<permission name="android.permission.PACKAGE_USAGE_STATS"/>
<permission name="android.permission.READ_PRIVILEGED_PHONE_STATE"/>
diff --git a/prebuilt/system/etc/permissions/privapp-permissions-qti.xml b/prebuilt/system/etc/permissions/privapp-permissions-qti.xml
deleted file mode 100644
index 75f7f1b..0000000
--- a/prebuilt/system/etc/permissions/privapp-permissions-qti.xml
+++ /dev/null
@@ -1,113 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (c) 2017, The Linux Foundation. All rights reserved.
-
- ~ Not a Contribution.
--->
-
-<!--
- ~ Copyright (C) 2016 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License
- -->
-
-<!--
-This XML file declares which signature|privileged permissions should be
-granted to privileged applications on QTI devices.
-It allows additional grants on top of privapp-permissions-platform.xml
--->
-
-<permissions>
- <privapp-permissions package="com.quicinc.cne.CNEService">
- <permission name="android.permission.INTERACT_ACROSS_USERS"/>
- <permission name="android.permission.PACKET_KEEPALIVE_OFFLOAD"/>
- </privapp-permissions>
-
- <privapp-permissions package="com.qti.dpmserviceapp">
- <permission name="android.permission.INTERACT_ACROSS_USERS"/>
- </privapp-permissions>
-
- <privapp-permissions package="com.qualcomm.qcrilmsgtunnel">
- <permission name="android.permission.INTERACT_ACROSS_USERS"/>
- </privapp-permissions>
-
- <privapp-permissions package="org.codeaurora.dialer">
- <permission name="android.permission.ALLOW_ANY_CODEC_FOR_PLAYBACK"/>
- <permission name="android.permission.CONTROL_INCALL_EXPERIENCE"/>
- <permission name="android.permission.GET_ACCOUNTS_PRIVILEGED"/>
- <permission name="android.permission.MODIFY_PHONE_STATE"/>
- <permission name="android.permission.READ_PRIVILEGED_PHONE_STATE"/>
- <permission name="android.permission.STATUS_BAR"/>
- <permission name="android.permission.STOP_APP_SWITCHES"/>
- <permission name="com.android.voicemail.permission.READ_VOICEMAIL"/>
- <permission name="com.android.voicemail.permission.WRITE_VOICEMAIL"/>
- </privapp-permissions>
-
- <privapp-permissions package="org.codeaurora.qti.qtiNetworkApp">
- <permission name="android.permission.MODIFY_PHONE_STATE"/>
- </privapp-permissions>
-
- <privapp-permissions package="org.codeaurora.ims">
- <permission name="android.permission.READ_PRECISE_PHONE_STATE"/>
- <permission name="android.permission.INTERACT_ACROSS_USERS"/>
- <permission name="android.permission.SUBSTITUTE_NOTIFICATION_APP_NAME"/>
- </privapp-permissions>
-
- <privapp-permissions package="com.android.soundrecorder">
- <permission name="android.permission.WRITE_MEDIA_STORAGE"/>
- <permission name="android.permission.CAPTURE_AUDIO_OUTPUT"/>
- </privapp-permissions>
-
- <privapp-permissions package="com.quicinc.voice.activation">
- <permission name="android.permission.CAPTURE_AUDIO_HOTWORD"/>
- <permission name="android.permission.MANAGE_SOUND_TRIGGER"/>
- </privapp-permissions>
-
- <privapp-permissions package="com.qualcomm.qti.carrierswitch">
- <permission name="android.permission.REBOOT"/>
- </privapp-permissions>
-
- <privapp-permissions package="com.qualcomm.wfd.service">
- <permission name="android.permission.READ_FRAME_BUFFER"/>
- <permission name="android.permission.WRITE_MEDIA_STORAGE"/>
- </privapp-permissions>
-
- <privapp-permissions package="com.android.mms">
- <permission name="android.permission.READ_PRIVILEGED_PHONE_STATE"/>
- <permission name="android.permission.WRITE_APN_SETTINGS"/>
- <permission name="android.permission.CALL_PRIVILEGED"/>
- </privapp-permissions>
-
- <privapp-permissions package="org.codeaurora.bluetooth.batestapp">
- <permission name="android.permission.BLUETOOTH_PRIVILEGED"/>
- <permission name="android.permission.LOCAL_MAC_ADDRESS"/>
- </privapp-permissions>
-
- <privapp-permissions package="org.codeaurora.snapcam">
- <permission name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS"/>
- <permission name="android.permission.WRITE_MEDIA_STORAGE"/>
- </privapp-permissions>
-
- <privapp-permissions package="org.codeaurora.gallery">
- <permission name="android.permission.MODIFY_AUDIO_ROUTING"/>
- </privapp-permissions>
-
- <privapp-permissions package="com.qualcomm.qti.callenhancement">
- <permission name="android.permission.RECORD_AUDIO" />
- <permission name="android.permission.CAPTURE_AUDIO_OUTPUT" />
- <permission name="android.permission.READ_EXTERNAL_STORAGE" />
- <permission name="android.permission.WRITE_EXTERNAL_STORAGE" />
- <permission name="android.permission.READ_BLOCKED_NUMBERS" />
- <permission name="android.permission.VIBRATE" />
- </privapp-permissions>
-</permissions>
diff --git a/prebuilt/system/etc/permissions/qti_libpermissions.xml b/prebuilt/system/etc/permissions/qti_libpermissions.xml
deleted file mode 100644
index 4756f67..0000000
--- a/prebuilt/system/etc/permissions/qti_libpermissions.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!---
- Copyright (c) 2017 Qualcomm Technologies, Inc.
- All Rights Reserved.
- Confidential and Proprietary - Qualcomm Technologies, Inc.
- -->
-<permissions>
- <library name="android.hidl.manager@1.0-java"
- file="/system/framework/android.hidl.manager-V1.0-java.jar"/>
-</permissions>
diff --git a/prebuilt/system/etc/sysconfig/ims-hiddenapi-package-whitelist.xml b/prebuilt/system/etc/sysconfig/ims-hiddenapi-package-whitelist.xml
deleted file mode 100644
index 64eacc6..0000000
--- a/prebuilt/system/etc/sysconfig/ims-hiddenapi-package-whitelist.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2018 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License
- -->
-
-<!--
-This XML file declares which platform apps that need to access internal APIs.
--->
-<config>
- <hidden-api-whitelisted-app package="com.asus.launcher" />
- <hidden-api-whitelisted-app package="com.asus.launcher3" />
- <hidden-api-whitelisted-app package="com.asus.mobilemanager" />
- <hidden-api-whitelisted-app package="com.asus.gamecenter" />
- <hidden-api-whitelisted-app package="com.asus.gamewidget" />
- <hidden-api-whitelisted-app package="com.asus.soundrecorder" />
-</config>
diff --git a/prebuilt/system/etc/sysconfig/qti_whitelist.xml b/prebuilt/system/etc/sysconfig/qti_whitelist.xml
deleted file mode 100644
index 4554c81..0000000
--- a/prebuilt/system/etc/sysconfig/qti_whitelist.xml
+++ /dev/null
@@ -1,115 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
-
-<!--
-/* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided
- * with the distribution.
- * * Neither the name of The Linux Foundation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
--->
-
-<config>
- <!-- These are telephony components that need to freely run in the background -->
- <allow-in-power-save package="com.qualcomm.atfwd" />
- <allow-in-power-save package="com.qualcomm.qti.telephonyservice" />
- <allow-in-power-save package="com.qualcomm.qcrilmsgtunnel" />
- <allow-in-power-save package="com.qualcomm.qti.ims" />
- <allow-in-power-save package="com.qualcomm.qti.radioconfiginterface" />
- <allow-in-power-save package="com.qualcomm.simcontacts" />
- <allow-in-power-save package="com.qualcomm.qti.autoregistration" />
- <allow-in-power-save package="com.qualcomm.qti.server.wigigapp" />
- <allow-in-power-save package="com.qualcomm.qti.StatsPollManager" />
- <allow-in-power-save package="com.qualcomm.qti.gsma.services.nfc" />
- <allow-in-power-save package="com.quicinc.voice.activation" />
- <allow-in-power-save package="com.android.mms" />
- <allow-in-power-save package="com.android.exchange" />
- <allow-in-power-save package="com.qualcomm.qti.callenhancement" />
- <allow-in-power-save package="com.qualcomm.qti.smartassistant" />
- <!-- These telephony applications need access to non-[System]SDK APIs -->
- <hidden-api-whitelisted-app package="com.qualcomm.uimremoteserver" />
- <hidden-api-whitelisted-app package="com.qualcomm.uimremoteclient" />
- <hidden-api-whitelisted-app package="com.qualcomm.atfwd" />
- <hidden-api-whitelisted-app package="com.qualcomm.qti.autoregistration" />
- <hidden-api-whitelisted-app package="com.qualcomm.qti.callenhancement" />
- <hidden-api-whitelisted-app package="com.qualcomm.qti.callfeaturessetting" />
- <hidden-api-whitelisted-app package="com.qualcomm.qti.confdialer" />
- <hidden-api-whitelisted-app package="org.codeaurora.dialer" />
- <hidden-api-whitelisted-app package="com.qti.qualcomm.datastatusnotification" />
- <hidden-api-whitelisted-app package="com.qti.qualcomm.deviceinfo" />
- <hidden-api-whitelisted-app package="com.qualcomm.qti.modemtestmode" />
- <hidden-api-whitelisted-app package="com.qualcomm.qti.networksetting" />
- <hidden-api-whitelisted-app package="com.qualcomm.qti.qtisystemservice" />
- <hidden-api-whitelisted-app package="com.qualcomm.qti.telephonyservice" />
- <hidden-api-whitelisted-app package="com.qualcomm.qti.radioconfiginterface" />
- <hidden-api-whitelisted-app package="com.qualcomm.qti.radioconfigtest" />
- <hidden-api-whitelisted-app package="com.qualcomm.qti.roamingsettings" />
- <hidden-api-whitelisted-app package="com.qualcomm.simcontacts" />
- <hidden-api-whitelisted-app package="com.qualcomm.qti.simsettings" />
- <hidden-api-whitelisted-app package="org.codeaurora.ims" />
- <hidden-api-whitelisted-app package="com.qualcomm.qti.ims" />
- <hidden-api-whitelisted-app package="com.qti.xdivert" />
- <hidden-api-whitelisted-app package="com.qualcomm.qcrilmsgtunnel" />
- <hidden-api-whitelisted-app package="com.qti.confuridialer" />
- <hidden-api-whitelisted-app package="com.qti.editnumber" />
- <hidden-api-whitelisted-app package="com.qualcomm.embmstest" />
- <hidden-api-whitelisted-app package="com.qualcomm.qti.ltedirect" />
- <hidden-api-whitelisted-app package="com.android.MultiplePdpTest" />
- <hidden-api-whitelisted-app package="com.qualcomm.qti.app" />
- <hidden-api-whitelisted-app package="com.qualcomm.embms" />
- <hidden-api-whitelisted-app package="com.qualcomm.qti.embmstuneaway" />
- <hidden-api-whitelisted-app package="com.qualcomm.qti.uimlpatest" />
- <hidden-api-whitelisted-app package="com.qualcomm.qti.lpa" />
- <hidden-api-whitelisted-app package="com.qualcomm.qti.uim" />
-
- <hidden-api-whitelisted-app package="org.codeaurora.snapcam" />
- <hidden-api-whitelisted-app package="com.android.mms" />
- <hidden-api-whitelisted-app package="com.qualcomm.qti.carrierswitch" />
- <hidden-api-whitelisted-app package="com.qualcomm.qti.carrierconfigure" />
- <hidden-api-whitelisted-app package="com.qualcomm.qti.sva" />
- <hidden-api-whitelisted-app package="com.qualcomm.qti.smartassistant" />
- <hidden-api-whitelisted-app package="com.quicinc.voice.activation" />
- <hidden-api-whitelisted-app package="com.android.backup" />
- <hidden-api-whitelisted-app package="com.android.contacts" />
- <hidden-api-whitelisted-app package="com.android.exchange" />
- <hidden-api-whitelisted-app package="com.android.soundrecorder" />
- <hidden-api-whitelisted-app package="com.android.camera2" />
- <hidden-api-whitelisted-app package="org.codeaurora.gallery" />
- <hidden-api-whitelisted-app package="com.example.connmgr" />
- <hidden-api-whitelisted-app package="com.android.email" />
- <hidden-api-whitelisted-app package="com.cyanogenmod.filemanager" />
- <hidden-api-whitelisted-app package="com.qualcomm.qti.presenceappSub2" />
- <hidden-api-whitelisted-app package="com.qualcomm.secureindicator" />
- <hidden-api-whitelisted-app package="com.qualcomm.qti.sysmonappExternal" />
- <hidden-api-whitelisted-app package="com.qualcomm.qti.biometrics.voiceprint.voiceprintdemo" />
- <hidden-api-whitelisted-app package="com.qti.vtloopback " />
- <hidden-api-whitelisted-app package="com.android.bluetooth" />
- <hidden-api-whitelisted-app package="org.codeaurora.bluetooth" />
- <hidden-api-whitelisted-app package="com.qualcomm.qti.qmmi" />
- <hidden-api-whitelisted-app package="com.qualcomm.qti.perfdump" />
- <hidden-api-whitelisted-app package="com.qualcomm.wfd.client" />
- <hidden-api-whitelisted-app package="com.qualcomm.wfd.service" />
- <hidden-api-whitelisted-app package="com.qualcomm.qti.server.wigigapp" />
- <hidden-api-whitelisted-app package="com.qti.service.colorservice" />
-</config>
diff --git a/prebuilt/system/product/etc/permissions/privapp-permissions-google_edited.xml b/prebuilt/system/product/etc/permissions/privapp-permissions-google_edited.xml
deleted file mode 100644
index 4018be3..0000000
--- a/prebuilt/system/product/etc/permissions/privapp-permissions-google_edited.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<permissions>
- <privapp-permissions package="com.android.hotwordenrollment.okgoogle">
- <permission name="android.permission.MANAGE_VOICE_KEYPHRASES"/>
- </privapp-permissions>
-
- <privapp-permissions package="com.android.hotwordenrollment.xgoogle">
- <permission name="android.permission.MANAGE_VOICE_KEYPHRASES"/>
- </privapp-permissions>
-
- <privapp-permissions package="com.android.hotwordenrollment.tgoogle">
- <permission name="android.permission.MANAGE_VOICE_KEYPHRASES"/>
- </privapp-permissions>
-
- <privapp-permissions package="com.google.android.projection.gearhead">
- <permission name="android.permission.ACCESS_NETWORK_CONDITIONS"/>
- <permission name="android.permission.ACTIVITY_EMBEDDING"/>
- <permission name="android.permission.BLUETOOTH_PRIVILEGED"/>
- <permission name="android.permission.CALL_PRIVILEGED"/>
- <permission name="android.permission.CAPTURE_AUDIO_HOTWORD"/>
- <permission name="android.permission.CAPTURE_AUDIO_OUTPUT"/>
- <permission name="android.permission.CHANGE_DEVICE_IDLE_TEMP_WHITELIST"/>
- <permission name="android.permission.CONNECTIVITY_USE_RESTRICTED_NETWORKS"/>
- <permission name="android.permission.CONTROL_INCALL_EXPERIENCE"/>
- <permission name="android.permission.DUMP"/>
- <permission name="android.permission.LOCAL_MAC_ADDRESS"/>
- <permission name="android.permission.LOCATION_HARDWARE"/>
- <permission name="android.permission.MANAGE_USB"/>
- <permission name="android.permission.MODIFY_AUDIO_ROUTING"/>
- <permission name="android.permission.MODIFY_DAY_NIGHT_MODE"/>
- <permission name="android.permission.MODIFY_PHONE_STATE"/>
- <permission name="android.permission.OBSERVE_GRANT_REVOKE_PERMISSIONS"/>
- <permission name="android.permission.OVERRIDE_WIFI_CONFIG"/>
- <permission name="android.permission.READ_LOGS"/>
- <permission name="android.permission.READ_PRIVILEGED_PHONE_STATE"/>
- <permission name="android.permission.READ_WIFI_CREDENTIAL"/>
- <permission name="android.permission.REAL_GET_TASKS"/>
- <permission name="android.permission.REGISTER_CALL_PROVIDER"/>
- <permission name="android.permission.REMOTE_DISPLAY_PROVIDER"/>
- <permission name="android.permission.START_ACTIVITIES_FROM_BACKGROUND"/>
- <permission name="android.permission.START_TASKS_FROM_RECENTS"/>
- <permission name="android.permission.UPDATE_DEVICE_STATS"/>
- <permission name="android.permission.USER_ACTIVITY"/>
- <permission name="android.permission.WRITE_SECURE_SETTINGS"/>
- </privapp-permissions>
-
-</permissions>
diff --git a/proprietary-files-product.txt b/proprietary-files-product.txt
deleted file mode 100644
index fc94fff..0000000
--- a/proprietary-files-product.txt
+++ /dev/null
@@ -1,191 +0,0 @@
-# Alarm
--product/app/PowerOffAlarm/PowerOffAlarm.apk
--product/framework/vendor.qti.hardware.alarm-V1.0-java.jar
-product/lib64/vendor.qti.hardware.alarm@1.0.so
-product/lib/vendor.qti.hardware.alarm@1.0.so
-
-# Bluetooth
-product/lib64/com.qualcomm.qti.bluetooth_audio@1.0.so
-product/lib64/vendor.qti.hardware.audiohalext@1.0.so
-product/lib64/vendor.qti.hardware.btconfigstore@1.0.so
-product/lib/com.qualcomm.qti.bluetooth_audio@1.0.so
-product/lib/vendor.qti.hardware.audiohalext@1.0.so
-product/lib/vendor.qti.hardware.btconfigstore@1.0.so
-
-# Camera
--product/framework/vendor.qti.hardware.sensorscalibrate-V1.0-java.jar
-product/lib/libQTEEConnector_system.so
-product/lib/libimscamera_jni.so
-product/lib/libseccam.so
-product/lib/vendor.qti.hardware.camera.device@1.0.so
-product/lib/vendor.qti.hardware.cvp@1.0.so
-product/lib/vendor.qti.hardware.scve.objecttracker@1.0-adapter-helper.so
-product/lib/vendor.qti.hardware.scve.objecttracker@1.0.so
-product/lib/vendor.qti.hardware.scve.panorama@1.0-adapter-helper.so
-product/lib/vendor.qti.hardware.scve.panorama@1.0.so
-product/lib/vendor.qti.hardware.sensorscalibrate@1.0.so
-product/lib64/libQTEEConnector_system.so
-product/lib64/libimscamera_jni.so
-product/lib64/libseccam.so
-product/lib64/vendor.qti.hardware.camera.device@1.0.so
-product/lib64/vendor.qti.hardware.scve.objecttracker@1.0-adapter-helper.so
-product/lib64/vendor.qti.hardware.scve.objecttracker@1.0.so
-product/lib64/vendor.qti.hardware.scve.panorama@1.0-adapter-helper.so
-product/lib64/vendor.qti.hardware.scve.panorama@1.0.so
-product/lib64/vendor.qti.hardware.sensorscalibrate@1.0.so
-
-# Display api
-product/lib/libsdm-disp-apis.qti.so
-product/lib/vendor.qti.hardware.qdutils_disp@1.0.so
-product/lib64/libsdm-disp-apis.qti.so
-product/lib64/vendor.qti.hardware.qdutils_disp@1.0.so
-
-# QTI Telephony
--product/app/embms/embms.apk
--product/app/datastatusnotification/datastatusnotification.apk
--product/app/DynamicDDSService/DynamicDDSService.apk
--product/app/uimgbaservice/uimgbaservice.apk
--product/app/uimlpaservice/uimlpaservice.apk
--product/priv-app/QAS_DVC_MSP/QAS_DVC_MSP.apk
-product/etc/permissions/embms.xml
-product/etc/permissions/embms-noship_product_privapp_permissions_qti.xml
-product/etc/permissions/lpa.xml
-product/etc/permissions/UimGba.xml
-product/etc/permissions/UimGbaManager.xml
--product/framework/embmslibrary.jar
--product/framework/uimgbalibrary.jar
--product/framework/uimgbamanagerlibrary.jar
--product/framework/uimlpalibrary.jar
--product/framework/uimservicelibrary.jar
--product/framework/qti-telephony-common.jar|c22616791b85fe249cb23bf5a332f919f1b5471f
--product/framework/vendor.qti.hardware.data.dynamicdds-V1.0-java.jar
--product/framework/vendor.qti.data.factory-V1.0-java.jar
--product/framework/vendor.qti.data.factory-V2.0-java.jar
--product/framework/vendor.qti.hardware.data.latency-V1.0-java.jar
--product/framework/vendor.qti.hardware.data.qmi-V1.0-java.jar
--product/framework/vendor.qti.latency-V2.0-java.jar
--product/framework/vendor.qti.voiceprint-V1.0-java.jar
-product/lib/vendor.qti.hardware.data.dynamicdds@1.0.so
-product/lib/vendor.qti.hardware.data.latency@1.0.so
-product/lib/vendor.qti.hardware.radio.qtiradio@1.0.so
-product/lib/vendor.qti.hardware.radio.qtiradio@2.0.so
-product/lib/vendor.qti.hardware.radio.qtiradio@2.1.so
-product/lib/vendor.qti.hardware.radio.qtiradio@2.2.so
-product/lib/vendor.qti.hardware.radio.qtiradio@2.3.so
-product/lib/vendor.qti.hardware.radio.uim@1.0.so
-product/lib/vendor.qti.hardware.radio.uim@1.1.so
-product/lib/vendor.qti.hardware.radio.uim@1.2.so
-product/lib/vendor.qti.hardware.radio.uim_remote_client@1.0.so
-product/lib/vendor.qti.hardware.radio.uim_remote_client@1.1.so
-product/lib/vendor.qti.hardware.radio.uim_remote_server@1.0.so
-product/lib/vendor.qti.latency@2.0.so
-product/lib/vendor.qti.voiceprint@1.0.so
-product/lib64/vendor.qti.hardware.data.dynamicdds@1.0.so
-product/lib64/vendor.qti.hardware.data.latency@1.0.so
-product/lib64/vendor.qti.hardware.radio.qtiradio@1.0.so
-product/lib64/vendor.qti.hardware.radio.qtiradio@2.0.so
-product/lib64/vendor.qti.hardware.radio.qtiradio@2.1.so
-product/lib64/vendor.qti.hardware.radio.qtiradio@2.2.so
-product/lib64/vendor.qti.hardware.radio.qtiradio@2.3.so
-product/lib64/vendor.qti.hardware.radio.uim@1.0.so
-product/lib64/vendor.qti.hardware.radio.uim@1.1.so
-product/lib64/vendor.qti.hardware.radio.uim@1.2.so
-product/lib64/vendor.qti.hardware.radio.uim_remote_client@1.0.so
-product/lib64/vendor.qti.hardware.radio.uim_remote_client@1.1.so
-product/lib64/vendor.qti.hardware.radio.uim_remote_server@1.0.so
-product/lib64/vendor.qti.latency@2.0.so
-product/lib64/vendor.qti.voiceprint@1.0.so
-
-# IMS
--product/priv-app/ims/ims.apk|411603cd3e3ae8b2658b56e5c91d74ff9f1dc8c2
-lib/libdiag_system.so
-lib64/libdiag_system.so
--product/framework/com.qualcomm.qti.imscmservice-V2.0-java.jar
--product/framework/com.qualcomm.qti.imscmservice-V2.1-java.jar
--product/framework/com.qualcomm.qti.imscmservice-V2.2-java.jar
--product/framework/com.qualcomm.qti.uceservice-V2.0-java.jar
--product/framework/com.qualcomm.qti.uceservice-V2.1-java.jar
--product/framework/uimservicelibrary.jar
--product/framework/vendor.qti.ims.callinfo-V1.0-java.jar
--product/framework/vendor.qti.ims.rcsconfig-V1.0-java.jar
-product/etc/permissions/UimService.xml
-product/etc/permissions/com.qualcomm.qti.imscmservice-V2.0-java.xml
-product/etc/permissions/com.qualcomm.qti.imscmservice-V2.1-java.xml
-product/etc/permissions/com.qualcomm.qti.imscmservice-V2.2-java.xml
-product/lib/com.qualcomm.qti.imscmservice@1.0.so
-product/lib/com.qualcomm.qti.imscmservice@2.0.so
-product/lib/com.qualcomm.qti.imscmservice@2.1.so
-product/lib/com.qualcomm.qti.imscmservice@2.2.so
-product/lib/com.qualcomm.qti.uceservice@2.0.so
-product/lib/libimscamera_jni.so
-product/lib/libimsmedia_jni.so
-product/lib/lib-imsvideocodec.so
-product/lib/lib-imsvtextutils.so
-product/lib/lib-imsvt.so
-product/lib/lib-imsvtutils.so
-product/lib/vendor.qti.hardware.radio.am@1.0.so
-product/lib/vendor.qti.hardware.radio.ims@1.0.so
-product/lib/vendor.qti.hardware.radio.ims@1.1.so
-product/lib/vendor.qti.hardware.radio.ims@1.2.so
-product/lib/vendor.qti.hardware.radio.ims@1.3.so
-product/lib/vendor.qti.hardware.radio.ims@1.4.so
-product/lib/vendor.qti.hardware.radio.lpa@1.0.so
-product/lib/vendor.qti.hardware.radio.qcrilhook@1.0.so
-product/lib/vendor.qti.hardware.radio.qtiradio@1.0.so
-product/lib/vendor.qti.hardware.radio.qtiradio@2.0.so
-product/lib/vendor.qti.hardware.radio.qtiradio@2.1.so
-product/lib/vendor.qti.hardware.radio.qtiradio@2.2.so
-product/lib/vendor.qti.hardware.radio.qtiradio@2.3.so
-product/lib/vendor.qti.ims.callinfo@1.0.so
-product/lib/vendor.qti.ims.rcsconfig@1.0.so
-product/lib/vendor.qti.imsrtpservice@2.0.so
-product/lib/vendor.qti.imsrtpservice@2.1.so
-product/lib64/com.qualcomm.qti.imscmservice@1.0.so
-product/lib64/com.qualcomm.qti.imscmservice@2.0.so
-product/lib64/com.qualcomm.qti.imscmservice@2.1.so
-product/lib64/com.qualcomm.qti.imscmservice@2.2.so
-product/lib64/com.qualcomm.qti.uceservice@2.0.so
-product/lib64/libimsmedia_jni.so
-product/lib64/lib-imsvideocodec.so
-product/lib64/lib-imsvtextutils.so
-product/lib64/lib-imsvt.so
-product/lib64/lib-imsvtutils.so
-product/lib64/vendor.qti.hardware.radio.am@1.0.so
-product/lib64/vendor.qti.hardware.radio.ims@1.0.so
-product/lib64/vendor.qti.hardware.radio.ims@1.1.so
-product/lib64/vendor.qti.hardware.radio.ims@1.2.so
-product/lib64/vendor.qti.hardware.radio.ims@1.3.so
-product/lib64/vendor.qti.hardware.radio.ims@1.4.so
-product/lib64/vendor.qti.hardware.radio.lpa@1.0.so
-product/lib64/vendor.qti.hardware.radio.qcrilhook@1.0.so
-product/lib64/vendor.qti.hardware.radio.qtiradio@1.0.so
-product/lib64/vendor.qti.hardware.radio.qtiradio@2.0.so
-product/lib64/vendor.qti.hardware.radio.qtiradio@2.1.so
-product/lib64/vendor.qti.hardware.radio.qtiradio@2.2.so
-product/lib64/vendor.qti.hardware.radio.qtiradio@2.3.so
-product/lib64/vendor.qti.ims.callinfo@1.0.so
-product/lib64/vendor.qti.ims.rcsconfig@1.0.so
-product/lib64/vendor.qti.imsrtpservice@2.0.so
-product/lib64/vendor.qti.imsrtpservice@2.1.so
-
-# IOP
-product/lib64/vendor.qti.hardware.iop@2.0.so
-product/lib64/vendor.qti.hardware.perf@2.0.so
-product/lib/vendor.qti.hardware.iop@2.0.so
-product/lib/vendor.qti.hardware.perf@2.0.so
-
--product/framework/vendor.qti.hardware.soter-V1.0-java.jar
-product/lib/vendor.qti.hardware.soter@1.0.so
-product/lib64/vendor.qti.hardware.soter@1.0.so
-product/lib/libGPTEE_system.qti.so
-product/lib/libQTEEConnector_system.so
-product/lib/libGPQTEEC_system.qti.so
-product/lib64/libGPTEE_system.qti.so
-product/lib64/libQTEEConnector_system.so
-product/lib64/libGPQTEEC_system.qti.so
-product/lib/libsecureuisvc_jni.so
-product/lib/libsecureui_svcsock_system.so
-product/lib64/libsecureuisvc_jni.so
-product/lib64/libsecureui_svcsock_system.so
-product/lib/vendor.qti.hardware.qteeconnector@1.0.so
-product/lib64/vendor.qti.hardware.qteeconnector@1.0.so
\ No newline at end of file
diff --git a/proprietary-files.txt b/proprietary-files.txt
index 518fa47..59fedb5 100644
--- a/proprietary-files.txt
+++ b/proprietary-files.txt
@@ -1,6 +1,3 @@
-# Android Auto
--product/priv-app/AndroidAutoStub/AndroidAutoStub.apk;PRESIGNED
-
# Asus Game
-app/FocusAppListener/FocusAppListener.apk;PRESIGNED
-app/GameBroadcasterService/GameBroadcasterService.apk;PRESIGNED
@@ -9,7 +6,8 @@
etc/hardcore_X1.json
etc/hardcore_X2.json
etc/hardcore_X3.json
-etc/permissions/asus.software.gamewidget.zenui.rog2.xml
+etc/x3_comb.json
+etc/permissions/asus.software.gamewidget.zenui.rog3.xml
etc/permissions/asus.software.zenui.rog.xml
etc/permissions/asus.software.zenui.xml
etc/sysconfig/ims-hiddenapi-package-whitelist.xml
@@ -17,37 +15,7 @@
priv-app/GameBroadcaster/lib/arm64/libJniModule.so
-priv-app/ROGGameCenter/ROGGameCenter.apk;PRESIGNED
-# ANT+
--lib/libantradio.so
--lib64/libantradio.so
-product/lib/com.qualcomm.qti.ant@1.0.so
-product/lib64/com.qualcomm.qti.ant@1.0.so
-
-# Audio
-etc/cdma_call_conf.xml
-lib/libadsprpc_system.so
-lib/libcdsprpc_system.so
-lib/libmdsprpc_system.so
-lib/libsdsprpc_system.so
-lib64/libadsprpc_system.so
-lib64/libcdsprpc_system.so
-lib64/libmdsprpc_system.so
-lib64/libsdsprpc_system.so
-
-# Bluetooth
--app/aptxals/aptxals.apk
-etc/bluetooth/bt_profile.conf
-etc/bluetooth/interop_database.conf
-etc/permissions/audiosphere.xml
--framework/audiosphere.jar
-lib/libbluetooth_qti.so
-lib64/libbluetooth_qti.so
-product/lib64/libaptX_encoder.so|df1c89d7af1bb35808d5fe3496b04ba066c10cbc
-product/lib64/libaptXHD_encoder.so|e13fa70c97caaa24d061678bdee608eb8850a69e
-
# Camera
-lib/DataSet/ispDB/ASUS_UNDI.bin
-lib/DataSet/ispDB/ASUS_UNDI_ZOOM.bin
lib64/DataSet/arch/DIT_List.cfg
lib64/DataSet/ditSCidGen/msgchk.db
lib64/DataSet/ispDB/ParameterDB.db
@@ -60,102 +28,48 @@
lib64/libxditk_ditBSP_JNI.so
-priv-app/AsusCamera/AsusCamera.apk;PRESIGNED
priv-app/AsusCamera/lib/arm64/libasus_camera_panorama.so
-priv-app/AsusCamera/lib/arm64/libasus_camera_panorama.so
+priv-app/AsusCamera/lib/arm64/libyuv_camera.so
+priv-app/AsusCamera/lib/arm64/libarcsoft_panorama_interval_capture.so
priv-app/AsusCamera/lib/arm64/libbitmap.so
priv-app/AsusCamera/lib/arm64/libmpbase.so
priv-app/AsusCamera/lib/arm64/libtensorflowlite_jni.so
priv-app/AsusCamera/lib/arm64/libasus_camera_selfiepano.so
priv-app/AsusCamera/lib/arm64/libasus_camera_object_tracking.so
-priv-app/AsusCamera/lib/arm64/libarcsoft_distortion_correction.so
+priv-app/AsusCamera/lib/arm64/libasus_camera_interval_panorama.so
priv-app/AsusCamera/lib/arm64/libarcsoft_panorama_burstcapture.so
+priv-app/AsusCamera/lib/arm64/libarcsoft_portrait_distortion_correction_zf7.so
+priv-app/AsusCamera/lib/arm64/libarcsoft_portrait_distortion_correction_rog3.so
priv-app/AsusCamera/lib/arm64/libyuv_util.so
priv-app/AsusCamera/lib/arm64/libUndistort.so
priv-app/AsusCamera/lib/arm64/libasusundistort.so
priv-app/AsusCamera/lib/arm64/libarcsoft_object_tracking.so
-# CNE
-etc/cne/Nexus/ATT/ATT_profiles.xml
-etc/cne/Nexus/ROW/ROW_profiles.xml
-etc/cne/Nexus/VZW/VZW_profiles.xml
--product/framework/com.quicinc.cne.api-V1.1-java.jar
--product/framework/com.quicinc.cne.constants-V1.0-java.jar
--product/framework/com.quicinc.cne.constants-V2.0-java.jar
--product/framework/com.quicinc.cne.constants-V2.1-java.jar
--product/framework/vendor.qti.hardware.data.cne.internal.api-V1.0-java.jar
--product/framework/vendor.qti.hardware.data.cne.internal.constants-V1.0-java.jar
-product/lib/com.quicinc.cne.api@1.0.so
-product/lib/com.quicinc.cne.api@1.1.so
-product/lib/com.quicinc.cne.constants@1.0.so
-product/lib/com.quicinc.cne.constants@2.0.so
-product/lib/com.quicinc.cne.constants@2.1.so
-product/lib64/com.quicinc.cne.api@1.0.so
-product/lib64/com.quicinc.cne.api@1.1.so
-product/lib64/com.quicinc.cne.constants@1.0.so
-product/lib64/com.quicinc.cne.constants@2.0.so
-product/lib64/com.quicinc.cne.constants@2.1.so
-product/lib/vendor.qti.hardware.data.cne.internal.api@1.0.so
-product/lib/vendor.qti.hardware.data.cne.internal.constants@1.0.so
-product/lib/vendor.qti.hardware.data.cne.internal.server@1.0.so
-product/lib64/vendor.qti.hardware.data.cne.internal.api@1.0.so
-product/lib64/vendor.qti.hardware.data.cne.internal.constants@1.0.so
-product/lib64/vendor.qti.hardware.data.cne.internal.server@1.0.so
-
-# DPM
--framework/tcmclient.jar
-product/bin/dpmd
-product/etc/dpm/dpm.conf
-product/etc/init/dpmd.rc
-product/etc/permissions/com.qti.dpmframework.xml
-product/etc/permissions/dpmapi.xml
--product/framework/com.qti.dpmframework.jar
--product/framework/dpmapi.jar
-product/lib/com.qualcomm.qti.dpm.api@1.0.so
-product/lib/libdpmctmgr.so
-product/lib/libdpmfdmgr.so
-product/lib/libdpmframework.so
-product/lib/libdpmtcm.so
-product/lib64/com.qualcomm.qti.dpm.api@1.0.so
-product/lib64/libdpmctmgr.so
-product/lib64/libdpmfdmgr.so
-product/lib64/libdpmframework.so
-product/lib64/libdpmtcm.so
--product/priv-app/dpmserviceapp/dpmserviceapp.apk
-
-# FM
-lib/fm_helium.so
-lib/libfm-hci.so
-lib64/fm_helium.so
-lib64/libfm-hci.so
-product/lib/vendor.qti.hardware.fm@1.0.so
-product/lib64/vendor.qti.hardware.fm@1.0.so
-
# Gallery
-priv-app/AsusGallery/AsusGallery.apk;PRESIGNED
-priv-app/AsusGallery/lib/arm/libmpbase.so
-priv-app/AsusGallery/lib/arm/libjni_filter_show.so
-priv-app/AsusGallery/lib/arm/libtensorflowlite_jni.so
-priv-app/AsusGallery/lib/arm/libjni_face_effect.so
-priv-app/AsusGallery/lib/arm/librs.vignette.so
-priv-app/AsusGallery/lib/arm/libtensorflow_inference.so
-priv-app/AsusGallery/lib/arm/librs.convolve3x3.so
-priv-app/AsusGallery/lib/arm/libpanorenderer.so
-priv-app/AsusGallery/lib/arm/libpano_video_renderer.so
-priv-app/AsusGallery/lib/arm/librsjni_androidx.so
-priv-app/AsusGallery/lib/arm/librsjni.so
-priv-app/AsusGallery/lib/arm/libgif.so
-priv-app/AsusGallery/lib/arm/librs.grey.so
-priv-app/AsusGallery/lib/arm/libarcsoft_beautyshot.so
-priv-app/AsusGallery/lib/arm/librs.saturation.so
-priv-app/AsusGallery/lib/arm/libblur.so
-priv-app/AsusGallery/lib/arm/librs.grad.so
-priv-app/AsusGallery/lib/arm/librs.blur.so
-priv-app/AsusGallery/lib/arm/libRSSupport.so
-priv-app/AsusGallery/lib/arm/libjni_wide_angle_undistort.so
-priv-app/AsusGallery/lib/arm/libgvr.so
-priv-app/AsusGallery/lib/arm/libjni_cvface_api.so
-priv-app/AsusGallery/lib/arm/libcvface_api.so
-priv-app/AsusGallery/lib/arm/libarcsoft_undistort.so
-priv-app/AsusGallery/lib/arm/libopencv_java3.so
+priv-app/AsusGallery/lib/arm64/libmpbase.so
+priv-app/AsusGallery/lib/arm64/libjni_filter_show.so
+priv-app/AsusGallery/lib/arm64/libtensorflowlite_jni.so
+priv-app/AsusGallery/lib/arm64/libjni_face_effect.so
+priv-app/AsusGallery/lib/arm64/librs.vignette.so
+priv-app/AsusGallery/lib/arm64/libtensorflow_inference.so
+priv-app/AsusGallery/lib/arm64/librs.convolve3x3.so
+priv-app/AsusGallery/lib/arm64/libpanorenderer.so
+priv-app/AsusGallery/lib/arm64/libpano_video_renderer.so
+priv-app/AsusGallery/lib/arm64/librsjni_androidx.so
+priv-app/AsusGallery/lib/arm64/librsjni.so
+priv-app/AsusGallery/lib/arm64/libgif.so
+priv-app/AsusGallery/lib/arm64/librs.grey.so
+priv-app/AsusGallery/lib/arm64/libarcsoft_beautyshot.so
+priv-app/AsusGallery/lib/arm64/librs.saturation.so
+priv-app/AsusGallery/lib/arm64/libblur.so
+priv-app/AsusGallery/lib/arm64/librs.grad.so
+priv-app/AsusGallery/lib/arm64/librs.blur.so
+priv-app/AsusGallery/lib/arm64/libRSSupport.so
+priv-app/AsusGallery/lib/arm64/libjni_wide_angle_undistort.so
+priv-app/AsusGallery/lib/arm64/libgvr.so
+priv-app/AsusGallery/lib/arm64/libjni_cvface_api.so
+priv-app/AsusGallery/lib/arm64/libcvface_api.so
+priv-app/AsusGallery/lib/arm64/libarcsoft_undistort.so
# GalleryBurst
-priv-app/AsusGalleryBurst/AsusGalleryBurst.apk;PRESIGNED
@@ -169,220 +83,3 @@
etc/videoeditor/Graceful.mfim
etc/videoeditor/Happy.mfim
etc/videoeditor/Dynamic.mfim
-
-# GPS
-etc/permissions/com.qti.location.sdk.xml
-etc/permissions/com.qualcomm.location.xml
-etc/permissions/izat.xt.srv.xml
-etc/permissions/privapp-permissions-com.qualcomm.location.xml
--framework/com.qti.location.sdk.jar
--framework/izat.xt.srv.jar
-lib64/liblocationservice_jni.so
-lib64/libxt_native.so
--priv-app/com.qualcomm.location/com.qualcomm.location.apk
-product/lib64/vendor.qti.gnss@1.0.so
-product/lib64/vendor.qti.gnss@1.1.so
-product/lib64/vendor.qti.gnss@1.2.so
-product/lib64/vendor.qti.gnss@2.0.so
-product/lib64/vendor.qti.gnss@2.1.so
-product/lib64/vendor.qti.gnss@3.0.so
-
-# HotwordEnrollment
--product/priv-app/HotwordEnrollmentOKGoogleWCD9340/HotwordEnrollmentOKGoogleWCD9340.apk;PRESIGNED
--product/priv-app/HotwordEnrollmentXGoogleWCD9340/HotwordEnrollmentXGoogleWCD9340.apk;PRESIGNED
-
-# MirarCast
-bin/sigma_miracasthalservice
-etc/init/com.qualcomm.qti.sigma_miracast@1.0-service.rc
-lib/libmiracastsystem.so
-lib/vendor.qti.hardware.sigma_miracast@1.0-halimpl.so
-lib/hw/vendor.qti.hardware.sigma_miracast@1.0-impl.so
-lib64/libmiracastsystem.so
-lib64/vendor.qti.hardware.sigma_miracast@1.0-halimpl.so
-lib64/hw/vendor.qti.hardware.sigma_miracast@1.0-impl.so
-product/lib/vendor.qti.hardware.sigma_miracast@1.0.so
-product/lib64/vendor.qti.hardware.sigma_miracast@1.0.so
-
-# NFC
-#-app/NQNfcNci/NQNfcNci.apk
-#-framework/com.nxp.nfc.nq.jar
-#-framework/com.gsma.services.nfc.jar
-#etc/permissions/com.nxp.nfc.nq.xml
-#etc/permissions/com.gsma.services.nfc.xml
-#etc/nqnfcee_access.xml
-#etc/nqnfcse_access.xml
-#lib/vendor.nxp.hardware.nfc@1.0.so
-#lib64/vendor.nxp.hardware.nfc@1.0.so
-#lib/libnqnfc-nci.so
-#lib64/libnqnfc-nci.so
-#lib64/libnqnfc_nci_jni.so
-
-# QVR
-bin/qvrservice
-etc/qvr/qvrservice_config.txt
-lib/libqvrcamera_client.qti.so
-lib/libqvrservice.so
-lib/libqvrservice_client.qti.so
-lib/rfsa/adsp/libdsp_streamer_qvrcam_receiver.so
-lib/rfsa/adsp/libeye_tracking_dsp_sample_skel.so
-lib/rfsa/adsp/libqvr_cam_dsp_driver_skel.so
-lib/rfsa/adsp/libqvr_dsp_driver_skel.so
-lib/rfsa/adsp/libsns_device_mode_skel.so
-lib/rfsa/adsp/libsns_low_lat_stream_skel.so
-lib/rfsa/adsp/libtracker_6dof_skel.so
-lib/libqvr_cam_cdsp_driver_stub.so
-lib/libqvr_eyetracking_plugin.so
-lib/libqvr_cdsp_driver_stub.so
-lib64/libqvrcamera_client.qti.so
-lib64/libqvrservice_client.qti.so
-
-# Sensors
-etc/sensors/proto/nanopb.proto
-etc/sensors/proto/sns_physical_sensor_test.proto
-etc/sensors/proto/sns_ccd_ttw.proto
-etc/sensors/proto/sns_std_sensor.proto
-etc/sensors/proto/sns_async_com_port.proto
-etc/sensors/proto/sns_tilt.proto
-etc/sensors/proto/sns_cmd.proto
-etc/sensors/proto/sns_interrupt.proto
-etc/sensors/proto/sns_basic_gestures.proto
-etc/sensors/proto/sns_game_rv.proto
-etc/sensors/proto/sns_accel_cal.proto
-etc/sensors/proto/sns_dae.proto
-etc/sensors/proto/sns_gyro_rot_matrix.proto
-etc/sensors/proto/sns_sensor_temperature.proto
-etc/sensors/proto/sns_pedometer_wrist.proto
-etc/sensors/proto/sns_wrist_tilt_gesture.proto
-etc/sensors/proto/sns_humidity.proto
-etc/sensors/proto/sns_heart_beat.proto
-etc/sensors/proto/sns_remote_proc_state.proto
-etc/sensors/proto/sns_oem1.proto
-etc/sensors/proto/sns_ext_svc.proto
-etc/sensors/proto/sns_diag.proto
-etc/sensors/proto/sns_rotv.proto
-etc/sensors/proto/sns_sim.proto
-etc/sensors/proto/sns_aont.proto
-etc/sensors/proto/sns_heart_rate.proto
-etc/sensors/proto/sns_accel.proto
-etc/sensors/proto/sns_device_orient.proto
-etc/sensors/proto/sns_bring_to_ear.proto
-etc/sensors/proto/sns_std.proto
-etc/sensors/proto/sns_registry.proto
-etc/sensors/proto/sns_gravity.proto
-etc/sensors/proto/sns_rgb.proto
-etc/sensors/proto/sns_offbody_detect.proto
-etc/sensors/proto/sns_data_acquisition_engine.proto
-etc/sensors/proto/sns_cmc.proto
-etc/sensors/proto/sns_distance_bound.proto
-etc/sensors/proto/sns_std_type.proto
-etc/sensors/proto/sns_pose_6dof.proto
-etc/sensors/proto/sns_sim_legacy.proto
-etc/sensors/proto/sns_sar.proto
-etc/sensors/proto/sns_threshold.proto
-etc/sensors/proto/sns_std_event_gated_sensor.proto
-etc/sensors/proto/sns_timer.proto
-etc/sensors/proto/sns_cal.proto
-etc/sensors/proto/sns_hall.proto
-etc/sensors/proto/sns_proximity.proto
-etc/sensors/proto/sns_mag_cal.proto
-etc/sensors/proto/sns_multishake.proto
-etc/sensors/proto/sns_diag_sensor.proto
-etc/sensors/proto/descriptor.proto
-etc/sensors/proto/sns_client.proto
-etc/sensors/proto/sns_thermopile.proto
-etc/sensors/proto/sns_psmd.proto
-etc/sensors/proto/sns_ultra_violet.proto
-etc/sensors/proto/sns_mag.proto
-etc/sensors/proto/sns_signal_sensor.proto
-etc/sensors/proto/sns_amd.proto
-etc/sensors/proto/sns_da_test.proto
-etc/sensors/proto/sns_dpc.proto
-etc/sensors/proto/sns_suid.proto
-etc/sensors/proto/sns_resampler.proto
-etc/sensors/proto/qti_gravity.proto
-etc/sensors/proto/sns_tilt_to_wake.proto
-etc/sensors/proto/sns_device_mode.proto
-etc/sensors/proto/sns_sig_motion.proto
-etc/sensors/proto/sns_gyro.proto
-etc/sensors/proto/sns_ambient_light.proto
-etc/sensors/proto/sns_pressure.proto
-etc/sensors/proto/sns_mcmd.proto
-etc/sensors/proto/sns_fw.proto
-etc/sensors/proto/sns_ppg.proto
-etc/sensors/proto/sns_geomag_rv.proto
-etc/sensors/proto/sns_facing.proto
-etc/sensors/proto/sns_gyro_cal.proto
-etc/sensors/proto/sns_pedometer.proto
-etc/sensors/proto/sns_fmv.proto
-etc/sensors/proto/sns_rmd.proto
-etc/sensors/proto/sns_ccd_walk.proto
-etc/sensors/proto/sns_motion_detect.proto
-etc/sensors/proto/sns_ambient_temperature.proto
-
-# Telephony
-etc/permissions/qti_libpermissions.xml
-etc/permissions/qti_permissions.xml
-etc/sysconfig/qti_whitelist.xml
-product/etc/permissions/qcrilhook.xml
-product/etc/permissions/telephony_product_privapp-permissions-qti.xml
-product/etc/permissions/telephonyservice.xml
--product/framework/QtiTelephonyServicelibrary.jar
--product/framework/qcrilhook.jar
--product/app/QtiTelephonyService/QtiTelephonyService.apk
--product/priv-app/qcrilmsgtunnel/qcrilmsgtunnel.apk
-
-# Wfd
-bin/wfdservice
-etc/init/wfdservice.rc
-etc/wfdconfigsink.xml
--framework/WfdCommon.jar
--priv-app/WfdService/WfdService.apk
-lib/com.qualcomm.qti.wifidisplayhal@1.0.so
-lib/libFileMux.so
-lib/libmmparser_lite.so
-lib/libmmosal.so
-lib/libmmrtpdecoder.so
-lib/libmmrtpencoder.so
-lib/libOmxMux.so
-lib/libwfdaac.so
-lib/libwfdavenhancements.so
-lib/libwfdcommonutils.so
-lib/libwfdconfigutils.so
-lib/libwfdclient.so
-lib/libwfdmminterface.so
-lib/libwfdmmsink.so
-lib/libwfdrtsp.so
-lib/libwfdservice.so
-lib/libwfdsm.so
-lib/libwfdsinksm.so
-lib/libwfduibcinterface.so
-lib/libwfduibcsink.so
-lib/libwfduibcsinkinterface.so
-lib/libwfduibcsrc.so
-lib/libwfduibcsrcinterface.so
-lib/libwfdmmsrc_system.so
-lib64/libFileMux.so
-lib64/libmmparser_lite.so
-lib64/libmmrtpdecoder.so
-lib64/libmmrtpencoder.so
-lib64/libmmosal.so
-lib64/libwfdclient.so
-lib64/libwfdcommonutils.so
-lib64/libwfdconfigutils.so
-lib64/libwfdmminterface.so
-lib64/libwfdmmsink.so
-lib64/libwfdnative.so
-lib64/libwfdrtsp.so
-lib64/libwfdsinksm.so
-lib64/libwfdsm.so
-lib64/libwfduibcinterface.so
-lib64/libwfduibcsinkinterface.so
-lib64/libwfduibcsink.so
-lib64/libwfduibcsrcinterface.so
-lib64/libwfduibcsrc.so
-product/lib/vendor.qti.hardware.wifidisplaysession@1.0.so
-product/lib64/vendor.qti.hardware.wifidisplaysession@1.0.so
-product/lib64/vendor.qti.hardware.wifi.keystore@1.0.so
-
-# Wlan
--product/framework/vendor.qti.hardware.data.iwlan-V1.0-java.jar
diff --git a/recovery.fstab b/recovery.fstab
deleted file mode 100644
index 94ae853..0000000
--- a/recovery.fstab
+++ /dev/null
@@ -1,29 +0,0 @@
-# Android fstab file.
-# The filesystem that contains the filesystem checker binary (typically /system) cannot
-# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
-
-#TODO: Add 'check' as fs_mgr_flags with data partition.
-# Currently we dont have e2fsck compiled. So fs check would failed.
-
-#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
-/dev/block/bootdevice/by-name/system / ext4 ro,barrier=1,discard wait,slotselect,avb
-/dev/block/bootdevice/by-name/metadata /metadata ext4 noatime,nosuid,nodev,discard wait,formattable
-/dev/block/bootdevice/by-name/userdata /data f2fs noatime,nosuid,nodev,discard,nobarrier latemount,wait,check,fileencryption=ice,keydirectory=/metadata/vold/metadata_encryption,quota,reservedsize=128M
-/dev/block/bootdevice/by-name/persist /mnt/vendor/persist ext4 noatime,nosuid,nodev,barrier=1 wait
-/dev/block/bootdevice/by-name/modem /vendor/firmware_mnt vfat ro,shortname=lower,uid=0,gid=1000,dmask=227,fmask=337,context=u:object_r:firmware_file:s0 wait,slotselect
-/dev/block/bootdevice/by-name/dsp /vendor/dsp ext4 ro,nosuid,nodev,barrier=1 wait,slotselect
-/dev/block/bootdevice/by-name/bluetooth /vendor/bt_firmware vfat ro,shortname=lower,uid=1002,gid=3002,dmask=227,fmask=337,context=u:object_r:bt_firmware_file:s0 wait,slotselect
-
-/dev/block/bootdevice/by-name/asusfw /mnt/vendor/asusfw ext4 rw,nosuid,noatime,nodev,barrier=1,noauto_da_alloc wait,slotselect
-
-/devices/platform/soc/8804000.sdhci/mmc_host* /storage/sdcard1 vfat nosuid,nodev wait,voldmanaged=sdcard1:auto
-/devices/platform/soc/1da4000.ufshc_card/host* /storage/sdcard1 vfat nosuid,nodev wait,voldmanaged=sdcard1:auto
-/devices/platform/soc/*.ssusb/*.dwc3/xhci-hcd.*.auto* /storage/usbotg vfat nosuid,nodev wait,voldmanaged=usbotg:auto
-
-
-# Need to have this entry in here even though the mount point itself is no longer needed.
-# The update_engine code looks for this entry in order to determine the boot device address
-# and fails if it does not find it.
-/dev/block/bootdevice/by-name/misc /misc emmc defaults defaults
-/dev/block/bootdevice/by-name/boot /boot emmc defaults defaults
-/dev/block/bootdevice/by-name/recovery /recovery emmc defaults defaults
diff --git a/removepackages/Android.mk b/removepackages/Android.mk
deleted file mode 100644
index cd1dc66..0000000
--- a/removepackages/Android.mk
+++ /dev/null
@@ -1,11 +0,0 @@
-OCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := RemovePackages
-LOCAL_MODULE_CLASS := APPS
-LOCAL_MODULE_TAGS := optional
-LOCAL_OVERRIDES_PACKAGES := Camera2
-LOCAL_UNINSTALLABLE_MODULE := true
-LOCAL_CERTIFICATE := PRESIGNED
-LOCAL_SRC_FILES := /dev/null
-include $(BUILD_PREBUILT)
\ No newline at end of file
diff --git a/sepolicy/private/app.te b/sepolicy/private/app.te
deleted file mode 100644
index 9f418bd..0000000
--- a/sepolicy/private/app.te
+++ /dev/null
@@ -1,2 +0,0 @@
-# Allow appdomain to get vendor_camera_prop
-get_prop(appdomain, vendor_camera_prop)
diff --git a/sepolicy/private/file.te b/sepolicy/private/file.te
deleted file mode 100644
index eeb7ab3..0000000
--- a/sepolicy/private/file.te
+++ /dev/null
@@ -1,21 +0,0 @@
-# rootfs
-type asdf_file, file_type;
-type bat_file, file_type;
-type bt_firmware_file, file_type;
-type demoapp_file, file_type;
-type firmware_file, fs_type, contextmount_type;
-type persist_file, file_type;
-type voucher_file, file_type;
-type xrom_file, file_type;
-
-# Lights
-type sysfs_rg_led, sysfs_type, fs_type;
-type sysfs_graphics, sysfs_type, fs_type;
-
-# Offscreen Gestures
-type sysfs_gesture, sysfs_type, fs_type;
-type proc_touchscreen, proc_type, sysfs_type, fs_type;
-type sysfs_touchscreen, sysfs_type, fs_type;
-
-# FOD
-type sysfs_fod, sysfs_type, fs_type;
\ No newline at end of file
diff --git a/sepolicy/private/file_contexts b/sepolicy/private/file_contexts
deleted file mode 100644
index 89bf0f3..0000000
--- a/sepolicy/private/file_contexts
+++ /dev/null
@@ -1,24 +0,0 @@
-# Files in rootfs
-/ADF(/.*)? u:object_r:demoapp_file:s0
-/APD(/.*)? u:object_r:demoapp_file:s0
-/asdf(/.*)? u:object_r:asdf_file:s0
-/batinfo(/.*)? u:object_r:bat_file:s0
-/bt_firmware(/.*)? u:object_r:bt_firmware_file:s0
-/firmware(/.*)? u:object_r:firmware_file:s0
-/persist(/.*)? u:object_r:persist_file:s0
-/tombstones u:object_r:rootfs:s0
-/dsp u:object_r:rootfs:s0
-/voucher(/.*)? u:object_r:voucher_file:s0
-/xrom(/.*)? u:object_r:xrom_file:s0
-
-# HALs
-/system/bin/hw/omni\.biometrics\.fingerprint\.inscreen@1\.0-service\.asus_msmnile u:object_r:hal_fod_asus_msmnile_exec:s0
-/(product|system/product)/vendor_overlay/[0-9]+/bin/hw/android\.hardware\.light@2\.0-service u:object_r:hal_light_default_exec:s0
-
-# Vendor overlay
-/(product|system/product)/vendor_overlay/[0-9]+/etc(/.*)? u:object_r:vendor_configs_file:s0
-/(product|system/product)/vendor_overlay/[0-9]+/lib(64)?/hw u:object_r:vendor_hal_file:s0
-
-# Vibrator
-/sys/class/leds/vibrator(/.*)? u:object_r:sysfs_vibrator:s0
-/system/bin/hw/android\.hardware\.vibrator@1\.2-service\.rog2 u:object_r:hal_omni_vibrator_exec:s0
diff --git a/sepolicy/private/genfs_contexts b/sepolicy/private/genfs_contexts
deleted file mode 100644
index 0500d32..0000000
--- a/sepolicy/private/genfs_contexts
+++ /dev/null
@@ -1,11 +0,0 @@
-genfscon sysfs /devices/platform/soc/soc:asustek_googlekey/googlekey_enable u:object_r:sysfs_gesture:s0
-genfscon sysfs /devices/platform/goodix_ts.0/gesture/dclick u:object_r:sysfs_touchscreen:s0
-genfscon sysfs /devices/platform/goodix_ts.0/gesture/gesture_c u:object_r:sysfs_touchscreen:s0
-genfscon sysfs /devices/platform/goodix_ts.0/gesture/gesture_e u:object_r:sysfs_touchscreen:s0
-genfscon sysfs /devices/platform/goodix_ts.0/gesture/gesture_s u:object_r:sysfs_touchscreen:s0
-genfscon sysfs /devices/platform/goodix_ts.0/gesture/gesture_v u:object_r:sysfs_touchscreen:s0
-genfscon sysfs /devices/platform/goodix_ts.0/gesture/gesture_w u:object_r:sysfs_touchscreen:s0
-genfscon sysfs /devices/platform/goodix_ts.0/gesture/gesture_z u:object_r:sysfs_touchscreen:s0
-genfscon sysfs /devices/platform/goodix_ts.0/gesture/swipeup u:object_r:sysfs_touchscreen:s0
-genfscon sysfs /devices/platform/goodix_ts.0/glove_mode u:object_r:sysfs_touchscreen:s0
-genfscon sysfs /devices/platform/goodix_ts.0/gesture/aod_enable u:object_r:sysfs_fod:s0
diff --git a/sepolicy/private/hal_fod_asus_msmnile.te b/sepolicy/private/hal_fod_asus_msmnile.te
deleted file mode 100644
index 7591c94..0000000
--- a/sepolicy/private/hal_fod_asus_msmnile.te
+++ /dev/null
@@ -1,8 +0,0 @@
-type hal_fod_asus_msmnile, coredomain, domain;
-hal_server_domain(hal_fod_asus_msmnile, hal_omni_fod)
-
-type hal_fod_asus_msmnile_exec, system_file_type, exec_type, file_type;
-init_daemon_domain(hal_fod_asus_msmnile)
-
-# Allow hal_fod_asus_msmnile to read and write to sysfs_fod
-allow hal_fod_asus_msmnile sysfs_fod:file rw_file_perms;
\ No newline at end of file
diff --git a/sepolicy/private/hal_light.te b/sepolicy/private/hal_light.te
deleted file mode 100644
index 67b5b9e..0000000
--- a/sepolicy/private/hal_light.te
+++ /dev/null
@@ -1 +0,0 @@
-allow hal_light sysfs_rg_led:file getattr;
\ No newline at end of file
diff --git a/sepolicy/private/hal_omni_vibrator.te b/sepolicy/private/hal_omni_vibrator.te
deleted file mode 100644
index 0281f89..0000000
--- a/sepolicy/private/hal_omni_vibrator.te
+++ /dev/null
@@ -1,9 +0,0 @@
-type hal_omni_vibrator, coredomain, domain;
-hal_server_domain(hal_omni_vibrator, hal_vibrator)
-type hal_omni_vibrator_exec, exec_type, file_type;
-init_daemon_domain(hal_omni_vibrator)
-allow hal_omni_vibrator hal_vibrator_hwservice:hwservice_manager find;
-allow hal_omni_vibrator sysfs_vibrator:file rw_file_perms;
-allow hal_omni_vibrator sysfs_vibrator:lnk_file rw_file_perms;
-allow hal_omni_vibrator sysfs:lnk_file rw_file_perms;
-#allow hal_omni_vibrator sysfs_oem:file rw_file_perms;
diff --git a/sepolicy/private/hwservice.te b/sepolicy/private/hwservice.te
deleted file mode 100644
index 01eb9e2..0000000
--- a/sepolicy/private/hwservice.te
+++ /dev/null
@@ -1 +0,0 @@
-type hal_omni_vibrator_hwservice, hwservice_manager_type;
\ No newline at end of file
diff --git a/sepolicy/private/init.te b/sepolicy/private/init.te
deleted file mode 100644
index 13ca440..0000000
--- a/sepolicy/private/init.te
+++ /dev/null
@@ -1,13 +0,0 @@
-# Allow init to chown/chmod on pseudo files in /sys
-allow init sysfs_gesture:file { rw_file_perms setattr };
-allow init proc_touchscreen:file { rw_file_perms setattr };
-allow init sysfs_touchscreen:file { rw_file_perms setattr };
-
-# Allow init to bind mount over vendor file
-allow init { system_file vendor_file }:file mounton;
-
-# Allow init to mount vendor configs
-allow init vendor_configs_file:dir mounton;
-
-# Vendor init
-allow init property_socket:sock_file write;
\ No newline at end of file
diff --git a/sepolicy/private/installd.te b/sepolicy/private/installd.te
deleted file mode 100644
index 8986bb2..0000000
--- a/sepolicy/private/installd.te
+++ /dev/null
@@ -1 +0,0 @@
-allow installd media_rw_data_file:file setattr;
\ No newline at end of file
diff --git a/sepolicy/private/isolated_app.te b/sepolicy/private/isolated_app.te
deleted file mode 100644
index bb86219..0000000
--- a/sepolicy/private/isolated_app.te
+++ /dev/null
@@ -1 +0,0 @@
-allow isolated_app app_data_file:dir getattr;
\ No newline at end of file
diff --git a/sepolicy/private/kernel.te b/sepolicy/private/kernel.te
deleted file mode 100644
index fd12570..0000000
--- a/sepolicy/private/kernel.te
+++ /dev/null
@@ -1 +0,0 @@
-allow kernel asdf_file:dir { search };
\ No newline at end of file
diff --git a/sepolicy/private/platform_app.te b/sepolicy/private/platform_app.te
deleted file mode 100644
index cde4345..0000000
--- a/sepolicy/private/platform_app.te
+++ /dev/null
@@ -1,3 +0,0 @@
-#allow platform_app asus_prop:file r_file_perms;
-#allow platform_app vendor_file:file { execute };
-allow platform_app app_data_file:file { execute };
\ No newline at end of file
diff --git a/sepolicy/private/priv_app.te b/sepolicy/private/priv_app.te
deleted file mode 100644
index 436884e..0000000
--- a/sepolicy/private/priv_app.te
+++ /dev/null
@@ -1,14 +0,0 @@
-#allow priv_app hal_memtrack_hwservice:hwservice_manager find;
-#allow priv_app mnt_vendor_file:dir search;
-allow priv_app firmware_file:filesystem getattr;
-allow priv_app bt_firmware_file:filesystem getattr;
-allow priv_app {
- asdf_file
- bat_file
- demoapp_file
- postinstall_mnt_dir
- radio_data_file
- system_app_data_file
- voucher_file
- xrom_file
-}:dir getattr;
diff --git a/sepolicy/private/property.te b/sepolicy/private/property.te
deleted file mode 100644
index 787663f..0000000
--- a/sepolicy/private/property.te
+++ /dev/null
@@ -1,2 +0,0 @@
-#type asus_prop, property_type;
-type vendor_camera_prop, property_type;
\ No newline at end of file
diff --git a/sepolicy/private/shell.te b/sepolicy/private/shell.te
deleted file mode 100644
index da7f5bc..0000000
--- a/sepolicy/private/shell.te
+++ /dev/null
@@ -1 +0,0 @@
-allow shell sysfs_fod:file r_file_perms;
\ No newline at end of file
diff --git a/sepolicy/private/system_app.te b/sepolicy/private/system_app.te
deleted file mode 100644
index 4e0f77a..0000000
--- a/sepolicy/private/system_app.te
+++ /dev/null
@@ -1,3 +0,0 @@
-allow system_app sysfs_gesture:file { rw_file_perms setattr };
-allow system_app proc_touchscreen:file { rw_file_perms setattr };
-allow system_app sysfs_touchscreen:file { rw_file_perms setattr };
\ No newline at end of file
diff --git a/sepolicy/private/system_server.te b/sepolicy/private/system_server.te
deleted file mode 100644
index ca73e39..0000000
--- a/sepolicy/private/system_server.te
+++ /dev/null
@@ -1,6 +0,0 @@
-allow system_server proc_touchscreen:file rw_file_perms;
-allow system_server sysfs_touchscreen:file rw_file_perms;
-allow system_server sysfs_gesture:file rw_file_perms;
-
-# allow system server to get vendor_camera_prop
-get_prop(system_server, vendor_camera_prop)
\ No newline at end of file
diff --git a/sepolicy/private/untrusted_app.te b/sepolicy/private/untrusted_app.te
deleted file mode 100644
index 9ec121b..0000000
--- a/sepolicy/private/untrusted_app.te
+++ /dev/null
@@ -1 +0,0 @@
-allow untrusted_app persist_camera_prop:file { read open getattr map};
\ No newline at end of file
diff --git a/sepolicy/private/vendor_init.te b/sepolicy/private/vendor_init.te
deleted file mode 100644
index b53b918..0000000
--- a/sepolicy/private/vendor_init.te
+++ /dev/null
@@ -1,4 +0,0 @@
-# Allow vendor_init to set vendor_camera_prop
-set_prop(vendor_init, vendor_camera_prop)
-
-allow vendor_init exported_system_prop:property_service set;
\ No newline at end of file
diff --git a/setup-makefiles.sh b/setup-makefiles.sh
index 1e313b3..2a2a3ec 100755
--- a/setup-makefiles.sh
+++ b/setup-makefiles.sh
@@ -20,39 +20,10 @@
set -e
# Required!
-DEVICE=rog2
-VENDOR=asus
+export DEVICE=rog3
+export DEVICE_COMMON=sm8250-common
+export VENDOR=asus
-INITIAL_COPYRIGHT_YEAR=2019
+export DEVICE_BRINGUP_YEAR=2020
-# Load extractutils and do some sanity checks
-MY_DIR="${BASH_SOURCE%/*}"
-if [[ ! -d "$MY_DIR" ]]; then MY_DIR="$PWD"; fi
-
-CM_ROOT="$MY_DIR"/../../..
-
-HELPER="$CM_ROOT"/vendor/omni/build/tools/extract_utils.sh
-if [ ! -f "$HELPER" ]; then
- echo "Unable to find helper script at $HELPER"
- exit 1
-fi
-. "$HELPER"
-
-# Initialize the helper
-setup_vendor "$DEVICE" "$VENDOR" "$CM_ROOT"
-
-# Copyright headers and guards
-write_headers "rog2"
-
-# The standard blobs
-write_makefiles "$MY_DIR"/proprietary-files.txt
-
-write_makefiles "$MY_DIR"/proprietary-files-product.txt
-
-cat << EOF >> "$ANDROIDMK"
-
-EOF
-
-# We are done!
-write_footers
-
+"./../../${VENDOR}/${DEVICE_COMMON}/setup-makefiles.sh" "$@"
\ No newline at end of file
diff --git a/system.prop b/system.prop
index 8e83945..e69de29 100644
--- a/system.prop
+++ b/system.prop
@@ -1,331 +0,0 @@
-#rild.libargs=-d /dev/smd0
-persist.rild.nitz_plmn=
-persist.rild.nitz_long_ons_0=
-persist.rild.nitz_long_ons_1=
-persist.rild.nitz_long_ons_2=
-persist.rild.nitz_long_ons_3=
-persist.rild.nitz_short_ons_0=
-persist.rild.nitz_short_ons_1=
-persist.rild.nitz_short_ons_2=
-persist.rild.nitz_short_ons_3=
-ril.subscription.types=RUIM,RUIM
-DEVICE_PROVISIONED=1
-# Set network mode to (T/L/G/W/1X/EVDO, T/L/G/W/1X/EVDO) for 7+7 mode device on DSDS mode
-
-dalvik.vm.heapsize=36m
-dev.pm.dyn_samplingrate=1
-
-#ro.hdmi.enable=true
-#persist.speaker.prot.enable=false
-qcom.hw.aac.encoder=true
-#
-# system props for the cne module
-#
-persist.vendor.cne.feature=1
-
-#system props for the MM modules
-media.stagefright.enable-player=true
-media.stagefright.enable-http=true
-media.stagefright.enable-aac=true
-media.stagefright.enable-qcp=true
-media.stagefright.enable-fma2dp=true
-media.stagefright.enable-scan=true
-media.stagefright.thumbnail.prefer_hw_codecs=true
-media.settings.xml=/vendor/etc/media_profiles_vendor.xml
-mmp.enable.3g2=true
-media.aac_51_output_enabled=true
-mm.enable.smoothstreaming=true
-#13631487 is decimal sum of supported codecs in AAL
-#codecs:(PARSER_)AAC AC3 AMR_NB AMR_WB ASF AVI DTS FLV 3GP 3G2 MKV MP2PS MP2TS MP3 OGG QCP WAV FLAC AIFF APE DSD XVID MHAS
-vendor.mm.enable.qcom_parser=114294783
-persist.mm.enable.prefetch=true
-
-#Netflix custom property
-ro.netflix.bsp_rev=Q855-16947-1
-
-#
-# system props for the data modules
-#
-ro.vendor.use_data_netmgrd=true
-persist.vendor.data.mode=concurrent
-
-#system props for time-services
-persist.timed.enable=true
-
-#
-# system prop for opengles version
-#
-# 196608 is decimal for 0x30000 to report version 3
-# 196609 is decimal for 0x30001 to report version 3.1
-# 196610 is decimal for 0x30002 to report version 3.2
-ro.opengles.version=196610
-
-# system property for maximum number of HFP client connections
-bt.max.hfpclient.connections=1
-
-#
-# System props for telephony
-# System prop to turn on CdmaLTEPhone always
-telephony.lteOnCdmaDevice=1
-
-#Simulate sdcard on /data/media
-#
-persist.fuse_sdcard=true
-
-#system prop for Bluetooth SOC type
-vendor.bluetooth.soc=cherokee
-#ro.bluetooth.library_name=libbluetooth_qti.so
-persist.vendor.btstack.enable.splita2dp=true
-persist.vendor.btstack.a2dp_offload_cap=sbc-aptx-aptxtws-aptxhd-aac-ldac
-persist.vendor.btstack.aac_frm_ctl.enabled=true
-persist.vendor.btstack.enable.twsplus=true
-persist.bluetooth.avrcpversion=avrcp16
-
-#system prop for wipower support
-ro.bluetooth.emb_wp_mode=false
-ro.bluetooth.wipower=false
-
-#
-#snapdragon value add features
-#
-ro.qc.sdk.audio.ssr=false
-
-##fluencetype can be "fluence" or "fluencepro" or "none"
-ro.qc.sdk.audio.fluencetype=none
-persist.audio.fluence.voicecall=true
-persist.audio.fluence.voicerec=false
-persist.audio.fluence.speaker=true
-
-
-#enable offload audio video playback by default
-audio.offload.video=true
-#
-##enable music through deep buffer
-audio.deep_buffer.media=true
-#
-##set AudioFlinger client heap size
-ro.af.client_heap_size_kbyte=7168
-#
-#system prop for RmNet Data
-persist.rmnet.data.enable=true
-persist.data.wda.enable=true
-persist.data.df.dl_mode=5
-persist.data.df.ul_mode=5
-persist.data.df.agg.dl_pkt=10
-persist.data.df.agg.dl_size=4096
-persist.data.df.mux_count=8
-persist.data.df.iwlan_mux=9
-persist.data.df.dev_name=rmnet_usb0
-
-# Enable wigig service
-persist.vendor.wigig.enable=1
-# # # Enable wigig UI
-persist.vendor.asus.wigig.support=1
-
-# Prevent suspend-on-sleep behaviour of displaylink
-com.displaylink.manager.suspend_on_sleep=false
-
-# Enable wigig npt and rps for better tput
-persist.vendor.wigig.npt.enable=1
-persist.vendor.wigig.npt.rps=0xEE
-
-#property to enable user to access Google WFD settings
-persist.debug.wfd.enable=1
-##property to choose between virtual/external wfd display
-persist.sys.wfd.virtual=0
-
-
-#property to enable HWC for VDS
-debug.sf.enable_hwc_vds=1
-
-#property to latch unsignaled buffer
-debug.sf.latch_unsignaled=1
-
-# enable tunnel encoding for amrwb
-tunnel.audio.encode = true
-
-#Buffer size in kbytes for compress offload playback
-audio.offload.buffer.size.kb=32
-
-#Enable offload audio video playback by default
-av.offload.enable=true
-
-#enable voice path for PCM VoIP by default
-use.voice.path.for.pcm.voip=true
-
-# system prop for NFC DT
-ro.nfc.port=I2C
-
-#enable dsp gapless mode by default
-audio.offload.gapless.enabled=true
-
-#initialize QCA1530 detection
-sys.qca1530=detect
-
-#Enable stm events
-persist.debug.coresight.config=stm-events
-
-#hwui properties
-ro.hwui.texture_cache_size=72
-ro.hwui.layer_cache_size=48
-ro.hwui.r_buffer_cache_size=8
-ro.hwui.path_cache_size=32
-ro.hwui.gradient_cache_size=1
-ro.hwui.drop_shadow_cache_size=6
-ro.hwui.texture_cache_flushrate=0.4
-ro.hwui.text_small_cache_width=1024
-ro.hwui.text_small_cache_height=1024
-ro.hwui.text_large_cache_width=2048
-ro.hwui.text_large_cache_height=1024
-
-config.disable_rtt=true
-
-#Bringup properties
-persist.sys.force_sw_gles=1
-persist.vendor.radio.atfwd.start=true
-ro.kernel.qemu.gles=0
-qemu.hw.mainkeys=0
-
-# ASUS_BSP "Enable IOT logging"+++
-persist.vendor.service.bt.iotinfo.report.enable=true
-# ASUS_BSP "Enable IOT logging"---
-
-#Expose aux camera for below packages
-vendor.camera.aux.packagelist=org.codeaurora.snapcam,com.qualcomm.saltproject2,com.asus.camera
-
-# [ASUS BSP] Deka
-ro.asus.camera.preview_beauty=0:1;1:1;2:1;3:1
-ro.asus.camera.preview_portrait=0:0;1:1;2:0;3:0
-ro.asus.camera.cam0.video_fps=HD@60,FHD@60,4K@60
-ro.asus.camera.cam1.video_fps=HD@30,FHD@60
-ro.asus.camera.cam2.video_fps=HD@60,FHD@60,4K@30
-#ro.asus.camera.cam3.video_fps=HD@60,FHD@60,4K@30
-ro.asus.camera.dual_bokeh=0:0;1:0;2:0;3:1
-ro.asus.camera.lens_type=0:standard;1:standard;2:wide-angle;3:virtual
-ro.asus.camera.use_frame_processor=0
-ro.asus.camera.ai_scene_mode=0:1;1:1;2:1;3:1
-ro.asus.camera.undistortion.preview=0:0;1:0;2:1;3:1
-ro.asus.camera.undistortion.video=0:0;1:0;2:0;3:0
-persist.camera.capture.hdrplus.dump=0
-# ASUS_BSP Jason Enable digital zoom 8x for Yoda_Q
-ro.asus.camera.capture.override_max_digital_zoom=0:8
-ro.asus.camera.cam0.preview_fps_range=8,45
-ro.asus.camera.cam1.preview_fps_range=8,30
-
-# [ASUS BSP] Wayne
-ro.asus.camera.cam0.stream_list=1P/2Y/1J
-ro.asus.camera.cam1.stream_list=1P/2Y/1J
-ro.asus.camera.cam0.exposure_time_range=312500,32000000000
-ro.asus.camera.cam1.exposure_time_range=312500,32000000000
-ro.asus.camera.cam2.exposure_time_range=100000,16000000000
-# [ASUS BSP] Mike
-ro.asus.camera.cam0.eis.sup_list=4K@60,4K@30,FHD@60,FHD@30,HD@30,TV@30
-ro.asus.camera.cam1.eis.sup_list=FHD@60,HD@30,TV@30
-ro.asus.camera.cam2.eis.sup_list=4K@30,FHD@60,FHD@30,HD@30,TV@30
-# [ASUS BSP] Mike
-
-# [ASUS BSP] Mike
-ro.asus.camera.fovc=0:1;1:0;2:0;3:0
-# [ASUS BSP] Mike
-
-# [ASUS BSP] Byron for camera night mode use
-ro.asus.camera.night=0:1;1:0;2:1;3:1
-# [ASUS BSP] Byron for camera night mode use
-
-# [ASUS BSP] for camera long exposure
-vendor.camera.expTimeMax=0
-# [ASUS BSP] for camera long exposure
-
-#enable IZat OptInApp overlay
-persist.vendor.overlay.izat.optin=rro
-
-# Property for backup NTP Server
-persist.backup.ntpServer="0.pool.ntp.org"
-
-#Property to enable Mag filter
-persist.vendor.sensors.enable.mag_filter=true
-
-#Partition source order for Product/Build properties pickup.
-#ro.product.property_source_order=odm,vendor,product,product_services,system
-
-#Property to enable Codec2 for audio and OMX for Video
-debug.stagefright.ccodec=1
-
-#Disable SPU
-vendor.gatekeeper.disable_spu=true
-
-# ASUS_BSP +++
-persist.vendor.asus.logcat.filenum=20
-# property for csclogtool
-logtool.package=com.asus.csclogtool
-logtool.class=com.asus.csclogtool.LogService
-ro.asus.rog=1
-# ASUS_BSP ---
-# jack for default log flag
-
-persist.vendor.asus.startlog=0
-persist.vendor.sys.downloadmode.enable=0
-
-#jack for game mode
-ro.cpufreq.game=1
-#ASUS BSP Wei ++
-persist.sys.hardcoder.name=ta_itf
-#ASUS BSP Wei --
-
-# ASUS BSP Charger +++
-persist.sys.stopcharging=0
-persist.vendor.pps.power_limit_w=15
-persist.vendor.chg.max_volt_mv=9000
-persist.vendor.ctm.disallowed=1
-ro.build.smartcharging=1
-ro.build.disableaicharging=1
-# ASUS BSP Charger ---
-
-# [ASUS BSP] Fingerprint/Payment +++
-persist.asus.fp.wakeup_support=true
-persist.asus.fp.wakeup=false
-ro.hardware.fp_position=front
-ro.hardware.fp_shape=round
-# [ASUS BSP] Fingerprint/Payment ---
-
-#Austin+++
-ro.asus.audiowizard.outdoor=1
-ro.asus.audio.dualSPK=true
-ro.asus.audio.realStereo=true
-ro.asus.aw.settingentry=1
-ro.audio.vibra.ring.vol.idx=5
-audio.wizard.default.mode=smart
-#Austin---
-
-# [ASUS BSP] for Poweroff Alarm Support
-ro.asus.poweroffalarm_support=1
-
-# lkmd
-
-ro.lmk.use_minfree_levels=true
-ro.lmk.use_psi=false
-ro.lmk.low=1001
-ro.lmk.medium=800
-ro.lmk.critical=200
-ro.lmk.kill_heaviest_task=true
-ro.lmk.upgrade_pressure=100
-ro.lmk.downgrade_pressure=100
-
-vendor.iop.enable_uxe=0
-
-
-# ASUS_BSP_Vibrator +++
-#setting property
-ro.asus.scale_low_max_amp=95
-ro.asus.scale_none_max_amp=200
-#end
-# ASUS_BSP_Vibrator ---
-
-ro.gfx.driver.0=com.asus.qti.gpudrivers.zs660kl.api29
-ro.gfx.driver.1=com.qualcomm.qti.gpudrivers.sm8150.api29
-
-# Extra Asus
-
-ro.build.asus.sku=WW
-ro.vendor.qti.va_aosp.support=1
-persist.sys.fflag.override.settings_network_and_internet_v2=true
diff --git a/vendor_framework_compatibility_matrix.xml b/vendor_framework_compatibility_matrix.xml
deleted file mode 100644
index 0bd821d..0000000
--- a/vendor_framework_compatibility_matrix.xml
+++ /dev/null
@@ -1,777 +0,0 @@
-<!-- Copyright (c) 2018, The Linux Foundation. All rights reserved.
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above
- copyright notice, this list of conditions and the following
- disclaimer in the documentation and/or other materials provided
- with the distribution.
- * Neither the name of The Linux Foundation nor the names of its
- contributors may be used to endorse or promote products derived
- from this software without specific prior written permission.
-THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
-WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
-ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
-BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
-OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
-IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--->
-
-<compatibility-matrix version="1.0" type="framework">
- <hal format="hidl" optional="true">
- <name>android.hardware.automotive.evs</name>
- <version>1.0</version>
- <interface>
- <name>IEvsEnumerator</name>
- <instance>EvsEnumeratorHw</instance>
- <instance>EvsEnumeratorHw-Mock</instance>
- <instance>default</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>android.hardware.gnss</name>
- <version>1.0-1</version>
- <version>2.0</version>
- <interface>
- <name>IGnss</name>
- <instance>default</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>android.hardware.gnss</name>
- <version>1.0-1</version>
- <version>2.0</version>
- <interface>
- <name>IGnss</name>
- <instance>gnss_vendor</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>android.hardware.media.c2</name>
- <version>1.0</version>
- <interface>
- <name>IComponentStore</name>
- <instance>default</instance>
- <instance>software</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>android.hardware.nfc</name>
- <version>1.0</version>
- <interface>
- <name>INfc</name>
- <instance>default</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>android.hardware.radio</name>
- <version>1.0-4</version>
- <interface>
- <name>IRadio</name>
- <instance>slot1</instance>
- <instance>slot2</instance>
- </interface>
- <interface>
- <name>ISap</name>
- <instance>slot1</instance>
- <instance>slot2</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>android.hardware.radio.config</name>
- <version>1.0-1</version>
- <interface>
- <name>IRadioConfig</name>
- <instance>default</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>android.hardware.wifi.supplicant</name>
- <version>1.0</version>
- <interface>
- <name>ISupplicant</name>
- <instance>default</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>com.qualcomm.qti.ant</name>
- <version>1.0</version>
- <interface>
- <name>IAntHci</name>
- <instance>default</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>com.qualcomm.qti.dpm.api</name>
- <version>1.0</version>
- <interface>
- <name>IdpmQmi</name>
- <instance>dpmQmiService</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>com.qualcomm.qti.imscmservice</name>
- <version>2.0-2</version>
- <interface>
- <name>IImsCmService</name>
- <instance>qti.ims.connectionmanagerservice</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>com.qualcomm.qti.uceservice</name>
- <version>2.0-1</version>
- <interface>
- <name>IUceService</name>
- <instance>com.qualcomm.qti.uceservice</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>com.qualcomm.qti.wifidisplayhal</name>
- <version>1.0</version>
- <interface>
- <name>IDSManager</name>
- <instance>wifidisplaydshal</instance>
- </interface>
- <interface>
- <name>IHDCPSession</name>
- <instance>wifidisplayhdcphal</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>com.quicinc.cne.api</name>
- <version>1.0-1</version>
- <interface>
- <name>IApiService</name>
- <instance>cnd</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>com.quicinc.cne.server</name>
- <version>2.0-2</version>
- <interface>
- <name>IServer</name>
- <instance>cnd</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>vendor.asus.motor</name>
- <version>1.0</version>
- <interface>
- <name>IRotateCameraInterface</name>
- <instance>default</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>vendor.display.color</name>
- <version>1.0-5</version>
- <interface>
- <name>IDisplayColor</name>
- <instance>default</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>vendor.display.config</name>
- <version>1.0-10</version>
- <interface>
- <name>IDisplayConfig</name>
- <instance>default</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>vendor.display.postproc</name>
- <version>1.0</version>
- <interface>
- <name>IDisplayPostproc</name>
- <instance>default</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>vendor.ims.airtrigger</name>
- <version>1.1</version>
- <interface>
- <name>IAirTrigger</name>
- <instance>default</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>vendor.ims.colortemp</name>
- <version>1.0</version>
- <interface>
- <name>IColorTemp</name>
- <instance>default</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>vendor.ims.glovemode</name>
- <version>1.0</version>
- <interface>
- <name>IGloveMode</name>
- <instance>default</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>vendor.ims.twinviewdock</name>
- <version>1.0</version>
- <interface>
- <name>ITwinViewDock</name>
- <instance>default</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>vendor.ims.wifiantennamode</name>
- <version>1.0</version>
- <interface>
- <name>IWifiantennamode</name>
- <instance>default</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>vendor.ims.zenmotion</name>
- <version>1.0</version>
- <interface>
- <name>IZenMotion</name>
- <instance>default</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>vendor.nxp.hardware.nfc</name>
- <version>1.0-1</version>
- <interface>
- <name>INqNfc</name>
- <instance>default</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>vendor.qti.automotive.qcarcam</name>
- <version>1.0</version>
- <interface>
- <name>IQcarCamera</name>
- <instance>default</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>vendor.qti.data.factory</name>
- <version>1.0</version>
- <version>2.0</version>
- <interface>
- <name>IFactory</name>
- <instance>default</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>vendor.qti.esepowermanager</name>
- <version>1.0</version>
- <interface>
- <name>IEsePowerManager</name>
- <instance>default</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>vendor.qti.gnss</name>
- <version>1.0-2</version>
- <version>2.0-1</version>
- <version>3.0</version>
- <interface>
- <name>ILocHidlGnss</name>
- <instance>gnss_vendor</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>vendor.qti.hardware.alarm</name>
- <version>1.0</version>
- <interface>
- <name>IAlarm</name>
- <instance>default</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>vendor.qti.hardware.audiohalext</name>
- <version>1.0</version>
- <interface>
- <name>IAudioHalExt</name>
- <instance>default</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>vendor.qti.hardware.bluetooth_audio</name>
- <version>2.0</version>
- <interface>
- <name>IBluetoothAudioProvidersFactory</name>
- <instance>default</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>vendor.qti.hardware.bluetooth_dun</name>
- <version>1.0</version>
- <interface>
- <name>IBluetoothDunServer</name>
- <instance>default</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>vendor.qti.hardware.bluetooth_sar</name>
- <version>1.0</version>
- <interface>
- <name>IBluetoothSar</name>
- <instance>default</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>vendor.qti.hardware.btconfigstore</name>
- <version>1.0</version>
- <interface>
- <name>IBTConfigStore</name>
- <instance>default</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>vendor.qti.hardware.cacert</name>
- <version>1.0</version>
- <interface>
- <name>IService</name>
- <instance>default</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>vendor.qti.hardware.capabilityconfigstore</name>
- <version>1.0</version>
- <interface>
- <name>ICapabilityConfigStore</name>
- <instance>default</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>vendor.qti.hardware.cryptfshw</name>
- <version>1.0</version>
- <interface>
- <name>ICryptfsHw</name>
- <instance>default</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>vendor.qti.hardware.cvp</name>
- <version>1.0</version>
- <interface>
- <name>ICvp</name>
- <instance>cvphalservice</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>vendor.qti.hardware.data.connection</name>
- <version>1.0-1</version>
- <interface>
- <name>IDataConnection</name>
- <instance>slot1</instance>
- <instance>slot2</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>vendor.qti.hardware.data.iwlan</name>
- <version>1.0</version>
- <interface>
- <name>IIWlan</name>
- <instance>slot1</instance>
- <instance>slot2</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>vendor.qti.hardware.data.latency</name>
- <version>1.0</version>
- <interface>
- <name>ILinkLatency</name>
- <instance>default</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>vendor.qti.hardware.display.allocator</name>
- <version>1.0</version>
- <version>3.0</version>
- <interface>
- <name>IQtiAllocator</name>
- <instance>default</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>vendor.qti.hardware.display.composer</name>
- <version>2.0</version>
- <interface>
- <name>IQtiComposer</name>
- <instance>default</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>vendor.qti.hardware.display.mapper</name>
- <version>2.0</version>
- <version>3.0</version>
- <interface>
- <name>IQtiMapper</name>
- <instance>default</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>vendor.qti.hardware.factory</name>
- <version>1.0-1</version>
- <interface>
- <name>IFactory</name>
- <instance>default</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>vendor.qti.hardware.fingerprint</name>
- <version>1.0</version>
- <interface>
- <name>IQtiExtendedFingerprint</name>
- <instance>default</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>vendor.qti.hardware.fm</name>
- <version>1.0</version>
- <interface>
- <name>IFmHci</name>
- <instance>default</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>vendor.qti.hardware.improvetouch.blobmanager</name>
- <version>1.0</version>
- <interface>
- <name>IBlobManager</name>
- <instance>BlobManagerService</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>vendor.qti.hardware.improvetouch.gesturemanager</name>
- <version>1.0</version>
- <interface>
- <name>IGestureManager</name>
- <instance>GestureManagerService</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>vendor.qti.hardware.improvetouch.touchcompanion</name>
- <version>1.0</version>
- <interface>
- <name>ITouchCompanion</name>
- <instance>TouchCompanionService</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>vendor.qti.hardware.iop</name>
- <version>2.0</version>
- <interface>
- <name>IIop</name>
- <instance>default</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>vendor.qti.hardware.mlshal</name>
- <version>1.0</version>
- <interface>
- <name>IMlsDap</name>
- <instance>mlsdaphal</instance>
- </interface>
- <interface>
- <name>IMlsIon</name>
- <instance>mlsionhal</instance>
- </interface>
- <interface>
- <name>IMlsVnc</name>
- <instance>mlsvnchal</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>vendor.qti.hardware.perf</name>
- <version>2.0</version>
- <interface>
- <name>IPerf</name>
- <instance>default</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>vendor.qti.hardware.qdutils_disp</name>
- <version>1.0</version>
- <interface>
- <name>IQdutilsDisp</name>
- <instance>default</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>vendor.qti.hardware.qseecom</name>
- <version>1.0</version>
- <interface>
- <name>IQSEECom</name>
- <instance>default</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>vendor.qti.hardware.qteeconnector</name>
- <version>1.0</version>
- <interface>
- <name>IAppConnector</name>
- <instance>default</instance>
- </interface>
- <interface>
- <name>IGPAppConnector</name>
- <instance>default</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>vendor.qti.hardware.radio.am</name>
- <version>1.0</version>
- <interface>
- <name>IQcRilAudio</name>
- <instance>slot1</instance>
- <instance>slot2</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>vendor.qti.hardware.radio.ims</name>
- <version>1.0-5</version>
- <interface>
- <name>IImsRadio</name>
- <instance>imsradio0</instance>
- <instance>imsradio1</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>vendor.qti.hardware.radio.lpa</name>
- <version>1.0</version>
- <interface>
- <name>IUimLpa</name>
- <instance>UimLpa0</instance>
- <instance>UimLpa1</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>vendor.qti.hardware.radio.qcrilhook</name>
- <version>1.0</version>
- <interface>
- <name>IQtiOemHook</name>
- <instance>oemhook0</instance>
- <instance>oemhook1</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>vendor.qti.hardware.radio.qtiradio</name>
- <version>1.0</version>
- <version>2.0-3</version>
- <interface>
- <name>IQtiRadio</name>
- <instance>slot1</instance>
- <instance>slot2</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>vendor.qti.hardware.radio.uim</name>
- <version>1.1-2</version>
- <interface>
- <name>IUim</name>
- <instance>Uim0</instance>
- <instance>Uim1</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>vendor.qti.hardware.radio.uim_remote_client</name>
- <version>1.0</version>
- <interface>
- <name>IUimRemoteServiceClient</name>
- <instance>uimRemoteClient0</instance>
- <instance>uimRemoteClient1</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>vendor.qti.hardware.radio.uim_remote_server</name>
- <version>1.0</version>
- <interface>
- <name>IUimRemoteServiceServer</name>
- <instance>uimRemoteServer0</instance>
- <instance>uimRemoteServer1</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>vendor.qti.hardware.scve.objecttracker</name>
- <version>1.0</version>
- <interface>
- <name>IObjectTracker</name>
- <instance>objectTracker</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>vendor.qti.hardware.scve.panorama</name>
- <version>1.0</version>
- <interface>
- <name>IPanoramaStitching</name>
- <instance>panoStitching</instance>
- </interface>
- <interface>
- <name>IPanoramaTracking</name>
- <instance>panoTracking</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>vendor.qti.hardware.seccam</name>
- <version>1.0</version>
- <interface>
- <name>ISecCam</name>
- <instance>default</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>vendor.qti.hardware.sensorscalibrate</name>
- <version>1.0</version>
- <interface>
- <name>ISensorsCalibrate</name>
- <instance>default</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>vendor.qti.hardware.soter</name>
- <version>1.0</version>
- <interface>
- <name>ISoter</name>
- <instance>default</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>vendor.qti.hardware.tui_comm</name>
- <version>1.0</version>
- <interface>
- <name>ITuiComm</name>
- <instance>default</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>vendor.qti.hardware.vpp</name>
- <version>1.1-3</version>
- <interface>
- <name>IHidlVppService</name>
- <instance>vppService</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>vendor.qti.hardware.wifi.hostapd</name>
- <version>1.0-1</version>
- <interface>
- <name>IHostapdVendor</name>
- <instance>default</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>vendor.qti.hardware.wifi.supplicant</name>
- <version>2.0</version>
- <interface>
- <name>ISupplicantVendor</name>
- <instance>default</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>vendor.qti.hardware.wifi.wifilearner</name>
- <version>1.0</version>
- <interface>
- <name>IWifiStats</name>
- <instance>wifiStats</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>vendor.qti.hardware.wifidisplaysession</name>
- <version>1.0</version>
- <interface>
- <name>IWifiDisplaySession</name>
- <instance>wifidisplaysession</instance>
- </interface>
- <interface>
- <name>IWifiDisplaySessionAudioTrack</name>
- <instance>wifidisplaysessionaudiotrack</instance>
- </interface>
- <interface>
- <name>IWifiDisplaySessionImageTrack</name>
- <instance>wifidisplaysessionimagetrack</instance>
- </interface>
- <interface>
- <name>IWifiDisplaySessionVideoTrack</name>
- <instance>wifidisplaysessionvideotrack</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>vendor.qti.hardware.wigig.netperftuner</name>
- <version>1.0</version>
- <interface>
- <name>INetPerfTuner</name>
- <instance>default</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>vendor.qti.hardware.wigig.supptunnel</name>
- <version>1.0</version>
- <interface>
- <name>ISuppTunnelProvider</name>
- <instance>default</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>vendor.qti.hardware.wipower</name>
- <version>1.0</version>
- <interface>
- <name>IWipower</name>
- <instance>default</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>vendor.qti.ims.callinfo</name>
- <version>1.0</version>
- <interface>
- <name>IService</name>
- <instance>default</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>vendor.qti.imsrtpservice</name>
- <version>2.0-1</version>
- <interface>
- <name>IRTPService</name>
- <instance>imsrtpservice</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>vendor.qti.power.pasrmanager</name>
- <version>1.0</version>
- <interface>
- <name>IPasrManager</name>
- <instance>default</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>vendor.qti.qspmhal</name>
- <version>1.0</version>
- <interface>
- <name>IQspmhal</name>
- <instance>default</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="true">
- <name>vendor.qti.voiceprint</name>
- <version>1.0</version>
- <interface>
- <name>IQtiVoicePrintService</name>
- <instance>default</instance>
- </interface>
- </hal>
- <sepolicy>
- <kernel-sepolicy-version>30</kernel-sepolicy-version>
- <sepolicy-version>26.0</sepolicy-version>
- <sepolicy-version>27.0</sepolicy-version>
- <sepolicy-version>28.0</sepolicy-version>
- <sepolicy-version>29.0</sepolicy-version>
- </sepolicy>
- <avb>
- <vbmeta-version>1.0</vbmeta-version>
- </avb>
-</compatibility-matrix>
diff --git a/vibrator/Android.bp b/vibrator/Android.bp
deleted file mode 100644
index 0825b90..0000000
--- a/vibrator/Android.bp
+++ /dev/null
@@ -1,39 +0,0 @@
-//
-// Copyright (C) 2019 The LineageOS Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-cc_binary {
- name: "android.hardware.vibrator@1.2-service.rog2",
- relative_install_path: "hw",
- init_rc: ["android.hardware.vibrator@1.2-service.rog2.rc"],
- srcs: ["service.cpp", "Vibrator.cpp"],
- cflags: [
- "-Wall",
- "-Werror",
- ],
- shared_libs: [
- "libbase",
- "libhidlbase",
- "libcutils",
- "libhidltransport",
- "liblog",
- "libhwbinder",
- "libutils",
- "libhardware",
- "android.hardware.vibrator@1.0",
- "android.hardware.vibrator@1.1",
- "android.hardware.vibrator@1.2",
- ],
- proprietary: false,
-}
diff --git a/vibrator/Vibrator.cpp b/vibrator/Vibrator.cpp
deleted file mode 100644
index 8a0bb97..0000000
--- a/vibrator/Vibrator.cpp
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#define LOG_TAG "VibratorService"
-
-#include <log/log.h>
-
-#include <android-base/logging.h>
-#include <hardware/hardware.h>
-#include <hardware/vibrator.h>
-#include <cutils/properties.h>
-
-#include "Vibrator.h"
-
-#include <cinttypes>
-#include <cmath>
-#include <iostream>
-#include <fstream>
-
-static constexpr char ACTIVATE_PATH[] = "/sys/class/leds/vibrator/activate";
-static constexpr char DURATION_PATH[] = "/sys/class/leds/vibrator/duration";
-static constexpr char STATE_PATH[] = "/sys/class/leds/vibrator/state";
-static constexpr char EFFECT_INDEX_PATH[] = "/sys/class/leds/vibrator/lp_trigger_effect";
-
-namespace android {
-namespace hardware {
-namespace vibrator {
-namespace V1_2 {
-namespace implementation {
-
-using Status = ::android::hardware::vibrator::V1_0::Status;
-using EffectStrength = ::android::hardware::vibrator::V1_0::EffectStrength;
-
-static constexpr uint32_t WAVEFORM_TICK_EFFECT_MS = 30;
-
-static constexpr uint32_t WAVEFORM_CLICK_EFFECT_MS = 20;
-
-static constexpr uint32_t WAVEFORM_HEAVY_CLICK_EFFECT_MS = 35;
-
-static constexpr uint32_t WAVEFORM_DOUBLE_CLICK_EFFECT_MS = 35;
-
-static constexpr uint32_t WAVEFORM_POP_EFFECT_MS = 20;
-
-static constexpr uint32_t WAVEFORM_THUD_EFFECT_MS = 25;
-
-/*
- * Write value to path and close file.
- */
-template <typename T>
-static void set(const std::string& path, const T& value) {
- std::ofstream file(path);
-
- if (!file.is_open()) {
- LOG(ERROR) << "Unable to open: " << path << " (" << strerror(errno) << ")";
- return;
- }
-
- file << value;
-}
-
-Vibrator::Vibrator() {
- set(EFFECT_INDEX_PATH, 1);
-}
-
-// Methods from ::android::hardware::vibrator::V1_1::IVibrator follow.
-Return<Status> Vibrator::on(uint32_t timeoutMs) {
- set(STATE_PATH, 1);
- set(DURATION_PATH, timeoutMs);
- set(ACTIVATE_PATH, 1);
-
- return Status::OK;
-}
-
-Return<Status> Vibrator::off() {
- return Status::OK;
-}
-
-Return<bool> Vibrator::supportsAmplitudeControl() {
- return false;
-}
-
-Return<Status> Vibrator::setAmplitude(uint8_t) {
- return Status::UNSUPPORTED_OPERATION;
-}
-
-Return<void> Vibrator::perform(V1_0::Effect effect, EffectStrength strength,
- perform_cb _hidl_cb) {
- return performEffect(static_cast<Effect>(effect), strength, _hidl_cb);
-}
-
-Return<void> Vibrator::perform_1_1(V1_1::Effect_1_1 effect, EffectStrength strength,
- perform_cb _hidl_cb) {
- return performEffect(static_cast<Effect>(effect), strength, _hidl_cb);
-}
-
-Return<void> Vibrator::perform_1_2(Effect effect, EffectStrength strength,
- perform_cb _hidl_cb) {
- return performEffect(static_cast<Effect>(effect), strength, _hidl_cb);
-}
-
-Return<void> Vibrator::performEffect(Effect effect, EffectStrength,
- perform_cb _hidl_cb) {
- set(ACTIVATE_PATH, 0);
- Status status = Status::OK;
- uint32_t timeMs;
-
- switch (effect) {
- case Effect::TICK:
- timeMs = WAVEFORM_TICK_EFFECT_MS;
- break;
- case Effect::CLICK:
- timeMs = WAVEFORM_CLICK_EFFECT_MS;
- break;
- case Effect::HEAVY_CLICK:
- timeMs = WAVEFORM_HEAVY_CLICK_EFFECT_MS;
- break;
- case Effect::DOUBLE_CLICK:
- timeMs = WAVEFORM_DOUBLE_CLICK_EFFECT_MS;
- break;
- case Effect::POP:
- timeMs = WAVEFORM_POP_EFFECT_MS;
- break;
- case Effect::THUD:
- timeMs = WAVEFORM_THUD_EFFECT_MS;
- break;
- default:
- _hidl_cb(Status::UNSUPPORTED_OPERATION, 0);
- return Void();
- }
-
- on(timeMs);
- _hidl_cb(status, timeMs);
-
- return Void();
-}
-
-
-} // namespace implementation
-} // namespace V1_2
-} // namespace vibrator
-} // namespace hardware
-} // namespace android
\ No newline at end of file
diff --git a/vibrator/Vibrator.h b/vibrator/Vibrator.h
deleted file mode 100644
index b543f19..0000000
--- a/vibrator/Vibrator.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef ANDROID_HARDWARE_VIBRATOR_V1_2_VIBRATOR_H
-#define ANDROID_HARDWARE_VIBRATOR_V1_2_VIBRATOR_H
-
-#include <android/hardware/vibrator/1.2/IVibrator.h>
-#include <hidl/Status.h>
-
-#include <fstream>
-
-namespace android {
-namespace hardware {
-namespace vibrator {
-namespace V1_2 {
-namespace implementation {
-
-class Vibrator : public IVibrator {
-public:
- Vibrator();
-
- // Methods from ::android::hardware::vibrator::V1_0::IVibrator follow.
- using Status = ::android::hardware::vibrator::V1_0::Status;
- Return<Status> on(uint32_t timeoutMs) override;
- Return<Status> off() override;
- Return<bool> supportsAmplitudeControl() override;
- Return<Status> setAmplitude(uint8_t amplitude) override;
-
- using EffectStrength = ::android::hardware::vibrator::V1_0::EffectStrength;
- Return<void> perform(V1_0::Effect effect, EffectStrength strength, perform_cb _hidl_cb)
- override;
- Return<void> perform_1_1(V1_1::Effect_1_1 effect, EffectStrength strength, perform_cb _hidl_cb)
- override;
- Return<void> perform_1_2(Effect effect, EffectStrength strength, perform_cb _hidl_cb) override;
-
-private:
- Return<void> performEffect(Effect effect, EffectStrength strength, perform_cb _hidl_cb);
-};
-} // namespace implementation
-} // namespace V1_2
-} // namespace vibrator
-} // namespace hardware
-} // namespace android
-
-#endif // ANDROID_HARDWARE_VIBRATOR_V1_2_VIBRATOR_H
\ No newline at end of file
diff --git a/vibrator/android.hardware.vibrator@1.2-service.rog2.rc b/vibrator/android.hardware.vibrator@1.2-service.rog2.rc
deleted file mode 100644
index b59ac86..0000000
--- a/vibrator/android.hardware.vibrator@1.2-service.rog2.rc
+++ /dev/null
@@ -1,11 +0,0 @@
-on early-boot
- chown system system /sys/class/leds/vibrator/activate
- chown system system /sys/class/leds/vibrator/duration
- chown system system /sys/class/leds/vibrator/lp_trigger_effect
- chown system system /sys/class/leds/vibrator/state
- chown system system /sys/class/leds/vibrator/scale
-
-service system.vibrator-1-2 /system/bin/hw/android.hardware.vibrator@1.2-service.rog2
- class hal
- user system
- group system
diff --git a/vibrator/service.cpp b/vibrator/service.cpp
deleted file mode 100644
index 27cae2e..0000000
--- a/vibrator/service.cpp
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#define LOG_TAG "vibrator@1.2-rog2"
-
-#include <android/hardware/vibrator/1.2/IVibrator.h>
-#include <android-base/logging.h>
-#include <hidl/HidlTransportSupport.h>
-
-#include "Vibrator.h"
-
-using android::hardware::configureRpcThreadpool;
-using android::hardware::joinRpcThreadpool;
-
-using android::hardware::vibrator::V1_2::IVibrator;
-using android::hardware::vibrator::V1_2::implementation::Vibrator;
-
-using android::OK;
-using android::status_t;
-
-int main() {
- android::sp<Vibrator> service = new Vibrator();
-
- configureRpcThreadpool(1, true);
-
- status_t status = service->registerAsService();
- if (status != OK) {
- LOG(ERROR) << "Cannot register Vibrator HAL service.";
- return 1;
- }
-
- LOG(INFO) << "Vibrator HAL service ready.";
-
- joinRpcThreadpool();
-
- LOG(ERROR) << "Vibrator HAL service failed to join thread pool.";
- return 1;
-}
\ No newline at end of file
diff --git a/vintf/manifest.xml b/vintf/manifest.xml
deleted file mode 100644
index 15aeb23..0000000
--- a/vintf/manifest.xml
+++ /dev/null
@@ -1,1028 +0,0 @@
-<!--
- Input:
- manifest.xml
- manifest.xml
- c2_manifest.xml
- airtrigger.xml
- glovemode.xml
- zenmotion.xml
- wifiantennamode.xml
- colortemp.xml
- twinviewdock.xml
--->
-<manifest version="1.0" type="device" target-level="4">
- <hal format="hidl">
- <name>android.hardware.audio</name>
- <transport>hwbinder</transport>
- <version>5.0</version>
- <interface>
- <name>IDevicesFactory</name>
- <instance>default</instance>
- </interface>
- <fqname>@5.0::IDevicesFactory/default</fqname>
- </hal>
- <hal format="hidl">
- <name>android.hardware.audio.effect</name>
- <transport>hwbinder</transport>
- <version>5.0</version>
- <interface>
- <name>IEffectsFactory</name>
- <instance>default</instance>
- </interface>
- <fqname>@5.0::IEffectsFactory/default</fqname>
- </hal>
- <hal format="hidl">
- <name>android.hardware.biometrics.fingerprint</name>
- <transport>hwbinder</transport>
- <version>2.1</version>
- <interface>
- <name>IBiometricsFingerprint</name>
- <instance>default</instance>
- </interface>
- <fqname>@2.1::IBiometricsFingerprint/default</fqname>
- </hal>
- <hal format="hidl">
- <name>android.hardware.bluetooth</name>
- <transport>hwbinder</transport>
- <version>1.0</version>
- <interface>
- <name>IBluetoothHci</name>
- <instance>default</instance>
- </interface>
- <fqname>@1.0::IBluetoothHci/default</fqname>
- </hal>
- <hal format="hidl">
- <name>android.hardware.bluetooth.audio</name>
- <transport>hwbinder</transport>
- <version>2.0</version>
- <interface>
- <name>IBluetoothAudioProvidersFactory</name>
- <instance>default</instance>
- </interface>
- <fqname>@2.0::IBluetoothAudioProvidersFactory/default</fqname>
- </hal>
- <hal format="hidl">
- <name>android.hardware.boot</name>
- <transport>hwbinder</transport>
- <version>1.0</version>
- <interface>
- <name>IBootControl</name>
- <instance>default</instance>
- </interface>
- <fqname>@1.0::IBootControl/default</fqname>
- </hal>
- <hal format="hidl">
- <name>android.hardware.camera.provider</name>
- <transport>hwbinder</transport>
- <version>2.4</version>
- <interface>
- <name>ICameraProvider</name>
- <instance>legacy/0</instance>
- </interface>
- <fqname>@2.4::ICameraProvider/legacy/0</fqname>
- </hal>
- <hal format="hidl">
- <name>android.hardware.configstore</name>
- <transport>hwbinder</transport>
- <version>1.1</version>
- <interface>
- <name>ISurfaceFlingerConfigs</name>
- <instance>default</instance>
- </interface>
- <fqname>@1.1::ISurfaceFlingerConfigs/default</fqname>
- </hal>
- <hal format="hidl">
- <name>android.hardware.contexthub</name>
- <transport>hwbinder</transport>
- <version>1.0</version>
- <interface>
- <name>IContexthub</name>
- <instance>default</instance>
- </interface>
- <fqname>@1.0::IContexthub/default</fqname>
- </hal>
- <hal format="hidl">
- <name>android.hardware.drm</name>
- <transport>hwbinder</transport>
- <version>1.0</version>
- <interface>
- <name>ICryptoFactory</name>
- <instance>default</instance>
- </interface>
- <interface>
- <name>IDrmFactory</name>
- <instance>default</instance>
- </interface>
- <fqname>@1.0::ICryptoFactory/default</fqname>
- <fqname>@1.0::IDrmFactory/default</fqname>
- <fqname>@1.1::ICryptoFactory/wfdhdcp</fqname>
- <fqname>@1.1::IDrmFactory/wfdhdcp</fqname>
- <fqname>@1.2::ICryptoFactory/clearkey</fqname>
- <fqname>@1.2::ICryptoFactory/widevine</fqname>
- <fqname>@1.2::IDrmFactory/clearkey</fqname>
- <fqname>@1.2::IDrmFactory/widevine</fqname>
- </hal>
- <hal format="hidl">
- <name>android.hardware.gatekeeper</name>
- <transport>hwbinder</transport>
- <version>1.0</version>
- <interface>
- <name>IGatekeeper</name>
- <instance>default</instance>
- </interface>
- <fqname>@1.0::IGatekeeper/default</fqname>
- </hal>
- <hal format="hidl">
- <name>android.hardware.gnss</name>
- <transport>hwbinder</transport>
- <version>1.1</version>
- <interface>
- <name>IGnss</name>
- <instance>default</instance>
- </interface>
- <fqname>@1.0::IGnss/gnss_vendor</fqname>
- <fqname>@1.1::IGnss/default</fqname>
- </hal>
- <hal format="hidl">
- <name>android.hardware.gnss</name>
- <transport>hwbinder</transport>
- <version>2.0</version>
- <interface>
- <name>IGnss</name>
- <instance>default</instance>
- </interface>
- <fqname>@1.0::IGnss/gnss_vendor</fqname>
- <fqname>@2.0::IGnss/default</fqname>
- </hal>
- <hal format="hidl">
- <name>android.hardware.graphics.allocator</name>
- <transport>hwbinder</transport>
- <version>2.0</version>
- <interface>
- <name>IAllocator</name>
- <instance>default</instance>
- </interface>
- <fqname>@2.0::IAllocator/default</fqname>
- </hal>
- <hal format="hidl">
- <name>android.hardware.graphics.composer</name>
- <transport>hwbinder</transport>
- <version>2.3</version>
- <interface>
- <name>IComposer</name>
- <instance>default</instance>
- </interface>
- <fqname>@2.3::IComposer/default</fqname>
- </hal>
- <hal format="hidl">
- <name>android.hardware.graphics.mapper</name>
- <transport arch="32+64">passthrough</transport>
- <version>2.1</version>
- <interface>
- <name>IMapper</name>
- <instance>default</instance>
- </interface>
- <fqname>@2.1::IMapper/default</fqname>
- </hal>
- <hal format="hidl">
- <name>android.hardware.health</name>
- <transport>hwbinder</transport>
- <version>2.0</version>
- <interface>
- <name>IHealth</name>
- <instance>default</instance>
- </interface>
- <fqname>@2.0::IHealth/default</fqname>
- </hal>
- <hal format="hidl">
- <name>android.hardware.keymaster</name>
- <transport>hwbinder</transport>
- <version>4.0</version>
- <interface>
- <name>IKeymasterDevice</name>
- <instance>default</instance>
- </interface>
- <fqname>@4.0::IKeymasterDevice/default</fqname>
- </hal>
- <hal format="hidl">
- <name>android.hardware.light</name>
- <transport>hwbinder</transport>
- <version>2.0</version>
- <interface>
- <name>ILight</name>
- <instance>default</instance>
- </interface>
- <fqname>@2.0::ILight/default</fqname>
- </hal>
- <hal format="hidl">
- <name>android.hardware.media.c2</name>
- <transport>hwbinder</transport>
- <version>1.0</version>
- <interface>
- <name>IComponentStore</name>
- <instance>default</instance>
- </interface>
- <fqname>@1.0::IComponentStore/default</fqname>
- </hal>
- <hal format="hidl">
- <name>android.hardware.media.omx</name>
- <transport>hwbinder</transport>
- <version>1.0</version>
- <interface>
- <name>IOmx</name>
- <instance>default</instance>
- </interface>
- <interface>
- <name>IOmxStore</name>
- <instance>default</instance>
- </interface>
- <fqname>@1.0::IOmx/default</fqname>
- <fqname>@1.0::IOmxStore/default</fqname>
- </hal>
- <hal format="hidl">
- <name>android.hardware.memtrack</name>
- <transport>hwbinder</transport>
- <version>1.0</version>
- <interface>
- <name>IMemtrack</name>
- <instance>default</instance>
- </interface>
- <fqname>@1.0::IMemtrack/default</fqname>
- </hal>
- <hal format="hidl">
- <name>android.hardware.neuralnetworks</name>
- <transport>hwbinder</transport>
- <version>1.2</version>
- <interface>
- <name>IDevice</name>
- <instance>qti-default</instance>
- <instance>qti-dsp</instance>
- <instance>qti-gpu</instance>
- <instance>qti-hta</instance>
- </interface>
- <fqname>@1.2::IDevice/qti-default</fqname>
- <fqname>@1.2::IDevice/qti-dsp</fqname>
- <fqname>@1.2::IDevice/qti-gpu</fqname>
- <fqname>@1.2::IDevice/qti-hta</fqname>
- </hal>
- <hal format="hidl">
- <name>android.hardware.nfc</name>
- <transport>hwbinder</transport>
- <version>1.2</version>
- <interface>
- <name>INfc</name>
- <instance>default</instance>
- </interface>
- <fqname>@1.2::INfc/default</fqname>
- </hal>
- <hal format="hidl">
- <name>android.hardware.power</name>
- <transport>hwbinder</transport>
- <version>1.2</version>
- <interface>
- <name>IPower</name>
- <instance>default</instance>
- </interface>
- <fqname>@1.2::IPower/default</fqname>
- </hal>
- <hal format="hidl">
- <name>android.hardware.radio</name>
- <transport>hwbinder</transport>
- <fqname>@1.2::ISap/slot1</fqname>
- <fqname>@1.2::ISap/slot2</fqname>
- <fqname>@1.4::IRadio/slot1</fqname>
- <fqname>@1.4::IRadio/slot2</fqname>
- </hal>
- <hal format="hidl">
- <name>android.hardware.radio.config</name>
- <transport>hwbinder</transport>
- <version>1.1</version>
- <interface>
- <name>IRadioConfig</name>
- <instance>default</instance>
- </interface>
- <fqname>@1.1::IRadioConfig/default</fqname>
- </hal>
- <hal format="hidl">
- <name>android.hardware.renderscript</name>
- <transport arch="32+64">passthrough</transport>
- <version>1.0</version>
- <interface>
- <name>IDevice</name>
- <instance>default</instance>
- </interface>
- <fqname>@1.0::IDevice/default</fqname>
- </hal>
- <hal format="hidl">
- <name>android.hardware.secure_element</name>
- <transport>hwbinder</transport>
- <version>1.0</version>
- <interface>
- <name>ISecureElement</name>
- <instance>SIM1</instance>
- <instance>SIM2</instance>
- </interface>
- <fqname>@1.0::ISecureElement/SIM1</fqname>
- <fqname>@1.0::ISecureElement/SIM2</fqname>
- </hal>
- <hal format="hidl">
- <name>android.hardware.sensors</name>
- <transport>hwbinder</transport>
- <version>2.0</version>
- <interface>
- <name>ISensors</name>
- <instance>default</instance>
- </interface>
- <fqname>@2.0::ISensors/default</fqname>
- </hal>
- <hal format="hidl">
- <name>android.hardware.soundtrigger</name>
- <transport>hwbinder</transport>
- <version>2.1</version>
- <interface>
- <name>ISoundTriggerHw</name>
- <instance>default</instance>
- </interface>
- <fqname>@2.1::ISoundTriggerHw/default</fqname>
- </hal>
- <hal format="hidl">
- <name>android.hardware.tetheroffload.config</name>
- <transport>hwbinder</transport>
- <version>1.0</version>
- <interface>
- <name>IOffloadConfig</name>
- <instance>default</instance>
- </interface>
- <fqname>@1.0::IOffloadConfig/default</fqname>
- </hal>
- <hal format="hidl">
- <name>android.hardware.tetheroffload.control</name>
- <transport>hwbinder</transport>
- <version>1.0</version>
- <interface>
- <name>IOffloadControl</name>
- <instance>default</instance>
- </interface>
- <fqname>@1.0::IOffloadControl/default</fqname>
- </hal>
- <hal format="hidl">
- <name>android.hardware.thermal</name>
- <transport>hwbinder</transport>
- <version>1.0</version>
- <interface>
- <name>IThermal</name>
- <instance>default</instance>
- </interface>
- <fqname>@1.0::IThermal/default</fqname>
- </hal>
- <hal format="hidl">
- <name>android.hardware.usb</name>
- <transport>hwbinder</transport>
- <version>1.0</version>
- <interface>
- <name>IUsb</name>
- <instance>default</instance>
- </interface>
- <fqname>@1.0::IUsb/default</fqname>
- </hal>
- <hal format="hidl">
- <name>android.hardware.vibrator</name>
- <transport>hwbinder</transport>
- <version>1.2</version>
- <interface>
- <name>IVibrator</name>
- <instance>default</instance>
- </interface>
- <fqname>@1.2::IVibrator/default</fqname>
- </hal>
- <hal format="hidl">
- <name>android.hardware.wifi</name>
- <transport>hwbinder</transport>
- <version>1.3</version>
- <interface>
- <name>IWifi</name>
- <instance>default</instance>
- </interface>
- <fqname>@1.3::IWifi/default</fqname>
- </hal>
- <hal format="hidl">
- <name>android.hardware.wifi.hostapd</name>
- <transport>hwbinder</transport>
- <version>1.1</version>
- <interface>
- <name>IHostapd</name>
- <instance>default</instance>
- </interface>
- <fqname>@1.1::IHostapd/default</fqname>
- </hal>
- <hal format="hidl">
- <name>android.hardware.wifi.supplicant</name>
- <transport>hwbinder</transport>
- <version>1.2</version>
- <interface>
- <name>ISupplicant</name>
- <instance>default</instance>
- </interface>
- <fqname>@1.2::ISupplicant/default</fqname>
- </hal>
- <hal format="hidl">
- <name>com.qualcomm.qti.uceservice</name>
- <transport>hwbinder</transport>
- <version>2.1</version>
- <interface>
- <name>IUceService</name>
- <instance>com.qualcomm.qti.uceservice</instance>
- </interface>
- <fqname>@2.1::IUceService/com.qualcomm.qti.uceservice</fqname>
- </hal>
- <hal format="hidl">
- <name>vendor.asus.hardware.vibratorcontrol</name>
- <transport>hwbinder</transport>
- <version>1.0</version>
- <interface>
- <name>IVibratorcontrol</name>
- <instance>default</instance>
- </interface>
- <fqname>@1.0::IVibratorcontrol/default</fqname>
- </hal>
- <hal format="hidl">
- <name>vendor.asus.motor</name>
- <transport>hwbinder</transport>
- <version>1.0</version>
- <interface>
- <name>IRotateCameraInterface</name>
- <instance>default</instance>
- </interface>
- <fqname>@1.0::IRotateCameraInterface/default</fqname>
- </hal>
- <hal format="hidl">
- <name>vendor.display.color</name>
- <transport>hwbinder</transport>
- <version>1.3</version>
- <interface>
- <name>IDisplayColor</name>
- <instance>default</instance>
- </interface>
- <fqname>@1.3::IDisplayColor/default</fqname>
- </hal>
- <hal format="hidl">
- <name>vendor.display.config</name>
- <transport>hwbinder</transport>
- <version>1.10</version>
- <interface>
- <name>IDisplayConfig</name>
- <instance>default</instance>
- </interface>
- <fqname>@1.10::IDisplayConfig/default</fqname>
- </hal>
- <hal format="hidl">
- <name>vendor.display.postproc</name>
- <transport>hwbinder</transport>
- <version>1.0</version>
- <interface>
- <name>IDisplayPostproc</name>
- <instance>default</instance>
- </interface>
- <fqname>@1.0::IDisplayPostproc/default</fqname>
- </hal>
- <hal format="hidl">
- <name>vendor.goodix.hardware.biometrics.fingerprint</name>
- <transport>hwbinder</transport>
- <version>2.1</version>
- <interface>
- <name>IGoodixFingerprintDaemon</name>
- <instance>default</instance>
- </interface>
- <fqname>@2.1::IGoodixFingerprintDaemon/default</fqname>
- </hal>
- <hal format="hidl">
- <name>vendor.ims.airtrigger</name>
- <transport>hwbinder</transport>
- <version>1.1</version>
- <interface>
- <name>IAirTrigger</name>
- <instance>default</instance>
- </interface>
- <fqname>@1.1::IAirTrigger/default</fqname>
- </hal>
- <hal format="hidl">
- <name>vendor.ims.colortemp</name>
- <transport>hwbinder</transport>
- <version>1.0</version>
- <interface>
- <name>IColorTemp</name>
- <instance>default</instance>
- </interface>
- <fqname>@1.0::IColorTemp/default</fqname>
- </hal>
- <hal format="hidl">
- <name>vendor.ims.glovemode</name>
- <transport>hwbinder</transport>
- <version>1.0</version>
- <interface>
- <name>IGloveMode</name>
- <instance>default</instance>
- </interface>
- <fqname>@1.0::IGloveMode/default</fqname>
- </hal>
- <hal format="hidl">
- <name>vendor.ims.twinviewdock</name>
- <transport>hwbinder</transport>
- <version>1.0</version>
- <interface>
- <name>ITwinViewDock</name>
- <instance>default</instance>
- </interface>
- <fqname>@1.0::ITwinViewDock/default</fqname>
- </hal>
- <hal format="hidl">
- <name>vendor.ims.wifiantennamode</name>
- <transport>hwbinder</transport>
- <version>1.0</version>
- <interface>
- <name>IWifiantennamode</name>
- <instance>default</instance>
- </interface>
- <fqname>@1.0::IWifiantennamode/default</fqname>
- </hal>
- <hal format="hidl">
- <name>vendor.ims.zenmotion</name>
- <transport>hwbinder</transport>
- <version>1.0</version>
- <interface>
- <name>IZenMotion</name>
- <instance>default</instance>
- </interface>
- <fqname>@1.0::IZenMotion/default</fqname>
- </hal>
- <hal format="hidl">
- <name>vendor.nxp.hardware.nfc</name>
- <transport>hwbinder</transport>
- <version>1.1</version>
- <interface>
- <name>INqNfc</name>
- <instance>default</instance>
- </interface>
- <fqname>@1.1::INqNfc/default</fqname>
- </hal>
- <hal format="hidl">
- <name>vendor.pixelworks.hardware.display</name>
- <transport>hwbinder</transport>
- <version>1.0</version>
- <interface>
- <name>IIris</name>
- <instance>default</instance>
- </interface>
- <fqname>@1.0::IIris/default</fqname>
- </hal>
- <hal format="hidl">
- <name>vendor.qti.data.factory</name>
- <transport>hwbinder</transport>
- <version>2.0</version>
- <interface>
- <name>IFactory</name>
- <instance>default</instance>
- </interface>
- <fqname>@2.0::IFactory/default</fqname>
- </hal>
- <hal format="hidl">
- <name>vendor.qti.esepowermanager</name>
- <transport>hwbinder</transport>
- <version>1.0</version>
- <interface>
- <name>IEsePowerManager</name>
- <instance>default</instance>
- </interface>
- <fqname>@1.0::IEsePowerManager/default</fqname>
- </hal>
- <hal format="hidl">
- <name>vendor.qti.gnss</name>
- <transport>hwbinder</transport>
- <version>1.2</version>
- <interface>
- <name>ILocHidlGnss</name>
- <instance>gnss_vendor</instance>
- </interface>
- <fqname>@1.2::ILocHidlGnss/gnss_vendor</fqname>
- </hal>
- <hal format="hidl">
- <name>vendor.qti.gnss</name>
- <transport>hwbinder</transport>
- <version>2.1</version>
- <interface>
- <name>ILocHidlGnss</name>
- <instance>gnss_vendor</instance>
- </interface>
- <fqname>@2.1::ILocHidlGnss/gnss_vendor</fqname>
- </hal>
- <hal format="hidl">
- <name>vendor.qti.gnss</name>
- <transport>hwbinder</transport>
- <version>3.0</version>
- <interface>
- <name>ILocHidlGnss</name>
- <instance>gnss_vendor</instance>
- </interface>
- <fqname>@3.0::ILocHidlGnss/gnss_vendor</fqname>
- </hal>
- <hal format="hidl">
- <name>vendor.qti.hardware.alarm</name>
- <transport>hwbinder</transport>
- <version>1.0</version>
- <interface>
- <name>IAlarm</name>
- <instance>default</instance>
- </interface>
- <fqname>@1.0::IAlarm/default</fqname>
- </hal>
- <hal format="hidl">
- <name>vendor.qti.hardware.audiohalext</name>
- <transport>hwbinder</transport>
- <version>1.0</version>
- <interface>
- <name>IAudioHalExt</name>
- <instance>default</instance>
- </interface>
- <fqname>@1.0::IAudioHalExt/default</fqname>
- </hal>
- <hal format="hidl">
- <name>vendor.qti.hardware.auralight</name>
- <transport>hwbinder</transport>
- <version>1.0</version>
- <interface>
- <name>IAuraLight</name>
- <instance>default</instance>
- </interface>
- <fqname>@1.0::IAuraLight/default</fqname>
- </hal>
- <hal format="hidl">
- <name>vendor.qti.hardware.bluetooth_sar</name>
- <transport>hwbinder</transport>
- <version>1.0</version>
- <interface>
- <name>IBluetoothSar</name>
- <instance>default</instance>
- </interface>
- <fqname>@1.0::IBluetoothSar/default</fqname>
- </hal>
- <hal format="hidl">
- <name>vendor.qti.hardware.cacert</name>
- <transport>hwbinder</transport>
- <version>1.0</version>
- <interface>
- <name>IService</name>
- <instance>default</instance>
- </interface>
- <fqname>@1.0::IService/default</fqname>
- </hal>
- <hal format="hidl">
- <name>vendor.qti.hardware.capabilityconfigstore</name>
- <transport>hwbinder</transport>
- <version>1.0</version>
- <interface>
- <name>ICapabilityConfigStore</name>
- <instance>default</instance>
- </interface>
- <fqname>@1.0::ICapabilityConfigStore/default</fqname>
- </hal>
- <hal format="hidl">
- <name>vendor.qti.hardware.cryptfshw</name>
- <transport>hwbinder</transport>
- <version>1.0</version>
- <interface>
- <name>ICryptfsHw</name>
- <instance>default</instance>
- </interface>
- <fqname>@1.0::ICryptfsHw/default</fqname>
- </hal>
- <hal format="hidl">
- <name>vendor.qti.hardware.cvp</name>
- <transport>hwbinder</transport>
- <version>1.0</version>
- <interface>
- <name>ICvp</name>
- <instance>cvphalservice</instance>
- </interface>
- <fqname>@1.0::ICvp/cvphalservice</fqname>
- </hal>
- <hal format="hidl">
- <name>vendor.qti.hardware.data.connection</name>
- <transport>hwbinder</transport>
- <version>1.1</version>
- <interface>
- <name>IDataConnection</name>
- <instance>slot1</instance>
- <instance>slot2</instance>
- </interface>
- <fqname>@1.1::IDataConnection/slot1</fqname>
- <fqname>@1.1::IDataConnection/slot2</fqname>
- </hal>
- <hal format="hidl">
- <name>vendor.qti.hardware.data.iwlan</name>
- <transport>hwbinder</transport>
- <version>1.0</version>
- <interface>
- <name>IIWlan</name>
- <instance>slot1</instance>
- <instance>slot2</instance>
- </interface>
- <fqname>@1.0::IIWlan/slot1</fqname>
- <fqname>@1.0::IIWlan/slot2</fqname>
- </hal>
- <hal format="hidl">
- <name>vendor.qti.hardware.display.allocator</name>
- <transport>hwbinder</transport>
- <version>1.0</version>
- <interface>
- <name>IQtiAllocator</name>
- <instance>default</instance>
- </interface>
- <fqname>@1.0::IQtiAllocator/default</fqname>
- </hal>
- <hal format="hidl">
- <name>vendor.qti.hardware.display.mapper</name>
- <transport arch="32+64">passthrough</transport>
- <version>2.0</version>
- <interface>
- <name>IQtiMapper</name>
- <instance>default</instance>
- </interface>
- <fqname>@2.0::IQtiMapper/default</fqname>
- </hal>
- <hal format="hidl">
- <name>vendor.qti.hardware.iop</name>
- <transport>hwbinder</transport>
- <version>2.0</version>
- <interface>
- <name>IIop</name>
- <instance>default</instance>
- </interface>
- <fqname>@2.0::IIop/default</fqname>
- </hal>
- <hal format="hidl">
- <name>vendor.qti.hardware.perf</name>
- <transport>hwbinder</transport>
- <version>2.0</version>
- <interface>
- <name>IPerf</name>
- <instance>default</instance>
- </interface>
- <fqname>@2.0::IPerf/default</fqname>
- </hal>
- <hal format="hidl">
- <name>vendor.qti.hardware.qdutils_disp</name>
- <transport>hwbinder</transport>
- <version>1.0</version>
- <interface>
- <name>IQdutilsDisp</name>
- <instance>default</instance>
- </interface>
- <fqname>@1.0::IQdutilsDisp/default</fqname>
- </hal>
- <hal format="hidl">
- <name>vendor.qti.hardware.qseecom</name>
- <transport>hwbinder</transport>
- <version>1.0</version>
- <interface>
- <name>IQSEECom</name>
- <instance>default</instance>
- </interface>
- <fqname>@1.0::IQSEECom/default</fqname>
- </hal>
- <hal format="hidl">
- <name>vendor.qti.hardware.qteeconnector</name>
- <transport>hwbinder</transport>
- <version>1.0</version>
- <interface>
- <name>IAppConnector</name>
- <instance>default</instance>
- </interface>
- <interface>
- <name>IGPAppConnector</name>
- <instance>default</instance>
- </interface>
- <fqname>@1.0::IAppConnector/default</fqname>
- <fqname>@1.0::IGPAppConnector/default</fqname>
- </hal>
- <hal format="hidl">
- <name>vendor.qti.hardware.radio.am</name>
- <transport>hwbinder</transport>
- <version>1.0</version>
- <interface>
- <name>IQcRilAudio</name>
- <instance>slot1</instance>
- <instance>slot2</instance>
- </interface>
- <fqname>@1.0::IQcRilAudio/slot1</fqname>
- <fqname>@1.0::IQcRilAudio/slot2</fqname>
- </hal>
- <hal format="hidl">
- <name>vendor.qti.hardware.radio.ims</name>
- <transport>hwbinder</transport>
- <version>1.5</version>
- <interface>
- <name>IImsRadio</name>
- <instance>imsradio0</instance>
- <instance>imsradio1</instance>
- </interface>
- <fqname>@1.5::IImsRadio/imsradio0</fqname>
- <fqname>@1.5::IImsRadio/imsradio1</fqname>
- </hal>
- <hal format="hidl">
- <name>vendor.qti.hardware.radio.lpa</name>
- <transport>hwbinder</transport>
- <version>1.0</version>
- <interface>
- <name>IUimLpa</name>
- <instance>UimLpa0</instance>
- <instance>UimLpa1</instance>
- </interface>
- <fqname>@1.0::IUimLpa/UimLpa0</fqname>
- <fqname>@1.0::IUimLpa/UimLpa1</fqname>
- </hal>
- <hal format="hidl">
- <name>vendor.qti.hardware.radio.qcrilhook</name>
- <transport>hwbinder</transport>
- <version>1.0</version>
- <interface>
- <name>IQtiOemHook</name>
- <instance>oemhook0</instance>
- <instance>oemhook1</instance>
- </interface>
- <fqname>@1.0::IQtiOemHook/oemhook0</fqname>
- <fqname>@1.0::IQtiOemHook/oemhook1</fqname>
- </hal>
- <hal format="hidl">
- <name>vendor.qti.hardware.radio.qtiradio</name>
- <transport>hwbinder</transport>
- <version>1.0</version>
- <interface>
- <name>IQtiRadio</name>
- <instance>slot1</instance>
- <instance>slot2</instance>
- </interface>
- <fqname>@1.0::IQtiRadio/slot1</fqname>
- <fqname>@1.0::IQtiRadio/slot2</fqname>
- </hal>
- <hal format="hidl">
- <name>vendor.qti.hardware.radio.qtiradio</name>
- <transport>hwbinder</transport>
- <version>2.3</version>
- <interface>
- <name>IQtiRadio</name>
- <instance>slot1</instance>
- <instance>slot2</instance>
- </interface>
- <fqname>@2.3::IQtiRadio/slot1</fqname>
- <fqname>@2.3::IQtiRadio/slot2</fqname>
- </hal>
- <hal format="hidl">
- <name>vendor.qti.hardware.radio.uim</name>
- <transport>hwbinder</transport>
- <version>1.2</version>
- <interface>
- <name>IUim</name>
- <instance>Uim0</instance>
- <instance>Uim1</instance>
- </interface>
- <fqname>@1.2::IUim/Uim0</fqname>
- <fqname>@1.2::IUim/Uim1</fqname>
- </hal>
- <hal format="hidl">
- <name>vendor.qti.hardware.radio.uim_remote_client</name>
- <transport>hwbinder</transport>
- <version>1.0</version>
- <interface>
- <name>IUimRemoteServiceClient</name>
- <instance>uimRemoteClient0</instance>
- <instance>uimRemoteClient1</instance>
- </interface>
- <fqname>@1.0::IUimRemoteServiceClient/uimRemoteClient0</fqname>
- <fqname>@1.0::IUimRemoteServiceClient/uimRemoteClient1</fqname>
- </hal>
- <hal format="hidl">
- <name>vendor.qti.hardware.radio.uim_remote_server</name>
- <transport>hwbinder</transport>
- <version>1.0</version>
- <interface>
- <name>IUimRemoteServiceServer</name>
- <instance>uimRemoteServer0</instance>
- <instance>uimRemoteServer1</instance>
- </interface>
- <fqname>@1.0::IUimRemoteServiceServer/uimRemoteServer0</fqname>
- <fqname>@1.0::IUimRemoteServiceServer/uimRemoteServer1</fqname>
- </hal>
- <hal format="hidl">
- <name>vendor.qti.hardware.sensorscalibrate</name>
- <transport>hwbinder</transport>
- <version>1.0</version>
- <interface>
- <name>ISensorsCalibrate</name>
- <instance>default</instance>
- </interface>
- <fqname>@1.0::ISensorsCalibrate/default</fqname>
- </hal>
- <hal format="hidl">
- <name>vendor.qti.hardware.soter</name>
- <transport>hwbinder</transport>
- <version>1.0</version>
- <interface>
- <name>ISoter</name>
- <instance>default</instance>
- </interface>
- <fqname>@1.0::ISoter/default</fqname>
- </hal>
- <hal format="hidl">
- <name>vendor.qti.hardware.tui_comm</name>
- <transport>hwbinder</transport>
- <version>1.0</version>
- <interface>
- <name>ITuiComm</name>
- <instance>default</instance>
- </interface>
- <fqname>@1.0::ITuiComm/default</fqname>
- </hal>
- <hal format="hidl">
- <name>vendor.qti.hardware.vpp</name>
- <transport>hwbinder</transport>
- <version>1.3</version>
- <interface>
- <name>IHidlVppService</name>
- <instance>vppService</instance>
- </interface>
- <fqname>@1.3::IHidlVppService/vppService</fqname>
- </hal>
- <hal format="hidl">
- <name>vendor.qti.hardware.wifi.hostapd</name>
- <transport>hwbinder</transport>
- <version>1.1</version>
- <interface>
- <name>IHostapdVendor</name>
- <instance>default</instance>
- </interface>
- <fqname>@1.1::IHostapdVendor/default</fqname>
- </hal>
- <hal format="hidl">
- <name>vendor.qti.hardware.wifi.supplicant</name>
- <transport>hwbinder</transport>
- <version>2.0</version>
- <interface>
- <name>ISupplicantVendor</name>
- <instance>default</instance>
- </interface>
- <fqname>@2.0::ISupplicantVendor/default</fqname>
- </hal>
- <hal format="hidl">
- <name>vendor.qti.hardware.wifi.wifilearner</name>
- <transport>hwbinder</transport>
- <version>1.0</version>
- <interface>
- <name>IWifiStats</name>
- <instance>wifiStats</instance>
- </interface>
- <fqname>@1.0::IWifiStats/wifiStats</fqname>
- </hal>
- <hal format="hidl">
- <name>vendor.qti.hardware.wigig.netperftuner</name>
- <transport>hwbinder</transport>
- <version>1.0</version>
- <interface>
- <name>INetPerfTuner</name>
- <instance>default</instance>
- </interface>
- <fqname>@1.0::INetPerfTuner/default</fqname>
- </hal>
- <hal format="hidl">
- <name>vendor.qti.hardware.wigig.supptunnel</name>
- <transport>hwbinder</transport>
- <version>1.0</version>
- <interface>
- <name>ISuppTunnelProvider</name>
- <instance>default</instance>
- </interface>
- <fqname>@1.0::ISuppTunnelProvider/default</fqname>
- </hal>
- <hal format="hidl">
- <name>vendor.qti.ims.callinfo</name>
- <transport>hwbinder</transport>
- <version>1.0</version>
- <interface>
- <name>IService</name>
- <instance>default</instance>
- </interface>
- <fqname>@1.0::IService/default</fqname>
- </hal>
- <hal format="hidl">
- <name>vendor.qti.imsrtpservice</name>
- <transport>hwbinder</transport>
- <version>2.1</version>
- <interface>
- <name>IRTPService</name>
- <instance>imsrtpservice</instance>
- </interface>
- <fqname>@2.1::IRTPService/imsrtpservice</fqname>
- </hal>
- <sepolicy>
- <version>29.0</version>
- </sepolicy>
-</manifest>