mirror of
https://github.com/S3NEO/android_device_samsung_msm8226-common.git
synced 2024-11-06 21:55:45 +00:00
msm8226-common: initial commit of the rebased tree
This commit is contained in:
parent
f31beaa748
commit
6dfb0a8d0e
58 changed files with 2088 additions and 1171 deletions
|
@ -16,7 +16,6 @@ LOCAL_PATH := $(call my-dir)
|
||||||
|
|
||||||
ifeq ($(BOARD_VENDOR),samsung)
|
ifeq ($(BOARD_VENDOR),samsung)
|
||||||
ifeq ($(TARGET_BOARD_PLATFORM),msm8226)
|
ifeq ($(TARGET_BOARD_PLATFORM),msm8226)
|
||||||
|
|
||||||
include $(call all-subdir-makefiles,$(LOCAL_PATH))
|
include $(call all-subdir-makefiles,$(LOCAL_PATH))
|
||||||
|
|
||||||
ADSP_IMAGES := \
|
ADSP_IMAGES := \
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Copyright (C) 2014 The CyanogenMod Project
|
# Copyright (C) 2012 The CyanogenMod Project
|
||||||
# Copyright (C) 2017-2019 The LineageOS Project
|
# Copyright (C) 2017-2018 The LineageOS Project
|
||||||
#
|
#
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
# you may not use this file except in compliance with the License.
|
# you may not use this file except in compliance with the License.
|
||||||
|
@ -13,31 +13,17 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
# Inherit from qcom-common
|
# inherit from qcom-common
|
||||||
-include device/samsung/qcom-common/BoardConfigCommon.mk
|
-include device/samsung/qcom-common/BoardConfigCommon.mk
|
||||||
|
|
||||||
VENDOR_PATH := device/samsung/msm8226-common
|
# Platform
|
||||||
|
TARGET_BOARD_PLATFORM := msm8226
|
||||||
TARGET_SPECIFIC_HEADER_PATH := $(VENDOR_PATH)/include
|
TARGET_BOARD_PLATFORM_GPU := qcom-adreno305
|
||||||
|
|
||||||
# Use Snapdragon LLVM if available on build server
|
|
||||||
TARGET_USE_SDCLANG := true
|
|
||||||
|
|
||||||
# Architecture
|
# Architecture
|
||||||
BOARD_USES_QCOM_HARDWARE := true
|
|
||||||
TARGET_CPU_MEMCPY_BASE_OPT_DISABLE := true
|
|
||||||
TARGET_CPU_VARIANT := krait
|
TARGET_CPU_VARIANT := krait
|
||||||
BOARD_GLOBAL_CFLAGS += -mfpu=neon -mfloat-abi=softfp
|
|
||||||
BOARD_GLOBAL_CPPFLAGS += -mfpu=neon -mfloat-abi=softfp
|
|
||||||
|
|
||||||
# Audio
|
# Audio
|
||||||
AUDIO_FEATURE_ENABLED_COMPRESS_VOIP := true
|
|
||||||
AUDIO_FEATURE_ENABLED_EXTN_FORMATS := true
|
|
||||||
AUDIO_FEATURE_ENABLED_EXTN_POST_PROC := true
|
|
||||||
AUDIO_FEATURE_ENABLED_FLUENCE := true
|
|
||||||
AUDIO_FEATURE_ENABLED_FM_POWER_OPT := true
|
|
||||||
AUDIO_FEATURE_ENABLED_HFP := true
|
|
||||||
AUDIO_FEATURE_ENABLED_PROXY_DEVICE := true
|
|
||||||
AUDIO_FEATURE_ENABLED_LOW_LATENCY_CAPTURE := true
|
AUDIO_FEATURE_ENABLED_LOW_LATENCY_CAPTURE := true
|
||||||
BOARD_USES_ALSA_AUDIO := true
|
BOARD_USES_ALSA_AUDIO := true
|
||||||
|
|
||||||
|
@ -46,30 +32,22 @@ TARGET_USES_64_BIT_BINDER := true
|
||||||
|
|
||||||
# Bluetooth
|
# Bluetooth
|
||||||
BOARD_HAVE_BLUETOOTH := true
|
BOARD_HAVE_BLUETOOTH := true
|
||||||
BOARD_HAVE_BLUETOOTH_QCOM := true
|
|
||||||
BLUETOOTH_HCI_USE_MCT := true
|
|
||||||
|
|
||||||
# Bootloader
|
|
||||||
TARGET_BOOTLOADER_BOARD_NAME := MSM8226
|
|
||||||
|
|
||||||
# Camera
|
# Camera
|
||||||
TARGET_PROVIDES_CAMERA_HAL := true
|
|
||||||
USE_DEVICE_SPECIFIC_CAMERA := true
|
|
||||||
TARGET_USE_COMPAT_GRALLOC_ALIGN := true
|
|
||||||
TARGET_HAS_LEGACY_CAMERA_HAL1 := true
|
TARGET_HAS_LEGACY_CAMERA_HAL1 := true
|
||||||
TARGET_NEEDS_LEGACY_CAMERA_HAL1_DYN_NATIVE_HANDLE := true
|
TARGET_NEEDS_LEGACY_CAMERA_HAL1_DYN_NATIVE_HANDLE := true
|
||||||
TARGET_USES_MEDIA_EXTENSIONS := true
|
TARGET_USES_MEDIA_EXTENSIONS := true
|
||||||
|
|
||||||
# Charger
|
# Charger
|
||||||
BOARD_CHARGING_MODE_BOOTING_LPM := "/sys/class/power_supply/battery/batt_lp_charging"
|
|
||||||
BOARD_BATTERY_DEVICE_NAME := "battery"
|
BOARD_BATTERY_DEVICE_NAME := "battery"
|
||||||
BOARD_CHARGING_CMDLINE_NAME := "androidboot.mode"
|
BOARD_CHARGING_CMDLINE_NAME := "androidboot.mode"
|
||||||
BOARD_CHARGING_CMDLINE_VALUE := "charger"
|
BOARD_CHARGING_CMDLINE_VALUE := "charger"
|
||||||
BOARD_CHARGER_DISABLE_INIT_BLANK := true
|
BOARD_CHARGER_SHOW_PERCENTAGE := true
|
||||||
|
BOARD_CHARGER_ENABLE_SUSPEND := true
|
||||||
WITH_LINEAGE_CHARGER := false
|
WITH_LINEAGE_CHARGER := false
|
||||||
|
|
||||||
# Custom RIL class
|
# LineageHW
|
||||||
BOARD_RIL_CLASS := ../../../$(VENDOR_PATH)/ril
|
BOARD_HARDWARE_CLASS += device/samsung/msm8226-common/lineagehw
|
||||||
|
|
||||||
# Dexpreopt
|
# Dexpreopt
|
||||||
ifeq ($(HOST_OS),linux)
|
ifeq ($(HOST_OS),linux)
|
||||||
|
@ -79,11 +57,14 @@ ifeq ($(HOST_OS),linux)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
WITH_DEXPREOPT_DEBUG_INFO := false
|
||||||
|
USE_DEX2OAT_DEBUG := false
|
||||||
|
DONT_DEXPREOPT_PREBUILTS := true
|
||||||
|
|
||||||
# Display
|
# Display
|
||||||
NUM_FRAMEBUFFER_SURFACE_BUFFERS := 3
|
NUM_FRAMEBUFFER_SURFACE_BUFFERS := 3
|
||||||
OVERRIDE_RS_DRIVER := libRSDriver_adreno.so
|
OVERRIDE_RS_DRIVER := libRSDriver_adreno.so
|
||||||
TARGET_USES_C2D_COMPOSITION := true
|
TARGET_USES_C2D_COMPOSITION := true
|
||||||
TARGET_ADDITIONAL_GRALLOC_10_USAGE_BITS := 0x02000000U
|
|
||||||
TARGET_USES_ION := true
|
TARGET_USES_ION := true
|
||||||
|
|
||||||
# Shader cache config options
|
# Shader cache config options
|
||||||
|
@ -96,19 +77,9 @@ MAX_EGL_CACHE_KEY_SIZE := 12*1024
|
||||||
# of the device.
|
# of the device.
|
||||||
MAX_EGL_CACHE_SIZE := 2048*1024
|
MAX_EGL_CACHE_SIZE := 2048*1024
|
||||||
|
|
||||||
# Extended Filesystem Support
|
|
||||||
TARGET_KERNEL_HAVE_EXFAT := true
|
|
||||||
|
|
||||||
# Filesystem
|
# Filesystem
|
||||||
TARGET_FS_CONFIG_GEN := device/samsung/msm8226-common/config.fs
|
TARGET_FS_CONFIG_GEN := device/samsung/msm8226-common/config.fs
|
||||||
|
|
||||||
# Fonts
|
|
||||||
EXTENDED_FONT_FOOTPRINT := true
|
|
||||||
|
|
||||||
# Healthd
|
|
||||||
BOARD_HAL_STATIC_LIBRARIES := libhealthd.msm8226
|
|
||||||
BOARD_HEALTHD_CUSTOM_CHARGER_RES := device/samsung/msm8226-common/libhealthd/images
|
|
||||||
|
|
||||||
# HIDL
|
# HIDL
|
||||||
DEVICE_MANIFEST_FILE := device/samsung/msm8226-common/manifest.xml
|
DEVICE_MANIFEST_FILE := device/samsung/msm8226-common/manifest.xml
|
||||||
DEVICE_MATRIX_FILE := device/samsung/msm8226-common/compatibility_matrix.xml
|
DEVICE_MATRIX_FILE := device/samsung/msm8226-common/compatibility_matrix.xml
|
||||||
|
@ -116,47 +87,31 @@ DEVICE_MATRIX_FILE := device/samsung/msm8226-common/compatibility_matrix.xml
|
||||||
# SELinux
|
# SELinux
|
||||||
include device/samsung/msm8226-common/sepolicy/sepolicy.mk
|
include device/samsung/msm8226-common/sepolicy/sepolicy.mk
|
||||||
|
|
||||||
|
# Shims
|
||||||
|
TARGET_LD_SHIM_LIBS += \
|
||||||
|
/system/lib/libcrypto.so|libboringssl-compat.so
|
||||||
|
|
||||||
# Init
|
# Init
|
||||||
TARGET_INIT_VENDOR_LIB := libinit_msm
|
TARGET_INIT_VENDOR_LIB := libinit_msm8226
|
||||||
|
TARGET_RECOVERY_DEVICE_MODULES := libinit_msm8226
|
||||||
|
|
||||||
# Legacy blobs support
|
# Partitions
|
||||||
TARGET_NEEDS_PLATFORM_TEXT_RELOCATIONS := true
|
|
||||||
|
|
||||||
# LineageHW
|
|
||||||
BOARD_HARDWARE_CLASS += device/samsung/msm8226-common/lineagehw
|
|
||||||
|
|
||||||
# Memory
|
|
||||||
MALLOC_SVELTE := true
|
|
||||||
|
|
||||||
# Partitions and Vold
|
|
||||||
BOARD_VOLD_EMMC_SHARES_DEV_MAJOR := true
|
|
||||||
TARGET_USERIMAGES_USE_EXT4 := true
|
TARGET_USERIMAGES_USE_EXT4 := true
|
||||||
TARGET_USE_CUSTOM_LUN_FILE_PATH := /sys/devices/platform/msm_hsusb/gadget/lun%d/file
|
TARGET_USERIMAGES_USE_F2FS := true
|
||||||
|
BOARD_VOLD_EMMC_SHARES_DEV_MAJOR := true
|
||||||
# Platform
|
|
||||||
TARGET_BOARD_PLATFORM := msm8226
|
|
||||||
TARGET_BOARD_PLATFORM_GPU := qcom-adreno305
|
|
||||||
USE_CLANG_PLATFORM_BUILD := true
|
|
||||||
|
|
||||||
# Properties (reset them here, include more in device if needed)
|
|
||||||
TARGET_SYSTEM_PROP := $(VENDOR_PATH)/system.prop
|
|
||||||
|
|
||||||
# Power
|
# Power
|
||||||
TARGET_HAS_LEGACY_POWER_STATS := true
|
TARGET_HAS_LEGACY_POWER_STATS := true
|
||||||
TARGET_HAS_NO_WIFI_STATS := true
|
TARGET_HAS_NO_WIFI_STATS := true
|
||||||
TARGET_USES_INTERACTION_BOOST := true
|
TARGET_USES_INTERACTION_BOOST := true
|
||||||
|
|
||||||
# Shims
|
|
||||||
TARGET_LD_SHIM_LIBS += \
|
|
||||||
/system/lib/libcrypto.so|libboringssl-compat.so
|
|
||||||
|
|
||||||
# Time services
|
# Time services
|
||||||
BOARD_USES_QC_TIME_SERVICES := true
|
BOARD_USES_QC_TIME_SERVICES := true
|
||||||
|
|
||||||
# Wifi
|
# Wifi
|
||||||
|
BOARD_WLAN_DEVICE := qcwcn
|
||||||
BOARD_HAS_QCOM_WLAN := true
|
BOARD_HAS_QCOM_WLAN := true
|
||||||
BOARD_HAS_QCOM_WLAN_SDK := true
|
BOARD_HAS_QCOM_WLAN_SDK := true
|
||||||
BOARD_WLAN_DEVICE := qcwcn
|
|
||||||
BOARD_HOSTAPD_DRIVER := NL80211
|
BOARD_HOSTAPD_DRIVER := NL80211
|
||||||
BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE)
|
BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE)
|
||||||
BOARD_WPA_SUPPLICANT_DRIVER := NL80211
|
BOARD_WPA_SUPPLICANT_DRIVER := NL80211
|
||||||
|
|
3
README
Normal file
3
README
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
Copyright 2012 - The CyanogenMod Project
|
||||||
|
|
||||||
|
Common Samsung 8226 repository
|
|
@ -1,5 +1,3 @@
|
||||||
ifeq ($(TARGET_PROVIDES_CAMERA_HAL),true)
|
|
||||||
|
|
||||||
LOCAL_PATH := $(call my-dir)
|
LOCAL_PATH := $(call my-dir)
|
||||||
include $(CLEAR_VARS)
|
include $(CLEAR_VARS)
|
||||||
|
|
||||||
|
@ -9,14 +7,11 @@ LOCAL_C_INCLUDES := \
|
||||||
LOCAL_SRC_FILES := \
|
LOCAL_SRC_FILES := \
|
||||||
CameraWrapper.cpp
|
CameraWrapper.cpp
|
||||||
|
|
||||||
|
LOCAL_STATIC_LIBRARIES := libbase libarect
|
||||||
LOCAL_SHARED_LIBRARIES := \
|
LOCAL_SHARED_LIBRARIES := \
|
||||||
libhardware liblog libcamera_client libutils libcutils libdl libgui libhidltransport libsensor \
|
libhardware liblog libcamera_client libutils libcutils libdl libgui libhidltransport libsensor \
|
||||||
android.hidl.token@1.0-utils \
|
android.hidl.token@1.0-utils \
|
||||||
android.hardware.graphics.bufferqueue@1.0
|
android.hardware.graphics.bufferqueue@1.0
|
||||||
|
|
||||||
LOCAL_STATIC_LIBRARIES := \
|
|
||||||
libbase \
|
|
||||||
libarect
|
|
||||||
|
|
||||||
LOCAL_HEADER_LIBRARIES := libnativebase_headers
|
LOCAL_HEADER_LIBRARIES := libnativebase_headers
|
||||||
|
|
||||||
|
@ -26,5 +21,3 @@ LOCAL_MODULE_TAGS := optional
|
||||||
LOCAL_PROPRIETARY_MODULE := true
|
LOCAL_PROPRIETARY_MODULE := true
|
||||||
|
|
||||||
include $(BUILD_SHARED_LIBRARY)
|
include $(BUILD_SHARED_LIBRARY)
|
||||||
|
|
||||||
endif
|
|
||||||
|
|
|
@ -27,12 +27,12 @@
|
||||||
#define LOG_TAG "CameraWrapper"
|
#define LOG_TAG "CameraWrapper"
|
||||||
#include <cutils/log.h>
|
#include <cutils/log.h>
|
||||||
|
|
||||||
|
#include <utils/threads.h>
|
||||||
|
#include <utils/String8.h>
|
||||||
|
#include <hardware/hardware.h>
|
||||||
|
#include <hardware/camera.h>
|
||||||
#include <camera/Camera.h>
|
#include <camera/Camera.h>
|
||||||
#include <camera/CameraParameters.h>
|
#include <camera/CameraParameters.h>
|
||||||
#include <hardware/camera.h>
|
|
||||||
#include <hardware/hardware.h>
|
|
||||||
#include <utils/String8.h>
|
|
||||||
#include <utils/threads.h>
|
|
||||||
|
|
||||||
#define BACK_CAMERA_ID 0
|
#define BACK_CAMERA_ID 0
|
||||||
#define FRONT_CAMERA_ID 1
|
#define FRONT_CAMERA_ID 1
|
||||||
|
@ -76,7 +76,7 @@ camera_module_t HAL_MODULE_INFO_SYM = {
|
||||||
.hal_api_version = HARDWARE_HAL_API_VERSION,
|
.hal_api_version = HARDWARE_HAL_API_VERSION,
|
||||||
.id = CAMERA_HARDWARE_MODULE_ID,
|
.id = CAMERA_HARDWARE_MODULE_ID,
|
||||||
.name = "Samsung msm8226 Camera Wrapper",
|
.name = "Samsung msm8226 Camera Wrapper",
|
||||||
.author = "The LineageOS Project",
|
.author = "The CyanogenMod Project",
|
||||||
.methods = &camera_module_methods,
|
.methods = &camera_module_methods,
|
||||||
.dso = NULL, /* remove compilation warnings */
|
.dso = NULL, /* remove compilation warnings */
|
||||||
.reserved = {0}, /* remove compilation warnings */
|
.reserved = {0}, /* remove compilation warnings */
|
||||||
|
@ -264,8 +264,9 @@ static void camera_set_callbacks(struct camera_device* device, camera_notify_cal
|
||||||
ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device,
|
ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device,
|
||||||
(uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
|
(uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
|
||||||
|
|
||||||
VENDOR_CALL(device, set_callbacks, camera_notify_cb, camera_data_cb,camera_data_cb_timestamp, camera_get_memory, user);
|
VENDOR_CALL(device, set_callbacks, camera_notify_cb, camera_data_cb,
|
||||||
|
camera_data_cb_timestamp, camera_get_memory, user);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void camera_enable_msg_type(struct camera_device* device, int32_t msg_type) {
|
static void camera_enable_msg_type(struct camera_device* device, int32_t msg_type) {
|
||||||
|
@ -474,13 +475,14 @@ static int camera_send_command(struct camera_device* device, int32_t cmd, int32_
|
||||||
|
|
||||||
static void camera_release(struct camera_device* device) {
|
static void camera_release(struct camera_device* device) {
|
||||||
wrapper_camera_device_t* wrapper_dev = NULL;
|
wrapper_camera_device_t* wrapper_dev = NULL;
|
||||||
|
|
||||||
if (!device) return;
|
if (!device) return;
|
||||||
|
|
||||||
wrapper_dev = (wrapper_camera_device_t*) device;
|
wrapper_dev = (wrapper_camera_device_t*) device;
|
||||||
|
|
||||||
|
|
||||||
ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device,
|
ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device,
|
||||||
(uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
|
(uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
|
||||||
|
|
||||||
VENDOR_CALL(device, release);
|
VENDOR_CALL(device, release);
|
||||||
|
|
||||||
|
@ -590,7 +592,7 @@ static int camera_device_open(const hw_module_t* module, const char* name, hw_de
|
||||||
memset(camera_device, 0, sizeof(*camera_device));
|
memset(camera_device, 0, sizeof(*camera_device));
|
||||||
camera_device->camera_released = false;
|
camera_device->camera_released = false;
|
||||||
camera_device->id = cameraid;
|
camera_device->id = cameraid;
|
||||||
|
|
||||||
int retries = OPEN_RETRIES;
|
int retries = OPEN_RETRIES;
|
||||||
bool retry;
|
bool retry;
|
||||||
do {
|
do {
|
||||||
|
@ -605,6 +607,7 @@ static int camera_device_open(const hw_module_t* module, const char* name, hw_de
|
||||||
ALOGE("vendor camera open fail");
|
ALOGE("vendor camera open fail");
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
ALOGV("%s: got vendor camera device 0x%08X", __FUNCTION__,
|
ALOGV("%s: got vendor camera device 0x%08X", __FUNCTION__,
|
||||||
(uintptr_t)(camera_device->vendor));
|
(uintptr_t)(camera_device->vendor));
|
||||||
|
|
||||||
|
|
|
@ -239,6 +239,5 @@
|
||||||
<Limit name="concurrent-instances" max="3" />
|
<Limit name="concurrent-instances" max="3" />
|
||||||
</MediaCodec>
|
</MediaCodec>
|
||||||
</Decoders>
|
</Decoders>
|
||||||
<Include href="media_codecs_google_video_le.xml" />
|
<Include href="media_codecs_google_video.xml" />
|
||||||
<Include href="media_codecs_ffmpeg.xml" />
|
|
||||||
</MediaCodecs>
|
</MediaCodecs>
|
||||||
|
|
1043
configs/wifi/hostapd_default.conf
Normal file
1043
configs/wifi/hostapd_default.conf
Normal file
File diff suppressed because it is too large
Load diff
10
configs/wifi/p2p_supplicant_overlay.conf
Normal file
10
configs/wifi/p2p_supplicant_overlay.conf
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
disable_scan_offload=1
|
||||||
|
p2p_listen_reg_class=81
|
||||||
|
p2p_listen_channel=1
|
||||||
|
p2p_oper_reg_class=124
|
||||||
|
p2p_oper_channel=149
|
||||||
|
manufacturer=SAMSUNG_ELECTRONICS
|
||||||
|
model_name=SAMSUNG_MOBILE
|
||||||
|
model_number=2014
|
||||||
|
serial_number=19691101
|
||||||
|
update_config=1
|
4
configs/wifi/wpa_supplicant_overlay.conf
Normal file
4
configs/wifi/wpa_supplicant_overlay.conf
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
disable_scan_offload=1
|
||||||
|
p2p_disabled=1
|
||||||
|
update_config=1
|
||||||
|
p2p_no_group_iface=1
|
|
@ -23,7 +23,7 @@ if [[ ! -d "$MY_DIR" ]]; then MY_DIR="$PWD"; fi
|
||||||
|
|
||||||
# Override anything that may come from the calling environment
|
# Override anything that may come from the calling environment
|
||||||
CM_ROOT="$MY_DIR"/../../..
|
CM_ROOT="$MY_DIR"/../../..
|
||||||
BOARD=msm8974
|
BOARD=msm8226
|
||||||
DEVICE_COMMON=${BOARD}-common
|
DEVICE_COMMON=${BOARD}-common
|
||||||
VENDOR=samsung
|
VENDOR=samsung
|
||||||
|
|
||||||
|
|
|
@ -378,6 +378,7 @@ enum loc_api_adapter_event_index {
|
||||||
LOC_API_ADAPTER_GDT_UPLOAD_END_REQ, // GDT upload end request
|
LOC_API_ADAPTER_GDT_UPLOAD_END_REQ, // GDT upload end request
|
||||||
LOC_API_ADAPTER_GNSS_MEASUREMENT, // GNSS Measurement report
|
LOC_API_ADAPTER_GNSS_MEASUREMENT, // GNSS Measurement report
|
||||||
LOC_API_ADAPTER_REQUEST_TIMEZONE, // Timezone injection request
|
LOC_API_ADAPTER_REQUEST_TIMEZONE, // Timezone injection request
|
||||||
|
LOC_API_ADAPTER_REPORT_GENFENCE_DWELL_REPORT, // Geofence dwell report
|
||||||
LOC_API_ADAPTER_EVENT_MAX
|
LOC_API_ADAPTER_EVENT_MAX
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -407,6 +408,7 @@ enum loc_api_adapter_event_index {
|
||||||
#define LOC_API_ADAPTER_BIT_GDT_UPLOAD_END_REQ (1<<LOC_API_ADAPTER_GDT_UPLOAD_END_REQ)
|
#define LOC_API_ADAPTER_BIT_GDT_UPLOAD_END_REQ (1<<LOC_API_ADAPTER_GDT_UPLOAD_END_REQ)
|
||||||
#define LOC_API_ADAPTER_BIT_GNSS_MEASUREMENT (1<<LOC_API_ADAPTER_GNSS_MEASUREMENT)
|
#define LOC_API_ADAPTER_BIT_GNSS_MEASUREMENT (1<<LOC_API_ADAPTER_GNSS_MEASUREMENT)
|
||||||
#define LOC_API_ADAPTER_BIT_REQUEST_TIMEZONE (1<<LOC_API_ADAPTER_REQUEST_TIMEZONE)
|
#define LOC_API_ADAPTER_BIT_REQUEST_TIMEZONE (1<<LOC_API_ADAPTER_REQUEST_TIMEZONE)
|
||||||
|
#define LOC_API_ADAPTER_BIT_REPORT_GENFENCE_DWELL (1<<LOC_API_ADAPTER_REPORT_GENFENCE_DWELL_REPORT)
|
||||||
|
|
||||||
typedef unsigned int LOC_API_ADAPTER_EVENT_MASK_T;
|
typedef unsigned int LOC_API_ADAPTER_EVENT_MASK_T;
|
||||||
|
|
||||||
|
@ -416,6 +418,7 @@ typedef enum loc_api_adapter_msg_to_check_supported {
|
||||||
LOC_API_ADAPTER_MESSAGE_DISTANCE_BASE_TRACKING, // DBT 2.0
|
LOC_API_ADAPTER_MESSAGE_DISTANCE_BASE_TRACKING, // DBT 2.0
|
||||||
LOC_API_ADAPTER_MESSAGE_ADAPTIVE_LOCATION_BATCHING, // Batching 1.5
|
LOC_API_ADAPTER_MESSAGE_ADAPTIVE_LOCATION_BATCHING, // Batching 1.5
|
||||||
LOC_API_ADAPTER_MESSAGE_DISTANCE_BASE_LOCATION_BATCHING, // Batching 2.0
|
LOC_API_ADAPTER_MESSAGE_DISTANCE_BASE_LOCATION_BATCHING, // Batching 2.0
|
||||||
|
LOC_API_ADAPTER_MESSAGE_UPDATE_TBF_ON_THE_FLY, // Updating Tracking TBF On The Fly
|
||||||
|
|
||||||
LOC_API_ADAPTER_MESSAGE_MAX
|
LOC_API_ADAPTER_MESSAGE_MAX
|
||||||
} LocCheckingMessagesID;
|
} LocCheckingMessagesID;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved.
|
/* Copyright (c) 2011-2015, The Linux Foundation. All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are
|
* modification, are permitted provided that the following conditions are
|
||||||
|
@ -49,7 +49,7 @@ void LocPosMode::logv() const
|
||||||
}
|
}
|
||||||
|
|
||||||
/* GPS status names */
|
/* GPS status names */
|
||||||
static loc_name_val_s_type gps_status_name[] =
|
static const loc_name_val_s_type gps_status_name[] =
|
||||||
{
|
{
|
||||||
NAME_VAL( GPS_STATUS_NONE ),
|
NAME_VAL( GPS_STATUS_NONE ),
|
||||||
NAME_VAL( GPS_STATUS_SESSION_BEGIN ),
|
NAME_VAL( GPS_STATUS_SESSION_BEGIN ),
|
||||||
|
@ -57,7 +57,7 @@ static loc_name_val_s_type gps_status_name[] =
|
||||||
NAME_VAL( GPS_STATUS_ENGINE_ON ),
|
NAME_VAL( GPS_STATUS_ENGINE_ON ),
|
||||||
NAME_VAL( GPS_STATUS_ENGINE_OFF ),
|
NAME_VAL( GPS_STATUS_ENGINE_OFF ),
|
||||||
};
|
};
|
||||||
static int gps_status_num = sizeof(gps_status_name) / sizeof(loc_name_val_s_type);
|
static const int gps_status_num = sizeof(gps_status_name) / sizeof(loc_name_val_s_type);
|
||||||
|
|
||||||
/* Find Android GPS status name */
|
/* Find Android GPS status name */
|
||||||
const char* loc_get_gps_status_name(GpsStatusValue gps_status)
|
const char* loc_get_gps_status_name(GpsStatusValue gps_status)
|
||||||
|
@ -68,7 +68,7 @@ const char* loc_get_gps_status_name(GpsStatusValue gps_status)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static loc_name_val_s_type loc_eng_position_modes[] =
|
static const loc_name_val_s_type loc_eng_position_modes[] =
|
||||||
{
|
{
|
||||||
NAME_VAL( LOC_POSITION_MODE_STANDALONE ),
|
NAME_VAL( LOC_POSITION_MODE_STANDALONE ),
|
||||||
NAME_VAL( LOC_POSITION_MODE_MS_BASED ),
|
NAME_VAL( LOC_POSITION_MODE_MS_BASED ),
|
||||||
|
@ -79,7 +79,7 @@ static loc_name_val_s_type loc_eng_position_modes[] =
|
||||||
NAME_VAL( LOC_POSITION_MODE_RESERVED_4 ),
|
NAME_VAL( LOC_POSITION_MODE_RESERVED_4 ),
|
||||||
NAME_VAL( LOC_POSITION_MODE_RESERVED_5 )
|
NAME_VAL( LOC_POSITION_MODE_RESERVED_5 )
|
||||||
};
|
};
|
||||||
static int loc_eng_position_mode_num = sizeof(loc_eng_position_modes) / sizeof(loc_name_val_s_type);
|
static const int loc_eng_position_mode_num = sizeof(loc_eng_position_modes) / sizeof(loc_name_val_s_type);
|
||||||
|
|
||||||
const char* loc_get_position_mode_name(GpsPositionMode mode)
|
const char* loc_get_position_mode_name(GpsPositionMode mode)
|
||||||
{
|
{
|
||||||
|
@ -88,12 +88,12 @@ const char* loc_get_position_mode_name(GpsPositionMode mode)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static loc_name_val_s_type loc_eng_position_recurrences[] =
|
static const loc_name_val_s_type loc_eng_position_recurrences[] =
|
||||||
{
|
{
|
||||||
NAME_VAL( GPS_POSITION_RECURRENCE_PERIODIC ),
|
NAME_VAL( GPS_POSITION_RECURRENCE_PERIODIC ),
|
||||||
NAME_VAL( GPS_POSITION_RECURRENCE_SINGLE )
|
NAME_VAL( GPS_POSITION_RECURRENCE_SINGLE )
|
||||||
};
|
};
|
||||||
static int loc_eng_position_recurrence_num = sizeof(loc_eng_position_recurrences) / sizeof(loc_name_val_s_type);
|
static const int loc_eng_position_recurrence_num = sizeof(loc_eng_position_recurrences) / sizeof(loc_name_val_s_type);
|
||||||
|
|
||||||
const char* loc_get_position_recurrence_name(GpsPositionRecurrence recur)
|
const char* loc_get_position_recurrence_name(GpsPositionRecurrence recur)
|
||||||
{
|
{
|
||||||
|
@ -102,7 +102,7 @@ const char* loc_get_position_recurrence_name(GpsPositionRecurrence recur)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static loc_name_val_s_type loc_eng_aiding_data_bits[] =
|
static const loc_name_val_s_type loc_eng_aiding_data_bits[] =
|
||||||
{
|
{
|
||||||
NAME_VAL( GPS_DELETE_EPHEMERIS ),
|
NAME_VAL( GPS_DELETE_EPHEMERIS ),
|
||||||
NAME_VAL( GPS_DELETE_ALMANAC ),
|
NAME_VAL( GPS_DELETE_ALMANAC ),
|
||||||
|
@ -118,7 +118,7 @@ static loc_name_val_s_type loc_eng_aiding_data_bits[] =
|
||||||
NAME_VAL( GPS_DELETE_CELLDB_INFO ),
|
NAME_VAL( GPS_DELETE_CELLDB_INFO ),
|
||||||
NAME_VAL( GPS_DELETE_ALL)
|
NAME_VAL( GPS_DELETE_ALL)
|
||||||
};
|
};
|
||||||
static int loc_eng_aiding_data_bit_num = sizeof(loc_eng_aiding_data_bits) / sizeof(loc_name_val_s_type);
|
static const int loc_eng_aiding_data_bit_num = sizeof(loc_eng_aiding_data_bits) / sizeof(loc_name_val_s_type);
|
||||||
|
|
||||||
const char* loc_get_aiding_data_mask_names(GpsAidingData data)
|
const char* loc_get_aiding_data_mask_names(GpsAidingData data)
|
||||||
{
|
{
|
||||||
|
@ -126,7 +126,7 @@ const char* loc_get_aiding_data_mask_names(GpsAidingData data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static loc_name_val_s_type loc_eng_agps_types[] =
|
static const loc_name_val_s_type loc_eng_agps_types[] =
|
||||||
{
|
{
|
||||||
NAME_VAL( AGPS_TYPE_INVALID ),
|
NAME_VAL( AGPS_TYPE_INVALID ),
|
||||||
NAME_VAL( AGPS_TYPE_ANY ),
|
NAME_VAL( AGPS_TYPE_ANY ),
|
||||||
|
@ -134,7 +134,7 @@ static loc_name_val_s_type loc_eng_agps_types[] =
|
||||||
NAME_VAL( AGPS_TYPE_C2K ),
|
NAME_VAL( AGPS_TYPE_C2K ),
|
||||||
NAME_VAL( AGPS_TYPE_WWAN_ANY )
|
NAME_VAL( AGPS_TYPE_WWAN_ANY )
|
||||||
};
|
};
|
||||||
static int loc_eng_agps_type_num = sizeof(loc_eng_agps_types) / sizeof(loc_name_val_s_type);
|
static const int loc_eng_agps_type_num = sizeof(loc_eng_agps_types) / sizeof(loc_name_val_s_type);
|
||||||
|
|
||||||
const char* loc_get_agps_type_name(AGpsType type)
|
const char* loc_get_agps_type_name(AGpsType type)
|
||||||
{
|
{
|
||||||
|
@ -142,14 +142,14 @@ const char* loc_get_agps_type_name(AGpsType type)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static loc_name_val_s_type loc_eng_ni_types[] =
|
static const loc_name_val_s_type loc_eng_ni_types[] =
|
||||||
{
|
{
|
||||||
NAME_VAL( GPS_NI_TYPE_VOICE ),
|
NAME_VAL( GPS_NI_TYPE_VOICE ),
|
||||||
NAME_VAL( GPS_NI_TYPE_UMTS_SUPL ),
|
NAME_VAL( GPS_NI_TYPE_UMTS_SUPL ),
|
||||||
NAME_VAL( GPS_NI_TYPE_UMTS_CTRL_PLANE ),
|
NAME_VAL( GPS_NI_TYPE_UMTS_CTRL_PLANE ),
|
||||||
NAME_VAL( GPS_NI_TYPE_EMERGENCY_SUPL )
|
NAME_VAL( GPS_NI_TYPE_EMERGENCY_SUPL )
|
||||||
};
|
};
|
||||||
static int loc_eng_ni_type_num = sizeof(loc_eng_ni_types) / sizeof(loc_name_val_s_type);
|
static const int loc_eng_ni_type_num = sizeof(loc_eng_ni_types) / sizeof(loc_name_val_s_type);
|
||||||
|
|
||||||
const char* loc_get_ni_type_name(GpsNiType type)
|
const char* loc_get_ni_type_name(GpsNiType type)
|
||||||
{
|
{
|
||||||
|
@ -157,13 +157,13 @@ const char* loc_get_ni_type_name(GpsNiType type)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static loc_name_val_s_type loc_eng_ni_responses[] =
|
static const loc_name_val_s_type loc_eng_ni_responses[] =
|
||||||
{
|
{
|
||||||
NAME_VAL( GPS_NI_RESPONSE_ACCEPT ),
|
NAME_VAL( GPS_NI_RESPONSE_ACCEPT ),
|
||||||
NAME_VAL( GPS_NI_RESPONSE_DENY ),
|
NAME_VAL( GPS_NI_RESPONSE_DENY ),
|
||||||
NAME_VAL( GPS_NI_RESPONSE_DENY )
|
NAME_VAL( GPS_NI_RESPONSE_DENY )
|
||||||
};
|
};
|
||||||
static int loc_eng_ni_reponse_num = sizeof(loc_eng_ni_responses) / sizeof(loc_name_val_s_type);
|
static const int loc_eng_ni_reponse_num = sizeof(loc_eng_ni_responses) / sizeof(loc_name_val_s_type);
|
||||||
|
|
||||||
const char* loc_get_ni_response_name(GpsUserResponseType response)
|
const char* loc_get_ni_response_name(GpsUserResponseType response)
|
||||||
{
|
{
|
||||||
|
@ -171,7 +171,7 @@ const char* loc_get_ni_response_name(GpsUserResponseType response)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static loc_name_val_s_type loc_eng_ni_encodings[] =
|
static const loc_name_val_s_type loc_eng_ni_encodings[] =
|
||||||
{
|
{
|
||||||
NAME_VAL( GPS_ENC_NONE ),
|
NAME_VAL( GPS_ENC_NONE ),
|
||||||
NAME_VAL( GPS_ENC_SUPL_GSM_DEFAULT ),
|
NAME_VAL( GPS_ENC_SUPL_GSM_DEFAULT ),
|
||||||
|
@ -179,55 +179,55 @@ static loc_name_val_s_type loc_eng_ni_encodings[] =
|
||||||
NAME_VAL( GPS_ENC_SUPL_UCS2 ),
|
NAME_VAL( GPS_ENC_SUPL_UCS2 ),
|
||||||
NAME_VAL( GPS_ENC_UNKNOWN )
|
NAME_VAL( GPS_ENC_UNKNOWN )
|
||||||
};
|
};
|
||||||
static int loc_eng_ni_encoding_num = sizeof(loc_eng_ni_encodings) / sizeof(loc_name_val_s_type);
|
static const int loc_eng_ni_encoding_num = sizeof(loc_eng_ni_encodings) / sizeof(loc_name_val_s_type);
|
||||||
|
|
||||||
const char* loc_get_ni_encoding_name(GpsNiEncodingType encoding)
|
const char* loc_get_ni_encoding_name(GpsNiEncodingType encoding)
|
||||||
{
|
{
|
||||||
return loc_get_name_from_val(loc_eng_ni_encodings, loc_eng_ni_encoding_num, (long) encoding);
|
return loc_get_name_from_val(loc_eng_ni_encodings, loc_eng_ni_encoding_num, (long) encoding);
|
||||||
}
|
}
|
||||||
|
|
||||||
static loc_name_val_s_type loc_eng_agps_bears[] =
|
static const loc_name_val_s_type loc_eng_agps_bears[] =
|
||||||
{
|
{
|
||||||
NAME_VAL( AGPS_APN_BEARER_INVALID ),
|
NAME_VAL( AGPS_APN_BEARER_INVALID ),
|
||||||
NAME_VAL( AGPS_APN_BEARER_IPV4 ),
|
NAME_VAL( AGPS_APN_BEARER_IPV4 ),
|
||||||
NAME_VAL( AGPS_APN_BEARER_IPV6 ),
|
NAME_VAL( AGPS_APN_BEARER_IPV6 ),
|
||||||
NAME_VAL( AGPS_APN_BEARER_IPV4V6 )
|
NAME_VAL( AGPS_APN_BEARER_IPV4V6 )
|
||||||
};
|
};
|
||||||
static int loc_eng_agps_bears_num = sizeof(loc_eng_agps_bears) / sizeof(loc_name_val_s_type);
|
static const int loc_eng_agps_bears_num = sizeof(loc_eng_agps_bears) / sizeof(loc_name_val_s_type);
|
||||||
|
|
||||||
const char* loc_get_agps_bear_name(AGpsBearerType bearer)
|
const char* loc_get_agps_bear_name(AGpsBearerType bearer)
|
||||||
{
|
{
|
||||||
return loc_get_name_from_val(loc_eng_agps_bears, loc_eng_agps_bears_num, (long) bearer);
|
return loc_get_name_from_val(loc_eng_agps_bears, loc_eng_agps_bears_num, (long) bearer);
|
||||||
}
|
}
|
||||||
|
|
||||||
static loc_name_val_s_type loc_eng_server_types[] =
|
static const loc_name_val_s_type loc_eng_server_types[] =
|
||||||
{
|
{
|
||||||
NAME_VAL( LOC_AGPS_CDMA_PDE_SERVER ),
|
NAME_VAL( LOC_AGPS_CDMA_PDE_SERVER ),
|
||||||
NAME_VAL( LOC_AGPS_CUSTOM_PDE_SERVER ),
|
NAME_VAL( LOC_AGPS_CUSTOM_PDE_SERVER ),
|
||||||
NAME_VAL( LOC_AGPS_MPC_SERVER ),
|
NAME_VAL( LOC_AGPS_MPC_SERVER ),
|
||||||
NAME_VAL( LOC_AGPS_SUPL_SERVER )
|
NAME_VAL( LOC_AGPS_SUPL_SERVER )
|
||||||
};
|
};
|
||||||
static int loc_eng_server_types_num = sizeof(loc_eng_server_types) / sizeof(loc_name_val_s_type);
|
static const int loc_eng_server_types_num = sizeof(loc_eng_server_types) / sizeof(loc_name_val_s_type);
|
||||||
|
|
||||||
const char* loc_get_server_type_name(LocServerType type)
|
const char* loc_get_server_type_name(LocServerType type)
|
||||||
{
|
{
|
||||||
return loc_get_name_from_val(loc_eng_server_types, loc_eng_server_types_num, (long) type);
|
return loc_get_name_from_val(loc_eng_server_types, loc_eng_server_types_num, (long) type);
|
||||||
}
|
}
|
||||||
|
|
||||||
static loc_name_val_s_type loc_eng_position_sess_status_types[] =
|
static const loc_name_val_s_type loc_eng_position_sess_status_types[] =
|
||||||
{
|
{
|
||||||
NAME_VAL( LOC_SESS_SUCCESS ),
|
NAME_VAL( LOC_SESS_SUCCESS ),
|
||||||
NAME_VAL( LOC_SESS_INTERMEDIATE ),
|
NAME_VAL( LOC_SESS_INTERMEDIATE ),
|
||||||
NAME_VAL( LOC_SESS_FAILURE )
|
NAME_VAL( LOC_SESS_FAILURE )
|
||||||
};
|
};
|
||||||
static int loc_eng_position_sess_status_num = sizeof(loc_eng_position_sess_status_types) / sizeof(loc_name_val_s_type);
|
static const int loc_eng_position_sess_status_num = sizeof(loc_eng_position_sess_status_types) / sizeof(loc_name_val_s_type);
|
||||||
|
|
||||||
const char* loc_get_position_sess_status_name(enum loc_sess_status status)
|
const char* loc_get_position_sess_status_name(enum loc_sess_status status)
|
||||||
{
|
{
|
||||||
return loc_get_name_from_val(loc_eng_position_sess_status_types, loc_eng_position_sess_status_num, (long) status);
|
return loc_get_name_from_val(loc_eng_position_sess_status_types, loc_eng_position_sess_status_num, (long) status);
|
||||||
}
|
}
|
||||||
|
|
||||||
static loc_name_val_s_type loc_eng_agps_status_names[] =
|
static const loc_name_val_s_type loc_eng_agps_status_names[] =
|
||||||
{
|
{
|
||||||
NAME_VAL( GPS_REQUEST_AGPS_DATA_CONN ),
|
NAME_VAL( GPS_REQUEST_AGPS_DATA_CONN ),
|
||||||
NAME_VAL( GPS_RELEASE_AGPS_DATA_CONN ),
|
NAME_VAL( GPS_RELEASE_AGPS_DATA_CONN ),
|
||||||
|
@ -235,7 +235,7 @@ static loc_name_val_s_type loc_eng_agps_status_names[] =
|
||||||
NAME_VAL( GPS_AGPS_DATA_CONN_DONE ),
|
NAME_VAL( GPS_AGPS_DATA_CONN_DONE ),
|
||||||
NAME_VAL( GPS_AGPS_DATA_CONN_FAILED )
|
NAME_VAL( GPS_AGPS_DATA_CONN_FAILED )
|
||||||
};
|
};
|
||||||
static int loc_eng_agps_status_num = sizeof(loc_eng_agps_status_names) / sizeof(loc_name_val_s_type);
|
static const int loc_eng_agps_status_num = sizeof(loc_eng_agps_status_names) / sizeof(loc_name_val_s_type);
|
||||||
|
|
||||||
const char* loc_get_agps_status_name(AGpsStatusValue status)
|
const char* loc_get_agps_status_name(AGpsStatusValue status)
|
||||||
{
|
{
|
||||||
|
|
|
@ -29,7 +29,7 @@ BATCH_SIZE=20
|
||||||
# GEOFENCE = 0x01
|
# GEOFENCE = 0x01
|
||||||
# BATCHING = 0x02
|
# BATCHING = 0x02
|
||||||
# default = GEOFENCE | BATCHING
|
# default = GEOFENCE | BATCHING
|
||||||
CAPABILITIES=0x03
|
CAPABILITIES=0x00
|
||||||
|
|
||||||
###################################
|
###################################
|
||||||
# FLP BATCHING ACCURACY
|
# FLP BATCHING ACCURACY
|
||||||
|
|
|
@ -1,18 +1,13 @@
|
||||||
#Uncommenting these urls would only enable
|
#XTRA_SERVER_1=https://xtrapath1.izatcloud.net/xtra3grc.bin
|
||||||
#the power up auto injection and force injection(test case).
|
#XTRA_SERVER_2=https://xtrapath2.izatcloud.net/xtra3grc.bin
|
||||||
#XTRA_SERVER_1=http://xtrapath1.izatcloud.net/xtra3grc.bin
|
#XTRA_SERVER_3=https://xtrapath3.izatcloud.net/xtra3grc.bin
|
||||||
#XTRA_SERVER_2=http://xtrapath2.izatcloud.net/xtra3grc.bin
|
|
||||||
#XTRA_SERVER_3=http://xtrapath3.izatcloud.net/xtra3grc.bin
|
|
||||||
#XTRA2_SERVER_1=http://xtrapath1.izatcloud.net/xtra2.bin
|
|
||||||
#XTRA2_SERVER_2=http://xtrapath2.izatcloud.net/xtra2.bin
|
|
||||||
#XTRA2_SERVER_3=http://xtrapath3.izatcloud.net/xtra2.bin
|
|
||||||
|
|
||||||
#Version check for XTRA
|
#Version check for XTRA
|
||||||
#DISABLE = 0
|
#DISABLE = 0
|
||||||
#AUTO = 1
|
#AUTO = 1
|
||||||
#XTRA2 = 2
|
#XTRA2 = 2
|
||||||
#XTRA3 = 3
|
#XTRA3 = 3
|
||||||
XTRA_VERSION_CHECK=0
|
XTRA_VERSION_CHECK=1
|
||||||
|
|
||||||
# Error Estimate
|
# Error Estimate
|
||||||
# _SET = 1
|
# _SET = 1
|
||||||
|
@ -25,7 +20,7 @@ NTP_SERVER=1.android.pool.ntp.org
|
||||||
# DEBUG LEVELS: 0 - none, 1 - Error, 2 - Warning, 3 - Info
|
# DEBUG LEVELS: 0 - none, 1 - Error, 2 - Warning, 3 - Info
|
||||||
# 4 - Debug, 5 - Verbose
|
# 4 - Debug, 5 - Verbose
|
||||||
# If DEBUG_LEVEL is commented, Android's logging levels will be used
|
# If DEBUG_LEVEL is commented, Android's logging levels will be used
|
||||||
DEBUG_LEVEL = 4
|
DEBUG_LEVEL = 2
|
||||||
|
|
||||||
# Intermediate position report, 1=enable, 0=disable
|
# Intermediate position report, 1=enable, 0=disable
|
||||||
INTERMEDIATE_POS=0
|
INTERMEDIATE_POS=0
|
||||||
|
@ -37,11 +32,11 @@ INTERMEDIATE_POS=0
|
||||||
# default - non is locked for backward compatibility
|
# default - non is locked for backward compatibility
|
||||||
#GPS_LOCK = 0
|
#GPS_LOCK = 0
|
||||||
|
|
||||||
# supl version 1.0
|
# supl version 2.0
|
||||||
SUPL_VER=0x10000
|
SUPL_VER=0x20000
|
||||||
|
|
||||||
# Emergency SUPL, 1=enable, 0=disable
|
# Emergency SUPL, 1=enable, 0=disable
|
||||||
SUPL_ES=0
|
#SUPL_ES=0
|
||||||
# Sensor R&D : Non-SUPL ES should be default
|
# Sensor R&D : Non-SUPL ES should be default
|
||||||
|
|
||||||
#Choose PDN for Emergency SUPL
|
#Choose PDN for Emergency SUPL
|
||||||
|
@ -55,7 +50,7 @@ USE_EMERGENCY_PDN_FOR_EMERGENCY_SUPL=1
|
||||||
#MSA=0X2
|
#MSA=0X2
|
||||||
#MSB=0X1
|
#MSB=0X1
|
||||||
#Sensor R&D : Change default bit mask
|
#Sensor R&D : Change default bit mask
|
||||||
SUPL_MODE=3
|
#SUPL_MODE=1
|
||||||
|
|
||||||
# GPS Capabilities bit mask
|
# GPS Capabilities bit mask
|
||||||
# SCHEDULING = 0x01
|
# SCHEDULING = 0x01
|
||||||
|
@ -64,7 +59,7 @@ SUPL_MODE=3
|
||||||
# ON_DEMAND_TIME = 0x10
|
# ON_DEMAND_TIME = 0x10
|
||||||
# GEOFENCE = 0x20
|
# GEOFENCE = 0x20
|
||||||
# default = ON_DEMAND_TIME | MSA | MSB | SCHEDULING | GEOFENCE
|
# default = ON_DEMAND_TIME | MSA | MSB | SCHEDULING | GEOFENCE
|
||||||
CAPABILITIES=0x37
|
CAPABILITIES=0x31
|
||||||
|
|
||||||
# Accuracy threshold for intermediate positions
|
# Accuracy threshold for intermediate positions
|
||||||
# less accurate positions are ignored, 0 for passing all positions
|
# less accurate positions are ignored, 0 for passing all positions
|
||||||
|
@ -75,8 +70,8 @@ CAPABILITIES=0x37
|
||||||
################################
|
################################
|
||||||
|
|
||||||
# FOR SUPL SUPPORT, set the following
|
# FOR SUPL SUPPORT, set the following
|
||||||
# SUPL_HOST=supl.host.com or IP
|
#SUPL_HOST=supl.google.com
|
||||||
# SUPL_PORT=1234
|
#SUPL_PORT=7275
|
||||||
|
|
||||||
# FOR C2K PDE SUPPORT, set the following
|
# FOR C2K PDE SUPPORT, set the following
|
||||||
# C2K_HOST=c2k.pde.com or IP
|
# C2K_HOST=c2k.pde.com or IP
|
||||||
|
@ -97,7 +92,7 @@ CAPABILITIES=0x37
|
||||||
# 1: Enable LPP_User_Plane on LTE
|
# 1: Enable LPP_User_Plane on LTE
|
||||||
# 2: Enable LPP_Control_Plane
|
# 2: Enable LPP_Control_Plane
|
||||||
# 3: Enable both LPP_User_Plane and LPP_Control_Plane
|
# 3: Enable both LPP_User_Plane and LPP_Control_Plane
|
||||||
LPP_PROFILE = 0 # Sensor R&D : This will not be injected to MODEM
|
#LPP_PROFILE = 0 # Sensor R&D : This will not be injected to MODEM
|
||||||
|
|
||||||
################################
|
################################
|
||||||
# EXTRA SETTINGS
|
# EXTRA SETTINGS
|
||||||
|
@ -113,11 +108,5 @@ SGLTE_TARGET=0
|
||||||
# 0x1: RRC CPlane
|
# 0x1: RRC CPlane
|
||||||
# 0x2: RRLP UPlane
|
# 0x2: RRLP UPlane
|
||||||
# 0x4: LLP Uplane
|
# 0x4: LLP Uplane
|
||||||
A_GLONASS_POS_PROTOCOL_SELECT = 0 #Sensor R&D : This will not be injected to MODEM
|
# Sensor R&D : This will not be injected to MODEM
|
||||||
|
A_GLONASS_POS_PROTOCOL_SELECT = 0
|
||||||
##################################################
|
|
||||||
# Delete only Ephemeris files
|
|
||||||
##################################################
|
|
||||||
#0 : off - default
|
|
||||||
#1 : on - Erase only eph files when we use 'delete aiding data' function.
|
|
||||||
DEL_EPH_ONLY = 0
|
|
||||||
|
|
|
@ -27,12 +27,12 @@ WIFI_WAIT_TIMEOUT_SELECT = 0
|
||||||
# QNP when the EULA is not consented to by the user. QNP can
|
# QNP when the EULA is not consented to by the user. QNP can
|
||||||
# still return ZPP locations or injected locations even
|
# still return ZPP locations or injected locations even
|
||||||
# without EULA consent, but the uncertainty can be high.
|
# without EULA consent, but the uncertainty can be high.
|
||||||
NLP_MODE = 3
|
NLP_MODE = 1
|
||||||
NLP_TOLERANCE_TIME_FIRST = 5000
|
NLP_TOLERANCE_TIME_FIRST = 5000
|
||||||
NLP_TOLERANCE_TIME_AFTER = 20000
|
NLP_TOLERANCE_TIME_AFTER = 20000
|
||||||
NLP_THRESHOLD = 3
|
NLP_THRESHOLD = 3
|
||||||
NLP_ACCURACY_MULTIPLE = 2
|
NLP_ACCURACY_MULTIPLE = 2
|
||||||
NLP_COMBO_MODE_USES_QNP_WITH_NO_EULA_CONSENT = 1
|
NLP_COMBO_MODE_USES_QNP_WITH_NO_EULA_CONSENT = 0
|
||||||
|
|
||||||
# Threshold period for ZPP triggers
|
# Threshold period for ZPP triggers
|
||||||
ZPP_TRIGGER_THRESHOLD=60000
|
ZPP_TRIGGER_THRESHOLD=60000
|
||||||
|
@ -88,7 +88,7 @@ SAP=BASIC
|
||||||
#ODCPI valid modes:
|
#ODCPI valid modes:
|
||||||
#DISABLED
|
#DISABLED
|
||||||
#BASIC
|
#BASIC
|
||||||
ODCPI=BASIC
|
ODCPI=DISABLED
|
||||||
|
|
||||||
#FREE_WIFI_SCAN_INJECT valid modes:
|
#FREE_WIFI_SCAN_INJECT valid modes:
|
||||||
#DISABLED
|
#DISABLED
|
||||||
|
@ -98,7 +98,7 @@ FREE_WIFI_SCAN_INJECT=BASIC
|
||||||
#SUPL_WIFI valid modes:
|
#SUPL_WIFI valid modes:
|
||||||
#DISABLED
|
#DISABLED
|
||||||
#BASIC
|
#BASIC
|
||||||
SUPL_WIFI=BASIC
|
SUPL_WIFI=DISABLED
|
||||||
|
|
||||||
#WIFI_SUPPLICANT_INFO valid modes:
|
#WIFI_SUPPLICANT_INFO valid modes:
|
||||||
#DISABLED
|
#DISABLED
|
||||||
|
@ -147,7 +147,7 @@ LEAN_TARGETS=DISABLED
|
||||||
|
|
||||||
PROCESS_NAME=/system/bin/gpsone_daemon
|
PROCESS_NAME=/system/bin/gpsone_daemon
|
||||||
PROCESS_ARGUMENT=
|
PROCESS_ARGUMENT=
|
||||||
PROCESS_STATE=ENABLED
|
PROCESS_STATE=DISABLED
|
||||||
PROCESS_GROUPS=inet net_raw
|
PROCESS_GROUPS=inet net_raw
|
||||||
PREMIUM_FEATURE=0
|
PREMIUM_FEATURE=0
|
||||||
IZAT_FEATURE_MASK=0
|
IZAT_FEATURE_MASK=0
|
||||||
|
@ -158,7 +158,7 @@ LEAN_TARGETS=DISABLED
|
||||||
PROCESS_NAME=/system/bin/lowi-server
|
PROCESS_NAME=/system/bin/lowi-server
|
||||||
PROCESS_ARGUMENT=
|
PROCESS_ARGUMENT=
|
||||||
PROCESS_STATE=ENABLED
|
PROCESS_STATE=ENABLED
|
||||||
PROCESS_GROUPS=gps net_admin wifi inet qcom_diag net_raw
|
PROCESS_GROUPS=gps net_admin wifi inet oem_2950 net_raw
|
||||||
PREMIUM_FEATURE=0
|
PREMIUM_FEATURE=0
|
||||||
IZAT_FEATURE_MASK=0xf303
|
IZAT_FEATURE_MASK=0xf303
|
||||||
PLATFORMS=all
|
PLATFORMS=all
|
||||||
|
@ -178,7 +178,7 @@ LEAN_TARGETS=DISABLED
|
||||||
PROCESS_NAME=/system/bin/xtwifi-client
|
PROCESS_NAME=/system/bin/xtwifi-client
|
||||||
PROCESS_ARGUMENT=
|
PROCESS_ARGUMENT=
|
||||||
PROCESS_STATE=ENABLED
|
PROCESS_STATE=ENABLED
|
||||||
PROCESS_GROUPS=net_admin wifi inet gps net_raw rfs_shared
|
PROCESS_GROUPS=net_admin wifi inet gps net_raw oem_2952
|
||||||
PREMIUM_FEATURE=1
|
PREMIUM_FEATURE=1
|
||||||
IZAT_FEATURE_MASK=0xf0f
|
IZAT_FEATURE_MASK=0xf0f
|
||||||
PLATFORMS=all
|
PLATFORMS=all
|
||||||
|
@ -188,7 +188,7 @@ LEAN_TARGETS=DISABLED
|
||||||
PROCESS_NAME=/system/vendor/bin/slim_daemon
|
PROCESS_NAME=/system/vendor/bin/slim_daemon
|
||||||
PROCESS_ARGUMENT=
|
PROCESS_ARGUMENT=
|
||||||
PROCESS_STATE=ENABLED
|
PROCESS_STATE=ENABLED
|
||||||
PROCESS_GROUPS=gps net_raw qcom_diag
|
PROCESS_GROUPS=gps net_raw oem_2950
|
||||||
PREMIUM_FEATURE=1
|
PREMIUM_FEATURE=1
|
||||||
IZAT_FEATURE_MASK=0xf0
|
IZAT_FEATURE_MASK=0xf0
|
||||||
PLATFORMS=all
|
PLATFORMS=all
|
||||||
|
|
|
@ -34,13 +34,13 @@ SENSOR_CONTROL_MODE=0
|
||||||
SENSOR_USAGE=0
|
SENSOR_USAGE=0
|
||||||
|
|
||||||
# Choose GSIFF sensor provider (1=Snapdragon Sensors Core, 2=Android NDK)
|
# Choose GSIFF sensor provider (1=Snapdragon Sensors Core, 2=Android NDK)
|
||||||
SENSOR_PROVIDER=1
|
SENSOR_PROVIDER=2
|
||||||
|
|
||||||
# Bit mask used to define which sensor algorithms are used.
|
# Bit mask used to define which sensor algorithms are used.
|
||||||
# Setting each bit has the following definition:
|
# Setting each bit has the following definition:
|
||||||
# 0x1 - DISABLE_INS_POSITIONING_FILTER
|
# 0x1 - DISABLE_INS_POSITIONING_FILTER
|
||||||
# 0x0 - ENABLE_INS_POSITIONING_FILTER
|
# 0x0 - ENABLE_INS_POSITIONING_FILTER
|
||||||
SENSOR_ALGORITHM_CONFIG_MASK=0x1
|
SENSOR_ALGORITHM_CONFIG_MASK=0x0
|
||||||
|
|
||||||
# Time source used by Sensor HAL
|
# Time source used by Sensor HAL
|
||||||
# Setting this value controls accuracy of location sensor services.
|
# Setting this value controls accuracy of location sensor services.
|
||||||
|
|
|
@ -101,7 +101,6 @@ void LocEngAdapter::setXtraUserAgent() {
|
||||||
char release[PROPERTY_VALUE_MAX];
|
char release[PROPERTY_VALUE_MAX];
|
||||||
char manufacture[PROPERTY_VALUE_MAX];
|
char manufacture[PROPERTY_VALUE_MAX];
|
||||||
char model[PROPERTY_VALUE_MAX];
|
char model[PROPERTY_VALUE_MAX];
|
||||||
char carrier[PROPERTY_VALUE_MAX];
|
|
||||||
char board[PROPERTY_VALUE_MAX];
|
char board[PROPERTY_VALUE_MAX];
|
||||||
char brand[PROPERTY_VALUE_MAX];
|
char brand[PROPERTY_VALUE_MAX];
|
||||||
char chipsetsn[CHIPSET_SERIAL_NUMBER_MAX_LEN];
|
char chipsetsn[CHIPSET_SERIAL_NUMBER_MAX_LEN];
|
||||||
|
@ -111,13 +110,18 @@ void LocEngAdapter::setXtraUserAgent() {
|
||||||
property_get("ro.build.version.release", release, defVal);
|
property_get("ro.build.version.release", release, defVal);
|
||||||
property_get("ro.product.manufacturer", manufacture, defVal);
|
property_get("ro.product.manufacturer", manufacture, defVal);
|
||||||
property_get("ro.product.model", model, defVal);
|
property_get("ro.product.model", model, defVal);
|
||||||
property_get("ro.carrier", carrier, defVal);
|
|
||||||
property_get("ro.product.board", board, defVal);
|
property_get("ro.product.board", board, defVal);
|
||||||
property_get("ro.product.brand", brand, defVal);
|
property_get("ro.product.brand", brand, defVal);
|
||||||
getChipsetSerialNo(chipsetsn, sizeof(chipsetsn), defVal);
|
getChipsetSerialNo(chipsetsn, sizeof(chipsetsn), defVal);
|
||||||
|
|
||||||
snprintf(userAgent, sizeof(userAgent), "A/%s/%s/%s/%s/%s/QCX3/s%u/-/%s/-/%s/-/-/-",
|
encodeInPlace(release, PROPERTY_VALUE_MAX);
|
||||||
release, manufacture, model, board, carrier,
|
encodeInPlace(manufacture, PROPERTY_VALUE_MAX);
|
||||||
|
encodeInPlace(model, PROPERTY_VALUE_MAX);
|
||||||
|
encodeInPlace(board, PROPERTY_VALUE_MAX);
|
||||||
|
encodeInPlace(brand, PROPERTY_VALUE_MAX);
|
||||||
|
|
||||||
|
snprintf(userAgent, sizeof(userAgent), "A/%s/%s/%s/%s/-/QCX3/s%u/-/%s/-/%s/-/-/-",
|
||||||
|
release, manufacture, model, board,
|
||||||
mContext->getIzatDevId(), chipsetsn, brand);
|
mContext->getIzatDevId(), chipsetsn, brand);
|
||||||
|
|
||||||
for (int i = 0; i < sizeof(userAgent) && userAgent[i]; i++) {
|
for (int i = 0; i < sizeof(userAgent) && userAgent[i]; i++) {
|
||||||
|
@ -201,6 +205,56 @@ void LocEngAdapter::setXtraUserAgent() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* encode the given string value such that all separator characters ('/','+','|','%')
|
||||||
|
* in the string are repaced by their corresponding encodings (%2F","%2B","%7C", "%25")
|
||||||
|
*/
|
||||||
|
static void encodeInPlace(char value[], const int size) {
|
||||||
|
char buffer[size];
|
||||||
|
|
||||||
|
struct ENCODE {
|
||||||
|
const char ch;
|
||||||
|
const char *code;
|
||||||
|
};
|
||||||
|
|
||||||
|
const ENCODE encodings[] = { {'/', "%2F"}, {'+', "%2B"}, {'|', "%7C",}, {'%', "%25"} };
|
||||||
|
const int nencodings = (int)sizeof(encodings) / sizeof(encodings[0]);
|
||||||
|
|
||||||
|
int inpos = 0, outpos = 0;
|
||||||
|
while(value[inpos] != '\0' && outpos < size - 1) {
|
||||||
|
// check if escaped character
|
||||||
|
int escchar = 0;
|
||||||
|
while(escchar < nencodings && encodings[escchar].ch != value[inpos]) {
|
||||||
|
escchar++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (escchar == nencodings) {
|
||||||
|
// non escaped character
|
||||||
|
buffer[outpos++] = value[inpos++];
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
// escaped character
|
||||||
|
int codepos = 0;
|
||||||
|
#define NUM_CHARS_IN_CODE 3
|
||||||
|
|
||||||
|
if (outpos + NUM_CHARS_IN_CODE >= size) {
|
||||||
|
// skip last character if there is insufficient space
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
while(outpos < size - 1 && codepos < NUM_CHARS_IN_CODE) {
|
||||||
|
buffer[outpos++] = encodings[escchar].code[codepos++];
|
||||||
|
}
|
||||||
|
inpos++;
|
||||||
|
}
|
||||||
|
|
||||||
|
// copy to ouput
|
||||||
|
value[outpos] = '\0';
|
||||||
|
while(--outpos >= 0) {
|
||||||
|
value[outpos] = buffer[outpos];
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
sendMsg(new LocSetXtraUserAgent(mContext));
|
sendMsg(new LocSetXtraUserAgent(mContext));
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (c) 2009-2014, The Linux Foundation. All rights reserved.
|
/* Copyright (c) 2009-2015, The Linux Foundation. All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are
|
* modification, are permitted provided that the following conditions are
|
||||||
|
@ -94,7 +94,7 @@ loc_gps_cfg_s_type gps_conf;
|
||||||
loc_sap_cfg_s_type sap_conf;
|
loc_sap_cfg_s_type sap_conf;
|
||||||
|
|
||||||
/* Parameter spec table */
|
/* Parameter spec table */
|
||||||
static loc_param_s_type gps_conf_table[] =
|
static const loc_param_s_type gps_conf_table[] =
|
||||||
{
|
{
|
||||||
{"GPS_LOCK", &gps_conf.GPS_LOCK, NULL, 'n'},
|
{"GPS_LOCK", &gps_conf.GPS_LOCK, NULL, 'n'},
|
||||||
{"SUPL_VER", &gps_conf.SUPL_VER, NULL, 'n'},
|
{"SUPL_VER", &gps_conf.SUPL_VER, NULL, 'n'},
|
||||||
|
@ -113,7 +113,7 @@ static loc_param_s_type gps_conf_table[] =
|
||||||
{"USE_EMERGENCY_PDN_FOR_EMERGENCY_SUPL", &gps_conf.USE_EMERGENCY_PDN_FOR_EMERGENCY_SUPL, NULL, 'n'},
|
{"USE_EMERGENCY_PDN_FOR_EMERGENCY_SUPL", &gps_conf.USE_EMERGENCY_PDN_FOR_EMERGENCY_SUPL, NULL, 'n'},
|
||||||
};
|
};
|
||||||
|
|
||||||
static loc_param_s_type sap_conf_table[] =
|
static const loc_param_s_type sap_conf_table[] =
|
||||||
{
|
{
|
||||||
{"GYRO_BIAS_RANDOM_WALK", &sap_conf.GYRO_BIAS_RANDOM_WALK, &sap_conf.GYRO_BIAS_RANDOM_WALK_VALID, 'f'},
|
{"GYRO_BIAS_RANDOM_WALK", &sap_conf.GYRO_BIAS_RANDOM_WALK, &sap_conf.GYRO_BIAS_RANDOM_WALK_VALID, 'f'},
|
||||||
{"ACCEL_RANDOM_WALK_SPECTRAL_DENSITY", &sap_conf.ACCEL_RANDOM_WALK_SPECTRAL_DENSITY, &sap_conf.ACCEL_RANDOM_WALK_SPECTRAL_DENSITY_VALID, 'f'},
|
{"ACCEL_RANDOM_WALK_SPECTRAL_DENSITY", &sap_conf.ACCEL_RANDOM_WALK_SPECTRAL_DENSITY, &sap_conf.ACCEL_RANDOM_WALK_SPECTRAL_DENSITY_VALID, 'f'},
|
||||||
|
|
|
@ -30,6 +30,7 @@
|
||||||
#define __LOC_SHARED_LOCK__
|
#define __LOC_SHARED_LOCK__
|
||||||
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
#include <cutils/atomic.h>
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
// This is a utility created for use cases such that there are more than
|
// This is a utility created for use cases such that there are more than
|
||||||
|
@ -39,16 +40,16 @@
|
||||||
// this share lock's share() method has to be called, so that the obj
|
// this share lock's share() method has to be called, so that the obj
|
||||||
// can maintain an accurate client count.
|
// can maintain an accurate client count.
|
||||||
class LocSharedLock {
|
class LocSharedLock {
|
||||||
uint32_t mRef;
|
volatile int32_t mRef;
|
||||||
pthread_mutex_t mMutex;
|
pthread_mutex_t mMutex;
|
||||||
inline ~LocSharedLock() { pthread_mutex_destroy(&mMutex); }
|
inline ~LocSharedLock() { pthread_mutex_destroy(&mMutex); }
|
||||||
public:
|
public:
|
||||||
// first client to create this LockSharedLock
|
// first client to create this LockSharedLock
|
||||||
inline LocSharedLock() : mRef(1) { pthread_mutex_init(&mMutex, NULL); }
|
inline LocSharedLock() : mRef(1) { pthread_mutex_init(&mMutex, NULL); }
|
||||||
// following client(s) are to *share()* this lock created by the first client
|
// following client(s) are to *share()* this lock created by the first client
|
||||||
inline LocSharedLock* share() { mRef++; return this; }
|
inline LocSharedLock* share() { android_atomic_inc(&mRef); return this; }
|
||||||
// whe a client no longer needs this shared lock, drop() shall be called.
|
// whe a client no longer needs this shared lock, drop() shall be called.
|
||||||
inline void drop() { if (0 == --mRef) delete this; }
|
inline void drop() { if (1 == android_atomic_dec(&mRef)) delete this; }
|
||||||
// locking the lock to enter critical section
|
// locking the lock to enter critical section
|
||||||
inline void lock() { pthread_mutex_lock(&mMutex); }
|
inline void lock() { pthread_mutex_lock(&mMutex); }
|
||||||
// unlocking the lock to leave the critical section
|
// unlocking the lock to leave the critical section
|
||||||
|
|
|
@ -83,7 +83,7 @@ void MsgTask::prerun() {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MsgTask::run() {
|
bool MsgTask::run() {
|
||||||
LOC_LOGD("MsgTask::loop() listening ...\n");
|
LOC_LOGV("MsgTask::loop() listening ...\n");
|
||||||
LocMsg* msg;
|
LocMsg* msg;
|
||||||
msq_q_err_type result = msg_q_rcv((void*)mQ, (void **)&msg);
|
msq_q_err_type result = msg_q_rcv((void*)mQ, (void **)&msg);
|
||||||
if (eMSG_Q_SUCCESS != result) {
|
if (eMSG_Q_SUCCESS != result) {
|
||||||
|
|
|
@ -109,7 +109,7 @@ linked_list_err_type linked_list_destroy(void** list_data)
|
||||||
===========================================================================*/
|
===========================================================================*/
|
||||||
linked_list_err_type linked_list_add(void* list_data, void *data_obj, void (*dealloc)(void*))
|
linked_list_err_type linked_list_add(void* list_data, void *data_obj, void (*dealloc)(void*))
|
||||||
{
|
{
|
||||||
LOC_LOGD("%s: Adding to list data_obj = 0x%08X\n", __FUNCTION__, data_obj);
|
LOC_LOGV("%s: Adding to list data_obj = 0x%08X\n", __FUNCTION__, data_obj);
|
||||||
if( list_data == NULL )
|
if( list_data == NULL )
|
||||||
{
|
{
|
||||||
LOC_LOGE("%s: Invalid list parameter!\n", __FUNCTION__);
|
LOC_LOGE("%s: Invalid list parameter!\n", __FUNCTION__);
|
||||||
|
@ -161,7 +161,7 @@ linked_list_err_type linked_list_add(void* list_data, void *data_obj, void (*dea
|
||||||
===========================================================================*/
|
===========================================================================*/
|
||||||
linked_list_err_type linked_list_remove(void* list_data, void **data_obj)
|
linked_list_err_type linked_list_remove(void* list_data, void **data_obj)
|
||||||
{
|
{
|
||||||
LOC_LOGD("%s: Removing from list\n", __FUNCTION__);
|
LOC_LOGV("%s: Removing from list\n", __FUNCTION__);
|
||||||
if( list_data == NULL )
|
if( list_data == NULL )
|
||||||
{
|
{
|
||||||
LOC_LOGE("%s: Invalid list parameter!\n", __FUNCTION__);
|
LOC_LOGE("%s: Invalid list parameter!\n", __FUNCTION__);
|
||||||
|
@ -268,7 +268,7 @@ linked_list_err_type linked_list_search(void* list_data, void **data_p,
|
||||||
bool (*equal)(void* data_0, void* data),
|
bool (*equal)(void* data_0, void* data),
|
||||||
void* data_0, bool rm_if_found)
|
void* data_0, bool rm_if_found)
|
||||||
{
|
{
|
||||||
LOC_LOGD("%s: Search the list\n", __FUNCTION__);
|
LOC_LOGV("%s: Search the list\n", __FUNCTION__);
|
||||||
if( list_data == NULL || NULL == equal )
|
if( list_data == NULL || NULL == equal )
|
||||||
{
|
{
|
||||||
LOC_LOGE("%s: Invalid list parameter! list_data %p equal %p\n",
|
LOC_LOGE("%s: Invalid list parameter! list_data %p equal %p\n",
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved.
|
/* Copyright (c) 2011-2015, The Linux Foundation. All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are
|
* modification, are permitted provided that the following conditions are
|
||||||
|
@ -56,12 +56,12 @@ static uint32_t DEBUG_LEVEL = 0xff;
|
||||||
static uint32_t TIMESTAMP = 0;
|
static uint32_t TIMESTAMP = 0;
|
||||||
|
|
||||||
/* Parameter spec table */
|
/* Parameter spec table */
|
||||||
static loc_param_s_type loc_param_table[] =
|
static const loc_param_s_type loc_param_table[] =
|
||||||
{
|
{
|
||||||
{"DEBUG_LEVEL", &DEBUG_LEVEL, NULL, 'n'},
|
{"DEBUG_LEVEL", &DEBUG_LEVEL, NULL, 'n'},
|
||||||
{"TIMESTAMP", &TIMESTAMP, NULL, 'n'},
|
{"TIMESTAMP", &TIMESTAMP, NULL, 'n'},
|
||||||
};
|
};
|
||||||
int loc_param_num = sizeof(loc_param_table) / sizeof(loc_param_s_type);
|
static const int loc_param_num = sizeof(loc_param_table) / sizeof(loc_param_s_type);
|
||||||
|
|
||||||
typedef struct loc_param_v_type
|
typedef struct loc_param_v_type
|
||||||
{
|
{
|
||||||
|
@ -92,7 +92,7 @@ RETURN VALUE
|
||||||
SIDE EFFECTS
|
SIDE EFFECTS
|
||||||
N/A
|
N/A
|
||||||
===========================================================================*/
|
===========================================================================*/
|
||||||
int loc_set_config_entry(loc_param_s_type* config_entry, loc_param_v_type* config_value)
|
int loc_set_config_entry(const loc_param_s_type* config_entry, loc_param_v_type* config_value)
|
||||||
{
|
{
|
||||||
int ret=-1;
|
int ret=-1;
|
||||||
if(NULL == config_entry || NULL == config_value)
|
if(NULL == config_entry || NULL == config_value)
|
||||||
|
@ -181,7 +181,7 @@ SIDE EFFECTS
|
||||||
N/A
|
N/A
|
||||||
===========================================================================*/
|
===========================================================================*/
|
||||||
int loc_fill_conf_item(char* input_buf,
|
int loc_fill_conf_item(char* input_buf,
|
||||||
loc_param_s_type* config_table, uint32_t table_length)
|
const loc_param_s_type* config_table, uint32_t table_length)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
|
@ -258,7 +258,7 @@ RETURN VALUE
|
||||||
SIDE EFFECTS
|
SIDE EFFECTS
|
||||||
N/A
|
N/A
|
||||||
===========================================================================*/
|
===========================================================================*/
|
||||||
int loc_read_conf_r(FILE *conf_fp, loc_param_s_type* config_table, uint32_t table_length)
|
int loc_read_conf_r(FILE *conf_fp, const loc_param_s_type* config_table, uint32_t table_length)
|
||||||
{
|
{
|
||||||
int ret=0;
|
int ret=0;
|
||||||
|
|
||||||
|
@ -322,7 +322,7 @@ SIDE EFFECTS
|
||||||
N/A
|
N/A
|
||||||
===========================================================================*/
|
===========================================================================*/
|
||||||
int loc_update_conf(const char* conf_data, int32_t length,
|
int loc_update_conf(const char* conf_data, int32_t length,
|
||||||
loc_param_s_type* config_table, uint32_t table_length)
|
const loc_param_s_type* config_table, uint32_t table_length)
|
||||||
{
|
{
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
|
|
||||||
|
@ -377,7 +377,7 @@ RETURN VALUE
|
||||||
SIDE EFFECTS
|
SIDE EFFECTS
|
||||||
N/A
|
N/A
|
||||||
===========================================================================*/
|
===========================================================================*/
|
||||||
void loc_read_conf(const char* conf_file_name, loc_param_s_type* config_table,
|
void loc_read_conf(const char* conf_file_name, const loc_param_s_type* config_table,
|
||||||
uint32_t table_length)
|
uint32_t table_length)
|
||||||
{
|
{
|
||||||
FILE *conf_fp = NULL;
|
FILE *conf_fp = NULL;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved.
|
/* Copyright (c) 2011-2015, The Linux Foundation. All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are
|
* modification, are permitted provided that the following conditions are
|
||||||
|
@ -54,7 +54,7 @@
|
||||||
*============================================================================*/
|
*============================================================================*/
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
char param_name[LOC_MAX_PARAM_NAME];
|
const char *param_name;
|
||||||
void *param_ptr;
|
void *param_ptr;
|
||||||
uint8_t *param_set; /* was this value set by config file? */
|
uint8_t *param_set; /* was this value set by config file? */
|
||||||
char param_type; /* 'n' for number,
|
char param_type; /* 'n' for number,
|
||||||
|
@ -78,12 +78,12 @@ extern "C" {
|
||||||
*
|
*
|
||||||
*============================================================================*/
|
*============================================================================*/
|
||||||
void loc_read_conf(const char* conf_file_name,
|
void loc_read_conf(const char* conf_file_name,
|
||||||
loc_param_s_type* config_table,
|
const loc_param_s_type* config_table,
|
||||||
uint32_t table_length);
|
uint32_t table_length);
|
||||||
int loc_read_conf_r(FILE *conf_fp, loc_param_s_type* config_table,
|
int loc_read_conf_r(FILE *conf_fp, const loc_param_s_type* config_table,
|
||||||
uint32_t table_length);
|
uint32_t table_length);
|
||||||
int loc_update_conf(const char* conf_data, int32_t length,
|
int loc_update_conf(const char* conf_data, int32_t length,
|
||||||
loc_param_s_type* config_table, uint32_t table_length);
|
const loc_param_s_type* config_table, uint32_t table_length);
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (c) 2011-2012, The Linux Foundation. All rights reserved.
|
/* Copyright (c) 2011-2012, 2015, The Linux Foundation. All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are
|
* modification, are permitted provided that the following conditions are
|
||||||
|
@ -57,9 +57,9 @@ const char EXIT_ERROR_TAG[] = "Exiting with error";
|
||||||
loc_logger_s_type loc_logger;
|
loc_logger_s_type loc_logger;
|
||||||
|
|
||||||
/* Get names from value */
|
/* Get names from value */
|
||||||
const char* loc_get_name_from_mask(loc_name_val_s_type table[], int table_size, long mask)
|
const char* loc_get_name_from_mask(const loc_name_val_s_type table[], size_t table_size, long mask)
|
||||||
{
|
{
|
||||||
int i;
|
size_t i;
|
||||||
for (i = 0; i < table_size; i++)
|
for (i = 0; i < table_size; i++)
|
||||||
{
|
{
|
||||||
if (table[i].val & (long) mask)
|
if (table[i].val & (long) mask)
|
||||||
|
@ -71,9 +71,9 @@ const char* loc_get_name_from_mask(loc_name_val_s_type table[], int table_size,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Get names from value */
|
/* Get names from value */
|
||||||
const char* loc_get_name_from_val(loc_name_val_s_type table[], int table_size, long value)
|
const char* loc_get_name_from_val(const loc_name_val_s_type table[], size_t table_size, long value)
|
||||||
{
|
{
|
||||||
int i;
|
size_t i;
|
||||||
for (i = 0; i < table_size; i++)
|
for (i = 0; i < table_size; i++)
|
||||||
{
|
{
|
||||||
if (table[i].val == (long) value)
|
if (table[i].val == (long) value)
|
||||||
|
@ -84,7 +84,7 @@ const char* loc_get_name_from_val(loc_name_val_s_type table[], int table_size, l
|
||||||
return UNKNOWN_STR;
|
return UNKNOWN_STR;
|
||||||
}
|
}
|
||||||
|
|
||||||
static loc_name_val_s_type loc_msg_q_status[] =
|
static const loc_name_val_s_type loc_msg_q_status[] =
|
||||||
{
|
{
|
||||||
NAME_VAL( eMSG_Q_SUCCESS ),
|
NAME_VAL( eMSG_Q_SUCCESS ),
|
||||||
NAME_VAL( eMSG_Q_FAILURE_GENERAL ),
|
NAME_VAL( eMSG_Q_FAILURE_GENERAL ),
|
||||||
|
@ -93,7 +93,7 @@ static loc_name_val_s_type loc_msg_q_status[] =
|
||||||
NAME_VAL( eMSG_Q_UNAVAILABLE_RESOURCE ),
|
NAME_VAL( eMSG_Q_UNAVAILABLE_RESOURCE ),
|
||||||
NAME_VAL( eMSG_Q_INSUFFICIENT_BUFFER )
|
NAME_VAL( eMSG_Q_INSUFFICIENT_BUFFER )
|
||||||
};
|
};
|
||||||
static int loc_msg_q_status_num = sizeof(loc_msg_q_status) / sizeof(loc_name_val_s_type);
|
static const size_t loc_msg_q_status_num = LOC_TABLE_SIZE(loc_msg_q_status);
|
||||||
|
|
||||||
/* Find msg_q status name */
|
/* Find msg_q status name */
|
||||||
const char* loc_get_msg_q_status(int status)
|
const char* loc_get_msg_q_status(int status)
|
||||||
|
@ -107,7 +107,7 @@ const char* log_succ_fail_string(int is_succ)
|
||||||
}
|
}
|
||||||
|
|
||||||
//Target names
|
//Target names
|
||||||
loc_name_val_s_type target_name[] =
|
static const loc_name_val_s_type target_name[] =
|
||||||
{
|
{
|
||||||
NAME_VAL(GNSS_NONE),
|
NAME_VAL(GNSS_NONE),
|
||||||
NAME_VAL(GNSS_MSM),
|
NAME_VAL(GNSS_MSM),
|
||||||
|
@ -118,7 +118,7 @@ loc_name_val_s_type target_name[] =
|
||||||
NAME_VAL(GNSS_UNKNOWN)
|
NAME_VAL(GNSS_UNKNOWN)
|
||||||
};
|
};
|
||||||
|
|
||||||
static int target_name_num = sizeof(target_name)/sizeof(loc_name_val_s_type);
|
static const size_t target_name_num = LOC_TABLE_SIZE(target_name);
|
||||||
|
|
||||||
/*===========================================================================
|
/*===========================================================================
|
||||||
|
|
||||||
|
@ -139,7 +139,7 @@ const char *loc_get_target_name(unsigned int target)
|
||||||
static char ret[BUFFER_SIZE];
|
static char ret[BUFFER_SIZE];
|
||||||
|
|
||||||
index = getTargetGnssType(target);
|
index = getTargetGnssType(target);
|
||||||
if( index >= target_name_num || index < 0)
|
if( index < 0 || (unsigned)index >= target_name_num )
|
||||||
index = target_name_num - 1;
|
index = target_name_num - 1;
|
||||||
|
|
||||||
if( (target & HAS_SSC) == HAS_SSC ) {
|
if( (target & HAS_SSC) == HAS_SSC ) {
|
||||||
|
@ -168,7 +168,7 @@ RETURN VALUE
|
||||||
The time string
|
The time string
|
||||||
|
|
||||||
===========================================================================*/
|
===========================================================================*/
|
||||||
char *loc_get_time(char *time_string, unsigned long buf_size)
|
char *loc_get_time(char *time_string, size_t buf_size)
|
||||||
{
|
{
|
||||||
struct timeval now; /* sec and usec */
|
struct timeval now; /* sec and usec */
|
||||||
struct tm now_tm; /* broken-down time */
|
struct tm now_tm; /* broken-down time */
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (c) 2011-2012, The Linux Foundation. All rights reserved.
|
/* Copyright (c) 2011-2012, 2015 The Linux Foundation. All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are
|
* modification, are permitted provided that the following conditions are
|
||||||
|
@ -36,12 +36,13 @@ extern "C"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
#include <stdlib.h>
|
||||||
#include "loc_target.h"
|
#include "loc_target.h"
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
char name[128];
|
const char *name;
|
||||||
long val;
|
long val;
|
||||||
} loc_name_val_s_type;
|
} loc_name_val_s_type;
|
||||||
|
|
||||||
#define NAME_VAL(x) {"" #x "", x }
|
#define NAME_VAL(x) {"" #x "", x }
|
||||||
|
@ -49,17 +50,19 @@ typedef struct
|
||||||
#define UNKNOWN_STR "UNKNOWN"
|
#define UNKNOWN_STR "UNKNOWN"
|
||||||
|
|
||||||
#define CHECK_MASK(type, value, mask_var, mask) \
|
#define CHECK_MASK(type, value, mask_var, mask) \
|
||||||
((mask_var & mask) ? (type) value : (type) (-1))
|
(((mask_var) & (mask)) ? (type) (value) : (type) (-1))
|
||||||
|
|
||||||
|
#define LOC_TABLE_SIZE(table) (sizeof(table)/sizeof((table)[0]))
|
||||||
|
|
||||||
/* Get names from value */
|
/* Get names from value */
|
||||||
const char* loc_get_name_from_mask(loc_name_val_s_type table[], int table_size, long mask);
|
const char* loc_get_name_from_mask(const loc_name_val_s_type table[], size_t table_size, long mask);
|
||||||
const char* loc_get_name_from_val(loc_name_val_s_type table[], int table_size, long value);
|
const char* loc_get_name_from_val(const loc_name_val_s_type table[], size_t table_size, long value);
|
||||||
const char* loc_get_msg_q_status(int status);
|
const char* loc_get_msg_q_status(int status);
|
||||||
const char* loc_get_target_name(unsigned int target);
|
const char* loc_get_target_name(unsigned int target);
|
||||||
|
|
||||||
extern const char* log_succ_fail_string(int is_succ);
|
extern const char* log_succ_fail_string(int is_succ);
|
||||||
|
|
||||||
extern char *loc_get_time(char *time_string, unsigned long buf_size);
|
extern char *loc_get_time(char *time_string, size_t buf_size);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
@ -199,7 +199,7 @@ msq_q_err_type msg_q_snd(void* msg_q_data, void* msg_obj, void (*dealloc)(void*)
|
||||||
msg_q* p_msg_q = (msg_q*)msg_q_data;
|
msg_q* p_msg_q = (msg_q*)msg_q_data;
|
||||||
|
|
||||||
pthread_mutex_lock(&p_msg_q->list_mutex);
|
pthread_mutex_lock(&p_msg_q->list_mutex);
|
||||||
LOC_LOGD("%s: Sending message with handle = 0x%08X\n", __FUNCTION__, msg_obj);
|
LOC_LOGV("%s: Sending message with handle = 0x%08X\n", __FUNCTION__, msg_obj);
|
||||||
|
|
||||||
if( p_msg_q->unblocked )
|
if( p_msg_q->unblocked )
|
||||||
{
|
{
|
||||||
|
@ -215,7 +215,7 @@ msq_q_err_type msg_q_snd(void* msg_q_data, void* msg_obj, void (*dealloc)(void*)
|
||||||
|
|
||||||
pthread_mutex_unlock(&p_msg_q->list_mutex);
|
pthread_mutex_unlock(&p_msg_q->list_mutex);
|
||||||
|
|
||||||
LOC_LOGD("%s: Finished Sending message with handle = 0x%08X\n", __FUNCTION__, msg_obj);
|
LOC_LOGV("%s: Finished Sending message with handle = 0x%08X\n", __FUNCTION__, msg_obj);
|
||||||
|
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
@ -242,7 +242,7 @@ msq_q_err_type msg_q_rcv(void* msg_q_data, void** msg_obj)
|
||||||
|
|
||||||
msg_q* p_msg_q = (msg_q*)msg_q_data;
|
msg_q* p_msg_q = (msg_q*)msg_q_data;
|
||||||
|
|
||||||
LOC_LOGD("%s: Waiting on message\n", __FUNCTION__);
|
LOC_LOGV("%s: Waiting on message\n", __FUNCTION__);
|
||||||
|
|
||||||
pthread_mutex_lock(&p_msg_q->list_mutex);
|
pthread_mutex_lock(&p_msg_q->list_mutex);
|
||||||
|
|
||||||
|
@ -263,7 +263,7 @@ msq_q_err_type msg_q_rcv(void* msg_q_data, void** msg_obj)
|
||||||
|
|
||||||
pthread_mutex_unlock(&p_msg_q->list_mutex);
|
pthread_mutex_unlock(&p_msg_q->list_mutex);
|
||||||
|
|
||||||
LOC_LOGD("%s: Received message 0x%08X rv = %d\n", __FUNCTION__, *msg_obj, rv);
|
LOC_LOGV("%s: Received message 0x%08X rv = %d\n", __FUNCTION__, *msg_obj, rv);
|
||||||
|
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
32
init/Android.mk
Normal file
32
init/Android.mk
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
#
|
||||||
|
# Copyright (C) 2016 The CyanogenMod Project
|
||||||
|
# 2017 The LineageOS Project
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
|
||||||
|
LOCAL_PATH := $(call my-dir)
|
||||||
|
|
||||||
|
include $(CLEAR_VARS)
|
||||||
|
|
||||||
|
LOCAL_MODULE_TAGS := optional
|
||||||
|
LOCAL_C_INCLUDES := system/core/init
|
||||||
|
LOCAL_CFLAGS := -Wall -DANDROID_TARGET=\"$(TARGET_BOARD_PLATFORM)\"
|
||||||
|
LOCAL_SRC_FILES := init_msm8226.cpp
|
||||||
|
ifneq ($(TARGET_LIBINIT_MSM8226_DEFINES_FILE),)
|
||||||
|
LOCAL_SRC_FILES += ../../../../$(TARGET_LIBINIT_MSM8226_DEFINES_FILE)
|
||||||
|
endif
|
||||||
|
LOCAL_MODULE := libinit_msm8226
|
||||||
|
|
||||||
|
LOCAL_STATIC_LIBRARIES := libbase
|
||||||
|
|
||||||
|
include $(BUILD_STATIC_LIBRARY)
|
77
init/init_msm8226.cpp
Normal file
77
init/init_msm8226.cpp
Normal file
|
@ -0,0 +1,77 @@
|
||||||
|
/*
|
||||||
|
Copyright (c) 2016, The CyanogenMod Project. All rights reserved.
|
||||||
|
Copyright (c) 2017-2018, The LineageOS Project. 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <fcntl.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
|
||||||
|
#include <android-base/logging.h>
|
||||||
|
|
||||||
|
#define _REALLY_INCLUDE_SYS__SYSTEM_PROPERTIES_H_
|
||||||
|
#include <sys/_system_properties.h>
|
||||||
|
|
||||||
|
#include "vendor_init.h"
|
||||||
|
#include "property_service.h"
|
||||||
|
|
||||||
|
#include "init_msm8226.h"
|
||||||
|
|
||||||
|
using android::init::property_set;
|
||||||
|
|
||||||
|
__attribute__ ((weak))
|
||||||
|
void init_target_properties()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void property_override(char const prop[], char const value[])
|
||||||
|
{
|
||||||
|
prop_info *pi;
|
||||||
|
|
||||||
|
pi = (prop_info*) __system_property_find(prop);
|
||||||
|
if (pi)
|
||||||
|
__system_property_update(pi, value, strlen(value));
|
||||||
|
else
|
||||||
|
__system_property_add(prop, strlen(prop), value, strlen(value));
|
||||||
|
}
|
||||||
|
|
||||||
|
void property_override_dual(char const system_prop[],
|
||||||
|
char const vendor_prop[], char const value[])
|
||||||
|
{
|
||||||
|
property_override(system_prop, value);
|
||||||
|
property_override(vendor_prop, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void vendor_load_properties()
|
||||||
|
{
|
||||||
|
init_target_properties();
|
||||||
|
}
|
39
init/init_msm8226.h
Normal file
39
init/init_msm8226.h
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
/*
|
||||||
|
Copyright (c) 2016, The CyanogenMod Project
|
||||||
|
Copyright (c) 2018, The LineageOS 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __INIT_MSM8226__H__
|
||||||
|
#define __INIT_MSM8226__H__
|
||||||
|
|
||||||
|
void init_target_properties();
|
||||||
|
void property_override(char const prop[], char const value[]);
|
||||||
|
void property_override_dual(char const system_prop[],
|
||||||
|
char const vendor_prop[], char const value[]);
|
||||||
|
|
||||||
|
#endif /* __INIT_MSM8226__H__ */
|
|
@ -1,103 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (C) 2013 The Android Open Source Project
|
|
||||||
* Copyright (C) 2013 The CyanogenMod Project
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "minui/minui.h"
|
|
||||||
|
|
||||||
#include <cutils/klog.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
|
|
||||||
#include <healthd/healthd.h>
|
|
||||||
|
|
||||||
#ifndef BACKLIGHT_PATH
|
|
||||||
#define BACKLIGHT_PATH "/sys/class/leds/lcd-backlight/brightness"
|
|
||||||
#endif
|
|
||||||
#define BACKLIGHT_ON_LEVEL 100
|
|
||||||
|
|
||||||
#define LOGE(x...) do { KLOG_ERROR("charger", x); } while (0)
|
|
||||||
#define LOGW(x...) do { KLOG_WARNING("charger", x); } while (0)
|
|
||||||
#define LOGV(x...) do { KLOG_DEBUG("charger", x); } while (0)
|
|
||||||
|
|
||||||
void healthd_board_init(struct healthd_config *config)
|
|
||||||
{
|
|
||||||
config->batteryCapacityPath = "/sys/class/power_supply/battery/capacity";
|
|
||||||
config->batteryStatusPath = "/sys/class/power_supply/battery/status";
|
|
||||||
config->batteryVoltagePath = "/sys/class/power_supply/battery/voltage_now";
|
|
||||||
config->batteryPresentPath = "/sys/class/power_supply/battery/present";
|
|
||||||
config->batteryHealthPath = "/sys/class/power_supply/battery/health";
|
|
||||||
config->batteryTemperaturePath = "/sys/class/power_supply/battery/temp";
|
|
||||||
config->batteryTechnologyPath = "/sys/class/power_supply/battery/technology";
|
|
||||||
}
|
|
||||||
|
|
||||||
#define STR_LEN 8
|
|
||||||
void healthd_board_mode_charger_draw_battery(
|
|
||||||
struct android::BatteryProperties *batt_prop)
|
|
||||||
{
|
|
||||||
char cap_str[STR_LEN];
|
|
||||||
int x, y;
|
|
||||||
int str_len_px;
|
|
||||||
static int char_height = -1, char_width = -1;
|
|
||||||
|
|
||||||
if (char_height == -1 && char_width == -1)
|
|
||||||
gr_font_size(gr_sys_font(), &char_width, &char_height);
|
|
||||||
snprintf(cap_str, (STR_LEN - 1), "%d%%", batt_prop->batteryLevel);
|
|
||||||
str_len_px = gr_measure(gr_sys_font(), cap_str);
|
|
||||||
x = (gr_fb_width() - str_len_px) / 2;
|
|
||||||
y = (gr_fb_height() + char_height) / 2;
|
|
||||||
gr_color(0xa4, 0xc6, 0x39, 255);
|
|
||||||
gr_text(gr_sys_font(), x, y, cap_str, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
int healthd_board_battery_update(__attribute__((unused)) struct android::BatteryProperties *props)
|
|
||||||
{
|
|
||||||
// return 0 to log periodic polled battery status to kernel log
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
void healthd_board_mode_charger_battery_update(struct android::BatteryProperties*)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void healthd_board_mode_charger_set_backlight(bool on)
|
|
||||||
{
|
|
||||||
int fd;
|
|
||||||
char buffer[10];
|
|
||||||
|
|
||||||
if (access(BACKLIGHT_PATH, R_OK | W_OK) != 0)
|
|
||||||
{
|
|
||||||
LOGW("Backlight control not support\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
memset(buffer, '\0', sizeof(buffer));
|
|
||||||
fd = open(BACKLIGHT_PATH, O_RDWR);
|
|
||||||
if (fd < 0) {
|
|
||||||
LOGE("Could not open backlight node : %s\n", strerror(errno));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
LOGV("Enabling backlight\n");
|
|
||||||
snprintf(buffer, sizeof(buffer), "%d\n", on ? BACKLIGHT_ON_LEVEL : 0);
|
|
||||||
if (write(fd, buffer,strlen(buffer)) < 0) {
|
|
||||||
LOGE("Could not write to backlight node : %s\n", strerror(errno));
|
|
||||||
}
|
|
||||||
close(fd);
|
|
||||||
}
|
|
||||||
|
|
||||||
void healthd_board_mode_charger_init()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
Binary file not shown.
Before Width: | Height: | Size: 1.8 KiB |
Binary file not shown.
Before Width: | Height: | Size: 463 B |
17
libshims/Android.mk
Normal file
17
libshims/Android.mk
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
#
|
||||||
|
# Copyright (C) 2017 The LineageOS Project
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
#
|
||||||
|
|
||||||
|
include $(call first-makefiles-under,$(call my-dir))
|
|
@ -1,5 +1,5 @@
|
||||||
# Copyright (C) 2013 The Android Open Source Project
|
#
|
||||||
# Copyright (C) 2013 The CyanogenMod Project
|
# Copyright (C) 2017 The LineageOS Project
|
||||||
#
|
#
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
# you may not use this file except in compliance with the License.
|
# you may not use this file except in compliance with the License.
|
||||||
|
@ -12,13 +12,18 @@
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
#
|
||||||
|
|
||||||
LOCAL_PATH := $(call my-dir)
|
LOCAL_PATH := $(call my-dir)
|
||||||
|
|
||||||
include $(CLEAR_VARS)
|
include $(CLEAR_VARS)
|
||||||
LOCAL_SRC_FILES := healthd_board_default.cpp
|
|
||||||
LOCAL_MODULE := libhealthd.msm8226
|
|
||||||
LOCAL_C_INCLUDES := system/core/healthd/include bootable/recovery/minui/include
|
|
||||||
LOCAL_STATIC_LIBRARIES := libutils libbase libbinder
|
|
||||||
include $(BUILD_STATIC_LIBRARY)
|
|
||||||
|
|
||||||
|
LOCAL_MODULE := libshim_cutils_atomic
|
||||||
|
LOCAL_MODULE_CLASS := SHARED_LIBRARIES
|
||||||
|
LOCAL_MODULE_TAGS := optional
|
||||||
|
LOCAL_PROPRIETARY_MODULE := true
|
||||||
|
|
||||||
|
LOCAL_SRC_FILES := \
|
||||||
|
atomic.c
|
||||||
|
|
||||||
|
include $(BUILD_SHARED_LIBRARY)
|
26
libshims/libshim_cutils_atomic/atomic.c
Normal file
26
libshims/libshim_cutils_atomic/atomic.c
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
/*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Generate non-inlined versions of android_atomic functions.
|
||||||
|
* Nobody should be using these, but some binary blobs currently (late 2014)
|
||||||
|
* are.
|
||||||
|
* If you read this in 2015 or later, please try to delete this file.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define ANDROID_ATOMIC_INLINE
|
||||||
|
|
||||||
|
#include <cutils/atomic.h>
|
|
@ -2,9 +2,5 @@
|
||||||
{
|
{
|
||||||
"repository": "android_device_samsung_qcom-common",
|
"repository": "android_device_samsung_qcom-common",
|
||||||
"target_path": "device/samsung/qcom-common"
|
"target_path": "device/samsung/qcom-common"
|
||||||
},
|
|
||||||
{
|
|
||||||
"repository": "android_external_sony_boringssl-compat",
|
|
||||||
"target_path": "external/sony/boringssl-compat"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
31
manifest.xml
31
manifest.xml
|
@ -26,15 +26,6 @@
|
||||||
<instance>default</instance>
|
<instance>default</instance>
|
||||||
</interface>
|
</interface>
|
||||||
</hal>
|
</hal>
|
||||||
<hal format="hidl">
|
|
||||||
<name>android.hardware.camera.provider</name>
|
|
||||||
<transport arch="32">passthrough</transport>
|
|
||||||
<version>2.4</version>
|
|
||||||
<interface>
|
|
||||||
<name>ICameraProvider</name>
|
|
||||||
<instance>legacy/0</instance>
|
|
||||||
</interface>
|
|
||||||
</hal>
|
|
||||||
<hal format="hidl">
|
<hal format="hidl">
|
||||||
<name>android.hardware.configstore</name>
|
<name>android.hardware.configstore</name>
|
||||||
<transport>hwbinder</transport>
|
<transport>hwbinder</transport>
|
||||||
|
@ -95,19 +86,6 @@
|
||||||
<instance>default</instance>
|
<instance>default</instance>
|
||||||
</interface>
|
</interface>
|
||||||
</hal>
|
</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>
|
|
||||||
</hal>
|
|
||||||
<hal format="hidl">
|
<hal format="hidl">
|
||||||
<name>android.hardware.memtrack</name>
|
<name>android.hardware.memtrack</name>
|
||||||
<transport arch="32">passthrough</transport>
|
<transport arch="32">passthrough</transport>
|
||||||
|
@ -162,15 +140,6 @@
|
||||||
<instance>default</instance>
|
<instance>default</instance>
|
||||||
</interface>
|
</interface>
|
||||||
</hal>
|
</hal>
|
||||||
<hal format="hidl">
|
|
||||||
<name>android.hardware.wifi.hostapd</name>
|
|
||||||
<transport>hwbinder</transport>
|
|
||||||
<version>1.0</version>
|
|
||||||
<interface>
|
|
||||||
<name>IHostapd</name>
|
|
||||||
<instance>default</instance>
|
|
||||||
</interface>
|
|
||||||
</hal>
|
|
||||||
<hal format="hidl">
|
<hal format="hidl">
|
||||||
<name>android.hardware.wifi.supplicant</name>
|
<name>android.hardware.wifi.supplicant</name>
|
||||||
<transport>hwbinder</transport>
|
<transport>hwbinder</transport>
|
||||||
|
|
125
msm8226.mk
125
msm8226.mk
|
@ -1,5 +1,5 @@
|
||||||
# Copyright (C) 2014 The CyanogenMod Project
|
# Copyright (C) 2012 The CyanogenMod Project
|
||||||
# Copyright (C) 2017-2019 The LineageOS Project
|
# Copyright (C) 2017-2018 The LineageOS Project
|
||||||
#
|
#
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
# you may not use this file except in compliance with the License.
|
# you may not use this file except in compliance with the License.
|
||||||
|
@ -13,11 +13,8 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
$(call inherit-product, $(SRC_TARGET_DIR)/product/languages_full.mk)
|
|
||||||
|
|
||||||
# Overlays
|
# Overlays
|
||||||
DEVICE_PACKAGE_OVERLAYS += $(LOCAL_PATH)/overlay
|
DEVICE_PACKAGE_OVERLAYS += device/samsung/msm8226-common/overlay
|
||||||
DEVICE_PACKAGE_OVERLAYS += $(LOCAL_PATH)/overlay-lineage
|
|
||||||
|
|
||||||
# Permissions
|
# Permissions
|
||||||
PRODUCT_COPY_FILES += \
|
PRODUCT_COPY_FILES += \
|
||||||
|
@ -41,36 +38,30 @@ PRODUCT_COPY_FILES += \
|
||||||
frameworks/native/data/etc/android.software.sip.voip.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.sip.voip.xml \
|
frameworks/native/data/etc/android.software.sip.voip.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.sip.voip.xml \
|
||||||
frameworks/native/data/etc/android.software.midi.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.midi.xml
|
frameworks/native/data/etc/android.software.midi.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.midi.xml
|
||||||
|
|
||||||
# Ramdisk
|
|
||||||
PRODUCT_PACKAGES += \
|
|
||||||
init.qcom.bt.sh \
|
|
||||||
init.ril.sh
|
|
||||||
|
|
||||||
PRODUCT_PACKAGES += \
|
|
||||||
init.qcom.power.rc \
|
|
||||||
init.qcom.rc \
|
|
||||||
init.qcom.usb.rc \
|
|
||||||
init.recovery.qcom.rc \
|
|
||||||
ueventd.qcom.rc
|
|
||||||
|
|
||||||
# System properties
|
# System properties
|
||||||
PRODUCT_PROPERTY_OVERRIDES += \
|
PRODUCT_PROPERTY_OVERRIDES += \
|
||||||
audio.offload.buffer.size.kb=32 \
|
audio.offload.buffer.size.kb=32 \
|
||||||
audio.offload.gapless.enabled=false \
|
audio.offload.gapless.enabled=false \
|
||||||
av.offload.enable=true \
|
av.offload.enable=true\
|
||||||
ro.af.client_heap_size_kbyte=7168 \
|
ro.af.client_heap_size_kbyte=7168
|
||||||
persist.vendor.audio.hw.binder.size_kbyte=1024
|
|
||||||
|
|
||||||
PRODUCT_PROPERTY_OVERRIDES += \
|
PRODUCT_PROPERTY_OVERRIDES += \
|
||||||
ro.opengles.version=196608 \
|
ro.opengles.version=196608
|
||||||
debug.hwui.use_buffer_age=false
|
|
||||||
|
|
||||||
PRODUCT_PROPERTY_OVERRIDES += \
|
PRODUCT_PROPERTY_OVERRIDES += \
|
||||||
persist.graphics.vulkan.disable=true
|
persist.graphics.vulkan.disable=true
|
||||||
|
|
||||||
PRODUCT_PROPERTY_OVERRIDES += \
|
PRODUCT_PROPERTY_OVERRIDES += \
|
||||||
persist.timed.enable=true
|
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=""
|
||||||
|
|
||||||
PRODUCT_PROPERTY_OVERRIDES += \
|
PRODUCT_PROPERTY_OVERRIDES += \
|
||||||
dalvik.vm.heapstartsize=8m \
|
dalvik.vm.heapstartsize=8m \
|
||||||
dalvik.vm.heapgrowthlimit=192m \
|
dalvik.vm.heapgrowthlimit=192m \
|
||||||
|
@ -90,45 +81,31 @@ PRODUCT_PROPERTY_OVERRIDES += \
|
||||||
persist.sys.purgeable_assets=1
|
persist.sys.purgeable_assets=1
|
||||||
|
|
||||||
PRODUCT_PROPERTY_OVERRIDES += \
|
PRODUCT_PROPERTY_OVERRIDES += \
|
||||||
ro.vendor.extension_library=/vendor/lib/libqc-opt.so
|
persist.timed.enable=true
|
||||||
|
|
||||||
# Audio
|
# Audio
|
||||||
PRODUCT_PACKAGES += \
|
PRODUCT_PACKAGES += \
|
||||||
android.hardware.audio@2.0-impl \
|
android.hardware.audio@2.0-impl \
|
||||||
android.hardware.audio.effect@2.0-impl \
|
android.hardware.audio.effect@2.0-impl \
|
||||||
|
audio_policy.msm8226 \
|
||||||
audio.a2dp.default \
|
audio.a2dp.default \
|
||||||
audio.primary.msm8226 \
|
audio.primary.msm8226 \
|
||||||
audio.r_submix.default \
|
audio.r_submix.default \
|
||||||
audio.usb.default
|
audio.usb.default \
|
||||||
|
|
||||||
PRODUCT_PACKAGES += \
|
|
||||||
libaudio-resampler \
|
libaudio-resampler \
|
||||||
libqcompostprocbundle \
|
|
||||||
libqcomvisualizer \
|
libqcomvisualizer \
|
||||||
|
libqcompostprocbundle \
|
||||||
libqcomvoiceprocessing \
|
libqcomvoiceprocessing \
|
||||||
tinymix
|
tinymix
|
||||||
|
|
||||||
# Bluetooth
|
# Bluetooth
|
||||||
PRODUCT_PACKAGES += \
|
PRODUCT_PACKAGES += \
|
||||||
android.hardware.bluetooth@1.0-impl \
|
android.hardware.bluetooth@1.0-impl \
|
||||||
libbt-vendor
|
libbt-vendor
|
||||||
|
|
||||||
# Boot animation
|
# Boot animation
|
||||||
TARGET_BOOTANIMATION_HALF_RES := true
|
TARGET_BOOTANIMATION_HALF_RES := true
|
||||||
|
|
||||||
# Camera
|
|
||||||
PRODUCT_PACKAGES += \
|
|
||||||
android.hardware.camera.provider@2.4-impl-legacy \
|
|
||||||
camera.device@1.0-impl-legacy \
|
|
||||||
libboringssl-compat \
|
|
||||||
camera.msm8226 \
|
|
||||||
libxml2 \
|
|
||||||
Snap
|
|
||||||
|
|
||||||
# Charger
|
|
||||||
PRODUCT_PACKAGES += \
|
|
||||||
charger_res_images
|
|
||||||
|
|
||||||
# Display
|
# Display
|
||||||
PRODUCT_PACKAGES += \
|
PRODUCT_PACKAGES += \
|
||||||
android.hardware.graphics.allocator@2.0-impl \
|
android.hardware.graphics.allocator@2.0-impl \
|
||||||
|
@ -164,18 +141,13 @@ PRODUCT_COPY_FILES += \
|
||||||
# Keymaster
|
# Keymaster
|
||||||
PRODUCT_PACKAGES += \
|
PRODUCT_PACKAGES += \
|
||||||
android.hardware.keymaster@3.0-impl
|
android.hardware.keymaster@3.0-impl
|
||||||
|
|
||||||
# Keystore
|
|
||||||
PRODUCT_PACKAGES += \
|
|
||||||
keystore.msm8226
|
|
||||||
|
|
||||||
# Media
|
# Media
|
||||||
PRODUCT_COPY_FILES += \
|
PRODUCT_COPY_FILES += \
|
||||||
frameworks/av/media/libstagefright/data/media_codecs_google_audio.xml:system/etc/media_codecs_google_audio.xml \
|
frameworks/av/media/libstagefright/data/media_codecs_google_audio.xml:system/etc/media_codecs_google_audio.xml \
|
||||||
frameworks/av/media/libstagefright/data/media_codecs_google_telephony.xml:system/etc/media_codecs_google_telephony.xml \
|
frameworks/av/media/libstagefright/data/media_codecs_google_telephony.xml:system/etc/media_codecs_google_telephony.xml \
|
||||||
frameworks/av/media/libstagefright/data/media_codecs_google_video.xml:system/etc/media_codecs_google_video.xml \
|
frameworks/av/media/libstagefright/data/media_codecs_google_video.xml:system/etc/media_codecs_google_video.xml \
|
||||||
frameworks/av/media/libstagefright/data/media_codecs_google_video_le.xml:system/etc/media_codecs_google_video_le.xml \
|
device/samsung/msm8226-common/configs/media_codecs.xml:system/etc/media_codecs.xml
|
||||||
$(LOCAL_PATH)/configs/media_codecs.xml:system/etc/media_codecs.xml
|
|
||||||
|
|
||||||
# OMX
|
# OMX
|
||||||
PRODUCT_PACKAGES += \
|
PRODUCT_PACKAGES += \
|
||||||
|
@ -188,25 +160,41 @@ PRODUCT_PACKAGES += \
|
||||||
libOmxVdec \
|
libOmxVdec \
|
||||||
libOmxVenc \
|
libOmxVenc \
|
||||||
libstagefrighthw
|
libstagefrighthw
|
||||||
|
|
||||||
|
# Offmode charger
|
||||||
|
PRODUCT_PACKAGES += \
|
||||||
|
lineage_charger_res_images
|
||||||
|
|
||||||
# Power HAL
|
# Power HAL
|
||||||
PRODUCT_PACKAGES += \
|
PRODUCT_PACKAGES += \
|
||||||
android.hardware.power@1.0-service-qti
|
android.hardware.power@1.0-service-qti
|
||||||
|
|
||||||
# Preopt
|
# Preopt
|
||||||
PRODUCT_DEXPREOPT_SPEED_APPS += \
|
PRODUCT_DEXPREOPT_SPEED_APPS += \
|
||||||
Settings \
|
Settings \
|
||||||
SystemUI
|
SystemUI
|
||||||
|
|
||||||
|
# Ramdisk
|
||||||
|
PRODUCT_PACKAGES += \
|
||||||
|
init.qcom.bt.sh \
|
||||||
|
init.ril.sh
|
||||||
|
|
||||||
|
PRODUCT_PACKAGES += \
|
||||||
|
init.qcom.power.rc \
|
||||||
|
init.qcom.rc \
|
||||||
|
init.qcom.usb.rc \
|
||||||
|
init.recovery.qcom.rc \
|
||||||
|
ueventd.qcom.rc
|
||||||
|
|
||||||
|
# RenderScript HAL
|
||||||
|
PRODUCT_PACKAGES += \
|
||||||
|
android.hardware.renderscript@1.0-impl
|
||||||
|
|
||||||
# Seccomp
|
# Seccomp
|
||||||
PRODUCT_COPY_FILES += \
|
PRODUCT_COPY_FILES += \
|
||||||
$(LOCAL_PATH)/seccomp/mediacodec.policy:$(TARGET_COPY_OUT_VENDOR)/etc/seccomp_policy/mediacodec.policy \
|
$(LOCAL_PATH)/seccomp/mediacodec.policy:$(TARGET_COPY_OUT_VENDOR)/etc/seccomp_policy/mediacodec.policy \
|
||||||
$(LOCAL_PATH)/seccomp/mediaextractor.policy:$(TARGET_COPY_OUT_VENDOR)/etc/seccomp_policy/mediaextractor.policy
|
$(LOCAL_PATH)/seccomp/mediaextractor.policy:$(TARGET_COPY_OUT_VENDOR)/etc/seccomp_policy/mediaextractor.policy
|
||||||
|
|
||||||
# RenderScript HAL
|
|
||||||
PRODUCT_PACKAGES += \
|
|
||||||
android.hardware.renderscript@1.0-impl
|
|
||||||
|
|
||||||
# Sensors
|
# Sensors
|
||||||
PRODUCT_PACKAGES += \
|
PRODUCT_PACKAGES += \
|
||||||
android.hardware.sensors@1.0-impl
|
android.hardware.sensors@1.0-impl
|
||||||
|
@ -217,21 +205,28 @@ PRODUCT_PACKAGES += \
|
||||||
|
|
||||||
# Wifi
|
# Wifi
|
||||||
PRODUCT_PACKAGES += \
|
PRODUCT_PACKAGES += \
|
||||||
|
android.hardware.wifi@1.0-service \
|
||||||
dhcpcd.conf \
|
dhcpcd.conf \
|
||||||
hostapd \
|
hostapd \
|
||||||
wificond \
|
wificond \
|
||||||
wpa_supplicant \
|
wpa_supplicant \
|
||||||
wpa_supplicant.conf \
|
wpa_supplicant.conf \
|
||||||
libwpa_client \
|
libwpa_client
|
||||||
android.hardware.wifi@1.0-service
|
|
||||||
|
|
||||||
PRODUCT_PACKAGES += \
|
PRODUCT_PACKAGES += \
|
||||||
libcurl \
|
libcurl \
|
||||||
libwcnss_qmi \
|
libwcnss_qmi \
|
||||||
wcnss_service
|
wcnss_service
|
||||||
|
|
||||||
|
PRODUCT_COPY_FILES += \
|
||||||
|
$(LOCAL_PATH)/configs/wifi/wpa_supplicant_overlay.conf:system/etc/wifi/wpa_supplicant_overlay.conf \
|
||||||
|
$(LOCAL_PATH)/configs/wifi/p2p_supplicant_overlay.conf:system/etc/wifi/p2p_supplicant_overlay.conf \
|
||||||
|
$(LOCAL_PATH)/configs/wifi/hostapd_default.conf:system/etc/hostapd/hostapd_default.conf \
|
||||||
|
$(LOCAL_PATH)/prima/WCNSS_cfg.dat:system/etc/firmware/wlan/prima/WCNSS_cfg.dat \
|
||||||
|
$(LOCAL_PATH)/prima/WCNSS_qcom_cfg.ini:system/etc/firmware/wlan/prima/WCNSS_qcom_cfg.ini \
|
||||||
|
$(LOCAL_PATH)/prima/WCNSS_qcom_wlan_nv.bin:system/etc/firmware/wlan/prima/WCNSS_qcom_wlan_nv.bin
|
||||||
# Get non-open-source specific aspects
|
# Get non-open-source specific aspects
|
||||||
$(call inherit-product-if-exists, vendor/samsung/msm8226-common/msm8226-common-vendor.mk)
|
$(call inherit-product-if-exists, vendor/samsung/msm8226-common/msm8226-common-vendor.mk)
|
||||||
|
|
||||||
# Inherit from qcom-common
|
# common msm8226
|
||||||
$(call inherit-product, device/samsung/qcom-common/qcom-common.mk)
|
$(call inherit-product, device/samsung/qcom-common/qcom-common.mk)
|
||||||
|
|
|
@ -21,10 +21,6 @@
|
||||||
for different hardware and product builds. -->
|
for different hardware and product builds. -->
|
||||||
<resources>
|
<resources>
|
||||||
|
|
||||||
<!-- Should the pinner service pin the Camera application? -->
|
|
||||||
<bool name="config_pinnerCameraApp">true</bool>
|
|
||||||
<bool name="config_setColorTransformAccelerated">false</bool>
|
|
||||||
|
|
||||||
<!-- Values for GPS configuration -->
|
<!-- Values for GPS configuration -->
|
||||||
<string-array translatable="false" name="config_gpsParameters">
|
<string-array translatable="false" name="config_gpsParameters">
|
||||||
<item>XTRA_SERVER_1=https://xtrapath1.izatcloud.net/xtra3grc.bin</item>
|
<item>XTRA_SERVER_1=https://xtrapath1.izatcloud.net/xtra3grc.bin</item>
|
||||||
|
@ -37,26 +33,12 @@
|
||||||
<item>LPP_PROFILE=0</item>
|
<item>LPP_PROFILE=0</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
<!-- Operating voltage for bluetooth controller. 0 by default-->
|
|
||||||
<integer translatable="false" name="config_bluetooth_operating_voltage_mv">3300</integer>
|
|
||||||
|
|
||||||
<!-- Integer indicating wpa_supplicant scan interval in milliseconds -->
|
|
||||||
<integer translatable="false" name="config_wifi_supplicant_scan_interval">40000</integer>
|
|
||||||
|
|
||||||
<!-- Default list of files pinned by the Pinner Service -->
|
<!-- Default list of files pinned by the Pinner Service -->
|
||||||
<string-array translatable="false" name="config_defaultPinnerServiceFiles">
|
<string-array translatable="false" name="config_defaultPinnerServiceFiles">
|
||||||
<item>"/system/framework/arm/boot-framework.oat"</item>
|
|
||||||
<item>"/system/framework/boot-framework.vdex"</item>
|
|
||||||
<item>"/system/framework/oat/arm/services.odex"</item>
|
|
||||||
<item>"/system/framework/oat/arm/services.vdex"</item>
|
|
||||||
<item>"/system/framework/arm/boot.oat"</item>
|
|
||||||
<item>"/system/framework/boot.vdex"</item>
|
|
||||||
<item>"/system/framework/arm/boot-core-libart.oat"</item>
|
|
||||||
<item>"/system/framework/boot-core-libart.vdex"</item>
|
|
||||||
<item>"/system/priv-app/SystemUI/SystemUI.apk"</item>
|
<item>"/system/priv-app/SystemUI/SystemUI.apk"</item>
|
||||||
<item>"/data/dalvik-cache/arm64/system@priv-app@SystemUI@SystemUI.apk@classes.dex"</item>
|
<item>"/data/dalvik-cache/arm/system@priv-app@SystemUI@SystemUI.apk@classes.dex"</item>
|
||||||
<item>"/data/dalvik-cache/arm64/system@priv-app@SystemUI@SystemUI.apk@classes.vdex"</item>
|
<item>"/data/dalvik-cache/arm/system@priv-app@SystemUI@SystemUI.apk@classes.vdex"</item>
|
||||||
<item>"/system/lib/libsurfaceflinger.so"</item>
|
<item>"/system/lib/libsurfaceflinger.so"</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -1,28 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!--
|
|
||||||
/*
|
|
||||||
** Copyright 2016, The CyanogenMod Project
|
|
||||||
**
|
|
||||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
** you may not use this file except in compliance with the License.
|
|
||||||
** You may obtain a copy of the License at
|
|
||||||
**
|
|
||||||
** http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
**
|
|
||||||
** Unless required by applicable law or agreed to in writing, software
|
|
||||||
** distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
** See the License for the specific language governing permissions and
|
|
||||||
** limitations under the License.
|
|
||||||
*/
|
|
||||||
-->
|
|
||||||
|
|
||||||
<resources>
|
|
||||||
|
|
||||||
<!-- If true, enable the advance anti-falsing classifier on the lockscreen. On some devices it
|
|
||||||
does not work well, particularly with noisy touchscreens. Note that disabling it may
|
|
||||||
increase the rate of unintentional unlocks. -->
|
|
||||||
<bool name="config_lockscreenAntiFalsingClassifierEnabled">false</bool>
|
|
||||||
|
|
||||||
</resources>
|
|
||||||
|
|
|
@ -22,29 +22,4 @@
|
||||||
<boolean name="world_phone_bool" value="true" />
|
<boolean name="world_phone_bool" value="true" />
|
||||||
<boolean name="allow_adding_apns_bool" value="true" />
|
<boolean name="allow_adding_apns_bool" value="true" />
|
||||||
</carrier_config>
|
</carrier_config>
|
||||||
|
|
||||||
<!-- Verizon hackery -->
|
|
||||||
<carrier_config mcc="204" mnc="04" gid1="BAE0000000000000">
|
|
||||||
<boolean name="disable_cdma_activation_code_bool" value="true" />
|
|
||||||
</carrier_config>
|
|
||||||
<carrier_config mcc="310" mnc="004">
|
|
||||||
<boolean name="disable_cdma_activation_code_bool" value="true" />
|
|
||||||
</carrier_config>
|
|
||||||
<carrier_config mcc="311" mnc="480">
|
|
||||||
<boolean name="disable_cdma_activation_code_bool" value="true" />
|
|
||||||
</carrier_config>
|
|
||||||
|
|
||||||
<!-- Sprint hackery -->
|
|
||||||
<carrier_config mcc="310" mnc="120">
|
|
||||||
<boolean name="sprint_mwi_quirk" value="true" />
|
|
||||||
</carrier_config>
|
|
||||||
<carrier_config mcc="311" mnc="490">
|
|
||||||
<boolean name="sprint_mwi_quirk" value="true" />
|
|
||||||
</carrier_config>
|
|
||||||
<carrier_config mcc="311" mnc="870">
|
|
||||||
<boolean name="sprint_mwi_quirk" value="true" />
|
|
||||||
</carrier_config>
|
|
||||||
<carrier_config mcc="312" mnc="530">
|
|
||||||
<boolean name="sprint_mwi_quirk" value="true" />
|
|
||||||
</carrier_config>
|
|
||||||
</carrier_config_list>
|
</carrier_config_list>
|
||||||
|
|
|
@ -1,29 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!--
|
|
||||||
/*
|
|
||||||
**
|
|
||||||
** Copyright 2015 The Android Open Source Project
|
|
||||||
** 2017 The LineageOS Project
|
|
||||||
**
|
|
||||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
** you may not use this file except in compliance with the License.
|
|
||||||
** You may obtain a copy of the License at
|
|
||||||
**
|
|
||||||
** http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
**
|
|
||||||
** Unless required by applicable law or agreed to in writing, software
|
|
||||||
** distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
** See the License for the specific language governing permissions and
|
|
||||||
** limitations under the License.
|
|
||||||
*/
|
|
||||||
-->
|
|
||||||
<resources>
|
|
||||||
<!-- IDs for each color mode. The values must match the corresponding constants in
|
|
||||||
android.view.Display -->
|
|
||||||
<integer-array name="color_mode_ids">
|
|
||||||
<item>0</item>
|
|
||||||
<item>-1</item>
|
|
||||||
<item>-1</item>
|
|
||||||
</integer-array>
|
|
||||||
</resources>
|
|
BIN
prima/WCNSS_cfg.dat
Normal file
BIN
prima/WCNSS_cfg.dat
Normal file
Binary file not shown.
419
prima/WCNSS_qcom_cfg.ini
Normal file
419
prima/WCNSS_qcom_cfg.ini
Normal file
|
@ -0,0 +1,419 @@
|
||||||
|
# This file allows user to override the factory
|
||||||
|
|
||||||
|
# defaults for the WLAN Driver
|
||||||
|
|
||||||
|
|
||||||
|
# Enable IMPS or not
|
||||||
|
gEnableImps=1
|
||||||
|
|
||||||
|
# Enable/Disable Idle Scan
|
||||||
|
|
||||||
|
gEnableIdleScan=0
|
||||||
|
|
||||||
|
|
||||||
|
# Enable/Disable vsta based on MAX Assoc limit
|
||||||
|
gEnableVSTASupport=1
|
||||||
|
|
||||||
|
|
||||||
|
# Increase sleep duration (seconds) during IMPS
|
||||||
|
# 0 implies no periodic wake up from IMPS. Periodic wakeup is
|
||||||
|
# unnecessary if Idle Scan is disabled.
|
||||||
|
gImpsModSleepTime=0
|
||||||
|
|
||||||
|
|
||||||
|
# Enable BMPS or not
|
||||||
|
gEnableBmps=1
|
||||||
|
|
||||||
|
# Enable suspend or not
|
||||||
|
|
||||||
|
# 1: Enable standby, 2: Enable Deep sleep, 3: Enable Mcast/Bcast Filter
|
||||||
|
|
||||||
|
gEnableSuspend=3
|
||||||
|
|
||||||
|
# Phy Mode (auto, b, g, n, etc)
|
||||||
|
# Valid values are 0-9, with 0 = Auto, 4 = 11n, 9 = 11ac
|
||||||
|
gDot11Mode=0
|
||||||
|
|
||||||
|
|
||||||
|
# CSR Roaming Enable(1) Disable(0)
|
||||||
|
|
||||||
|
gRoamingTime=0
|
||||||
|
|
||||||
|
|
||||||
|
# Assigned MAC Addresses - This will be used until NV items are in place
|
||||||
|
|
||||||
|
# Each byte of MAC address is represented in Hex format as XX
|
||||||
|
|
||||||
|
Intf0MacAddress=000AF58989FF
|
||||||
|
Intf1MacAddress=000AF58989FE
|
||||||
|
Intf2MacAddress=000AF58989FD
|
||||||
|
|
||||||
|
Intf3MacAddress=000AF58989FC
|
||||||
|
|
||||||
|
|
||||||
|
# UAPSD service interval for VO,VI, BE, BK traffic
|
||||||
|
|
||||||
|
InfraUapsdVoSrvIntv=0
|
||||||
|
|
||||||
|
InfraUapsdViSrvIntv=0
|
||||||
|
|
||||||
|
InfraUapsdBeSrvIntv=0
|
||||||
|
|
||||||
|
InfraUapsdBkSrvIntv=0
|
||||||
|
|
||||||
|
# Flag to allow STA send AddTspec even when ACM is Off
|
||||||
|
gAddTSWhenACMIsOff=1
|
||||||
|
|
||||||
|
# Make 1x1 the default antenna configuration
|
||||||
|
|
||||||
|
gNumRxAnt=1
|
||||||
|
|
||||||
|
|
||||||
|
# Beacon filtering frequency (unit in beacon intervals)
|
||||||
|
|
||||||
|
gNthBeaconFilter=50
|
||||||
|
|
||||||
|
|
||||||
|
# Enable WAPI or not
|
||||||
|
|
||||||
|
# WAPIIsEnabled=0
|
||||||
|
|
||||||
|
|
||||||
|
# Flags to filter Mcast abd Bcast RX packets.
|
||||||
|
|
||||||
|
# Value 0: No filtering, 1: Filter all Multicast.
|
||||||
|
|
||||||
|
# 2: Filter all Broadcast. 3: Filter all Mcast abd Bcast
|
||||||
|
|
||||||
|
McastBcastFilter=3
|
||||||
|
|
||||||
|
|
||||||
|
#Flag to enable HostARPOffload feature or not
|
||||||
|
|
||||||
|
hostArpOffload=1
|
||||||
|
|
||||||
|
|
||||||
|
#Flag to enable HostNSOffload feature or not
|
||||||
|
|
||||||
|
hostNSOffload=0
|
||||||
|
|
||||||
|
#SoftAP Related Parameters
|
||||||
|
|
||||||
|
# AP MAc addr
|
||||||
|
|
||||||
|
gAPMacAddr=000AF589dcab
|
||||||
|
|
||||||
|
|
||||||
|
# 802.11n Protection flag
|
||||||
|
|
||||||
|
gEnableApProt=1
|
||||||
|
|
||||||
|
|
||||||
|
#Enable OBSS protection
|
||||||
|
|
||||||
|
gEnableApOBSSProt=1
|
||||||
|
|
||||||
|
|
||||||
|
#Enable/Disable UAPSD for SoftAP
|
||||||
|
|
||||||
|
gEnableApUapsd=0
|
||||||
|
|
||||||
|
|
||||||
|
# Fixed Rate
|
||||||
|
|
||||||
|
gFixedRate=0
|
||||||
|
|
||||||
|
|
||||||
|
# Maximum Tx power
|
||||||
|
|
||||||
|
# gTxPowerCap=30
|
||||||
|
|
||||||
|
|
||||||
|
# Fragmentation Threshold
|
||||||
|
|
||||||
|
# gFragmentationThreshold=2346
|
||||||
|
|
||||||
|
|
||||||
|
# RTS threshold
|
||||||
|
|
||||||
|
RTSThreshold=2347
|
||||||
|
|
||||||
|
|
||||||
|
# Intra-BSS forward
|
||||||
|
|
||||||
|
gDisableIntraBssFwd=0
|
||||||
|
|
||||||
|
|
||||||
|
# WMM Enable/Disable
|
||||||
|
|
||||||
|
WmmIsEnabled=0
|
||||||
|
|
||||||
|
|
||||||
|
# 802.11d support
|
||||||
|
|
||||||
|
g11dSupportEnabled=1
|
||||||
|
|
||||||
|
# 802.11h support
|
||||||
|
|
||||||
|
g11hSupportEnabled=1
|
||||||
|
|
||||||
|
# CCX Support and fast transition
|
||||||
|
CcxEnabled=0
|
||||||
|
FastTransitionEnabled=1
|
||||||
|
ImplicitQosIsEnabled=0
|
||||||
|
gNeighborScanTimerPeriod=200
|
||||||
|
|
||||||
|
gNeighborLookupThreshold=76
|
||||||
|
gNeighborReassocThreshold=81
|
||||||
|
|
||||||
|
gNeighborScanChannelMinTime=20
|
||||||
|
gNeighborScanChannelMaxTime=30
|
||||||
|
gMaxNeighborReqTries=3
|
||||||
|
|
||||||
|
# Legacy (non-CCX, non-802.11r) Fast Roaming Support
|
||||||
|
# To enable, set FastRoamEnabled=1
|
||||||
|
# To disable, set FastRoamEnabled=0
|
||||||
|
FastRoamEnabled=1
|
||||||
|
|
||||||
|
#Check if the AP to which we are roaming is better than current AP in terms of RSSI.
|
||||||
|
#Checking is disabled if set to Zero.Otherwise it will use this value as to how better
|
||||||
|
#the RSSI of the new/roamable AP should be for roaming
|
||||||
|
RoamRssiDiff=3
|
||||||
|
|
||||||
|
# If the RSSI of any available candidate is better than currently associated
|
||||||
|
# AP by at least gImmediateRoamRssiDiff, then being to roam immediately (without
|
||||||
|
# registering for reassoc threshold).
|
||||||
|
# NOTE: Value of 0 means that we would register for reassoc threshold.
|
||||||
|
gImmediateRoamRssiDiff=10
|
||||||
|
|
||||||
|
# To enable, set gRoamIntraBand=1 (Roaming within band)
|
||||||
|
# To disable, set gRoamIntraBand=0 (Roaming across band)
|
||||||
|
|
||||||
|
gRoamIntraBand=0
|
||||||
|
|
||||||
|
#SAP Country code
|
||||||
|
|
||||||
|
# Default Country Code is 2 bytes, 3rd byte is optional indoor or out door.
|
||||||
|
|
||||||
|
# Example
|
||||||
|
|
||||||
|
# US Indoor, USI
|
||||||
|
|
||||||
|
# Korea Outdoor, KRO
|
||||||
|
|
||||||
|
# Japan without optional byte, JP
|
||||||
|
|
||||||
|
# France without optional byte, FR
|
||||||
|
|
||||||
|
#gAPCntryCode=USI
|
||||||
|
|
||||||
|
|
||||||
|
#Short Guard Interval Enable/disable
|
||||||
|
|
||||||
|
gShortGI20Mhz=1
|
||||||
|
|
||||||
|
gShortGI40Mhz=1
|
||||||
|
|
||||||
|
|
||||||
|
#Auto Shutdown Value in seconds. A value of 0 means Auto shutoff is disabled
|
||||||
|
|
||||||
|
gAPAutoShutOff=0
|
||||||
|
|
||||||
|
|
||||||
|
# SAP auto channel selection configuration
|
||||||
|
|
||||||
|
# 0 = disable auto channel selection
|
||||||
|
|
||||||
|
# 1 = enable auto channel selection, channel provided by supplicant will be ignored
|
||||||
|
|
||||||
|
gApAutoChannelSelection=0
|
||||||
|
|
||||||
|
|
||||||
|
# Listen Energy Detect Mode Configuration
|
||||||
|
|
||||||
|
# Valid values 0-128
|
||||||
|
|
||||||
|
# 128 means disable Energy Detect feature
|
||||||
|
|
||||||
|
# 0-9 are threshold code and 7 is recommended value from system if feature is to be enabled.
|
||||||
|
|
||||||
|
# 10-128 are reserved.
|
||||||
|
|
||||||
|
# The EDET threshold mapping is as follows in 3dB step:
|
||||||
|
|
||||||
|
# 0 = -60 dBm
|
||||||
|
|
||||||
|
# 1 = -63 dBm
|
||||||
|
|
||||||
|
# 2 = -66 dBm
|
||||||
|
|
||||||
|
# ...
|
||||||
|
|
||||||
|
# 7 = -81 dBm
|
||||||
|
|
||||||
|
# 8 = -84 dBm
|
||||||
|
|
||||||
|
# 9 = -87 dBm
|
||||||
|
|
||||||
|
# Note: Any of these settings are valid. Setting 0 would yield the highest power saving (in a noisy environment) at the cost of more range. The range impact is approximately #calculated as:
|
||||||
|
|
||||||
|
#
|
||||||
|
|
||||||
|
# Range Loss (dB) = EDET threshold level (dBm) + 97 dBm.
|
||||||
|
|
||||||
|
#
|
||||||
|
|
||||||
|
gEnablePhyAgcListenMode=128
|
||||||
|
|
||||||
|
|
||||||
|
#Preferred channel to start BT AMP AP mode (0 means, any channel)
|
||||||
|
|
||||||
|
BtAmpPreferredChannel=0
|
||||||
|
|
||||||
|
|
||||||
|
#Preferred band (both or 2.4 only or 5 only)
|
||||||
|
|
||||||
|
BandCapability=0
|
||||||
|
|
||||||
|
|
||||||
|
#Beacon Early Termination (1 = enable the BET feature, 0 = disable)
|
||||||
|
|
||||||
|
enableBeaconEarlyTermination=0
|
||||||
|
|
||||||
|
beaconEarlyTerminationWakeInterval=3
|
||||||
|
|
||||||
|
|
||||||
|
#Bluetooth Alternate Mac Phy (1 = enable the BT AMP feature, 0 = disable)
|
||||||
|
|
||||||
|
gEnableBtAmp=0
|
||||||
|
|
||||||
|
|
||||||
|
#SOFTAP Channel Range selection
|
||||||
|
|
||||||
|
gAPChannelSelectStartChannel=1
|
||||||
|
|
||||||
|
gAPChannelSelectEndChannel=11
|
||||||
|
|
||||||
|
|
||||||
|
#SOFTAP Channel Range selection Operating band
|
||||||
|
|
||||||
|
# 0:2.4GHZ 1: LOW-5GHZ 2:MID-5GHZ 3:HIGH-5GHZ 4: 4.9HZ BAND
|
||||||
|
|
||||||
|
gAPChannelSelectOperatingBand=0
|
||||||
|
|
||||||
|
|
||||||
|
#Channel Bonding
|
||||||
|
gChannelBondingMode5GHz=1
|
||||||
|
|
||||||
|
|
||||||
|
#Enable Keep alive with non-zero period value
|
||||||
|
|
||||||
|
#gStaKeepAlivePeriod = 30
|
||||||
|
|
||||||
|
#AP LINK MONITOR TIMEOUT is used for both SAP and GO mode.
|
||||||
|
#It is used to change the frequency of keep alive packets in the AP Link Monitor period which is by
|
||||||
|
#default 20s. Currently the keep alive packets are sent as an interval of 3s but after this change
|
||||||
|
#the keep alive packet frequency can be changed.
|
||||||
|
|
||||||
|
#gApLinkMonitorPeriod = 3
|
||||||
|
|
||||||
|
|
||||||
|
#If set will start with active scan after driver load, otherwise will start with
|
||||||
|
|
||||||
|
#passive scan to find out the domain
|
||||||
|
|
||||||
|
gEnableBypass11d=1
|
||||||
|
|
||||||
|
|
||||||
|
#If set to 0, will not scan DFS channels
|
||||||
|
|
||||||
|
gEnableDFSChnlScan=1
|
||||||
|
|
||||||
|
|
||||||
|
gVhtChannelWidth=2
|
||||||
|
gEnableLogp=1
|
||||||
|
|
||||||
|
|
||||||
|
# Enable Automatic Tx Power control
|
||||||
|
|
||||||
|
gEnableAutomaticTxPowerControl=1
|
||||||
|
|
||||||
|
# 0 for OLPC 1 for CLPC and SCPC
|
||||||
|
gEnableCloseLoop=1
|
||||||
|
|
||||||
|
#Data Inactivity Timeout when in powersave (in ms)
|
||||||
|
gDataInactivityTimeout=200
|
||||||
|
|
||||||
|
# VHT Tx/Rx MCS values
|
||||||
|
# Valid values are 0,1,2. If commented out, the default value is 0.
|
||||||
|
# 0=MCS0-7, 1=MCS0-8, 2=MCS0-9
|
||||||
|
gVhtRxMCS=2
|
||||||
|
gVhtTxMCS=2
|
||||||
|
|
||||||
|
# Enable CRDA regulatory support by settings default country code
|
||||||
|
#gCrdaDefaultCountryCode=TW
|
||||||
|
|
||||||
|
# Scan Timing Parameters
|
||||||
|
# gPassiveMaxChannelTime=110
|
||||||
|
# gPassiveMinChannelTime=60
|
||||||
|
# gActiveMaxChannelTime=40
|
||||||
|
# gActiveMinChannelTime=20
|
||||||
|
|
||||||
|
#If set to 0, MCC is not allowed.
|
||||||
|
gEnableMCCMode=1
|
||||||
|
|
||||||
|
# 1=enable STBC; 0=disable STBC
|
||||||
|
gEnableRXSTBC=1
|
||||||
|
|
||||||
|
# Enable Active mode offload
|
||||||
|
gEnableActiveModeOffload=1
|
||||||
|
|
||||||
|
#Enable Scan Results Aging based on timer
|
||||||
|
#Timer value is in seconds
|
||||||
|
#If Set to 0 it will not enable the feature
|
||||||
|
gScanAgingTime=0
|
||||||
|
|
||||||
|
#Enable Power saving mechanism Based on Android Framework
|
||||||
|
#If set to 0 Driver internally control the Power saving mechanism
|
||||||
|
#If set to 1 Android Framwrok control the Power saving mechanism
|
||||||
|
isAndroidPsEn=0
|
||||||
|
|
||||||
|
#disable LDPC in STA mode if the AP is TXBF capable
|
||||||
|
gDisableLDPCWithTxbfAP=1
|
||||||
|
|
||||||
|
#Enable thermal mitigation
|
||||||
|
gThermalMitigationEnable=1
|
||||||
|
|
||||||
|
gEnableFastRoamInConcurrency=1
|
||||||
|
|
||||||
|
#List of Country codes for which 11ac needs to be disabled
|
||||||
|
#Each country code must be delimited by comma(,)
|
||||||
|
gListOfNon11acCountryCode=RU,UA,ZA
|
||||||
|
|
||||||
|
#Maxium Channel time in msec
|
||||||
|
gMaxMediumTime = 6000
|
||||||
|
|
||||||
|
# 802.11K support
|
||||||
|
gRrmEnable=1
|
||||||
|
gRrmOperChanMax=8
|
||||||
|
gRrmNonOperChanMax=8
|
||||||
|
gRrmRandIntvl=100
|
||||||
|
|
||||||
|
#Scan offload
|
||||||
|
gEnableDirectedScanOffload=0
|
||||||
|
|
||||||
|
# Oxygen network (prop IE for IBSS)
|
||||||
|
gEnableOxygenNwk=0
|
||||||
|
|
||||||
|
#FlexConnect Power Factor
|
||||||
|
#Default is set to 0 (disable)
|
||||||
|
gFlexConnectPowerFactor=0
|
||||||
|
|
||||||
|
#SAP/P2P-GO mode traffic monitor
|
||||||
|
gEnableTrafficMonitor=1
|
||||||
|
gTrafficIdleTimeout=3000
|
||||||
|
|
||||||
|
END
|
||||||
|
|
||||||
|
# Note: Configuration parser would not read anything past the END marker
|
||||||
|
|
BIN
prima/WCNSS_qcom_wlan_nv.bin
Normal file
BIN
prima/WCNSS_qcom_wlan_nv.bin
Normal file
Binary file not shown.
|
@ -1,374 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) 2014, The CyanogenMod Project. All rights reserved.
|
|
||||||
*
|
|
||||||
* 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 com.android.internal.telephony;
|
|
||||||
|
|
||||||
import static com.android.internal.telephony.RILConstants.*;
|
|
||||||
|
|
||||||
import android.content.Context;
|
|
||||||
import android.telephony.Rlog;
|
|
||||||
import android.os.AsyncResult;
|
|
||||||
import android.os.Message;
|
|
||||||
import android.os.Parcel;
|
|
||||||
import android.os.SystemProperties;
|
|
||||||
import android.telephony.PhoneNumberUtils;
|
|
||||||
import android.telephony.SignalStrength;
|
|
||||||
import com.android.internal.telephony.uicc.IccCardApplicationStatus;
|
|
||||||
import com.android.internal.telephony.uicc.IccCardStatus;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Collections;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Qualcomm RIL for Samsung MSM8226 Single-sim devices
|
|
||||||
* {@hide}
|
|
||||||
*/
|
|
||||||
public class SamsungMSM8226RIL extends RIL {
|
|
||||||
|
|
||||||
private static final int RIL_REQUEST_DIAL_EMERGENCY = 10001;
|
|
||||||
private static final int RIL_UNSOL_ON_SS_LL = 11055;
|
|
||||||
|
|
||||||
public SamsungMSM8226RIL(Context context, int preferredNetworkType, int cdmaSubscription) {
|
|
||||||
super(context, preferredNetworkType, cdmaSubscription, null);
|
|
||||||
mQANElements = 6;
|
|
||||||
}
|
|
||||||
|
|
||||||
public SamsungMSM8226RIL(Context context, int preferredNetworkType,
|
|
||||||
int cdmaSubscription, Integer instanceId) {
|
|
||||||
super(context, preferredNetworkType, cdmaSubscription, instanceId);
|
|
||||||
mQANElements = 6;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void
|
|
||||||
dial(String address, int clirMode, UUSInfo uusInfo, Message result) {
|
|
||||||
if (PhoneNumberUtils.isEmergencyNumber(address)) {
|
|
||||||
dialEmergencyCall(address, clirMode, result);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
RILRequest rr = RILRequest.obtain(RIL_REQUEST_DIAL, result);
|
|
||||||
|
|
||||||
rr.mParcel.writeString(address);
|
|
||||||
rr.mParcel.writeInt(clirMode);
|
|
||||||
rr.mParcel.writeInt(0); // CallDetails.call_type
|
|
||||||
rr.mParcel.writeInt(1); // CallDetails.call_domain
|
|
||||||
rr.mParcel.writeString(""); // CallDetails.getCsvFromExtras
|
|
||||||
|
|
||||||
if (uusInfo == null) {
|
|
||||||
rr.mParcel.writeInt(0); // UUS information is absent
|
|
||||||
} else {
|
|
||||||
rr.mParcel.writeInt(1); // UUS information is present
|
|
||||||
rr.mParcel.writeInt(uusInfo.getType());
|
|
||||||
rr.mParcel.writeInt(uusInfo.getDcs());
|
|
||||||
rr.mParcel.writeByteArray(uusInfo.getUserData());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (RILJ_LOGD) riljLog(rr.serialString() + "> " + requestToString(rr.mRequest));
|
|
||||||
|
|
||||||
send(rr);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected Object
|
|
||||||
responseIccCardStatus(Parcel p) {
|
|
||||||
IccCardApplicationStatus appStatus;
|
|
||||||
|
|
||||||
IccCardStatus cardStatus = new IccCardStatus();
|
|
||||||
cardStatus.setCardState(p.readInt());
|
|
||||||
cardStatus.setUniversalPinState(p.readInt());
|
|
||||||
cardStatus.mGsmUmtsSubscriptionAppIndex = p.readInt();
|
|
||||||
cardStatus.mCdmaSubscriptionAppIndex = p.readInt();
|
|
||||||
cardStatus.mImsSubscriptionAppIndex = p.readInt();
|
|
||||||
|
|
||||||
int numApplications = p.readInt();
|
|
||||||
|
|
||||||
// limit to maximum allowed applications
|
|
||||||
if (numApplications > IccCardStatus.CARD_MAX_APPS) {
|
|
||||||
numApplications = IccCardStatus.CARD_MAX_APPS;
|
|
||||||
}
|
|
||||||
cardStatus.mApplications = new IccCardApplicationStatus[numApplications];
|
|
||||||
|
|
||||||
for (int i = 0 ; i < numApplications ; i++) {
|
|
||||||
appStatus = new IccCardApplicationStatus();
|
|
||||||
appStatus.app_type = appStatus.AppTypeFromRILInt(p.readInt());
|
|
||||||
appStatus.app_state = appStatus.AppStateFromRILInt(p.readInt());
|
|
||||||
appStatus.perso_substate = appStatus.PersoSubstateFromRILInt(p.readInt());
|
|
||||||
appStatus.aid = p.readString();
|
|
||||||
appStatus.app_label = p.readString();
|
|
||||||
appStatus.pin1_replaced = p.readInt();
|
|
||||||
appStatus.pin1 = appStatus.PinStateFromRILInt(p.readInt());
|
|
||||||
appStatus.pin2 = appStatus.PinStateFromRILInt(p.readInt());
|
|
||||||
p.readInt(); // pin1_num_retries
|
|
||||||
p.readInt(); // puk1_num_retries
|
|
||||||
p.readInt(); // pin2_num_retries
|
|
||||||
p.readInt(); // puk2_num_retries
|
|
||||||
p.readInt(); // perso_unblock_retries
|
|
||||||
|
|
||||||
cardStatus.mApplications[i] = appStatus;
|
|
||||||
}
|
|
||||||
return cardStatus;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected Object
|
|
||||||
responseCallList(Parcel p) {
|
|
||||||
int num;
|
|
||||||
int voiceSettings;
|
|
||||||
ArrayList<DriverCall> response;
|
|
||||||
DriverCall dc;
|
|
||||||
|
|
||||||
num = p.readInt();
|
|
||||||
response = new ArrayList<DriverCall>(num);
|
|
||||||
|
|
||||||
if (RILJ_LOGV) {
|
|
||||||
riljLog("responseCallList: num=" + num +
|
|
||||||
" mEmergencyCallbackModeRegistrant=" + mEmergencyCallbackModeRegistrant +
|
|
||||||
" mTestingEmergencyCall=" + mTestingEmergencyCall.get());
|
|
||||||
}
|
|
||||||
for (int i = 0 ; i < num ; i++) {
|
|
||||||
dc = new DriverCall();
|
|
||||||
|
|
||||||
dc.state = DriverCall.stateFromCLCC(p.readInt());
|
|
||||||
dc.index = p.readInt() & 0xff;
|
|
||||||
dc.TOA = p.readInt();
|
|
||||||
dc.isMpty = (0 != p.readInt());
|
|
||||||
dc.isMT = (0 != p.readInt());
|
|
||||||
dc.als = p.readInt();
|
|
||||||
voiceSettings = p.readInt();
|
|
||||||
dc.isVoice = (0 == voiceSettings) ? false : true;
|
|
||||||
boolean isVideo;
|
|
||||||
int call_type = p.readInt(); // Samsung CallDetails
|
|
||||||
int call_domain = p.readInt(); // Samsung CallDetails
|
|
||||||
String csv = p.readString(); // Samsung CallDetails
|
|
||||||
dc.isVoicePrivacy = (0 != p.readInt());
|
|
||||||
dc.number = p.readString();
|
|
||||||
int np = p.readInt();
|
|
||||||
dc.numberPresentation = DriverCall.presentationFromCLIP(np);
|
|
||||||
dc.name = p.readString();
|
|
||||||
dc.namePresentation = DriverCall.presentationFromCLIP(p.readInt());
|
|
||||||
int uusInfoPresent = p.readInt();
|
|
||||||
if (uusInfoPresent == 1) {
|
|
||||||
dc.uusInfo = new UUSInfo();
|
|
||||||
dc.uusInfo.setType(p.readInt());
|
|
||||||
dc.uusInfo.setDcs(p.readInt());
|
|
||||||
byte[] userData = p.createByteArray();
|
|
||||||
dc.uusInfo.setUserData(userData);
|
|
||||||
riljLogv(String.format("Incoming UUS : type=%d, dcs=%d, length=%d",
|
|
||||||
dc.uusInfo.getType(), dc.uusInfo.getDcs(),
|
|
||||||
dc.uusInfo.getUserData().length));
|
|
||||||
riljLogv("Incoming UUS : data (string)="
|
|
||||||
+ new String(dc.uusInfo.getUserData()));
|
|
||||||
riljLogv("Incoming UUS : data (hex): "
|
|
||||||
+ IccUtils.bytesToHexString(dc.uusInfo.getUserData()));
|
|
||||||
} else {
|
|
||||||
riljLogv("Incoming UUS : NOT present!");
|
|
||||||
}
|
|
||||||
|
|
||||||
// Make sure there's a leading + on addresses with a TOA of 145
|
|
||||||
dc.number = PhoneNumberUtils.stringFromStringAndTOA(dc.number, dc.TOA);
|
|
||||||
|
|
||||||
response.add(dc);
|
|
||||||
|
|
||||||
if (dc.isVoicePrivacy) {
|
|
||||||
mVoicePrivacyOnRegistrants.notifyRegistrants();
|
|
||||||
riljLog("InCall VoicePrivacy is enabled");
|
|
||||||
} else {
|
|
||||||
mVoicePrivacyOffRegistrants.notifyRegistrants();
|
|
||||||
riljLog("InCall VoicePrivacy is disabled");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Collections.sort(response);
|
|
||||||
|
|
||||||
if ((num == 0) && mTestingEmergencyCall.getAndSet(false)) {
|
|
||||||
if (mEmergencyCallbackModeRegistrant != null) {
|
|
||||||
riljLog("responseCallList: call ended, testing emergency call," +
|
|
||||||
" notify ECM Registrants");
|
|
||||||
mEmergencyCallbackModeRegistrant.notifyRegistrant();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return response;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected Object
|
|
||||||
responseSignalStrength(Parcel p) {
|
|
||||||
int gsmSignalStrength = p.readInt() & 0xff;
|
|
||||||
int gsmBitErrorRate = p.readInt();
|
|
||||||
int cdmaDbm = p.readInt();
|
|
||||||
int cdmaEcio = p.readInt();
|
|
||||||
int evdoDbm = p.readInt();
|
|
||||||
int evdoEcio = p.readInt();
|
|
||||||
int evdoSnr = p.readInt();
|
|
||||||
int lteSignalStrength = p.readInt();
|
|
||||||
int lteRsrp = p.readInt();
|
|
||||||
int lteRsrq = p.readInt();
|
|
||||||
int lteRssnr = p.readInt();
|
|
||||||
int lteCqi = p.readInt();
|
|
||||||
int tdScdmaRscp = p.readInt();
|
|
||||||
// constructor sets default true, makeSignalStrengthFromRilParcel does not set it
|
|
||||||
boolean isGsm = true;
|
|
||||||
|
|
||||||
if ((lteSignalStrength & 0xff) == 255 || lteSignalStrength == 99) {
|
|
||||||
lteSignalStrength = 99;
|
|
||||||
lteRsrp = SignalStrength.INVALID;
|
|
||||||
lteRsrq = SignalStrength.INVALID;
|
|
||||||
lteRssnr = SignalStrength.INVALID;
|
|
||||||
lteCqi = SignalStrength.INVALID;
|
|
||||||
} else {
|
|
||||||
lteSignalStrength &= 0xff;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (RILJ_LOGD)
|
|
||||||
riljLog("gsmSignalStrength:" + gsmSignalStrength + " gsmBitErrorRate:" + gsmBitErrorRate +
|
|
||||||
" cdmaDbm:" + cdmaDbm + " cdmaEcio:" + cdmaEcio + " evdoDbm:" + evdoDbm +
|
|
||||||
" evdoEcio: " + evdoEcio + " evdoSnr:" + evdoSnr +
|
|
||||||
" lteSignalStrength:" + lteSignalStrength + " lteRsrp:" + lteRsrp +
|
|
||||||
" lteRsrq:" + lteRsrq + " lteRssnr:" + lteRssnr + " lteCqi:" + lteCqi +
|
|
||||||
" tdScdmaRscp:" + tdScdmaRscp + " isGsm:" + (isGsm ? "true" : "false"));
|
|
||||||
|
|
||||||
return new SignalStrength(gsmSignalStrength, gsmBitErrorRate, cdmaDbm, cdmaEcio, evdoDbm,
|
|
||||||
evdoEcio, evdoSnr, lteSignalStrength, lteRsrp, lteRsrq, lteRssnr, lteCqi,
|
|
||||||
tdScdmaRscp, isGsm);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void
|
|
||||||
processUnsolicited (Parcel p) {
|
|
||||||
Object ret;
|
|
||||||
int dataPosition = p.dataPosition();
|
|
||||||
int response = p.readInt();
|
|
||||||
int newResponse = response;
|
|
||||||
|
|
||||||
switch(response) {
|
|
||||||
case RIL_UNSOL_ON_SS_LL:
|
|
||||||
newResponse = RIL_UNSOL_ON_SS;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (newResponse != response) {
|
|
||||||
p.setDataPosition(dataPosition);
|
|
||||||
p.writeInt(newResponse);
|
|
||||||
}
|
|
||||||
p.setDataPosition(dataPosition);
|
|
||||||
super.processUnsolicited(p);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void
|
|
||||||
acceptCall (Message result) {
|
|
||||||
RILRequest rr
|
|
||||||
= RILRequest.obtain(RIL_REQUEST_ANSWER, result);
|
|
||||||
|
|
||||||
rr.mParcel.writeInt(1);
|
|
||||||
rr.mParcel.writeInt(0);
|
|
||||||
|
|
||||||
if (RILJ_LOGD) riljLog(rr.serialString() + "> " + requestToString(rr.mRequest));
|
|
||||||
|
|
||||||
send(rr);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
private void
|
|
||||||
dialEmergencyCall(String address, int clirMode, Message result) {
|
|
||||||
RILRequest rr;
|
|
||||||
|
|
||||||
rr = RILRequest.obtain(RIL_REQUEST_DIAL_EMERGENCY, result);
|
|
||||||
rr.mParcel.writeString(address);
|
|
||||||
rr.mParcel.writeInt(clirMode);
|
|
||||||
rr.mParcel.writeInt(0); // CallDetails.call_type
|
|
||||||
rr.mParcel.writeInt(3); // CallDetails.call_domain
|
|
||||||
rr.mParcel.writeString(""); // CallDetails.getCsvFromExtra
|
|
||||||
rr.mParcel.writeInt(0); // Unknown
|
|
||||||
|
|
||||||
if (RILJ_LOGD) riljLog(rr.serialString() + "> " + requestToString(rr.mRequest));
|
|
||||||
|
|
||||||
send(rr);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected RILRequest
|
|
||||||
processSolicited (Parcel p) {
|
|
||||||
int serial, error;
|
|
||||||
boolean found = false;
|
|
||||||
int dataPosition = p.dataPosition(); // save off position within the Parcel
|
|
||||||
serial = p.readInt();
|
|
||||||
error = p.readInt();
|
|
||||||
RILRequest rr = null;
|
|
||||||
/* Pre-process the reply before popping it */
|
|
||||||
synchronized (mRequestList) {
|
|
||||||
RILRequest tr = mRequestList.get(serial);
|
|
||||||
if (tr != null && tr.mSerial == serial) {
|
|
||||||
if (error == 0 || p.dataAvail() > 0) {
|
|
||||||
try {switch (tr.mRequest) {
|
|
||||||
/* Get those we're interested in */
|
|
||||||
case RIL_REQUEST_DATA_REGISTRATION_STATE:
|
|
||||||
rr = tr;
|
|
||||||
break;
|
|
||||||
}} catch (Throwable thr) {
|
|
||||||
// Exceptions here usually mean invalid RIL responses
|
|
||||||
if (tr.mResult != null) {
|
|
||||||
AsyncResult.forMessage(tr.mResult, null, thr);
|
|
||||||
tr.mResult.sendToTarget();
|
|
||||||
}
|
|
||||||
return tr;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (rr == null) {
|
|
||||||
/* Nothing we care about, go up */
|
|
||||||
p.setDataPosition(dataPosition);
|
|
||||||
// Forward responses that we are not overriding to the super class
|
|
||||||
return super.processSolicited(p);
|
|
||||||
}
|
|
||||||
rr = findAndRemoveRequestFromList(serial);
|
|
||||||
if (rr == null) {
|
|
||||||
return rr;
|
|
||||||
}
|
|
||||||
Object ret = null;
|
|
||||||
if (error == 0 || p.dataAvail() > 0) {
|
|
||||||
switch (rr.mRequest) {
|
|
||||||
case RIL_REQUEST_DATA_REGISTRATION_STATE: ret = responseDataRegistrationState(p); break;
|
|
||||||
default:
|
|
||||||
throw new RuntimeException("Unrecognized solicited response: " + rr.mRequest);
|
|
||||||
}
|
|
||||||
//break;
|
|
||||||
}
|
|
||||||
if (RILJ_LOGD) riljLog(rr.serialString() + "< " + requestToString(rr.mRequest)
|
|
||||||
+ " " + retToString(rr.mRequest, ret));
|
|
||||||
if (rr.mResult != null) {
|
|
||||||
AsyncResult.forMessage(rr.mResult, ret, null);
|
|
||||||
rr.mResult.sendToTarget();
|
|
||||||
}
|
|
||||||
return rr;
|
|
||||||
}
|
|
||||||
|
|
||||||
private Object
|
|
||||||
responseDataRegistrationState(Parcel p) {
|
|
||||||
String response[] = (String[])responseStrings(p);
|
|
||||||
/* DANGER WILL ROBINSON
|
|
||||||
* In some cases from Vodaphone we are receiving a RAT of 102
|
|
||||||
* while in tunnels of the metro. Lets Assume that if we
|
|
||||||
* receive 102 we actually want a RAT of 2 for EDGE service */
|
|
||||||
if (response.length > 4 &&
|
|
||||||
response[0].equals("1") &&
|
|
||||||
response[3].equals("102")) {
|
|
||||||
response[3] = "2";
|
|
||||||
}
|
|
||||||
return response;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,36 +1,12 @@
|
||||||
LOCAL_PATH:= $(call my-dir)
|
LOCAL_PATH:= $(call my-dir)
|
||||||
|
|
||||||
# Configuration scripts
|
|
||||||
|
|
||||||
include $(CLEAR_VARS)
|
include $(CLEAR_VARS)
|
||||||
LOCAL_MODULE := init.qcom.bt.sh
|
|
||||||
LOCAL_MODULE_TAGS := optional eng
|
|
||||||
LOCAL_MODULE_CLASS := ETC
|
|
||||||
LOCAL_SRC_FILES := etc/init.qcom.bt.sh
|
|
||||||
include $(BUILD_PREBUILT)
|
|
||||||
|
|
||||||
include $(CLEAR_VARS)
|
|
||||||
LOCAL_MODULE := init.ril.sh
|
|
||||||
LOCAL_MODULE_TAGS := optional eng
|
|
||||||
LOCAL_MODULE_CLASS := ETC
|
|
||||||
LOCAL_SRC_FILES := etc/init.ril.sh
|
|
||||||
include $(BUILD_PREBUILT)
|
|
||||||
|
|
||||||
# Init scripts
|
|
||||||
|
|
||||||
|
# Init
|
||||||
include $(CLEAR_VARS)
|
include $(CLEAR_VARS)
|
||||||
LOCAL_MODULE := init.qcom.rc
|
LOCAL_MODULE := init.qcom.rc
|
||||||
LOCAL_MODULE_TAGS := optional eng
|
LOCAL_MODULE_TAGS := optional eng
|
||||||
LOCAL_MODULE_CLASS := ETC
|
LOCAL_MODULE_CLASS := ETC
|
||||||
LOCAL_SRC_FILES := init.qcom.rc
|
LOCAL_SRC_FILES := etc/init.qcom.rc
|
||||||
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
|
|
||||||
include $(BUILD_PREBUILT)
|
|
||||||
|
|
||||||
include $(CLEAR_VARS)
|
|
||||||
LOCAL_MODULE := init.qcom.power.rc
|
|
||||||
LOCAL_MODULE_TAGS := optional eng
|
|
||||||
LOCAL_MODULE_CLASS := ETC
|
|
||||||
LOCAL_SRC_FILES := init.qcom.power.rc
|
|
||||||
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
|
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
|
||||||
include $(BUILD_PREBUILT)
|
include $(BUILD_PREBUILT)
|
||||||
|
|
||||||
|
@ -38,7 +14,7 @@ include $(CLEAR_VARS)
|
||||||
LOCAL_MODULE := init.qcom.usb.rc
|
LOCAL_MODULE := init.qcom.usb.rc
|
||||||
LOCAL_MODULE_TAGS := optional eng
|
LOCAL_MODULE_TAGS := optional eng
|
||||||
LOCAL_MODULE_CLASS := ETC
|
LOCAL_MODULE_CLASS := ETC
|
||||||
LOCAL_SRC_FILES := init.qcom.usb.rc
|
LOCAL_SRC_FILES := etc/init.qcom.usb.rc
|
||||||
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
|
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
|
||||||
include $(BUILD_PREBUILT)
|
include $(BUILD_PREBUILT)
|
||||||
|
|
||||||
|
@ -47,7 +23,7 @@ include $(CLEAR_VARS)
|
||||||
LOCAL_MODULE := init.recovery.qcom.rc
|
LOCAL_MODULE := init.recovery.qcom.rc
|
||||||
LOCAL_MODULE_TAGS := optional eng
|
LOCAL_MODULE_TAGS := optional eng
|
||||||
LOCAL_MODULE_CLASS := ETC
|
LOCAL_MODULE_CLASS := ETC
|
||||||
LOCAL_SRC_FILES := init.qcom.power.rc
|
LOCAL_SRC_FILES := etc/init.qcom.power.rc
|
||||||
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
|
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
|
||||||
include $(BUILD_PREBUILT)
|
include $(BUILD_PREBUILT)
|
||||||
|
|
||||||
|
@ -55,6 +31,29 @@ include $(CLEAR_VARS)
|
||||||
LOCAL_MODULE := ueventd.qcom.rc
|
LOCAL_MODULE := ueventd.qcom.rc
|
||||||
LOCAL_MODULE_TAGS := optional eng
|
LOCAL_MODULE_TAGS := optional eng
|
||||||
LOCAL_MODULE_CLASS := ETC
|
LOCAL_MODULE_CLASS := ETC
|
||||||
LOCAL_SRC_FILES := ueventd.qcom.rc
|
LOCAL_SRC_FILES := etc/ueventd.qcom.rc
|
||||||
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
|
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
|
||||||
include $(BUILD_PREBUILT)
|
include $(BUILD_PREBUILT)
|
||||||
|
|
||||||
|
include $(CLEAR_VARS)
|
||||||
|
LOCAL_MODULE := init.qcom.power.rc
|
||||||
|
LOCAL_MODULE_TAGS := optional eng
|
||||||
|
LOCAL_MODULE_CLASS := ETC
|
||||||
|
LOCAL_SRC_FILES := etc/init.qcom.power.rc
|
||||||
|
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
|
||||||
|
include $(BUILD_PREBUILT)
|
||||||
|
|
||||||
|
# Configuration scripts
|
||||||
|
include $(CLEAR_VARS)
|
||||||
|
LOCAL_MODULE := init.qcom.bt.sh
|
||||||
|
LOCAL_MODULE_TAGS := optional eng
|
||||||
|
LOCAL_MODULE_CLASS := ETC
|
||||||
|
LOCAL_SRC_FILES := etc/scripts/init.qcom.bt.sh
|
||||||
|
include $(BUILD_PREBUILT)
|
||||||
|
|
||||||
|
include $(CLEAR_VARS)
|
||||||
|
LOCAL_MODULE := init.ril.sh
|
||||||
|
LOCAL_MODULE_TAGS := optional eng
|
||||||
|
LOCAL_MODULE_CLASS := ETC
|
||||||
|
LOCAL_SRC_FILES := etc/scripts/init.ril.sh
|
||||||
|
include $(BUILD_PREBUILT)
|
||||||
|
|
|
@ -25,37 +25,6 @@
|
||||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#
|
#
|
||||||
|
|
||||||
on charger
|
|
||||||
write /sys/module/lpm_levels/enable_low_power/l2 4
|
|
||||||
write /sys/module/msm_pm/modes/cpu0/power_collapse/suspend_enabled 1
|
|
||||||
write /sys/module/msm_pm/modes/cpu1/power_collapse/suspend_enabled 1
|
|
||||||
write /sys/module/msm_pm/modes/cpu2/power_collapse/suspend_enabled 1
|
|
||||||
write /sys/module/msm_pm/modes/cpu3/power_collapse/suspend_enabled 1
|
|
||||||
write /sys/module/msm_pm/modes/cpu0/standalone_power_collapse/suspend_enabled 1
|
|
||||||
write /sys/module/msm_pm/modes/cpu1/standalone_power_collapse/suspend_enabled 1
|
|
||||||
write /sys/module/msm_pm/modes/cpu2/standalone_power_collapse/suspend_enabled 1
|
|
||||||
write /sys/module/msm_pm/modes/cpu3/standalone_power_collapse/suspend_enabled 1
|
|
||||||
write /sys/module/msm_pm/modes/cpu0/standalone_power_collapse/idle_enabled 1
|
|
||||||
write /sys/module/msm_pm/modes/cpu1/standalone_power_collapse/idle_enabled 1
|
|
||||||
write /sys/module/msm_pm/modes/cpu2/standalone_power_collapse/idle_enabled 1
|
|
||||||
write /sys/module/msm_pm/modes/cpu3/standalone_power_collapse/idle_enabled 1
|
|
||||||
write /sys/module/msm_pm/modes/cpu0/power_collapse/idle_enabled 1
|
|
||||||
|
|
||||||
write /sys/module/msm_thermal/core_control/enabled 0
|
|
||||||
|
|
||||||
write /sys/devices/system/cpu/cpu1/online 1
|
|
||||||
write /sys/devices/system/cpu/cpu2/online 1
|
|
||||||
write /sys/devices/system/cpu/cpu3/online 1
|
|
||||||
|
|
||||||
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor powersave
|
|
||||||
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 300000
|
|
||||||
|
|
||||||
write /sys/module/msm_thermal/core_control/enabled 1
|
|
||||||
|
|
||||||
write /sys/devices/system/cpu/cpu1/online 0
|
|
||||||
write /sys/devices/system/cpu/cpu2/online 0
|
|
||||||
write /sys/devices/system/cpu/cpu3/online 0
|
|
||||||
|
|
||||||
on init
|
on init
|
||||||
|
|
||||||
# HMP scheduler settings
|
# HMP scheduler settings
|
||||||
|
@ -117,8 +86,46 @@ on init
|
||||||
write /dev/cpuset/top-app/cpus 0-3
|
write /dev/cpuset/top-app/cpus 0-3
|
||||||
write /dev/cpuset/camera-daemon/cpus 0-3
|
write /dev/cpuset/camera-daemon/cpus 0-3
|
||||||
|
|
||||||
|
on charger
|
||||||
|
mount_all fstab.qcom
|
||||||
|
class_start charger
|
||||||
|
write /sys/module/lpm_levels/parameters/sleep_disabled 0
|
||||||
|
write /sys/module/lpm_levels/enable_low_power/l2 1
|
||||||
|
write /sys/module/msm_pm/modes/cpu0/power_collapse/suspend_enabled 1
|
||||||
|
write /sys/module/msm_pm/modes/cpu1/power_collapse/suspend_enabled 1
|
||||||
|
write /sys/module/msm_pm/modes/cpu2/power_collapse/suspend_enabled 1
|
||||||
|
write /sys/module/msm_pm/modes/cpu3/power_collapse/suspend_enabled 1
|
||||||
|
write /sys/module/msm_pm/modes/cpu0/standalone_power_collapse/suspend_enabled 1
|
||||||
|
write /sys/module/msm_pm/modes/cpu1/standalone_power_collapse/suspend_enabled 1
|
||||||
|
write /sys/module/msm_pm/modes/cpu2/standalone_power_collapse/suspend_enabled 1
|
||||||
|
write /sys/module/msm_pm/modes/cpu3/standalone_power_collapse/suspend_enabled 1
|
||||||
|
write /sys/module/msm_show_resume_irq/parameters/debug_mask 1
|
||||||
|
write /sys/devices/system/cpu/cpu1/online 0
|
||||||
|
write /sys/devices/system/cpu/cpu2/online 0
|
||||||
|
write /sys/devices/system/cpu/cpu3/online 0
|
||||||
|
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor "interactive"
|
||||||
|
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 300000
|
||||||
|
chown system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
|
||||||
|
chown system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
|
||||||
|
chown root system /sys/devices/system/cpu/cpu1/online
|
||||||
|
chown root system /sys/devices/system/cpu/cpu2/online
|
||||||
|
chown root system /sys/devices/system/cpu/cpu3/online
|
||||||
|
chmod 664 /sys/devices/system/cpu/cpu1/online
|
||||||
|
chmod 664 /sys/devices/system/cpu/cpu2/online
|
||||||
|
chmod 664 /sys/devices/system/cpu/cpu3/online
|
||||||
|
write /sys/module/msm_pm/modes/cpu0/standalone_power_collapse/idle_enabled 1
|
||||||
|
write /sys/module/msm_pm/modes/cpu0/power_collapse/idle_enabled 1
|
||||||
|
write /sys/module/lpm_levels/enable_low_power/l2 3
|
||||||
|
write /sys/module/msm_pm/modes/cpu0/power_collapse/idle_enabled 0
|
||||||
|
write /sys/devices/system/cpu/cpu1/online 1
|
||||||
|
write /sys/devices/system/cpu/cpu2/online 1
|
||||||
|
write /sys/devices/system/cpu/cpu3/online 1
|
||||||
|
|
||||||
on class_start:late_start
|
on class_start:late_start
|
||||||
trigger enable-low-power
|
trigger enable-low-power
|
||||||
|
|
||||||
on property:init.svc.recovery=running
|
on property:init.svc.recovery=running
|
||||||
trigger enable-low-power
|
trigger enable-low-power
|
||||||
|
|
||||||
|
on property:dev.bootcomplete=1
|
||||||
|
setprop sys.io.scheduler "bfq"
|
|
@ -42,9 +42,9 @@ on early-init
|
||||||
mkdir /efs 0771 system radio
|
mkdir /efs 0771 system radio
|
||||||
|
|
||||||
symlink /data/tombstones /tombstones
|
symlink /data/tombstones /tombstones
|
||||||
|
|
||||||
# Set permissions so radio can read
|
# Set permissions so radio can read
|
||||||
chmod 0444 /proc/cmdline
|
chmod 0444 /proc/cmdline
|
||||||
|
|
||||||
on init
|
on init
|
||||||
|
|
||||||
|
@ -85,19 +85,7 @@ on post-fs-data
|
||||||
# Create the directories used by CnE subsystem
|
# Create the directories used by CnE subsystem
|
||||||
mkdir /data/connectivity 0771 system system
|
mkdir /data/connectivity 0771 system system
|
||||||
chown system system /data/connectivity
|
chown system system /data/connectivity
|
||||||
|
|
||||||
mkdir /data/misc/bluetooth 0770 bluetooth bluetooth
|
|
||||||
|
|
||||||
# Create the directories used by the Wireless subsystem
|
|
||||||
mkdir /data/misc/wifi 0770 wifi wifi
|
|
||||||
chmod 0660 /data/misc/wifi/wpa_supplicant.conf
|
|
||||||
mkdir /data/misc/wifi/sockets 0770 wifi wifi
|
|
||||||
mkdir /data/vendor/wifi 0770 wifi wifi
|
|
||||||
mkdir /data/vendor/wifi/wpa 0770 wifi wifi
|
|
||||||
mkdir /data/vendor/wifi/wpa/sockets 0770 wifi wifi
|
|
||||||
mkdir /data/misc/wifi/wpa_supplicant 0770 wifi wifi
|
|
||||||
mkdir /data/misc/dhcp 0775 dhcp dhcp
|
|
||||||
|
|
||||||
# For WIFI TRP/TIS
|
# For WIFI TRP/TIS
|
||||||
chown system root /data/.psm.info
|
chown system root /data/.psm.info
|
||||||
chmod 0664 /data/.psm.info
|
chmod 0664 /data/.psm.info
|
||||||
|
@ -238,12 +226,12 @@ on post-fs-data
|
||||||
rmdir /data/user_de/0/com.android.providers.telephony/shared_prefs
|
rmdir /data/user_de/0/com.android.providers.telephony/shared_prefs
|
||||||
|
|
||||||
setprop vold.post_fs_data_done 1
|
setprop vold.post_fs_data_done 1
|
||||||
|
|
||||||
# Create perfd deamon related dirs
|
# Create perfd deamon related dirs
|
||||||
mkdir /data/misc/perfd 0755 root system
|
mkdir /data/misc/perfd 0755 root system
|
||||||
chmod 2755 /data/misc/perfd
|
chmod 2755 /data/misc/perfd
|
||||||
mkdir /data/system/perfd 0770 root system
|
mkdir /data/system/perfd 0770 root system
|
||||||
chmod 2770 /data/system/perfd
|
chmod 2770 /data/system/perfd
|
||||||
|
|
||||||
on early-boot
|
on early-boot
|
||||||
# Set RLIMIT_MEMLOCK to 64MB
|
# Set RLIMIT_MEMLOCK to 64MB
|
||||||
|
@ -599,9 +587,8 @@ service adsprpcd /vendor/bin/adsprpcd
|
||||||
user media
|
user media
|
||||||
group media
|
group media
|
||||||
|
|
||||||
service charger /sbin/healthd -c
|
service charger /charger
|
||||||
class charger
|
class charger
|
||||||
critical
|
|
||||||
seclabel u:r:charger:s0
|
seclabel u:r:charger:s0
|
||||||
|
|
||||||
service ds_fmc_appd /vendor/bin/ds_fmc_appd -p "rmnet0" -D
|
service ds_fmc_appd /vendor/bin/ds_fmc_appd -p "rmnet0" -D
|
||||||
|
@ -636,6 +623,7 @@ service mpdecision /vendor/bin/mpdecision --avg_comp
|
||||||
class main
|
class main
|
||||||
user root
|
user root
|
||||||
group root readproc
|
group root readproc
|
||||||
|
disabled
|
||||||
|
|
||||||
service qcamerasvr /vendor/bin/mm-qcamera-daemon
|
service qcamerasvr /vendor/bin/mm-qcamera-daemon
|
||||||
class main
|
class main
|
||||||
|
@ -695,11 +683,11 @@ service wcnss-service /system/bin/wcnss_service
|
||||||
# WPA
|
# WPA
|
||||||
service wpa_supplicant /vendor/bin/hw/wpa_supplicant \
|
service wpa_supplicant /vendor/bin/hw/wpa_supplicant \
|
||||||
-ip2p0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf \
|
-ip2p0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf \
|
||||||
-I/vendor/etc/wifi/p2p_supplicant_overlay.conf -N \
|
-I/system/etc/wifi/p2p_supplicant_overlay.conf -N \
|
||||||
-iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \
|
-iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \
|
||||||
-I/vendor/etc/wifi/wpa_supplicant_overlay.conf \
|
-I/system/etc/wifi/wpa_supplicant_overlay.conf \
|
||||||
-O/data/vendor/wifi/wpa/sockets -puse_p2p_group_interface=1 \
|
-puse_p2p_group_interface=1 \
|
||||||
-g@android:wpa_wlan0
|
-e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0
|
||||||
# we will start as root and wpa_supplicant will switch to user wifi
|
# we will start as root and wpa_supplicant will switch to user wifi
|
||||||
# after setting up the capabilities required for WEXT
|
# after setting up the capabilities required for WEXT
|
||||||
# user wifi
|
# user wifi
|
|
@ -25,8 +25,8 @@
|
||||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#
|
#
|
||||||
|
|
||||||
# the DIAG device node is not world writable/readable.
|
# the DIAG device node HAS TO BE world writable/readable, otherwise libdiag cant open the socket :/
|
||||||
/dev/diag 0660 system oem_2950
|
/dev/diag 0777 system oem_2950
|
||||||
|
|
||||||
/dev/genlock 0666 system system
|
/dev/genlock 0666 system system
|
||||||
/dev/kgsl 0666 system system
|
/dev/kgsl 0666 system system
|
|
@ -14,13 +14,11 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <pthread.h>
|
#include <hardware/sensors.h>
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#include <pthread.h>
|
||||||
#include <log/log.h>
|
#include <log/log.h>
|
||||||
|
|
||||||
#include <hardware/sensors.h>
|
|
||||||
#include "SensorEventQueue.h"
|
#include "SensorEventQueue.h"
|
||||||
|
|
||||||
SensorEventQueue::SensorEventQueue(int capacity) {
|
SensorEventQueue::SensorEventQueue(int capacity) {
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
#include "multihal.h"
|
#include "multihal.h"
|
||||||
|
|
||||||
#define LOG_NDEBUG 1
|
#define LOG_NDEBUG 1
|
||||||
#include <cutils/log.h>
|
#include <log/log.h>
|
||||||
#include <cutils/atomic.h>
|
#include <cutils/atomic.h>
|
||||||
#include <hardware/sensors.h>
|
#include <hardware/sensors.h>
|
||||||
|
|
||||||
|
@ -49,11 +49,10 @@ static pthread_mutex_t queue_mutex = PTHREAD_MUTEX_INITIALIZER;
|
||||||
static pthread_cond_t data_available_cond = PTHREAD_COND_INITIALIZER;
|
static pthread_cond_t data_available_cond = PTHREAD_COND_INITIALIZER;
|
||||||
bool waiting_for_data = false;
|
bool waiting_for_data = false;
|
||||||
|
|
||||||
// Vector of sub modules, whose indexes are referred to in this file as module_index.
|
/*
|
||||||
static std::vector<hw_module_t *> *sub_hw_modules = nullptr;
|
* Vector of sub modules, whose indexes are referred to in this file as module_index.
|
||||||
|
*/
|
||||||
// Vector of sub modules shared object handles
|
static std::vector<hw_module_t *> *sub_hw_modules = NULL;
|
||||||
static std::vector<void *> *so_handles = nullptr;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Comparable class that globally identifies a sensor, by module index and local handle.
|
* Comparable class that globally identifies a sensor, by module index and local handle.
|
||||||
|
@ -197,12 +196,7 @@ struct sensors_poll_context_t {
|
||||||
int poll(sensors_event_t* data, int count);
|
int poll(sensors_event_t* data, int count);
|
||||||
int batch(int handle, int flags, int64_t period_ns, int64_t timeout);
|
int batch(int handle, int flags, int64_t period_ns, int64_t timeout);
|
||||||
int flush(int handle);
|
int flush(int handle);
|
||||||
int inject_sensor_data(const sensors_event_t *data);
|
int inject_sensor_data(struct sensors_poll_device_1 *dev, const sensors_event_t *data);
|
||||||
int register_direct_channel(const struct sensors_direct_mem_t* mem,
|
|
||||||
int channel_handle);
|
|
||||||
int config_direct_report(int sensor_handle,
|
|
||||||
int channel_handle,
|
|
||||||
const struct sensors_direct_cfg_t *config);
|
|
||||||
int close();
|
int close();
|
||||||
|
|
||||||
std::vector<hw_device_t*> sub_hw_devices;
|
std::vector<hw_device_t*> sub_hw_devices;
|
||||||
|
@ -212,7 +206,6 @@ struct sensors_poll_context_t {
|
||||||
|
|
||||||
sensors_poll_device_t* get_v0_device_by_handle(int global_handle);
|
sensors_poll_device_t* get_v0_device_by_handle(int global_handle);
|
||||||
sensors_poll_device_1_t* get_v1_device_by_handle(int global_handle);
|
sensors_poll_device_1_t* get_v1_device_by_handle(int global_handle);
|
||||||
sensors_poll_device_1_t* get_primary_v1_device();
|
|
||||||
int get_device_version_by_handle(int global_handle);
|
int get_device_version_by_handle(int global_handle);
|
||||||
|
|
||||||
void copy_event_remap_handle(sensors_event_t* src, sensors_event_t* dest, int sub_index);
|
void copy_event_remap_handle(sensors_event_t* src, sensors_event_t* dest, int sub_index);
|
||||||
|
@ -252,14 +245,6 @@ sensors_poll_device_1_t* sensors_poll_context_t::get_v1_device_by_handle(int glo
|
||||||
return (sensors_poll_device_1_t*) this->sub_hw_devices[sub_index];
|
return (sensors_poll_device_1_t*) this->sub_hw_devices[sub_index];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns the device pointer, or NULL if primary hal does not exist
|
|
||||||
sensors_poll_device_1_t* sensors_poll_context_t::get_primary_v1_device() {
|
|
||||||
if (sub_hw_devices.size() < 1) {
|
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
return (sensors_poll_device_1_t*) this->sub_hw_devices[0];
|
|
||||||
}
|
|
||||||
|
|
||||||
// Returns the device version, or -1 if the handle is invalid.
|
// Returns the device version, or -1 if the handle is invalid.
|
||||||
int sensors_poll_context_t::get_device_version_by_handle(int handle) {
|
int sensors_poll_context_t::get_device_version_by_handle(int handle) {
|
||||||
sensors_poll_device_t* v0 = this->get_v0_device_by_handle(handle);
|
sensors_poll_device_t* v0 = this->get_v0_device_by_handle(handle);
|
||||||
|
@ -270,26 +255,6 @@ int sensors_poll_context_t::get_device_version_by_handle(int handle) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Android N and hire require sensor HALs to be at least 1_3 compliant
|
|
||||||
#define HAL_VERSION_IS_COMPLIANT(version) \
|
|
||||||
(version >= SENSORS_DEVICE_API_VERSION_1_3)
|
|
||||||
|
|
||||||
// Returns true if HAL is compliant, false if HAL is not compliant or if handle is invalid
|
|
||||||
static bool halIsCompliant(sensors_poll_context_t *ctx, int handle) {
|
|
||||||
int version = ctx->get_device_version_by_handle(handle);
|
|
||||||
return version != -1 && HAL_VERSION_IS_COMPLIANT(version);
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool halIsAPILevelCompliant(sensors_poll_context_t *ctx, int handle, int level) {
|
|
||||||
int version = ctx->get_device_version_by_handle(handle);
|
|
||||||
return version != -1 && (version >= level);
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool halSupportDirectSensorReport(sensors_poll_device_1_t* v1) {
|
|
||||||
return v1 != nullptr && HAL_VERSION_IS_COMPLIANT(v1->common.version) &&
|
|
||||||
v1->register_direct_channel != nullptr && v1->config_direct_report != nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
const char *apiNumToStr(int version) {
|
const char *apiNumToStr(int version) {
|
||||||
switch(version) {
|
switch(version) {
|
||||||
case SENSORS_DEVICE_API_VERSION_1_0:
|
case SENSORS_DEVICE_API_VERSION_1_0:
|
||||||
|
@ -312,12 +277,7 @@ int sensors_poll_context_t::activate(int handle, int enabled) {
|
||||||
ALOGV("activate");
|
ALOGV("activate");
|
||||||
int local_handle = get_local_handle(handle);
|
int local_handle = get_local_handle(handle);
|
||||||
sensors_poll_device_t* v0 = this->get_v0_device_by_handle(handle);
|
sensors_poll_device_t* v0 = this->get_v0_device_by_handle(handle);
|
||||||
if (halIsCompliant(this, handle) && local_handle >= 0 && v0) {
|
retval = v0->activate(v0, local_handle, enabled);
|
||||||
retval = v0->activate(v0, local_handle, enabled);
|
|
||||||
} else {
|
|
||||||
ALOGE("IGNORING activate(enable %d) call to non-API-compliant sensor handle=%d !",
|
|
||||||
enabled, handle);
|
|
||||||
}
|
|
||||||
ALOGV("retval %d", retval);
|
ALOGV("retval %d", retval);
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
@ -327,11 +287,7 @@ int sensors_poll_context_t::setDelay(int handle, int64_t ns) {
|
||||||
ALOGV("setDelay");
|
ALOGV("setDelay");
|
||||||
int local_handle = get_local_handle(handle);
|
int local_handle = get_local_handle(handle);
|
||||||
sensors_poll_device_t* v0 = this->get_v0_device_by_handle(handle);
|
sensors_poll_device_t* v0 = this->get_v0_device_by_handle(handle);
|
||||||
if (halIsCompliant(this, handle) && local_handle >= 0 && v0) {
|
retval = v0->setDelay(v0, local_handle, ns);
|
||||||
retval = v0->setDelay(v0, local_handle, ns);
|
|
||||||
} else {
|
|
||||||
ALOGE("IGNORING setDelay() call for non-API-compliant sensor handle=%d !", handle);
|
|
||||||
}
|
|
||||||
ALOGV("retval %d", retval);
|
ALOGV("retval %d", retval);
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
@ -375,7 +331,7 @@ int sensors_poll_context_t::poll(sensors_event_t *data, int maxReads) {
|
||||||
} else {
|
} else {
|
||||||
empties = 0;
|
empties = 0;
|
||||||
this->copy_event_remap_handle(&data[eventsRead], event, nextReadIndex);
|
this->copy_event_remap_handle(&data[eventsRead], event, nextReadIndex);
|
||||||
if (data[eventsRead].sensor == SENSORS_HANDLE_BASE - 1) {
|
if (data[eventsRead].sensor == -1) {
|
||||||
// Bad handle, do not pass corrupted event upstream !
|
// Bad handle, do not pass corrupted event upstream !
|
||||||
ALOGW("Dropping bad local handle event packet on the floor");
|
ALOGW("Dropping bad local handle event packet on the floor");
|
||||||
} else {
|
} else {
|
||||||
|
@ -405,11 +361,7 @@ int sensors_poll_context_t::batch(int handle, int flags, int64_t period_ns, int6
|
||||||
int retval = -EINVAL;
|
int retval = -EINVAL;
|
||||||
int local_handle = get_local_handle(handle);
|
int local_handle = get_local_handle(handle);
|
||||||
sensors_poll_device_1_t* v1 = this->get_v1_device_by_handle(handle);
|
sensors_poll_device_1_t* v1 = this->get_v1_device_by_handle(handle);
|
||||||
if (halIsCompliant(this, handle) && local_handle >= 0 && v1) {
|
retval = v1->batch(v1, local_handle, flags, period_ns, timeout);
|
||||||
retval = v1->batch(v1, local_handle, flags, period_ns, timeout);
|
|
||||||
} else {
|
|
||||||
ALOGE("IGNORING batch() call to non-API-compliant sensor handle=%d !", handle);
|
|
||||||
}
|
|
||||||
ALOGV("retval %d", retval);
|
ALOGV("retval %d", retval);
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
@ -419,84 +371,24 @@ int sensors_poll_context_t::flush(int handle) {
|
||||||
int retval = -EINVAL;
|
int retval = -EINVAL;
|
||||||
int local_handle = get_local_handle(handle);
|
int local_handle = get_local_handle(handle);
|
||||||
sensors_poll_device_1_t* v1 = this->get_v1_device_by_handle(handle);
|
sensors_poll_device_1_t* v1 = this->get_v1_device_by_handle(handle);
|
||||||
if (halIsCompliant(this, handle) && local_handle >= 0 && v1) {
|
retval = v1->flush(v1, local_handle);
|
||||||
retval = v1->flush(v1, local_handle);
|
|
||||||
} else {
|
|
||||||
ALOGE("IGNORING flush() call to non-API-compliant sensor handle=%d !", handle);
|
|
||||||
}
|
|
||||||
ALOGV("retval %d", retval);
|
ALOGV("retval %d", retval);
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
int sensors_poll_context_t::inject_sensor_data(const sensors_event_t *data) {
|
int sensors_poll_context_t::inject_sensor_data(struct sensors_poll_device_1 *dev,
|
||||||
|
const sensors_event_t *data) {
|
||||||
int retval = -EINVAL;
|
int retval = -EINVAL;
|
||||||
ALOGV("inject_sensor_data");
|
ALOGV("inject_sensor_data");
|
||||||
if (data->sensor == -1) {
|
// Get handle for the sensor owning the event being injected
|
||||||
// operational parameter
|
int local_handle = get_local_handle(data->sensor);
|
||||||
sensors_poll_device_1_t* v1 = get_primary_v1_device();
|
sensors_poll_device_1_t* v1 = this->get_v1_device_by_handle(data->sensor);
|
||||||
if (v1 && v1->common.version >= SENSORS_DEVICE_API_VERSION_1_4) {
|
retval = v1->inject_sensor_data(dev, data);
|
||||||
retval = v1->inject_sensor_data(v1, data);
|
|
||||||
} else {
|
|
||||||
ALOGE("IGNORED inject_sensor_data(operational param) call to non-API-compliant sensor");
|
|
||||||
return -ENOSYS;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// Get handle for the sensor owning the event being injected
|
|
||||||
int local_handle = get_local_handle(data->sensor);
|
|
||||||
sensors_poll_device_1_t* v1 = this->get_v1_device_by_handle(data->sensor);
|
|
||||||
if (halIsAPILevelCompliant(this, data->sensor, SENSORS_DEVICE_API_VERSION_1_4) &&
|
|
||||||
local_handle >= 0 && v1) {
|
|
||||||
// if specific sensor is used, we have to replace global sensor handle
|
|
||||||
// with local one, before passing to concrete HAL
|
|
||||||
sensors_event_t data_copy = *data;
|
|
||||||
data_copy.sensor = local_handle;
|
|
||||||
retval = v1->inject_sensor_data(v1, &data_copy);
|
|
||||||
} else {
|
|
||||||
ALOGE("IGNORED inject_sensor_data(type=%d, handle=%d) call to non-API-compliant sensor",
|
|
||||||
data->type, data->sensor);
|
|
||||||
retval = -ENOSYS;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
ALOGV("retval %d", retval);
|
ALOGV("retval %d", retval);
|
||||||
return retval;
|
return retval;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int sensors_poll_context_t::register_direct_channel(const struct sensors_direct_mem_t* mem,
|
|
||||||
int channel_handle) {
|
|
||||||
int retval = -EINVAL;
|
|
||||||
ALOGV("register_direct_channel");
|
|
||||||
sensors_poll_device_1_t* v1 = get_primary_v1_device();
|
|
||||||
if (v1 && halSupportDirectSensorReport(v1)) {
|
|
||||||
retval = v1->register_direct_channel(v1, mem, channel_handle);
|
|
||||||
} else {
|
|
||||||
ALOGE("IGNORED register_direct_channel(mem=%p, handle=%d) call to non-API-compliant sensor",
|
|
||||||
mem, channel_handle);
|
|
||||||
retval = -ENOSYS;
|
|
||||||
}
|
|
||||||
ALOGV("retval %d", retval);
|
|
||||||
return retval;
|
|
||||||
}
|
|
||||||
|
|
||||||
int sensors_poll_context_t::config_direct_report(int sensor_handle,
|
|
||||||
int channel_handle,
|
|
||||||
const struct sensors_direct_cfg_t *config) {
|
|
||||||
int retval = -EINVAL;
|
|
||||||
ALOGV("config_direct_report");
|
|
||||||
|
|
||||||
if (config != nullptr) {
|
|
||||||
int local_handle = get_local_handle(sensor_handle);
|
|
||||||
sensors_poll_device_1_t* v1 = get_primary_v1_device();
|
|
||||||
if (v1 && halSupportDirectSensorReport(v1)) {
|
|
||||||
retval = v1->config_direct_report(v1, local_handle, channel_handle, config);
|
|
||||||
} else {
|
|
||||||
ALOGE("IGNORED config_direct_report(sensor=%d, channel=%d, rate_level=%d) call to "
|
|
||||||
"non-API-compliant sensor", sensor_handle, channel_handle, config->rate_level);
|
|
||||||
retval = -ENOSYS;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
ALOGV("retval %d", retval);
|
|
||||||
return retval;
|
|
||||||
}
|
|
||||||
int sensors_poll_context_t::close() {
|
int sensors_poll_context_t::close() {
|
||||||
ALOGV("close");
|
ALOGV("close");
|
||||||
for (std::vector<hw_device_t*>::iterator it = this->sub_hw_devices.begin();
|
for (std::vector<hw_device_t*>::iterator it = this->sub_hw_devices.begin();
|
||||||
|
@ -510,26 +402,11 @@ int sensors_poll_context_t::close() {
|
||||||
|
|
||||||
|
|
||||||
static int device__close(struct hw_device_t *dev) {
|
static int device__close(struct hw_device_t *dev) {
|
||||||
pthread_mutex_lock(&init_modules_mutex);
|
|
||||||
sensors_poll_context_t* ctx = (sensors_poll_context_t*) dev;
|
sensors_poll_context_t* ctx = (sensors_poll_context_t*) dev;
|
||||||
if (ctx != NULL) {
|
if (ctx != NULL) {
|
||||||
int retval = ctx->close();
|
int retval = ctx->close();
|
||||||
delete ctx;
|
delete ctx;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sub_hw_modules != nullptr) {
|
|
||||||
delete sub_hw_modules;
|
|
||||||
sub_hw_modules = nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (so_handles != nullptr) {
|
|
||||||
for (auto handle : *so_handles) {
|
|
||||||
dlclose(handle);
|
|
||||||
}
|
|
||||||
delete so_handles;
|
|
||||||
so_handles = nullptr;
|
|
||||||
}
|
|
||||||
pthread_mutex_unlock(&init_modules_mutex);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -554,7 +431,9 @@ static int device__poll(struct sensors_poll_device_t *dev, sensors_event_t* data
|
||||||
static int device__batch(struct sensors_poll_device_1 *dev, int handle,
|
static int device__batch(struct sensors_poll_device_1 *dev, int handle,
|
||||||
int flags, int64_t period_ns, int64_t timeout) {
|
int flags, int64_t period_ns, int64_t timeout) {
|
||||||
sensors_poll_context_t* ctx = (sensors_poll_context_t*) dev;
|
sensors_poll_context_t* ctx = (sensors_poll_context_t*) dev;
|
||||||
|
|
||||||
ctx->setDelay(handle, period_ns);
|
ctx->setDelay(handle, period_ns);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -565,22 +444,7 @@ static int device__flush(struct sensors_poll_device_1 *dev, int handle) {
|
||||||
static int device__inject_sensor_data(struct sensors_poll_device_1 *dev,
|
static int device__inject_sensor_data(struct sensors_poll_device_1 *dev,
|
||||||
const sensors_event_t *data) {
|
const sensors_event_t *data) {
|
||||||
sensors_poll_context_t* ctx = (sensors_poll_context_t*) dev;
|
sensors_poll_context_t* ctx = (sensors_poll_context_t*) dev;
|
||||||
return ctx->inject_sensor_data(data);
|
return ctx->inject_sensor_data(dev, data);
|
||||||
}
|
|
||||||
|
|
||||||
static int device__register_direct_channel(struct sensors_poll_device_1 *dev,
|
|
||||||
const struct sensors_direct_mem_t* mem,
|
|
||||||
int channel_handle) {
|
|
||||||
sensors_poll_context_t* ctx = (sensors_poll_context_t*) dev;
|
|
||||||
return ctx->register_direct_channel(mem, channel_handle);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int device__config_direct_report(struct sensors_poll_device_1 *dev,
|
|
||||||
int sensor_handle,
|
|
||||||
int channel_handle,
|
|
||||||
const struct sensors_direct_cfg_t *config) {
|
|
||||||
sensors_poll_context_t* ctx = (sensors_poll_context_t*) dev;
|
|
||||||
return ctx->config_direct_report(sensor_handle, channel_handle, config);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int open_sensors(const struct hw_module_t* module, const char* name,
|
static int open_sensors(const struct hw_module_t* module, const char* name,
|
||||||
|
@ -599,9 +463,7 @@ static bool starts_with(const char* s, const char* prefix) {
|
||||||
* Adds valid paths from the config file to the vector passed in.
|
* Adds valid paths from the config file to the vector passed in.
|
||||||
* The vector must not be null.
|
* The vector must not be null.
|
||||||
*/
|
*/
|
||||||
static std::vector<std::string> get_so_paths() {
|
static void get_so_paths(std::vector<std::string> *so_paths) {
|
||||||
std::vector<std::string> so_paths;
|
|
||||||
|
|
||||||
const std::vector<const char *> config_path_list(
|
const std::vector<const char *> config_path_list(
|
||||||
{ MULTI_HAL_CONFIG_FILE_PATH, DEPRECATED_MULTI_HAL_CONFIG_FILE_PATH });
|
{ MULTI_HAL_CONFIG_FILE_PATH, DEPRECATED_MULTI_HAL_CONFIG_FILE_PATH });
|
||||||
|
|
||||||
|
@ -617,7 +479,7 @@ static std::vector<std::string> get_so_paths() {
|
||||||
}
|
}
|
||||||
if(!stream) {
|
if(!stream) {
|
||||||
ALOGW("No multihal config file found");
|
ALOGW("No multihal config file found");
|
||||||
return so_paths;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ALOGE_IF(strcmp(path, DEPRECATED_MULTI_HAL_CONFIG_FILE_PATH) == 0,
|
ALOGE_IF(strcmp(path, DEPRECATED_MULTI_HAL_CONFIG_FILE_PATH) == 0,
|
||||||
|
@ -629,9 +491,8 @@ static std::vector<std::string> get_so_paths() {
|
||||||
std::string line;
|
std::string line;
|
||||||
while (std::getline(stream, line)) {
|
while (std::getline(stream, line)) {
|
||||||
ALOGV("config file line: '%s'", line.c_str());
|
ALOGV("config file line: '%s'", line.c_str());
|
||||||
so_paths.push_back(line);
|
so_paths->push_back(line);
|
||||||
}
|
}
|
||||||
return so_paths;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -644,15 +505,15 @@ static void lazy_init_modules() {
|
||||||
pthread_mutex_unlock(&init_modules_mutex);
|
pthread_mutex_unlock(&init_modules_mutex);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
std::vector<std::string> so_paths(get_so_paths());
|
std::vector<std::string> *so_paths = new std::vector<std::string>();
|
||||||
|
get_so_paths(so_paths);
|
||||||
|
|
||||||
// dlopen the module files and cache their module symbols in sub_hw_modules
|
// dlopen the module files and cache their module symbols in sub_hw_modules
|
||||||
sub_hw_modules = new std::vector<hw_module_t *>();
|
sub_hw_modules = new std::vector<hw_module_t *>();
|
||||||
so_handles = new std::vector<void *>();
|
|
||||||
dlerror(); // clear any old errors
|
dlerror(); // clear any old errors
|
||||||
const char* sym = HAL_MODULE_INFO_SYM_AS_STR;
|
const char* sym = HAL_MODULE_INFO_SYM_AS_STR;
|
||||||
for (const auto &s : so_paths) {
|
for (std::vector<std::string>::iterator it = so_paths->begin(); it != so_paths->end(); it++) {
|
||||||
const char* path = s.c_str();
|
const char* path = it->c_str();
|
||||||
void* lib_handle = dlopen(path, RTLD_LAZY);
|
void* lib_handle = dlopen(path, RTLD_LAZY);
|
||||||
if (lib_handle == NULL) {
|
if (lib_handle == NULL) {
|
||||||
ALOGW("dlerror(): %s", dlerror());
|
ALOGW("dlerror(): %s", dlerror());
|
||||||
|
@ -670,13 +531,8 @@ static void lazy_init_modules() {
|
||||||
} else {
|
} else {
|
||||||
ALOGV("Loaded symbols from \"%s\"", sym);
|
ALOGV("Loaded symbols from \"%s\"", sym);
|
||||||
sub_hw_modules->push_back(module);
|
sub_hw_modules->push_back(module);
|
||||||
so_handles->push_back(lib_handle);
|
|
||||||
lib_handle = nullptr;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (lib_handle != nullptr) {
|
|
||||||
dlclose(lib_handle);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
pthread_mutex_unlock(&init_modules_mutex);
|
pthread_mutex_unlock(&init_modules_mutex);
|
||||||
}
|
}
|
||||||
|
@ -687,11 +543,27 @@ static void lazy_init_modules() {
|
||||||
*/
|
*/
|
||||||
static void fix_sensor_fields(sensor_t& sensor) {
|
static void fix_sensor_fields(sensor_t& sensor) {
|
||||||
/*
|
/*
|
||||||
* Because batching and flushing don't work modify the
|
* Becasue batching and flushing don't work modify the
|
||||||
* sensor fields to not report any fifo counts.
|
* sensor fields to not report any fifo counts.
|
||||||
*/
|
*/
|
||||||
sensor.fifoReservedEventCount = 0;
|
sensor.fifoReservedEventCount = 0;
|
||||||
sensor.fifoMaxEventCount = 0;
|
sensor.fifoMaxEventCount = 0;
|
||||||
|
|
||||||
|
switch (sensor.type) {
|
||||||
|
/*
|
||||||
|
* Use the flags suggested by the sensors documentation.
|
||||||
|
*/
|
||||||
|
case SENSOR_TYPE_TILT_DETECTOR:
|
||||||
|
sensor.flags = SENSOR_FLAG_WAKE_UP | SENSOR_FLAG_ON_CHANGE_MODE;
|
||||||
|
break;
|
||||||
|
/*
|
||||||
|
* Report a proper range to fix doze proximity check.
|
||||||
|
*/
|
||||||
|
case SENSOR_TYPE_PROXIMITY:
|
||||||
|
sensor.flags = SENSOR_FLAG_WAKE_UP | SENSOR_FLAG_ON_CHANGE_MODE;
|
||||||
|
sensor.maxRange = 5.0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -746,12 +618,6 @@ static void lazy_init_sensors_list() {
|
||||||
memcpy(&mutable_sensor_list[mutable_sensor_index], local_sensor,
|
memcpy(&mutable_sensor_list[mutable_sensor_index], local_sensor,
|
||||||
sizeof(struct sensor_t));
|
sizeof(struct sensor_t));
|
||||||
|
|
||||||
// sensor direct report is only for primary module
|
|
||||||
if (module_index != 0) {
|
|
||||||
mutable_sensor_list[mutable_sensor_index].flags &=
|
|
||||||
~(SENSOR_FLAG_MASK_DIRECT_REPORT | SENSOR_FLAG_MASK_DIRECT_CHANNEL);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Overwrite the global version's handle with a global handle.
|
// Overwrite the global version's handle with a global handle.
|
||||||
int global_handle = assign_global_handle(module_index, local_handle);
|
int global_handle = assign_global_handle(module_index, local_handle);
|
||||||
|
|
||||||
|
@ -816,7 +682,7 @@ static int open_sensors(const struct hw_module_t* hw_module, const char* name,
|
||||||
sensors_poll_context_t *dev = new sensors_poll_context_t();
|
sensors_poll_context_t *dev = new sensors_poll_context_t();
|
||||||
memset(dev, 0, sizeof(sensors_poll_device_1_t));
|
memset(dev, 0, sizeof(sensors_poll_device_1_t));
|
||||||
dev->proxy_device.common.tag = HARDWARE_DEVICE_TAG;
|
dev->proxy_device.common.tag = HARDWARE_DEVICE_TAG;
|
||||||
dev->proxy_device.common.version = SENSORS_DEVICE_API_VERSION_1_4;
|
dev->proxy_device.common.version = SENSORS_DEVICE_API_VERSION_1_3;
|
||||||
dev->proxy_device.common.module = const_cast<hw_module_t*>(hw_module);
|
dev->proxy_device.common.module = const_cast<hw_module_t*>(hw_module);
|
||||||
dev->proxy_device.common.close = device__close;
|
dev->proxy_device.common.close = device__close;
|
||||||
dev->proxy_device.activate = device__activate;
|
dev->proxy_device.activate = device__activate;
|
||||||
|
@ -825,8 +691,6 @@ static int open_sensors(const struct hw_module_t* hw_module, const char* name,
|
||||||
dev->proxy_device.batch = device__batch;
|
dev->proxy_device.batch = device__batch;
|
||||||
dev->proxy_device.flush = device__flush;
|
dev->proxy_device.flush = device__flush;
|
||||||
dev->proxy_device.inject_sensor_data = device__inject_sensor_data;
|
dev->proxy_device.inject_sensor_data = device__inject_sensor_data;
|
||||||
dev->proxy_device.register_direct_channel = device__register_direct_channel;
|
|
||||||
dev->proxy_device.config_direct_report = device__config_direct_report;
|
|
||||||
|
|
||||||
dev->nextReadIndex = 0;
|
dev->nextReadIndex = 0;
|
||||||
|
|
||||||
|
@ -837,12 +701,6 @@ static int open_sensors(const struct hw_module_t* hw_module, const char* name,
|
||||||
struct hw_device_t* sub_hw_device;
|
struct hw_device_t* sub_hw_device;
|
||||||
int sub_open_result = sensors_module->common.methods->open(*it, name, &sub_hw_device);
|
int sub_open_result = sensors_module->common.methods->open(*it, name, &sub_hw_device);
|
||||||
if (!sub_open_result) {
|
if (!sub_open_result) {
|
||||||
if (!HAL_VERSION_IS_COMPLIANT(sub_hw_device->version)) {
|
|
||||||
ALOGE("SENSORS_DEVICE_API_VERSION_1_3 or newer is required for all sensor HALs");
|
|
||||||
ALOGE("This HAL reports non-compliant API level : %s",
|
|
||||||
apiNumToStr(sub_hw_device->version));
|
|
||||||
ALOGE("Sensors belonging to this HAL will get ignored !");
|
|
||||||
}
|
|
||||||
dev->addSubHwDevice(sub_hw_device);
|
dev->addSubHwDevice(sub_hw_device);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
12
sepolicy/common/macloader.te
Normal file
12
sepolicy/common/macloader.te
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
type macloader, domain;
|
||||||
|
type macloader_exec, exec_type, file_type;
|
||||||
|
init_daemon_domain(macloader)
|
||||||
|
|
||||||
|
type_transition macloader system_data_file:file wifi_data_file ".cid.info";
|
||||||
|
|
||||||
|
r_dir_file(macloader, wifi_efs_file)
|
||||||
|
|
||||||
|
allow macloader efs_file:dir search;
|
||||||
|
allow macloader sysfs_wifi_writeable:file w_file_perms;
|
||||||
|
allow macloader system_data_file:dir w_dir_perms;
|
||||||
|
allow macloader wifi_data_file:file create_file_perms;
|
|
@ -40,7 +40,7 @@ fi
|
||||||
setup_vendor "$DEVICE_COMMON" "$VENDOR" "$CM_ROOT" true
|
setup_vendor "$DEVICE_COMMON" "$VENDOR" "$CM_ROOT" true
|
||||||
|
|
||||||
# Copyright headers
|
# Copyright headers
|
||||||
write_headers $BOARD TARGET_BOARD_BOARD
|
write_headers $BOARD TARGET_BOARD_PLATFORM
|
||||||
|
|
||||||
write_makefiles "$MY_DIR"/common-proprietary-files.txt
|
write_makefiles "$MY_DIR"/common-proprietary-files.txt
|
||||||
|
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
# Storage
|
|
||||||
ro.sys.sdcardfs=true
|
|
Loading…
Reference in a new issue