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 ($(TARGET_BOARD_PLATFORM),msm8226)
|
||||
|
||||
include $(call all-subdir-makefiles,$(LOCAL_PATH))
|
||||
|
||||
ADSP_IMAGES := \
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Copyright (C) 2014 The CyanogenMod Project
|
||||
# Copyright (C) 2017-2019 The LineageOS Project
|
||||
# Copyright (C) 2012 The CyanogenMod Project
|
||||
# Copyright (C) 2017-2018 The LineageOS Project
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
|
@ -13,31 +13,17 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# Inherit from qcom-common
|
||||
# inherit from qcom-common
|
||||
-include device/samsung/qcom-common/BoardConfigCommon.mk
|
||||
|
||||
VENDOR_PATH := device/samsung/msm8226-common
|
||||
|
||||
TARGET_SPECIFIC_HEADER_PATH := $(VENDOR_PATH)/include
|
||||
|
||||
# Use Snapdragon LLVM if available on build server
|
||||
TARGET_USE_SDCLANG := true
|
||||
# Platform
|
||||
TARGET_BOARD_PLATFORM := msm8226
|
||||
TARGET_BOARD_PLATFORM_GPU := qcom-adreno305
|
||||
|
||||
# Architecture
|
||||
BOARD_USES_QCOM_HARDWARE := true
|
||||
TARGET_CPU_MEMCPY_BASE_OPT_DISABLE := true
|
||||
TARGET_CPU_VARIANT := krait
|
||||
BOARD_GLOBAL_CFLAGS += -mfpu=neon -mfloat-abi=softfp
|
||||
BOARD_GLOBAL_CPPFLAGS += -mfpu=neon -mfloat-abi=softfp
|
||||
|
||||
# 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
|
||||
BOARD_USES_ALSA_AUDIO := true
|
||||
|
||||
|
@ -46,30 +32,22 @@ TARGET_USES_64_BIT_BINDER := true
|
|||
|
||||
# Bluetooth
|
||||
BOARD_HAVE_BLUETOOTH := true
|
||||
BOARD_HAVE_BLUETOOTH_QCOM := true
|
||||
BLUETOOTH_HCI_USE_MCT := true
|
||||
|
||||
# Bootloader
|
||||
TARGET_BOOTLOADER_BOARD_NAME := MSM8226
|
||||
|
||||
# Camera
|
||||
TARGET_PROVIDES_CAMERA_HAL := true
|
||||
USE_DEVICE_SPECIFIC_CAMERA := true
|
||||
TARGET_USE_COMPAT_GRALLOC_ALIGN := true
|
||||
TARGET_HAS_LEGACY_CAMERA_HAL1 := true
|
||||
TARGET_NEEDS_LEGACY_CAMERA_HAL1_DYN_NATIVE_HANDLE := true
|
||||
TARGET_USES_MEDIA_EXTENSIONS := true
|
||||
|
||||
# Charger
|
||||
BOARD_CHARGING_MODE_BOOTING_LPM := "/sys/class/power_supply/battery/batt_lp_charging"
|
||||
BOARD_BATTERY_DEVICE_NAME := "battery"
|
||||
BOARD_CHARGING_CMDLINE_NAME := "androidboot.mode"
|
||||
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
|
||||
|
||||
# Custom RIL class
|
||||
BOARD_RIL_CLASS := ../../../$(VENDOR_PATH)/ril
|
||||
# LineageHW
|
||||
BOARD_HARDWARE_CLASS += device/samsung/msm8226-common/lineagehw
|
||||
|
||||
# Dexpreopt
|
||||
ifeq ($(HOST_OS),linux)
|
||||
|
@ -79,11 +57,14 @@ ifeq ($(HOST_OS),linux)
|
|||
endif
|
||||
endif
|
||||
|
||||
WITH_DEXPREOPT_DEBUG_INFO := false
|
||||
USE_DEX2OAT_DEBUG := false
|
||||
DONT_DEXPREOPT_PREBUILTS := true
|
||||
|
||||
# Display
|
||||
NUM_FRAMEBUFFER_SURFACE_BUFFERS := 3
|
||||
OVERRIDE_RS_DRIVER := libRSDriver_adreno.so
|
||||
TARGET_USES_C2D_COMPOSITION := true
|
||||
TARGET_ADDITIONAL_GRALLOC_10_USAGE_BITS := 0x02000000U
|
||||
TARGET_USES_ION := true
|
||||
|
||||
# Shader cache config options
|
||||
|
@ -96,19 +77,9 @@ MAX_EGL_CACHE_KEY_SIZE := 12*1024
|
|||
# of the device.
|
||||
MAX_EGL_CACHE_SIZE := 2048*1024
|
||||
|
||||
# Extended Filesystem Support
|
||||
TARGET_KERNEL_HAVE_EXFAT := true
|
||||
|
||||
# Filesystem
|
||||
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
|
||||
DEVICE_MANIFEST_FILE := device/samsung/msm8226-common/manifest.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
|
||||
include device/samsung/msm8226-common/sepolicy/sepolicy.mk
|
||||
|
||||
# Shims
|
||||
TARGET_LD_SHIM_LIBS += \
|
||||
/system/lib/libcrypto.so|libboringssl-compat.so
|
||||
|
||||
# Init
|
||||
TARGET_INIT_VENDOR_LIB := libinit_msm
|
||||
TARGET_INIT_VENDOR_LIB := libinit_msm8226
|
||||
TARGET_RECOVERY_DEVICE_MODULES := libinit_msm8226
|
||||
|
||||
# Legacy blobs support
|
||||
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
|
||||
# Partitions
|
||||
TARGET_USERIMAGES_USE_EXT4 := true
|
||||
TARGET_USE_CUSTOM_LUN_FILE_PATH := /sys/devices/platform/msm_hsusb/gadget/lun%d/file
|
||||
|
||||
# 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
|
||||
TARGET_USERIMAGES_USE_F2FS := true
|
||||
BOARD_VOLD_EMMC_SHARES_DEV_MAJOR := true
|
||||
|
||||
# Power
|
||||
TARGET_HAS_LEGACY_POWER_STATS := true
|
||||
TARGET_HAS_NO_WIFI_STATS := true
|
||||
TARGET_USES_INTERACTION_BOOST := true
|
||||
|
||||
# Shims
|
||||
TARGET_LD_SHIM_LIBS += \
|
||||
/system/lib/libcrypto.so|libboringssl-compat.so
|
||||
|
||||
# Time services
|
||||
BOARD_USES_QC_TIME_SERVICES := true
|
||||
|
||||
# Wifi
|
||||
BOARD_WLAN_DEVICE := qcwcn
|
||||
BOARD_HAS_QCOM_WLAN := true
|
||||
BOARD_HAS_QCOM_WLAN_SDK := true
|
||||
BOARD_WLAN_DEVICE := qcwcn
|
||||
BOARD_HOSTAPD_DRIVER := NL80211
|
||||
BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE)
|
||||
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)
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
|
@ -9,15 +7,12 @@ LOCAL_C_INCLUDES := \
|
|||
LOCAL_SRC_FILES := \
|
||||
CameraWrapper.cpp
|
||||
|
||||
LOCAL_STATIC_LIBRARIES := libbase libarect
|
||||
LOCAL_SHARED_LIBRARIES := \
|
||||
libhardware liblog libcamera_client libutils libcutils libdl libgui libhidltransport libsensor \
|
||||
android.hidl.token@1.0-utils \
|
||||
android.hardware.graphics.bufferqueue@1.0
|
||||
|
||||
LOCAL_STATIC_LIBRARIES := \
|
||||
libbase \
|
||||
libarect
|
||||
|
||||
LOCAL_HEADER_LIBRARIES := libnativebase_headers
|
||||
|
||||
LOCAL_MODULE := camera.$(TARGET_BOARD_PLATFORM)
|
||||
|
@ -26,5 +21,3 @@ LOCAL_MODULE_TAGS := optional
|
|||
LOCAL_PROPRIETARY_MODULE := true
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
|
||||
endif
|
||||
|
|
|
@ -27,12 +27,12 @@
|
|||
#define LOG_TAG "CameraWrapper"
|
||||
#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/CameraParameters.h>
|
||||
#include <hardware/camera.h>
|
||||
#include <hardware/hardware.h>
|
||||
#include <utils/String8.h>
|
||||
#include <utils/threads.h>
|
||||
|
||||
#define BACK_CAMERA_ID 0
|
||||
#define FRONT_CAMERA_ID 1
|
||||
|
@ -76,7 +76,7 @@ camera_module_t HAL_MODULE_INFO_SYM = {
|
|||
.hal_api_version = HARDWARE_HAL_API_VERSION,
|
||||
.id = CAMERA_HARDWARE_MODULE_ID,
|
||||
.name = "Samsung msm8226 Camera Wrapper",
|
||||
.author = "The LineageOS Project",
|
||||
.author = "The CyanogenMod Project",
|
||||
.methods = &camera_module_methods,
|
||||
.dso = NULL, /* remove compilation warnings */
|
||||
.reserved = {0}, /* remove compilation warnings */
|
||||
|
@ -264,7 +264,8 @@ static void camera_set_callbacks(struct camera_device* device, camera_notify_cal
|
|||
ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device,
|
||||
(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);
|
||||
|
||||
}
|
||||
|
||||
|
@ -479,6 +480,7 @@ static void camera_release(struct camera_device* device) {
|
|||
|
||||
wrapper_dev = (wrapper_camera_device_t*) device;
|
||||
|
||||
|
||||
ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device,
|
||||
(uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
|
||||
|
||||
|
@ -605,6 +607,7 @@ static int camera_device_open(const hw_module_t* module, const char* name, hw_de
|
|||
ALOGE("vendor camera open fail");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
ALOGV("%s: got vendor camera device 0x%08X", __FUNCTION__,
|
||||
(uintptr_t)(camera_device->vendor));
|
||||
|
||||
|
|
|
@ -239,6 +239,5 @@
|
|||
<Limit name="concurrent-instances" max="3" />
|
||||
</MediaCodec>
|
||||
</Decoders>
|
||||
<Include href="media_codecs_google_video_le.xml" />
|
||||
<Include href="media_codecs_ffmpeg.xml" />
|
||||
<Include href="media_codecs_google_video.xml" />
|
||||
</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
|
||||
CM_ROOT="$MY_DIR"/../../..
|
||||
BOARD=msm8974
|
||||
BOARD=msm8226
|
||||
DEVICE_COMMON=${BOARD}-common
|
||||
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_GNSS_MEASUREMENT, // GNSS Measurement report
|
||||
LOC_API_ADAPTER_REQUEST_TIMEZONE, // Timezone injection request
|
||||
LOC_API_ADAPTER_REPORT_GENFENCE_DWELL_REPORT, // Geofence dwell report
|
||||
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_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_REPORT_GENFENCE_DWELL (1<<LOC_API_ADAPTER_REPORT_GENFENCE_DWELL_REPORT)
|
||||
|
||||
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_ADAPTIVE_LOCATION_BATCHING, // Batching 1.5
|
||||
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
|
||||
} 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
|
||||
* modification, are permitted provided that the following conditions are
|
||||
|
@ -49,7 +49,7 @@ void LocPosMode::logv() const
|
|||
}
|
||||
|
||||
/* 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_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_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 */
|
||||
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_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_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)
|
||||
{
|
||||
|
@ -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_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)
|
||||
{
|
||||
|
@ -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_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_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)
|
||||
{
|
||||
|
@ -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_ANY ),
|
||||
|
@ -134,7 +134,7 @@ static loc_name_val_s_type loc_eng_agps_types[] =
|
|||
NAME_VAL( AGPS_TYPE_C2K ),
|
||||
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)
|
||||
{
|
||||
|
@ -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_UMTS_SUPL ),
|
||||
NAME_VAL( GPS_NI_TYPE_UMTS_CTRL_PLANE ),
|
||||
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)
|
||||
{
|
||||
|
@ -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_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)
|
||||
{
|
||||
|
@ -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_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_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)
|
||||
{
|
||||
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_IPV4 ),
|
||||
NAME_VAL( AGPS_APN_BEARER_IPV6 ),
|
||||
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)
|
||||
{
|
||||
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_CUSTOM_PDE_SERVER ),
|
||||
NAME_VAL( LOC_AGPS_MPC_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)
|
||||
{
|
||||
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_INTERMEDIATE ),
|
||||
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)
|
||||
{
|
||||
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_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_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)
|
||||
{
|
||||
|
|
|
@ -29,7 +29,7 @@ BATCH_SIZE=20
|
|||
# GEOFENCE = 0x01
|
||||
# BATCHING = 0x02
|
||||
# default = GEOFENCE | BATCHING
|
||||
CAPABILITIES=0x03
|
||||
CAPABILITIES=0x00
|
||||
|
||||
###################################
|
||||
# FLP BATCHING ACCURACY
|
||||
|
|
|
@ -1,18 +1,13 @@
|
|||
#Uncommenting these urls would only enable
|
||||
#the power up auto injection and force injection(test case).
|
||||
#XTRA_SERVER_1=http://xtrapath1.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
|
||||
#XTRA_SERVER_1=https://xtrapath1.izatcloud.net/xtra3grc.bin
|
||||
#XTRA_SERVER_2=https://xtrapath2.izatcloud.net/xtra3grc.bin
|
||||
#XTRA_SERVER_3=https://xtrapath3.izatcloud.net/xtra3grc.bin
|
||||
|
||||
#Version check for XTRA
|
||||
#DISABLE = 0
|
||||
#AUTO = 1
|
||||
#XTRA2 = 2
|
||||
#XTRA3 = 3
|
||||
XTRA_VERSION_CHECK=0
|
||||
XTRA_VERSION_CHECK=1
|
||||
|
||||
# Error Estimate
|
||||
# _SET = 1
|
||||
|
@ -25,7 +20,7 @@ NTP_SERVER=1.android.pool.ntp.org
|
|||
# DEBUG LEVELS: 0 - none, 1 - Error, 2 - Warning, 3 - Info
|
||||
# 4 - Debug, 5 - Verbose
|
||||
# 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_POS=0
|
||||
|
@ -37,11 +32,11 @@ INTERMEDIATE_POS=0
|
|||
# default - non is locked for backward compatibility
|
||||
#GPS_LOCK = 0
|
||||
|
||||
# supl version 1.0
|
||||
SUPL_VER=0x10000
|
||||
# supl version 2.0
|
||||
SUPL_VER=0x20000
|
||||
|
||||
# Emergency SUPL, 1=enable, 0=disable
|
||||
SUPL_ES=0
|
||||
#SUPL_ES=0
|
||||
# Sensor R&D : Non-SUPL ES should be default
|
||||
|
||||
#Choose PDN for Emergency SUPL
|
||||
|
@ -55,7 +50,7 @@ USE_EMERGENCY_PDN_FOR_EMERGENCY_SUPL=1
|
|||
#MSA=0X2
|
||||
#MSB=0X1
|
||||
#Sensor R&D : Change default bit mask
|
||||
SUPL_MODE=3
|
||||
#SUPL_MODE=1
|
||||
|
||||
# GPS Capabilities bit mask
|
||||
# SCHEDULING = 0x01
|
||||
|
@ -64,7 +59,7 @@ SUPL_MODE=3
|
|||
# ON_DEMAND_TIME = 0x10
|
||||
# GEOFENCE = 0x20
|
||||
# default = ON_DEMAND_TIME | MSA | MSB | SCHEDULING | GEOFENCE
|
||||
CAPABILITIES=0x37
|
||||
CAPABILITIES=0x31
|
||||
|
||||
# Accuracy threshold for intermediate positions
|
||||
# less accurate positions are ignored, 0 for passing all positions
|
||||
|
@ -75,8 +70,8 @@ CAPABILITIES=0x37
|
|||
################################
|
||||
|
||||
# FOR SUPL SUPPORT, set the following
|
||||
# SUPL_HOST=supl.host.com or IP
|
||||
# SUPL_PORT=1234
|
||||
#SUPL_HOST=supl.google.com
|
||||
#SUPL_PORT=7275
|
||||
|
||||
# FOR C2K PDE SUPPORT, set the following
|
||||
# C2K_HOST=c2k.pde.com or IP
|
||||
|
@ -97,7 +92,7 @@ CAPABILITIES=0x37
|
|||
# 1: Enable LPP_User_Plane on LTE
|
||||
# 2: Enable 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
|
||||
|
@ -113,11 +108,5 @@ SGLTE_TARGET=0
|
|||
# 0x1: RRC CPlane
|
||||
# 0x2: RRLP UPlane
|
||||
# 0x4: LLP Uplane
|
||||
A_GLONASS_POS_PROTOCOL_SELECT = 0 #Sensor R&D : This will not be injected to MODEM
|
||||
|
||||
##################################################
|
||||
# Delete only Ephemeris files
|
||||
##################################################
|
||||
#0 : off - default
|
||||
#1 : on - Erase only eph files when we use 'delete aiding data' function.
|
||||
DEL_EPH_ONLY = 0
|
||||
# Sensor R&D : This will not be injected to MODEM
|
||||
A_GLONASS_POS_PROTOCOL_SELECT = 0
|
||||
|
|
|
@ -27,12 +27,12 @@ WIFI_WAIT_TIMEOUT_SELECT = 0
|
|||
# QNP when the EULA is not consented to by the user. QNP can
|
||||
# still return ZPP locations or injected locations even
|
||||
# without EULA consent, but the uncertainty can be high.
|
||||
NLP_MODE = 3
|
||||
NLP_MODE = 1
|
||||
NLP_TOLERANCE_TIME_FIRST = 5000
|
||||
NLP_TOLERANCE_TIME_AFTER = 20000
|
||||
NLP_THRESHOLD = 3
|
||||
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
|
||||
ZPP_TRIGGER_THRESHOLD=60000
|
||||
|
@ -88,7 +88,7 @@ SAP=BASIC
|
|||
#ODCPI valid modes:
|
||||
#DISABLED
|
||||
#BASIC
|
||||
ODCPI=BASIC
|
||||
ODCPI=DISABLED
|
||||
|
||||
#FREE_WIFI_SCAN_INJECT valid modes:
|
||||
#DISABLED
|
||||
|
@ -98,7 +98,7 @@ FREE_WIFI_SCAN_INJECT=BASIC
|
|||
#SUPL_WIFI valid modes:
|
||||
#DISABLED
|
||||
#BASIC
|
||||
SUPL_WIFI=BASIC
|
||||
SUPL_WIFI=DISABLED
|
||||
|
||||
#WIFI_SUPPLICANT_INFO valid modes:
|
||||
#DISABLED
|
||||
|
@ -147,7 +147,7 @@ LEAN_TARGETS=DISABLED
|
|||
|
||||
PROCESS_NAME=/system/bin/gpsone_daemon
|
||||
PROCESS_ARGUMENT=
|
||||
PROCESS_STATE=ENABLED
|
||||
PROCESS_STATE=DISABLED
|
||||
PROCESS_GROUPS=inet net_raw
|
||||
PREMIUM_FEATURE=0
|
||||
IZAT_FEATURE_MASK=0
|
||||
|
@ -158,7 +158,7 @@ LEAN_TARGETS=DISABLED
|
|||
PROCESS_NAME=/system/bin/lowi-server
|
||||
PROCESS_ARGUMENT=
|
||||
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
|
||||
IZAT_FEATURE_MASK=0xf303
|
||||
PLATFORMS=all
|
||||
|
@ -178,7 +178,7 @@ LEAN_TARGETS=DISABLED
|
|||
PROCESS_NAME=/system/bin/xtwifi-client
|
||||
PROCESS_ARGUMENT=
|
||||
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
|
||||
IZAT_FEATURE_MASK=0xf0f
|
||||
PLATFORMS=all
|
||||
|
@ -188,7 +188,7 @@ LEAN_TARGETS=DISABLED
|
|||
PROCESS_NAME=/system/vendor/bin/slim_daemon
|
||||
PROCESS_ARGUMENT=
|
||||
PROCESS_STATE=ENABLED
|
||||
PROCESS_GROUPS=gps net_raw qcom_diag
|
||||
PROCESS_GROUPS=gps net_raw oem_2950
|
||||
PREMIUM_FEATURE=1
|
||||
IZAT_FEATURE_MASK=0xf0
|
||||
PLATFORMS=all
|
||||
|
|
|
@ -34,13 +34,13 @@ SENSOR_CONTROL_MODE=0
|
|||
SENSOR_USAGE=0
|
||||
|
||||
# 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.
|
||||
# Setting each bit has the following definition:
|
||||
# 0x1 - DISABLE_INS_POSITIONING_FILTER
|
||||
# 0x0 - ENABLE_INS_POSITIONING_FILTER
|
||||
SENSOR_ALGORITHM_CONFIG_MASK=0x1
|
||||
SENSOR_ALGORITHM_CONFIG_MASK=0x0
|
||||
|
||||
# Time source used by Sensor HAL
|
||||
# Setting this value controls accuracy of location sensor services.
|
||||
|
|
|
@ -101,7 +101,6 @@ void LocEngAdapter::setXtraUserAgent() {
|
|||
char release[PROPERTY_VALUE_MAX];
|
||||
char manufacture[PROPERTY_VALUE_MAX];
|
||||
char model[PROPERTY_VALUE_MAX];
|
||||
char carrier[PROPERTY_VALUE_MAX];
|
||||
char board[PROPERTY_VALUE_MAX];
|
||||
char brand[PROPERTY_VALUE_MAX];
|
||||
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.product.manufacturer", manufacture, 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.brand", brand, defVal);
|
||||
getChipsetSerialNo(chipsetsn, sizeof(chipsetsn), defVal);
|
||||
|
||||
snprintf(userAgent, sizeof(userAgent), "A/%s/%s/%s/%s/%s/QCX3/s%u/-/%s/-/%s/-/-/-",
|
||||
release, manufacture, model, board, carrier,
|
||||
encodeInPlace(release, PROPERTY_VALUE_MAX);
|
||||
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);
|
||||
|
||||
for (int i = 0; i < sizeof(userAgent) && userAgent[i]; i++) {
|
||||
|
@ -201,6 +205,56 @@ void LocEngAdapter::setXtraUserAgent() {
|
|||
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));
|
||||
|
|
|
@ -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
|
||||
* 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;
|
||||
|
||||
/* 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'},
|
||||
{"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'},
|
||||
};
|
||||
|
||||
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'},
|
||||
{"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__
|
||||
|
||||
#include <stddef.h>
|
||||
#include <cutils/atomic.h>
|
||||
#include <pthread.h>
|
||||
|
||||
// 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
|
||||
// can maintain an accurate client count.
|
||||
class LocSharedLock {
|
||||
uint32_t mRef;
|
||||
volatile int32_t mRef;
|
||||
pthread_mutex_t mMutex;
|
||||
inline ~LocSharedLock() { pthread_mutex_destroy(&mMutex); }
|
||||
public:
|
||||
// first client to create this LockSharedLock
|
||||
inline LocSharedLock() : mRef(1) { pthread_mutex_init(&mMutex, NULL); }
|
||||
// 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.
|
||||
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
|
||||
inline void lock() { pthread_mutex_lock(&mMutex); }
|
||||
// unlocking the lock to leave the critical section
|
||||
|
|
|
@ -83,7 +83,7 @@ void MsgTask::prerun() {
|
|||
}
|
||||
|
||||
bool MsgTask::run() {
|
||||
LOC_LOGD("MsgTask::loop() listening ...\n");
|
||||
LOC_LOGV("MsgTask::loop() listening ...\n");
|
||||
LocMsg* msg;
|
||||
msq_q_err_type result = msg_q_rcv((void*)mQ, (void **)&msg);
|
||||
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*))
|
||||
{
|
||||
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 )
|
||||
{
|
||||
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)
|
||||
{
|
||||
LOC_LOGD("%s: Removing from list\n", __FUNCTION__);
|
||||
LOC_LOGV("%s: Removing from list\n", __FUNCTION__);
|
||||
if( list_data == NULL )
|
||||
{
|
||||
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),
|
||||
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 )
|
||||
{
|
||||
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
|
||||
* modification, are permitted provided that the following conditions are
|
||||
|
@ -56,12 +56,12 @@ static uint32_t DEBUG_LEVEL = 0xff;
|
|||
static uint32_t TIMESTAMP = 0;
|
||||
|
||||
/* 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'},
|
||||
{"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
|
||||
{
|
||||
|
@ -92,7 +92,7 @@ RETURN VALUE
|
|||
SIDE EFFECTS
|
||||
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;
|
||||
if(NULL == config_entry || NULL == config_value)
|
||||
|
@ -181,7 +181,7 @@ SIDE EFFECTS
|
|||
N/A
|
||||
===========================================================================*/
|
||||
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;
|
||||
|
||||
|
@ -258,7 +258,7 @@ RETURN VALUE
|
|||
SIDE EFFECTS
|
||||
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;
|
||||
|
||||
|
@ -322,7 +322,7 @@ SIDE EFFECTS
|
|||
N/A
|
||||
===========================================================================*/
|
||||
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;
|
||||
|
||||
|
@ -377,7 +377,7 @@ RETURN VALUE
|
|||
SIDE EFFECTS
|
||||
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)
|
||||
{
|
||||
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
|
||||
* modification, are permitted provided that the following conditions are
|
||||
|
@ -54,7 +54,7 @@
|
|||
*============================================================================*/
|
||||
typedef struct
|
||||
{
|
||||
char param_name[LOC_MAX_PARAM_NAME];
|
||||
const char *param_name;
|
||||
void *param_ptr;
|
||||
uint8_t *param_set; /* was this value set by config file? */
|
||||
char param_type; /* 'n' for number,
|
||||
|
@ -78,12 +78,12 @@ extern "C" {
|
|||
*
|
||||
*============================================================================*/
|
||||
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);
|
||||
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);
|
||||
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
|
||||
}
|
||||
#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
|
||||
* 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;
|
||||
|
||||
/* 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++)
|
||||
{
|
||||
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 */
|
||||
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++)
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
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_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_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 */
|
||||
const char* loc_get_msg_q_status(int status)
|
||||
|
@ -107,7 +107,7 @@ const char* log_succ_fail_string(int is_succ)
|
|||
}
|
||||
|
||||
//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_MSM),
|
||||
|
@ -118,7 +118,7 @@ loc_name_val_s_type target_name[] =
|
|||
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];
|
||||
|
||||
index = getTargetGnssType(target);
|
||||
if( index >= target_name_num || index < 0)
|
||||
if( index < 0 || (unsigned)index >= target_name_num )
|
||||
index = target_name_num - 1;
|
||||
|
||||
if( (target & HAS_SSC) == HAS_SSC ) {
|
||||
|
@ -168,7 +168,7 @@ RETURN VALUE
|
|||
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 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
|
||||
* modification, are permitted provided that the following conditions are
|
||||
|
@ -36,11 +36,12 @@ extern "C"
|
|||
#endif
|
||||
|
||||
#include <ctype.h>
|
||||
#include <stdlib.h>
|
||||
#include "loc_target.h"
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char name[128];
|
||||
const char *name;
|
||||
long val;
|
||||
} loc_name_val_s_type;
|
||||
|
||||
|
@ -49,17 +50,19 @@ typedef struct
|
|||
#define UNKNOWN_STR "UNKNOWN"
|
||||
|
||||
#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 */
|
||||
const char* loc_get_name_from_mask(loc_name_val_s_type table[], int 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_mask(const loc_name_val_s_type table[], size_t table_size, long mask);
|
||||
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_target_name(unsigned int target);
|
||||
|
||||
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
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
||||
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 )
|
||||
{
|
||||
|
@ -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);
|
||||
|
||||
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;
|
||||
}
|
||||
|
@ -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;
|
||||
|
||||
LOC_LOGD("%s: Waiting on message\n", __FUNCTION__);
|
||||
LOC_LOGV("%s: Waiting on message\n", __FUNCTION__);
|
||||
|
||||
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);
|
||||
|
||||
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;
|
||||
}
|
||||
|
|
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");
|
||||
# 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.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
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",
|
||||
"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>
|
||||
</interface>
|
||||
</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">
|
||||
<name>android.hardware.configstore</name>
|
||||
<transport>hwbinder</transport>
|
||||
|
@ -95,19 +86,6 @@
|
|||
<instance>default</instance>
|
||||
</interface>
|
||||
</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">
|
||||
<name>android.hardware.memtrack</name>
|
||||
<transport arch="32">passthrough</transport>
|
||||
|
@ -162,15 +140,6 @@
|
|||
<instance>default</instance>
|
||||
</interface>
|
||||
</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">
|
||||
<name>android.hardware.wifi.supplicant</name>
|
||||
<transport>hwbinder</transport>
|
||||
|
|
103
msm8226.mk
103
msm8226.mk
|
@ -1,5 +1,5 @@
|
|||
# Copyright (C) 2014 The CyanogenMod Project
|
||||
# Copyright (C) 2017-2019 The LineageOS Project
|
||||
# Copyright (C) 2012 The CyanogenMod Project
|
||||
# Copyright (C) 2017-2018 The LineageOS Project
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
|
@ -13,11 +13,8 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
$(call inherit-product, $(SRC_TARGET_DIR)/product/languages_full.mk)
|
||||
|
||||
# Overlays
|
||||
DEVICE_PACKAGE_OVERLAYS += $(LOCAL_PATH)/overlay
|
||||
DEVICE_PACKAGE_OVERLAYS += $(LOCAL_PATH)/overlay-lineage
|
||||
DEVICE_PACKAGE_OVERLAYS += device/samsung/msm8226-common/overlay
|
||||
|
||||
# Permissions
|
||||
PRODUCT_COPY_FILES += \
|
||||
|
@ -41,35 +38,29 @@ 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.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
|
||||
PRODUCT_PROPERTY_OVERRIDES += \
|
||||
audio.offload.buffer.size.kb=32 \
|
||||
audio.offload.gapless.enabled=false \
|
||||
av.offload.enable=true\
|
||||
ro.af.client_heap_size_kbyte=7168 \
|
||||
persist.vendor.audio.hw.binder.size_kbyte=1024
|
||||
ro.af.client_heap_size_kbyte=7168
|
||||
|
||||
PRODUCT_PROPERTY_OVERRIDES += \
|
||||
ro.opengles.version=196608 \
|
||||
debug.hwui.use_buffer_age=false
|
||||
ro.opengles.version=196608
|
||||
|
||||
PRODUCT_PROPERTY_OVERRIDES += \
|
||||
persist.graphics.vulkan.disable=true
|
||||
|
||||
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 += \
|
||||
dalvik.vm.heapstartsize=8m \
|
||||
|
@ -90,21 +81,20 @@ PRODUCT_PROPERTY_OVERRIDES += \
|
|||
persist.sys.purgeable_assets=1
|
||||
|
||||
PRODUCT_PROPERTY_OVERRIDES += \
|
||||
ro.vendor.extension_library=/vendor/lib/libqc-opt.so
|
||||
persist.timed.enable=true
|
||||
|
||||
# Audio
|
||||
PRODUCT_PACKAGES += \
|
||||
android.hardware.audio@2.0-impl \
|
||||
android.hardware.audio.effect@2.0-impl \
|
||||
audio_policy.msm8226 \
|
||||
audio.a2dp.default \
|
||||
audio.primary.msm8226 \
|
||||
audio.r_submix.default \
|
||||
audio.usb.default
|
||||
|
||||
PRODUCT_PACKAGES += \
|
||||
audio.usb.default \
|
||||
libaudio-resampler \
|
||||
libqcompostprocbundle \
|
||||
libqcomvisualizer \
|
||||
libqcompostprocbundle \
|
||||
libqcomvoiceprocessing \
|
||||
tinymix
|
||||
|
||||
|
@ -116,19 +106,6 @@ PRODUCT_PACKAGES += \
|
|||
# Boot animation
|
||||
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
|
||||
PRODUCT_PACKAGES += \
|
||||
android.hardware.graphics.allocator@2.0-impl \
|
||||
|
@ -165,17 +142,12 @@ PRODUCT_COPY_FILES += \
|
|||
PRODUCT_PACKAGES += \
|
||||
android.hardware.keymaster@3.0-impl
|
||||
|
||||
# Keystore
|
||||
PRODUCT_PACKAGES += \
|
||||
keystore.msm8226
|
||||
|
||||
# Media
|
||||
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_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_le.xml:system/etc/media_codecs_google_video_le.xml \
|
||||
$(LOCAL_PATH)/configs/media_codecs.xml:system/etc/media_codecs.xml
|
||||
device/samsung/msm8226-common/configs/media_codecs.xml:system/etc/media_codecs.xml
|
||||
|
||||
# OMX
|
||||
PRODUCT_PACKAGES += \
|
||||
|
@ -189,6 +161,10 @@ PRODUCT_PACKAGES += \
|
|||
libOmxVenc \
|
||||
libstagefrighthw
|
||||
|
||||
# Offmode charger
|
||||
PRODUCT_PACKAGES += \
|
||||
lineage_charger_res_images
|
||||
|
||||
# Power HAL
|
||||
PRODUCT_PACKAGES += \
|
||||
android.hardware.power@1.0-service-qti
|
||||
|
@ -198,15 +174,27 @@ PRODUCT_DEXPREOPT_SPEED_APPS += \
|
|||
Settings \
|
||||
SystemUI
|
||||
|
||||
# Seccomp
|
||||
PRODUCT_COPY_FILES += \
|
||||
$(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
|
||||
# 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
|
||||
PRODUCT_COPY_FILES += \
|
||||
$(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
|
||||
|
||||
# Sensors
|
||||
PRODUCT_PACKAGES += \
|
||||
android.hardware.sensors@1.0-impl
|
||||
|
@ -217,21 +205,28 @@ PRODUCT_PACKAGES += \
|
|||
|
||||
# Wifi
|
||||
PRODUCT_PACKAGES += \
|
||||
android.hardware.wifi@1.0-service \
|
||||
dhcpcd.conf \
|
||||
hostapd \
|
||||
wificond \
|
||||
wpa_supplicant \
|
||||
wpa_supplicant.conf \
|
||||
libwpa_client \
|
||||
android.hardware.wifi@1.0-service
|
||||
libwpa_client
|
||||
|
||||
PRODUCT_PACKAGES += \
|
||||
libcurl \
|
||||
libwcnss_qmi \
|
||||
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
|
||||
$(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)
|
||||
|
|
|
@ -21,10 +21,6 @@
|
|||
for different hardware and product builds. -->
|
||||
<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 -->
|
||||
<string-array translatable="false" name="config_gpsParameters">
|
||||
<item>XTRA_SERVER_1=https://xtrapath1.izatcloud.net/xtra3grc.bin</item>
|
||||
|
@ -37,25 +33,11 @@
|
|||
<item>LPP_PROFILE=0</item>
|
||||
</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 -->
|
||||
<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>"/data/dalvik-cache/arm64/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.dex"</item>
|
||||
<item>"/data/dalvik-cache/arm/system@priv-app@SystemUI@SystemUI.apk@classes.vdex"</item>
|
||||
<item>"/system/lib/libsurfaceflinger.so"</item>
|
||||
</string-array>
|
||||
|
||||
|
|
|
@ -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="allow_adding_apns_bool" value="true" />
|
||||
</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>
|
||||
|
|
|
@ -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)
|
||||
|
||||
# Configuration scripts
|
||||
|
||||
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)
|
||||
LOCAL_MODULE := init.qcom.rc
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := 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_SRC_FILES := etc/init.qcom.rc
|
||||
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
|
@ -38,7 +14,7 @@ include $(CLEAR_VARS)
|
|||
LOCAL_MODULE := init.qcom.usb.rc
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
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)
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
|
@ -47,7 +23,7 @@ include $(CLEAR_VARS)
|
|||
LOCAL_MODULE := init.recovery.qcom.rc
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
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)
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
|
@ -55,6 +31,29 @@ include $(CLEAR_VARS)
|
|||
LOCAL_MODULE := ueventd.qcom.rc
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := ueventd.qcom.rc
|
||||
LOCAL_SRC_FILES := etc/ueventd.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 := 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.
|
||||
#
|
||||
|
||||
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
|
||||
|
||||
# HMP scheduler settings
|
||||
|
@ -117,8 +86,46 @@ on init
|
|||
write /dev/cpuset/top-app/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
|
||||
trigger enable-low-power
|
||||
|
||||
on property:init.svc.recovery=running
|
||||
trigger enable-low-power
|
||||
|
||||
on property:dev.bootcomplete=1
|
||||
setprop sys.io.scheduler "bfq"
|
|
@ -86,18 +86,6 @@ on post-fs-data
|
|||
mkdir /data/connectivity 0771 system system
|
||||
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
|
||||
chown system root /data/.psm.info
|
||||
chmod 0664 /data/.psm.info
|
||||
|
@ -599,9 +587,8 @@ service adsprpcd /vendor/bin/adsprpcd
|
|||
user media
|
||||
group media
|
||||
|
||||
service charger /sbin/healthd -c
|
||||
service charger /charger
|
||||
class charger
|
||||
critical
|
||||
seclabel u:r:charger:s0
|
||||
|
||||
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
|
||||
user root
|
||||
group root readproc
|
||||
disabled
|
||||
|
||||
service qcamerasvr /vendor/bin/mm-qcamera-daemon
|
||||
class main
|
||||
|
@ -695,11 +683,11 @@ service wcnss-service /system/bin/wcnss_service
|
|||
# WPA
|
||||
service wpa_supplicant /vendor/bin/hw/wpa_supplicant \
|
||||
-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 \
|
||||
-I/vendor/etc/wifi/wpa_supplicant_overlay.conf \
|
||||
-O/data/vendor/wifi/wpa/sockets -puse_p2p_group_interface=1 \
|
||||
-g@android:wpa_wlan0
|
||||
-I/system/etc/wifi/wpa_supplicant_overlay.conf \
|
||||
-puse_p2p_group_interface=1 \
|
||||
-e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0
|
||||
# we will start as root and wpa_supplicant will switch to user wifi
|
||||
# after setting up the capabilities required for WEXT
|
||||
# user wifi
|
|
@ -25,8 +25,8 @@
|
|||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
# the DIAG device node is not world writable/readable.
|
||||
/dev/diag 0660 system oem_2950
|
||||
# the DIAG device node HAS TO BE world writable/readable, otherwise libdiag cant open the socket :/
|
||||
/dev/diag 0777 system oem_2950
|
||||
|
||||
/dev/genlock 0666 system system
|
||||
/dev/kgsl 0666 system system
|
|
@ -14,13 +14,11 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#include <hardware/sensors.h>
|
||||
#include <algorithm>
|
||||
|
||||
#include <pthread.h>
|
||||
#include <log/log.h>
|
||||
|
||||
#include <hardware/sensors.h>
|
||||
#include "SensorEventQueue.h"
|
||||
|
||||
SensorEventQueue::SensorEventQueue(int capacity) {
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
#include "multihal.h"
|
||||
|
||||
#define LOG_NDEBUG 1
|
||||
#include <cutils/log.h>
|
||||
#include <log/log.h>
|
||||
#include <cutils/atomic.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;
|
||||
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 shared object handles
|
||||
static std::vector<void *> *so_handles = nullptr;
|
||||
/*
|
||||
* Vector of sub modules, whose indexes are referred to in this file as module_index.
|
||||
*/
|
||||
static std::vector<hw_module_t *> *sub_hw_modules = NULL;
|
||||
|
||||
/*
|
||||
* 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 batch(int handle, int flags, int64_t period_ns, int64_t timeout);
|
||||
int flush(int handle);
|
||||
int inject_sensor_data(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 inject_sensor_data(struct sensors_poll_device_1 *dev, const sensors_event_t *data);
|
||||
int close();
|
||||
|
||||
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_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);
|
||||
|
||||
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];
|
||||
}
|
||||
|
||||
// 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.
|
||||
int sensors_poll_context_t::get_device_version_by_handle(int 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) {
|
||||
switch(version) {
|
||||
case SENSORS_DEVICE_API_VERSION_1_0:
|
||||
|
@ -312,12 +277,7 @@ int sensors_poll_context_t::activate(int handle, int enabled) {
|
|||
ALOGV("activate");
|
||||
int local_handle = get_local_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);
|
||||
} else {
|
||||
ALOGE("IGNORING activate(enable %d) call to non-API-compliant sensor handle=%d !",
|
||||
enabled, handle);
|
||||
}
|
||||
ALOGV("retval %d", retval);
|
||||
return retval;
|
||||
}
|
||||
|
@ -327,11 +287,7 @@ int sensors_poll_context_t::setDelay(int handle, int64_t ns) {
|
|||
ALOGV("setDelay");
|
||||
int local_handle = get_local_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);
|
||||
} else {
|
||||
ALOGE("IGNORING setDelay() call for non-API-compliant sensor handle=%d !", handle);
|
||||
}
|
||||
ALOGV("retval %d", retval);
|
||||
return retval;
|
||||
}
|
||||
|
@ -375,7 +331,7 @@ int sensors_poll_context_t::poll(sensors_event_t *data, int maxReads) {
|
|||
} else {
|
||||
empties = 0;
|
||||
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 !
|
||||
ALOGW("Dropping bad local handle event packet on the floor");
|
||||
} else {
|
||||
|
@ -405,11 +361,7 @@ int sensors_poll_context_t::batch(int handle, int flags, int64_t period_ns, int6
|
|||
int retval = -EINVAL;
|
||||
int local_handle = get_local_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);
|
||||
} else {
|
||||
ALOGE("IGNORING batch() call to non-API-compliant sensor handle=%d !", handle);
|
||||
}
|
||||
ALOGV("retval %d", retval);
|
||||
return retval;
|
||||
}
|
||||
|
@ -419,84 +371,24 @@ int sensors_poll_context_t::flush(int handle) {
|
|||
int retval = -EINVAL;
|
||||
int local_handle = get_local_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);
|
||||
} else {
|
||||
ALOGE("IGNORING flush() call to non-API-compliant sensor handle=%d !", handle);
|
||||
}
|
||||
ALOGV("retval %d", 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;
|
||||
ALOGV("inject_sensor_data");
|
||||
if (data->sensor == -1) {
|
||||
// operational parameter
|
||||
sensors_poll_device_1_t* v1 = get_primary_v1_device();
|
||||
if (v1 && v1->common.version >= SENSORS_DEVICE_API_VERSION_1_4) {
|
||||
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;
|
||||
}
|
||||
}
|
||||
retval = v1->inject_sensor_data(dev, data);
|
||||
ALOGV("retval %d", 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() {
|
||||
ALOGV("close");
|
||||
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) {
|
||||
pthread_mutex_lock(&init_modules_mutex);
|
||||
sensors_poll_context_t* ctx = (sensors_poll_context_t*) dev;
|
||||
if (ctx != NULL) {
|
||||
int retval = ctx->close();
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -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,
|
||||
int flags, int64_t period_ns, int64_t timeout) {
|
||||
sensors_poll_context_t* ctx = (sensors_poll_context_t*) dev;
|
||||
|
||||
ctx->setDelay(handle, period_ns);
|
||||
|
||||
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,
|
||||
const sensors_event_t *data) {
|
||||
sensors_poll_context_t* ctx = (sensors_poll_context_t*) dev;
|
||||
return ctx->inject_sensor_data(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);
|
||||
return ctx->inject_sensor_data(dev, data);
|
||||
}
|
||||
|
||||
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.
|
||||
* The vector must not be null.
|
||||
*/
|
||||
static std::vector<std::string> get_so_paths() {
|
||||
std::vector<std::string> so_paths;
|
||||
|
||||
static void get_so_paths(std::vector<std::string> *so_paths) {
|
||||
const std::vector<const char *> config_path_list(
|
||||
{ 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) {
|
||||
ALOGW("No multihal config file found");
|
||||
return so_paths;
|
||||
return;
|
||||
}
|
||||
|
||||
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;
|
||||
while (std::getline(stream, line)) {
|
||||
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);
|
||||
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
|
||||
sub_hw_modules = new std::vector<hw_module_t *>();
|
||||
so_handles = new std::vector<void *>();
|
||||
dlerror(); // clear any old errors
|
||||
const char* sym = HAL_MODULE_INFO_SYM_AS_STR;
|
||||
for (const auto &s : so_paths) {
|
||||
const char* path = s.c_str();
|
||||
for (std::vector<std::string>::iterator it = so_paths->begin(); it != so_paths->end(); it++) {
|
||||
const char* path = it->c_str();
|
||||
void* lib_handle = dlopen(path, RTLD_LAZY);
|
||||
if (lib_handle == NULL) {
|
||||
ALOGW("dlerror(): %s", dlerror());
|
||||
|
@ -670,13 +531,8 @@ static void lazy_init_modules() {
|
|||
} else {
|
||||
ALOGV("Loaded symbols from \"%s\"", sym);
|
||||
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);
|
||||
}
|
||||
|
@ -687,11 +543,27 @@ static void lazy_init_modules() {
|
|||
*/
|
||||
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.fifoReservedEventCount = 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,
|
||||
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.
|
||||
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();
|
||||
memset(dev, 0, sizeof(sensors_poll_device_1_t));
|
||||
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.close = device__close;
|
||||
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.flush = device__flush;
|
||||
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;
|
||||
|
||||
|
@ -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;
|
||||
int sub_open_result = sensors_module->common.methods->open(*it, name, &sub_hw_device);
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
|
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
|
||||
|
||||
# Copyright headers
|
||||
write_headers $BOARD TARGET_BOARD_BOARD
|
||||
write_headers $BOARD TARGET_BOARD_PLATFORM
|
||||
|
||||
write_makefiles "$MY_DIR"/common-proprietary-files.txt
|
||||
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
# Storage
|
||||
ro.sys.sdcardfs=true
|
Loading…
Reference in a new issue