diff options
| author | deadman96385 <seanhoyt963@gmail.com> | 2015-06-20 00:50:10 -0400 |
|---|---|---|
| committer | deadman96385 <seanhoyt963@gmail.com> | 2015-06-20 03:46:46 -0400 |
| commit | 8570d466e2b5b88c316c7f1576bf8ea9051c5e2a (patch) | |
| tree | 354d224a980c7a233a5496a4febd7da47a3575fe | |
| parent | b761e551cd607f0e7d6ffc64221c253ea9052df4 (diff) | |
Move stuff up to Exynos-5420
Change-Id: I1217c7c01056d9ca9f3a9211d2459ee69fa8daa2
44 files changed, 16 insertions, 3981 deletions
diff --git a/BoardConfig.mk b/BoardConfig.mk index d967064..e2cab8c 100644 --- a/BoardConfig.mk +++ b/BoardConfig.mk @@ -14,33 +14,10 @@ # limitations under the License. # -LOCAL_PATH := device/samsung/klimtlte - -# Platform -BOARD_VENDOR := samsung -TARGET_BOARD_PLATFORM := exynos5 -TARGET_SLSI_VARIANT := insignal -TARGET_SOC := exynos5420 - -# Architecture -TARGET_ARCH := arm -TARGET_ARCH_VARIANT := armv7-a-neon -TARGET_CPU_VARIANT := cortex-a15 -TARGET_CPU_ABI := armeabi-v7a -TARGET_CPU_ABI2 := armeabi -TARGET_CPU_SMP := true +# Inherit from Exynos 5420 Common +-include device/samsung/exynos5420-common/BoardConfigCommon.mk -# Audio -BOARD_USES_LIBMEDIA_WITH_AUDIOPARAMETER := true - -# Bionic -TARGET_USE_QCOM_BIONIC_OPTIMIZATION := true - -# Bluetooth -BOARD_HAVE_BLUETOOTH := true -BOARD_HAVE_BLUETOOTH_BCM := true -BOARD_BLUEDROID_VENDOR_CONF := $(LOCAL_PATH)/bluetooth/libbt_vndcfg.txt -BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := $(LOCAL_PATH)/bluetooth +LOCAL_PATH := device/samsung/klimtlte # Bootloader TARGET_OTA_ASSERT_DEVICE := klimtlte @@ -52,68 +29,19 @@ COMMON_GLOBAL_CFLAGS += -DDISABLE_HW_ID_MATCH_CHECK COMMON_GLOBAL_CFLAGS += -DSAMSUNG_CAMERA_HARDWARE COMMON_GLOBAL_CFLAGS += -DSAMSUNG_DVFS -# Fonts -EXTENDED_FONT_FOOTPRINT := true - -# Force the screenshot path to CPU consumer -COMMON_GLOBAL_CFLAGS += -DFORCE_SCREENSHOT_CPU_PATH - # Kernel -BOARD_KERNEL_BASE := 0x10000000 -BOARD_KERNEL_PAGESIZE := 2048 TARGET_KERNEL_CONFIG := deathly_klimtlte_defconfig -TARGET_KERNEL_SOURCE := kernel/samsung/klimtwifi # Battery BOARD_CHARGING_MODE_BOOTING_LPM := /sys/class/power_supply/battery/batt_lp_charging -BOARD_BATTERY_DEVICE_NAME := battery BOARD_CHARGER_SHOW_PERCENTAGE := true -# Bootloader -TARGET_BOOTLOADER_BOARD_NAME := universal5420 -TARGET_NO_BOOTLOADER := true -TARGET_NO_RADIOIMAGE := true - -# FIMG2D -BOARD_USES_SKIA_FIMGAPI := true -BOARD_USES_NEON_BLITANTIH := true - -# Graphics -USE_OPENGL_RENDERER := true -BOARD_EGL_CFG := $(LOCAL_PATH)/configs/egl.cfg -NUM_FRAMEBUFFER_SURFACE_BUFFERS := 5 - -# HWCServices -BOARD_USES_HWC_SERVICES := true - # Include path TARGET_SPECIFIC_HEADER_PATH := $(LOCAL_PATH)/include # Hardware BOARD_HARDWARE_CLASS += device/samsung/klimtlte/cmhw -# Init -TARGET_NR_SVC_SUPP_GIDS := 20 - -# Media -COMMON_GLOBAL_CFLAGS += -DUSE_NATIVE_SEC_NV12TILED # use format from fw/native -COMMON_GLOBAL_CFLAGS += -DWIDEVINE_PLUGIN_PRE_NOTIFY_ERROR - -# OpenMAX Video -BOARD_USE_STOREMETADATA := true -BOARD_USE_METADATABUFFERTYPE := true -BOARD_USE_S3D_SUPPORT := true -BOARD_USE_DMA_BUF := true -BOARD_USE_ANB_OUTBUF_SHARE := true -BOARD_USE_GSC_RGB_ENCODER := true -BOARD_USE_IMPROVED_BUFFER := true -BOARD_USE_CSC_HW := false -BOARD_USE_H264_PREPEND_SPS_PPS := false -BOARD_USE_QOS_CTRL := false -BOARD_USE_VP8ENC_SUPPORT := true -BOARD_USE_ENCODER_RGBINPUT_SUPPORT := true -BOARD_USE_DUALDPB_MODE := true - # Partitions BOARD_BOOTIMAGE_PARTITION_SIZE := 8388608 BOARD_RECOVERYIMAGE_PARTITION_SIZE := 10485760 @@ -124,60 +52,8 @@ BOARD_FLASH_BLOCK_SIZE := 4096 # PowerHAL TARGET_POWERHAL_VARIANT := klimtlte -# Recovery -COMMON_GLOBAL_CFLAGS += -DNO_SECURE_DISCARD -BOARD_USE_CUSTOM_RECOVERY_FONT := \"roboto_23x41.h\" -BOARD_HAS_NO_SELECT_BUTTON := true -TARGET_RECOVERY_FSTAB := $(LOCAL_PATH)/rootdir/etc/fstab.universal5420 -TARGET_RECOVERY_PIXEL_FORMAT := BGRA_8888 -TARGET_USERIMAGES_USE_EXT4 := true -BOARD_RECOVERY_SWIPE := true -RECOVERY_GRAPHICS_USE_LINELENGTH := true - -# Scaler -BOARD_USES_SCALER := true - # SELinux -BOARD_SEPOLICY_DIRS += \ - device/samsung/klimtlte/sepolicy - -BOARD_SEPOLICY_UNION += \ - file_contexts \ - device.te \ - domain.te \ - drmserver.te \ - file.te \ - gpsd.te \ - init.te \ - mediaserver.te \ - servicemanager.te \ - service_contexts \ - system_app.te \ - system_server.te \ - vold.te \ - wpa.te - -# SurfaceFlinger -BOARD_USES_SYNC_MODE_FOR_MEDIA := true - -# Webkit -ENABLE_WEBGL := true - -# WFD -BOARD_USES_WFD_SERVICE := true -BOARD_USES_WFD := true - -# Wifi -BOARD_HAVE_SAMSUNG_WIFI := true -BOARD_WLAN_DEVICE := bcmdhd -WPA_SUPPLICANT_VERSION := VER_0_8_X -BOARD_WPA_SUPPLICANT_DRIVER := NL80211 -BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_bcmdhd -BOARD_HOSTAPD_DRIVER := NL80211 -BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_bcmdhd -WIFI_DRIVER_FW_PATH_PARAM := "/sys/module/dhd/parameters/firmware_path" -WIFI_DRIVER_FW_PATH_STA := "/system/etc/wifi/bcmdhd_sta.bin" -WIFI_DRIVER_FW_PATH_AP := "/system/etc/wifi/bcmdhd_apsta.bin" +include device/samsung/exynos5420-common/sepolicy/sepolicy.mk # Radio BOARD_RIL_CLASS := ../../../device/samsung/klimtlte/ril diff --git a/bluetooth/bdroid_buildcfg.h b/bluetooth/bdroid_buildcfg.h deleted file mode 100644 index 6ef5159..0000000 --- a/bluetooth/bdroid_buildcfg.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - * 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. - */ - -#ifndef _BDROID_BUILDCFG_H -#define _BDROID_BUILDCFG_H - -#define BTM_DEF_LOCAL_NAME "SM-T705" - -// Networking, Capturing, Object Transfer -// MAJOR CLASS: COMPUTER -// MINOR CLASS: LAPTOP -#define BTA_DM_COD {0x1A, 0x01, 0x0C} - -#define BTIF_HF_SERVICES (BTA_HSP_SERVICE_MASK) -#define BTIF_HF_SERVICE_NAMES { BTIF_HSAG_SERVICE_NAME, NULL } -#define PAN_NAP_DISABLED TRUE - -#endif diff --git a/bluetooth/libbt_vndcfg.txt b/bluetooth/libbt_vndcfg.txt deleted file mode 100644 index f00c1d0..0000000 --- a/bluetooth/libbt_vndcfg.txt +++ /dev/null @@ -1,7 +0,0 @@ -BLUETOOTH_UART_DEVICE_PORT = "/dev/ttySAC0" -FW_PATCHFILE_LOCATION = "/vendor/firmware" -FW_PATCH_SETTLEMENT_DELAY_MS = 100 -UART_TARGET_BAUD_RATE = 921600 -LPM_IDLE_TIMEOUT_MULTIPLE = 5 -SCO_USE_I2S_INTERFACE = TRUE -SCO_I2SPCM_IF_ROLE = 0 diff --git a/camera/Android.mk b/camera/Android.mk deleted file mode 100644 index 7e6518a..0000000 --- a/camera/Android.mk +++ /dev/null @@ -1,17 +0,0 @@ -LOCAL_PATH := $(call my-dir) -include $(CLEAR_VARS) - -LOCAL_SRC_FILES := \ - CameraWrapper.cpp - -LOCAL_SHARED_LIBRARIES := \ - libhardware liblog libcamera_client libutils - -LOCAL_C_INCLUDES += \ - system/media/camera/include \ - -LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw -LOCAL_MODULE := camera.universal5420 -LOCAL_MODULE_TAGS := optional - -include $(BUILD_SHARED_LIBRARY) diff --git a/camera/CameraWrapper.cpp b/camera/CameraWrapper.cpp deleted file mode 100644 index 09469bc..0000000 --- a/camera/CameraWrapper.cpp +++ /dev/null @@ -1,622 +0,0 @@ -/* - * Copyright (C) 2014, 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. - */ - -/** -* @file CameraWrapper.cpp -* -* This file wraps a vendor camera module. -* -*/ - -//#define LOG_NDEBUG 0 - -#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> - -static android::Mutex gCameraWrapperLock; -static camera_module_t *gVendorModule = 0; - -static char **fixed_set_params = NULL; - -static int camera_device_open(const hw_module_t *module, const char *name, - hw_device_t **device); -static int camera_get_number_of_cameras(void); -static int camera_get_camera_info(int camera_id, struct camera_info *info); - -static struct hw_module_methods_t camera_module_methods = { - open: camera_device_open -}; - -camera_module_t HAL_MODULE_INFO_SYM = { - common: { - tag: HARDWARE_MODULE_TAG, - version_major: 1, - version_minor: 0, - id: CAMERA_HARDWARE_MODULE_ID, - name: "Exynos5420 Camera Wrapper", - author: "BLCK", - methods: &camera_module_methods, - dso: NULL, /* remove compilation warnings */ - reserved: {0}, /* remove compilation warnings */ - }, - get_number_of_cameras: camera_get_number_of_cameras, - get_camera_info: camera_get_camera_info, - set_callbacks: NULL, -}; - -typedef struct wrapper_camera_device { - camera_device_t base; - int id; - camera_device_t *vendor; -} wrapper_camera_device_t; - -#define VENDOR_CALL(device, func, ...) ({ \ - wrapper_camera_device_t *__wrapper_dev = (wrapper_camera_device_t*) device; \ - __wrapper_dev->vendor->ops->func(__wrapper_dev->vendor, ##__VA_ARGS__); \ -}) - -#define CAMERA_ID(device) (((wrapper_camera_device_t *)(device))->id) - -static int check_vendor_module() -{ - int rv = 0; - ALOGV("%s", __FUNCTION__); - - if (gVendorModule) - return 0; - - rv = hw_get_module_by_class("camera", "vendor", - (const hw_module_t**)&gVendorModule); - if (rv) - ALOGE("failed to open vendor camera module"); - return rv; -} - -static char *camera_fixup_getparams(int id, const char *settings) -{ - android::CameraParameters params; - params.unflatten(android::String8(settings)); - -#if !LOG_NDEBUG - ALOGV("%s: original parameters:", __FUNCTION__); - params.dump(); -#endif - - /* Convert to Qualcomm-style max parameters */ - if (params.get("contrast-max")) { - params.set("max-contrast", params.get("contrast-max")); - } - if (params.get("saturation-max")) { - params.set("max-saturation", params.get("saturation-max")); - } - if (params.get("sharpness-max")) { - params.set("max-sharpness", params.get("sharpness-max")); - } - -#if !LOG_NDEBUG - ALOGV("%s: fixed parameters:", __FUNCTION__); - params.dump(); -#endif - - android::String8 strParams = params.flatten(); - char *ret = strdup(strParams.string()); - - return ret; -} - -static char *camera_fixup_setparams(int id, const char *settings) -{ - android::CameraParameters params; - params.unflatten(android::String8(settings)); - -#if !LOG_NDEBUG - ALOGV("%s: original parameters:", __FUNCTION__); - params.dump(); -#endif - - /* Convert to Qualcomm-style max/min parameters */ - if (params.get("max-contrast")) { - params.set("contrast-max", params.get("max-contrast")); - } - if (params.get("max-saturation")) { - params.set("saturation-max", params.get("max-saturation")); - } - if (params.get("max-sharpness")) { - params.set("sharpness-max", params.get("max-sharpness")); - } - -#if !LOG_NDEBUG - ALOGV("%s: fixed parameters:", __FUNCTION__); - params.dump(); -#endif - - android::String8 strParams = params.flatten(); - if (fixed_set_params[id]) - free(fixed_set_params[id]); - fixed_set_params[id] = strdup(strParams.string()); - char *ret = fixed_set_params[id]; - - return ret; -} - -/******************************************************************* - * implementation of camera_device_ops functions - *******************************************************************/ - -static int camera_set_preview_window(struct camera_device *device, - struct preview_stream_ops *window) -{ - ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device, - (uintptr_t)(((wrapper_camera_device_t*)device)->vendor)); - - if (!device) { - ALOGE("Camera device null"); - return -EINVAL; - } - if (!window) { - ALOGE("Camera window is null"); - return -EINVAL; - } - - return VENDOR_CALL(device, set_preview_window, window); -} - -static void camera_set_callbacks(struct camera_device *device, - camera_notify_callback notify_cb, - camera_data_callback data_cb, - camera_data_timestamp_callback data_cb_timestamp, - camera_request_memory get_memory, - void *user) -{ - ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device, - (uintptr_t)(((wrapper_camera_device_t*)device)->vendor)); - - if (!device) - return; - - VENDOR_CALL(device, set_callbacks, notify_cb, data_cb, data_cb_timestamp, - get_memory, user); -} - -static void camera_enable_msg_type(struct camera_device *device, - int32_t msg_type) -{ - ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device, - (uintptr_t)(((wrapper_camera_device_t*)device)->vendor)); - - if (!device) - return; - - VENDOR_CALL(device, enable_msg_type, msg_type); -} - -static void camera_disable_msg_type(struct camera_device *device, - int32_t msg_type) -{ - ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device, - (uintptr_t)(((wrapper_camera_device_t*)device)->vendor)); - - if (!device) - return; - - VENDOR_CALL(device, disable_msg_type, msg_type); -} - -static int camera_msg_type_enabled(struct camera_device *device, - int32_t msg_type) -{ - ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device, - (uintptr_t)(((wrapper_camera_device_t*)device)->vendor)); - - if (!device) - return 0; - - return VENDOR_CALL(device, msg_type_enabled, msg_type); -} - -static int camera_start_preview(struct camera_device *device) -{ - ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device, - (uintptr_t)(((wrapper_camera_device_t*)device)->vendor)); - - if (!device) { - ALOGE("Camera device null"); - return -EINVAL; - } - - return VENDOR_CALL(device, start_preview); -} - -static void camera_stop_preview(struct camera_device *device) -{ - ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device, - (uintptr_t)(((wrapper_camera_device_t*)device)->vendor)); - - if (!device) - return; - - VENDOR_CALL(device, stop_preview); -} - -static int camera_preview_enabled(struct camera_device *device) -{ - ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device, - (uintptr_t)(((wrapper_camera_device_t*)device)->vendor)); - - if (!device) { - ALOGE("Camera device null"); - return -EINVAL; - } - - return VENDOR_CALL(device, preview_enabled); -} - -static int camera_store_meta_data_in_buffers(struct camera_device *device, - int enable) -{ - ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device, - (uintptr_t)(((wrapper_camera_device_t*)device)->vendor)); - - if (!device) - return -EINVAL; - - return VENDOR_CALL(device, store_meta_data_in_buffers, enable); -} - -static int camera_start_recording(struct camera_device *device) -{ - ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device, - (uintptr_t)(((wrapper_camera_device_t*)device)->vendor)); - - if (!device) - return EINVAL; - - return VENDOR_CALL(device, start_recording); -} - -static void camera_stop_recording(struct camera_device *device) -{ - ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device, - (uintptr_t)(((wrapper_camera_device_t*)device)->vendor)); - - if (!device) - return; - - VENDOR_CALL(device, stop_recording); -} - -static int camera_recording_enabled(struct camera_device *device) -{ - ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device, - (uintptr_t)(((wrapper_camera_device_t*)device)->vendor)); - - if (!device) - return -EINVAL; - - return VENDOR_CALL(device, recording_enabled); -} - -static void camera_release_recording_frame(struct camera_device *device, - const void *opaque) -{ - ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device, - (uintptr_t)(((wrapper_camera_device_t*)device)->vendor)); - - if (!device) - return; - - VENDOR_CALL(device, release_recording_frame, opaque); -} - -static int camera_auto_focus(struct camera_device *device) -{ - ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device, - (uintptr_t)(((wrapper_camera_device_t*)device)->vendor)); - - if (!device) - return -EINVAL; - - - return VENDOR_CALL(device, auto_focus); -} - -static int camera_cancel_auto_focus(struct camera_device *device) -{ - ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device, - (uintptr_t)(((wrapper_camera_device_t*)device)->vendor)); - - if (!device) - return -EINVAL; - - return VENDOR_CALL(device, cancel_auto_focus); -} - -static int camera_take_picture(struct camera_device *device) -{ - ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device, - (uintptr_t)(((wrapper_camera_device_t*)device)->vendor)); - - if (!device) - return -EINVAL; - - return VENDOR_CALL(device, take_picture); -} - -static int camera_cancel_picture(struct camera_device *device) -{ - ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device, - (uintptr_t)(((wrapper_camera_device_t*)device)->vendor)); - - if (!device) - return -EINVAL; - - return VENDOR_CALL(device, cancel_picture); -} - -static int camera_set_parameters(struct camera_device *device, - const char *params) -{ - ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device, - (uintptr_t)(((wrapper_camera_device_t*)device)->vendor)); - - if (!device) - return -EINVAL; - - char *tmp = NULL; - tmp = camera_fixup_setparams(CAMERA_ID(device), params); - - int ret = VENDOR_CALL(device, set_parameters, tmp); - return ret; -} - -static char *camera_get_parameters(struct camera_device *device) -{ - ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device, - (uintptr_t)(((wrapper_camera_device_t*)device)->vendor)); - - if (!device) - return NULL; - - char *params = VENDOR_CALL(device, get_parameters); - - char *tmp = camera_fixup_getparams(CAMERA_ID(device), params); - VENDOR_CALL(device, put_parameters, params); - params = tmp; - - return params; -} - -static void camera_put_parameters(struct camera_device *device, char *params) -{ - ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device, - (uintptr_t)(((wrapper_camera_device_t*)device)->vendor)); - - if (params) - free(params); -} - -static int camera_send_command(struct camera_device *device, - int32_t cmd, int32_t arg1, int32_t arg2) -{ - ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device, - (uintptr_t)(((wrapper_camera_device_t*)device)->vendor)); - - if (!device) - return -EINVAL; - - return VENDOR_CALL(device, send_command, cmd, arg1, arg2); -} - -static void camera_release(struct camera_device *device) -{ - ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device, - (uintptr_t)(((wrapper_camera_device_t*)device)->vendor)); - - if (!device) - return; - - VENDOR_CALL(device, release); -} - -static int camera_dump(struct camera_device *device, int fd) -{ - ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device, - (uintptr_t)(((wrapper_camera_device_t*)device)->vendor)); - - if (!device) - return -EINVAL; - - return VENDOR_CALL(device, dump, fd); -} - -extern "C" void heaptracker_free_leaked_memory(void); - -static int camera_device_close(hw_device_t *device) -{ - int ret = 0; - wrapper_camera_device_t *wrapper_dev = NULL; - - ALOGV("%s", __FUNCTION__); - - android::Mutex::Autolock lock(gCameraWrapperLock); - - if (!device) { - ret = -EINVAL; - goto done; - } - - for (int i = 0; i < camera_get_number_of_cameras(); i++) { - if (fixed_set_params[i]) - free(fixed_set_params[i]); - } - - wrapper_dev = (wrapper_camera_device_t*) device; - - wrapper_dev->vendor->common.close((hw_device_t*)wrapper_dev->vendor); - if (wrapper_dev->base.ops) - free(wrapper_dev->base.ops); - free(wrapper_dev); -done: -#ifdef HEAPTRACKER - heaptracker_free_leaked_memory(); -#endif - return ret; -} - -/******************************************************************* - * implementation of camera_module functions - *******************************************************************/ - -/* open device handle to one of the cameras - * - * assume camera service will keep singleton of each camera - * so this function will always only be called once per camera instance - */ - -static int camera_device_open(const hw_module_t *module, const char *name, - hw_device_t **device) -{ - int rv = 0; - int num_cameras = 0; - int cameraid; - wrapper_camera_device_t *camera_device = NULL; - camera_device_ops_t *camera_ops = NULL; - - android::Mutex::Autolock lock(gCameraWrapperLock); - - ALOGV("%s", __FUNCTION__); - - if (name != NULL) { - if (check_vendor_module()) - return -EINVAL; - - cameraid = atoi(name); - num_cameras = gVendorModule->get_number_of_cameras(); - - fixed_set_params = (char **) malloc(sizeof(char *) * num_cameras); - if (!fixed_set_params) { - ALOGE("parameter memory allocation fail"); - rv = -ENOMEM; - goto fail; - } - memset(fixed_set_params, 0, sizeof(char *) * num_cameras); - - if (cameraid > num_cameras) { - ALOGE("camera service provided cameraid out of bounds, " - "cameraid = %d, num supported = %d", - cameraid, num_cameras); - rv = -EINVAL; - goto fail; - } - - camera_device = (wrapper_camera_device_t*)malloc(sizeof(*camera_device)); - if (!camera_device) { - ALOGE("camera_device allocation fail"); - rv = -ENOMEM; - goto fail; - } - memset(camera_device, 0, sizeof(*camera_device)); - camera_device->id = cameraid; - - rv = gVendorModule->common.methods->open( - (const hw_module_t*)gVendorModule, name, - (hw_device_t**)&(camera_device->vendor)); - if (rv) { - ALOGE("vendor camera open fail"); - goto fail; - } - ALOGV("%s: got vendor camera device 0x%08X", - __FUNCTION__, (uintptr_t)(camera_device->vendor)); - - camera_ops = (camera_device_ops_t*)malloc(sizeof(*camera_ops)); - if (!camera_ops) { - ALOGE("camera_ops allocation fail"); - rv = -ENOMEM; - goto fail; - } - - memset(camera_ops, 0, sizeof(*camera_ops)); - - camera_device->base.common.tag = HARDWARE_DEVICE_TAG; - camera_device->base.common.version = 0; - camera_device->base.common.module = (hw_module_t *)(module); - camera_device->base.common.close = camera_device_close; - camera_device->base.ops = camera_ops; - - camera_ops->set_preview_window = camera_set_preview_window; - camera_ops->set_callbacks = camera_set_callbacks; - camera_ops->enable_msg_type = camera_enable_msg_type; - camera_ops->disable_msg_type = camera_disable_msg_type; - camera_ops->msg_type_enabled = camera_msg_type_enabled; - camera_ops->start_preview = camera_start_preview; - camera_ops->stop_preview = camera_stop_preview; - camera_ops->preview_enabled = camera_preview_enabled; - camera_ops->store_meta_data_in_buffers = camera_store_meta_data_in_buffers; - camera_ops->start_recording = camera_start_recording; - camera_ops->stop_recording = camera_stop_recording; - camera_ops->recording_enabled = camera_recording_enabled; - camera_ops->release_recording_frame = camera_release_recording_frame; - camera_ops->auto_focus = camera_auto_focus; - camera_ops->cancel_auto_focus = camera_cancel_auto_focus; - camera_ops->take_picture = camera_take_picture; - camera_ops->cancel_picture = camera_cancel_picture; - camera_ops->set_parameters = camera_set_parameters; - camera_ops->get_parameters = camera_get_parameters; - camera_ops->put_parameters = camera_put_parameters; - camera_ops->send_command = camera_send_command; - camera_ops->release = camera_release; - camera_ops->dump = camera_dump; - - *device = &camera_device->base.common; - } - - return rv; - -fail: - if (camera_device) { - free(camera_device); - camera_device = NULL; - } - if (camera_ops) { - free(camera_ops); - camera_ops = NULL; - } - *device = NULL; - return rv; -} - -static int camera_get_number_of_cameras(void) -{ - ALOGV("%s", __FUNCTION__); - if (check_vendor_module()) - return 0; - return gVendorModule->get_number_of_cameras(); -} - -static int camera_get_camera_info(int camera_id, struct camera_info *info) -{ - ALOGV("%s", __FUNCTION__); - if (check_vendor_module()) - return 0; - return gVendorModule->get_camera_info(camera_id, info); -} diff --git a/configs/p2p_supplicant_overlay.conf b/configs/p2p_supplicant_overlay.conf deleted file mode 100644 index 46aaaa7..0000000 --- a/configs/p2p_supplicant_overlay.conf +++ /dev/null @@ -1,9 +0,0 @@ -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
\ No newline at end of file diff --git a/configs/wpa_supplicant.conf b/configs/wpa_supplicant.conf deleted file mode 100644 index 9f9e399..0000000 --- a/configs/wpa_supplicant.conf +++ /dev/null @@ -1,5 +0,0 @@ -update_config=1 -ctrl_interface=wlan0 -eapol_version=1 -ap_scan=1 -fast_reauth=1 diff --git a/configs/wpa_supplicant_overlay.conf b/configs/wpa_supplicant_overlay.conf deleted file mode 100644 index 06fc042..0000000 --- a/configs/wpa_supplicant_overlay.conf +++ /dev/null @@ -1 +0,0 @@ -p2p_disabled=1 diff --git a/consumerir/Android.mk b/consumerir/Android.mk deleted file mode 100644 index 9a16958..0000000 --- a/consumerir/Android.mk +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright (C) 2014 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. - -# HAL module implementation stored in -# hw/<POWERS_HARDWARE_MODULE_ID>.<ro.hardware>.so - -LOCAL_PATH := $(call my-dir) - -include $(CLEAR_VARS) - -LOCAL_MODULE := consumerir.universal5420 -LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw -LOCAL_SRC_FILES := consumerir.c -LOCAL_SHARED_LIBRARIES := liblog libcutils -LOCAL_MODULE_TAGS := optional - -include $(BUILD_SHARED_LIBRARY) diff --git a/consumerir/consumerir.c b/consumerir/consumerir.c deleted file mode 100644 index 3c23b45..0000000 --- a/consumerir/consumerir.c +++ /dev/null @@ -1,187 +0,0 @@ -/* - * Copyright (C) 2014 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#define LOG_TAG "ConsumerIrHal" - -#include <stdlib.h> -#include <malloc.h> -#include <stdbool.h> -#include <errno.h> -#include <string.h> -#include <unistd.h> -#include <fcntl.h> -#include <cutils/log.h> -#include <hardware/hardware.h> -#include <hardware/consumerir.h> - -#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0])) - -static const consumerir_freq_range_t consumerir_freqs[] = { - {.min = 30000, .max = 30000}, - {.min = 33000, .max = 33000}, - {.min = 36000, .max = 36000}, - {.min = 38000, .max = 38000}, - {.min = 40000, .max = 40000}, - {.min = 56000, .max = 56000}, -}; - -static bool -try_append_number(char *buffer, int *len, int size, int number) -{ - int stored; - - stored = snprintf(&buffer[*len], size - *len, "%d,", number); - - if (stored < 0 || stored >= size - *len) { - return false; - } - - *len += stored; - return true; -} - -static bool -grow_buffer(char **buffer, int *size) -{ - char *new_buffer; - - *size *= 2; - if ((new_buffer = realloc(*buffer, *size)) == NULL) { - return false; - } - *buffer = new_buffer; - return true; -} - -static bool -append_number(char **buffer, int *len, int *size, int number) -{ - if (! try_append_number(*buffer, len, *size, number)) { - if (! grow_buffer(buffer, size)) return false; - return try_append_number(*buffer, len, *size, number); - } else { - return true; - } -} - -int fd = 0; -static int consumerir_transmit(struct consumerir_device *dev, - int carrier_freq, int pattern[], int pattern_len) -{ - int buffer_len = 0; - int buffer_size = 128; - int i; - char *buffer; - - if ((buffer = malloc(buffer_size)) == NULL) { - return -ENOMEM; - } - - /* write the header */ - if (! append_number(&buffer, &buffer_len, &buffer_size, carrier_freq)) { - goto error; - } - - /* calculate factor of conversion from microseconds to pulses */ - float factor = 1000000 / carrier_freq; - - /* write out the timing pattern */ - for (i = 0; i < pattern_len; i++) - { - if (! append_number(&buffer, &buffer_len, &buffer_size, (int) (pattern[i]/factor))) { - goto error; - } - } - - buffer[buffer_len - 1] = 0; - write(fd, buffer, buffer_len - 1); - - free(buffer); - - return 0; - -error: - free(buffer); - return -ENOMEM; -} - -static int consumerir_get_num_carrier_freqs(struct consumerir_device *dev) -{ - return ARRAY_SIZE(consumerir_freqs); -} - -static int consumerir_get_carrier_freqs(struct consumerir_device *dev, - size_t len, consumerir_freq_range_t *ranges) -{ - size_t to_copy = ARRAY_SIZE(consumerir_freqs); - - to_copy = len < to_copy ? len : to_copy; - memcpy(ranges, consumerir_freqs, to_copy * sizeof(consumerir_freq_range_t)); - return to_copy; -} - -static int consumerir_close(hw_device_t *dev) -{ - free(dev); - close(fd); - return 0; -} - -/* - * Generic device handling - */ -static int consumerir_open(const hw_module_t* module, const char* name, - hw_device_t** device) -{ - if (strcmp(name, CONSUMERIR_TRANSMITTER) != 0) { - return -EINVAL; - } - if (device == NULL) { - ALOGE("NULL device on open"); - return -EINVAL; - } - - consumerir_device_t *dev = malloc(sizeof(consumerir_device_t)); - memset(dev, 0, sizeof(consumerir_device_t)); - - dev->common.tag = HARDWARE_DEVICE_TAG; - dev->common.version = 0; - dev->common.module = (struct hw_module_t*) module; - dev->common.close = consumerir_close; - - dev->transmit = consumerir_transmit; - dev->get_num_carrier_freqs = consumerir_get_num_carrier_freqs; - dev->get_carrier_freqs = consumerir_get_carrier_freqs; - - *device = (hw_device_t*) dev; - fd = open("/sys/class/sec/sec_ir/ir_send", O_RDWR); - return 0; -} - -static struct hw_module_methods_t consumerir_module_methods = { - .open = consumerir_open, -}; - -consumerir_module_t HAL_MODULE_INFO_SYM = { - .common = { - .tag = HARDWARE_MODULE_TAG, - .module_api_version = CONSUMERIR_MODULE_API_VERSION_1_0, - .hal_api_version = HARDWARE_HAL_API_VERSION, - .id = CONSUMERIR_HARDWARE_MODULE_ID, - .name = "Consumer IR Module", - .author = "The CyanogenMod Project", - .methods = &consumerir_module_methods, - }, -}; @@ -16,14 +16,10 @@ LOCAL_PATH := device/samsung/klimtlte -$(call inherit-product, $(SRC_TARGET_DIR)/product/languages_full.mk) - -PRODUCT_CHARACTERISTICS := tablet +# overlays DEVICE_PACKAGE_OVERLAYS += device/samsung/klimtlte/overlay -# Device uses high-density artwork where available -PRODUCT_AAPT_CONFIG := normal xlarge hdpi xhdpi xxhdpi -PRODUCT_AAPT_PREF_CONFIG := xhdpi +$(call inherit-product, device/samsung/exynos5420-common/exynos5420-common.mk) # Audio PRODUCT_PACKAGES += \ @@ -42,40 +38,11 @@ PRODUCT_COPY_FILES += \ TARGET_SCREEN_HEIGHT := 2560 TARGET_SCREEN_WIDTH := 1600 -# Camera -PRODUCT_PACKAGES += \ - camera.universal5420 \ - libhwjpeg - -# Filesystem management tools -PRODUCT_PACKAGES += \ - make_ext4fs \ - e2fsck \ - setup_fs - -# GPS -PRODUCT_PACKAGES += \ - gps.universal5420 - -# HW composer -PRODUCT_PACKAGES += \ - libion \ - hwcomposer.exynos5 \ - gralloc.exynos5 - -# IR -PRODUCT_PACKAGES += \ - consumerir.universal5420 - # Keylayouts PRODUCT_COPY_FILES += \ $(LOCAL_PATH)/configs/sec_touchscreen.kl:system/usr/keylayout/sec_touchscreen.kl \ $(LOCAL_PATH)/configs/sec_touchkey.kl:system/usr/keylayout/sec_touchkey.kl -# Keystore -PRODUCT_PACKAGES += \ - keystore.exynos5 - # Lights PRODUCT_PACKAGES += \ lights.universal5420 @@ -89,72 +56,17 @@ PRODUCT_COPY_FILES += \ $(LOCAL_PATH)/configs/media_codecs.xml:system/etc/media_codecs.xml \ $(LOCAL_PATH)/configs/media_profiles.xml:system/etc/media_profiles.xml -# Misc -PRODUCT_PACKAGES += \ - com.android.future.usb.accessory - -# MobiCore setup -PRODUCT_PACKAGES += \ - libMcClient \ - libMcRegistry \ - libPaApi \ - libgdmcprov \ - mcDriverDaemon - -# Network tools - -PRODUCT_PACKAGES += \ - libpcap \ - tcpdump - -# OMX -PRODUCT_PACKAGES += \ - libcsc \ - libExynosOMX_Core \ - libOMX.Exynos.MP3.Decoder \ - libOMX.Exynos.AVC.Decoder \ - libOMX.Exynos.AVC.Encoder \ - libOMX.Exynos.MPEG4.Decoder \ - libOMX.Exynos.MPEG4.Encoder \ - libOMX.Exynos.VP8.Decoder \ - libOMX.Exynos.VP8.Encoder \ - libstagefrighthw - # Permissions PRODUCT_COPY_FILES += \ - frameworks/native/data/etc/tablet_core_hardware.xml:system/etc/permissions/tablet_core_hardware.xml \ - frameworks/native/data/etc/android.hardware.consumerir.xml:system/etc/permissions/android.hardware.consumerir.xml \ - frameworks/native/data/etc/android.hardware.location.gps.xml:system/etc/permissions/android.hardware.location.gps.xml \ - frameworks/native/data/etc/android.hardware.wifi.xml:system/etc/permissions/android.hardware.wifi.xml \ - frameworks/native/data/etc/android.hardware.wifi.direct.xml:system/etc/permissions/android.hardware.wifi.direct.xml \ - frameworks/native/data/etc/android.hardware.sensor.accelerometer.xml:system/etc/permissions/android.hardware.sensor.accelerometer.xml \ - frameworks/native/data/etc/android.hardware.sensor.compass.xml:system/etc/permissions/android.hardware.sensor.compass.xml \ - frameworks/native/data/etc/android.hardware.sensor.proximity.xml:system/etc/permissions/android.hardware.sensor.proximity.xml \ - frameworks/native/data/etc/android.hardware.sensor.light.xml:system/etc/permissions/android.hardware.sensor.light.xml \ - frameworks/native/data/etc/android.hardware.sensor.gyroscope.xml:system/etc/permissions/android.hardware.sensor.gyroscope.xml \ frameworks/native/data/etc/android.hardware.sensor.barometer.xml:system/etc/permissions/android.hardware.sensor.barometer.xml \ frameworks/native/data/etc/android.hardware.sensor.stepdetector.xml:system/etc/permissions/android.hardware.sensor.stepdetector.xml \ frameworks/native/data/etc/android.hardware.sensor.stepcounter.xml:system/etc/permissions/android.hardware.sensor.stepcounter.xml \ - frameworks/native/data/etc/android.hardware.touchscreen.multitouch.distinct.xml:system/etc/permissions/android.hardware.touchscreen.multitouch.distinct.xml \ - frameworks/native/data/etc/android.hardware.usb.accessory.xml:system/etc/permissions/android.hardware.usb.accessory.xml \ - frameworks/native/data/etc/android.hardware.usb.host.xml:system/etc/permissions/android.hardware.usb.host.xml \ - frameworks/native/data/etc/android.hardware.camera.flash-autofocus.xml:system/etc/permissions/android.hardware.camera.flash-autofocus.xml \ - frameworks/native/data/etc/android.hardware.camera.front.xml:system/etc/permissions/android.hardware.camera.front.xml \ frameworks/native/data/etc/android.hardware.telephony.cdma.xml:system/etc/permissions/android.hardware.telephony.cdma.xml \ frameworks/native/data/etc/android.hardware.telephony.gsm.xml:system/etc/permissions/android.hardware.telephony.gsm.xml \ - frameworks/native/data/etc/android.hardware.bluetooth_le.xml:system/etc/permissions/android.hardware.bluetooth_le.xml - -# Power -PRODUCT_PACKAGES += \ - power.universal5420 PRODUCT_PACKAGES += \ - fstab.universal5420 \ - init.samsung.rc \ init.baseband.rc \ init.universal5420.rc \ - init.universal5420.usb.rc \ - init.universal5420.wifi.rc \ lpm.rc \ ueventd.universal5420.rc @@ -174,35 +86,10 @@ PRODUCT_PACKAGES += \ PRODUCT_COPY_FILES += \ $(LOCAL_PATH)/configs/PARAM.ini:system/etc/PARAM.ini \ $(LOCAL_PATH)/configs/PDC.ini:system/etc/PDC.ini - -# Wifi -PRODUCT_COPY_FILES += \ - $(LOCAL_PATH)/configs/wpa_supplicant.conf:system/etc/wifi/wpa_supplicant.conf \ - $(LOCAL_PATH)/configs/wpa_supplicant_overlay.conf:system/etc/wifi/wpa_supplicant_overlay.conf \ - $(LOCAL_PATH)/configs/p2p_supplicant_overlay.conf:system/etc/wifi/p2p_supplicant_overlay.conf - -PRODUCT_PACKAGES += \ - dhcpcd.conf \ - hostapd \ - hostapd_default.conf \ - libwpa_client \ - wpa_supplicant - - -PRODUCT_PACKAGES += \ - libnetcmdiface \ - macloader - + # Charger PRODUCT_PACKAGES += \ charger_res_images -# CPU producer to CPU consumer not supported -PRODUCT_PROPERTY_OVERRIDES += \ - ro.bq.gpu_to_cpu_unsupported=1 - -# call dalvik heap config -$(call inherit-product-if-exists, frameworks/native/build/phone-xxhdpi-2048-dalvik-heap.mk) - # call the proprietary setup $(call inherit-product-if-exists, vendor/samsung/klimtlte/klimtlte-vendor.mk) diff --git a/include/camera/CameraParametersExtra.h b/include/camera/CameraParametersExtra.h deleted file mode 100644 index d604deb..0000000 --- a/include/camera/CameraParametersExtra.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (C) 2014 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 "camera/CameraParametersExtraDurationTimer.h" - -#define CAMERA_PARAMETERS_EXTRA_C \ -const char CameraParameters::KEY_CITYID[] = "cityid"; \ -const char CameraParameters::KEY_WEATHER[] = "weather"; \ -\ -int CameraParameters::getInt64(const char *key) const { return -1; } \ -extern "C" { \ - void acquire_dvfs_lock(void) { } \ - void release_dvfs_lock(void) { } \ -} \ -CAMERA_PARAMETERS_EXTRA_C_DURATION_TIMER \ -\ -/* LAST_LINE OF CAMERA_PARAMETERS_EXTRA_C, every line before this one *MUST* have - * a backslash \ at the end of the line or else everything will break. - */ - -#define CAMERA_PARAMETERS_EXTRA_H \ - static const char KEY_CITYID[]; \ - static const char KEY_WEATHER[]; \ - \ - int getInt64(const char *key) const; \ - \ - /* LAST_LINE OF CAMERA_PARAMETERS_EXTRA_H, every line before this one *MUST* have - * a backslash \ at the end of the line or else everything will break. - */ diff --git a/include/camera/CameraParametersExtraDurationTimer.h b/include/camera/CameraParametersExtraDurationTimer.h deleted file mode 100644 index 9f2f049..0000000 --- a/include/camera/CameraParametersExtraDurationTimer.h +++ /dev/null @@ -1,62 +0,0 @@ -#define CAMERA_PARAMETERS_EXTRA_C_DURATION_TIMER \ -\ -class DurationTimer { \ -public: \ - DurationTimer() {} \ - ~DurationTimer() {} \ - void start(); \ - void stop(); \ - long long durationUsecs() const; \ - static long long subtractTimevals(const struct timeval* ptv1, \ - const struct timeval* ptv2); \ - static void addToTimeval(struct timeval* ptv, long usec); \ -private: \ - struct timeval mStartWhen; \ - struct timeval mStopWhen; \ -}; \ -\ -void DurationTimer::start(void) \ -{ \ - gettimeofday(&mStartWhen, NULL); \ -} \ -\ -void DurationTimer::stop(void) \ -{ \ - gettimeofday(&mStopWhen, NULL); \ -} \ -\ -long long DurationTimer::durationUsecs(void) const \ -{ \ - return (long) subtractTimevals(&mStopWhen, &mStartWhen); \ -} \ -\ -/*static*/ long long DurationTimer::subtractTimevals(const struct timeval* ptv1, \ - const struct timeval* ptv2) \ -{ \ - long long stop = ((long long) ptv1->tv_sec) * 1000000LL + \ - ((long long) ptv1->tv_usec); \ - long long start = ((long long) ptv2->tv_sec) * 1000000LL + \ - ((long long) ptv2->tv_usec); \ - return stop - start; \ -} \ -\ -/*static*/ void DurationTimer::addToTimeval(struct timeval* ptv, long usec) \ -{ \ - if (usec < 0) { \ - ALOG(LOG_WARN, "", "Negative values not supported in addToTimeval\n"); \ - return; \ - } \ -\ - if (ptv->tv_usec >= 1000000) { \ - ptv->tv_sec += ptv->tv_usec / 1000000; \ - ptv->tv_usec %= 1000000; \ - } \ -\ - ptv->tv_usec += usec % 1000000; \ - if (ptv->tv_usec >= 1000000) { \ - ptv->tv_usec -= 1000000; \ - ptv->tv_sec++; \ - } \ - ptv->tv_sec += usec / 1000000; \ -} \ -/* END OF DEF */ diff --git a/include/hardware/gps.h b/include/hardware/gps.h deleted file mode 100644 index ad3d5fd..0000000 --- a/include/hardware/gps.h +++ /dev/null @@ -1,1813 +0,0 @@ -/* - * Copyright (C) 2010 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef ANDROID_INCLUDE_HARDWARE_GPS_H -#define ANDROID_INCLUDE_HARDWARE_GPS_H - -#include <stdint.h> -#include <sys/cdefs.h> -#include <sys/types.h> -#include <pthread.h> -#include <sys/socket.h> -#include <stdbool.h> - -#include <hardware/hardware.h> - -__BEGIN_DECLS - -/** - * The id of this module - */ -#define GPS_HARDWARE_MODULE_ID "gps" - - -/** Milliseconds since January 1, 1970 */ -typedef int64_t GpsUtcTime; - -/** Maximum number of SVs for gps_sv_status_callback(). */ -#define GPS_MAX_SVS 32 - -/** Maximum number of Measurements in gps_measurement_callback(). */ -#define GPS_MAX_MEASUREMENT 32 - -/** Requested operational mode for GPS operation. */ -typedef uint32_t GpsPositionMode; -// IMPORTANT: Note that the following values must match -// constants in GpsLocationProvider.java. -/** Mode for running GPS standalone (no assistance). */ -#define GPS_POSITION_MODE_STANDALONE 0 -/** AGPS MS-Based mode. */ -#define GPS_POSITION_MODE_MS_BASED 1 -/** AGPS MS-Assisted mode. */ -#define GPS_POSITION_MODE_MS_ASSISTED 2 - -/** Requested recurrence mode for GPS operation. */ -typedef uint32_t GpsPositionRecurrence; -// IMPORTANT: Note that the following values must match -// constants in GpsLocationProvider.java. -/** Receive GPS fixes on a recurring basis at a specified period. */ -#define GPS_POSITION_RECURRENCE_PERIODIC 0 -/** Request a single shot GPS fix. */ -#define GPS_POSITION_RECURRENCE_SINGLE 1 - -/** GPS status event values. */ -typedef uint16_t GpsStatusValue; -// IMPORTANT: Note that the following values must match -// constants in GpsLocationProvider.java. -/** GPS status unknown. */ -#define GPS_STATUS_NONE 0 -/** GPS has begun navigating. */ -#define GPS_STATUS_SESSION_BEGIN 1 -/** GPS has stopped navigating. */ -#define GPS_STATUS_SESSION_END 2 -/** GPS has powered on but is not navigating. */ -#define GPS_STATUS_ENGINE_ON 3 -/** GPS is powered off. */ -#define GPS_STATUS_ENGINE_OFF 4 - -/** Flags to indicate which values are valid in a GpsLocation. */ -typedef uint16_t GpsLocationFlags; -// IMPORTANT: Note that the following values must match -// constants in GpsLocationProvider.java. -/** GpsLocation has valid latitude and longitude. */ -#define GPS_LOCATION_HAS_LAT_LONG 0x0001 -/** GpsLocation has valid altitude. */ -#define GPS_LOCATION_HAS_ALTITUDE 0x0002 -/** GpsLocation has valid speed. */ -#define GPS_LOCATION_HAS_SPEED 0x0004 -/** GpsLocation has valid bearing. */ -#define GPS_LOCATION_HAS_BEARING 0x0008 -/** GpsLocation has valid accuracy. */ -#define GPS_LOCATION_HAS_ACCURACY 0x0010 - -/** Flags for the gps_set_capabilities callback. */ - -/** GPS HAL schedules fixes for GPS_POSITION_RECURRENCE_PERIODIC mode. - If this is not set, then the framework will use 1000ms for min_interval - and will start and call start() and stop() to schedule the GPS. - */ -#define GPS_CAPABILITY_SCHEDULING 0x0000001 -/** GPS supports MS-Based AGPS mode */ -#define GPS_CAPABILITY_MSB 0x0000002 -/** GPS supports MS-Assisted AGPS mode */ -#define GPS_CAPABILITY_MSA 0x0000004 -/** GPS supports single-shot fixes */ -#define GPS_CAPABILITY_SINGLE_SHOT 0x0000008 -/** GPS supports on demand time injection */ -#define GPS_CAPABILITY_ON_DEMAND_TIME 0x0000010 -/** GPS supports Geofencing */ -#define GPS_CAPABILITY_GEOFENCING 0x0000020 -/** GPS supports Measurements */ -#define GPS_CAPABILITY_MEASUREMENTS 0x0000040 -/** GPS supports Navigation Messages */ -#define GPS_CAPABILITY_NAV_MESSAGES 0x0000080 - -/** Flags used to specify which aiding data to delete - when calling delete_aiding_data(). */ -typedef uint32_t GpsAidingData; -// IMPORTANT: Note that the following values must match -// constants in GpsLocationProvider.java. -#define GPS_DELETE_EPHEMERIS 0x00000001 -#define GPS_DELETE_ALMANAC 0x00000002 -#define GPS_DELETE_POSITION 0x00000004 -#define GPS_DELETE_TIME 0x00000008 -#define GPS_DELETE_IONO 0x00000010 -#define GPS_DELETE_UTC 0x00000020 -#define GPS_DELETE_HEALTH 0x00000040 -#define GPS_DELETE_SVDIR 0x00000080 -#define GPS_DELETE_SVSTEER 0x00000100 -#define GPS_DELETE_SADATA 0x00000200 -#define GPS_DELETE_RTI 0x00000400 -#define GPS_DELETE_CELLDB_INFO 0x00000800 -#define GPS_DELETE_ALMANAC_CORR 0x00001000 -#define GPS_DELETE_FREQ_BIAS_EST 0x00002000 -#define GLO_DELETE_EPHEMERIS 0x00004000 -#define GLO_DELETE_ALMANAC 0x00008000 -#define GLO_DELETE_SVDIR 0x00010000 -#define GLO_DELETE_SVSTEER 0x00020000 -#define GLO_DELETE_ALMANAC_CORR 0x00040000 -#define GPS_DELETE_TIME_GPS 0x00080000 -#define GLO_DELETE_TIME 0x00100000 -#define BDS_DELETE_SVDIR 0X00200000 -#define BDS_DELETE_SVSTEER 0X00400000 -#define BDS_DELETE_TIME 0X00800000 -#define BDS_DELETE_ALMANAC_CORR 0X01000000 -#define BDS_DELETE_EPHEMERIS 0X02000000 -#define BDS_DELETE_ALMANAC 0X04000000 - -#define GPS_DELETE_ALL 0xFFFFFFFF - -/** AGPS type */ -typedef uint16_t AGpsType; -#define AGPS_TYPE_SUPL 1 -#define AGPS_TYPE_C2K 2 - -typedef uint16_t AGpsSetIDType; -#define AGPS_SETID_TYPE_NONE 0 -#define AGPS_SETID_TYPE_IMSI 1 -#define AGPS_SETID_TYPE_MSISDN 2 - -typedef uint16_t ApnIpType; -#define APN_IP_INVALID 0 -#define APN_IP_IPV4 1 -#define APN_IP_IPV6 2 -#define APN_IP_IPV4V6 3 - -/** - * String length constants - */ -#define GPS_NI_SHORT_STRING_MAXLEN 256 -#define GPS_NI_LONG_STRING_MAXLEN 2048 - -/** - * GpsNiType constants - */ -typedef uint32_t GpsNiType; -#define GPS_NI_TYPE_VOICE 1 -#define GPS_NI_TYPE_UMTS_SUPL 2 -#define GPS_NI_TYPE_UMTS_CTRL_PLANE 3 - -/** - * GpsNiNotifyFlags constants - */ -typedef uint32_t GpsNiNotifyFlags; -/** NI requires notification */ -#define GPS_NI_NEED_NOTIFY 0x0001 -/** NI requires verification */ -#define GPS_NI_NEED_VERIFY 0x0002 -/** NI requires privacy override, no notification/minimal trace */ -#define GPS_NI_PRIVACY_OVERRIDE 0x0004 - -/** - * GPS NI responses, used to define the response in - * NI structures - */ -typedef int GpsUserResponseType; -#define GPS_NI_RESPONSE_ACCEPT 1 -#define GPS_NI_RESPONSE_DENY 2 -#define GPS_NI_RESPONSE_NORESP 3 - -/** - * NI data encoding scheme - */ -typedef int GpsNiEncodingType; -#define GPS_ENC_NONE 0 -#define GPS_ENC_SUPL_GSM_DEFAULT 1 -#define GPS_ENC_SUPL_UTF8 2 -#define GPS_ENC_SUPL_UCS2 3 -#define GPS_ENC_UNKNOWN -1 - -/** AGPS status event values. */ -typedef uint16_t AGpsStatusValue; -/** GPS requests data connection for AGPS. */ -#define GPS_REQUEST_AGPS_DATA_CONN 1 -/** GPS releases the AGPS data connection. */ -#define GPS_RELEASE_AGPS_DATA_CONN 2 -/** AGPS data connection initiated */ -#define GPS_AGPS_DATA_CONNECTED 3 -/** AGPS data connection completed */ -#define GPS_AGPS_DATA_CONN_DONE 4 -/** AGPS data connection failed */ -#define GPS_AGPS_DATA_CONN_FAILED 5 - -#define AGPS_REF_LOCATION_TYPE_GSM_CELLID 1 -#define AGPS_REF_LOCATION_TYPE_UMTS_CELLID 2 -#define AGPS_REG_LOCATION_TYPE_MAC 3 - -/** Network types for update_network_state "type" parameter */ -#define AGPS_RIL_NETWORK_TYPE_MOBILE 0 -#define AGPS_RIL_NETWORK_TYPE_WIFI 1 -#define AGPS_RIL_NETWORK_TYPE_MOBILE_MMS 2 -#define AGPS_RIL_NETWORK_TYPE_MOBILE_SUPL 3 -#define AGPS_RIL_NETWORK_TTYPE_MOBILE_DUN 4 -#define AGPS_RIL_NETWORK_TTYPE_MOBILE_HIPRI 5 -#define AGPS_RIL_NETWORK_TTYPE_WIMAX 6 - -/** - * Flags to indicate what fields in GpsClock are valid. - */ -typedef uint16_t GpsClockFlags; -/** A valid 'leap second' is stored in the data structure. */ -#define GPS_CLOCK_HAS_LEAP_SECOND (1<<0) -/** A valid 'time uncertainty' is stored in the data structure. */ -#define GPS_CLOCK_HAS_TIME_UNCERTAINTY (1<<1) -/** A valid 'full bias' is stored in the data structure. */ -#define GPS_CLOCK_HAS_FULL_BIAS (1<<2) -/** A valid 'bias' is stored in the data structure. */ -#define GPS_CLOCK_HAS_BIAS (1<<3) -/** A valid 'bias uncertainty' is stored in the data structure. */ -#define GPS_CLOCK_HAS_BIAS_UNCERTAINTY (1<<4) -/** A valid 'drift' is stored in the data structure. */ -#define GPS_CLOCK_HAS_DRIFT (1<<5) -/** A valid 'drift uncertainty' is stored in the data structure. */ -#define GPS_CLOCK_HAS_DRIFT_UNCERTAINTY (1<<6) - -/** - * Enumeration of the available values for the GPS Clock type. - */ -typedef uint8_t GpsClockType; -/** The type is not available ot it is unknown. */ -#define GPS_CLOCK_TYPE_UNKNOWN 0 -/** The source of the time value reported by GPS clock is the local hardware clock. */ -#define GPS_CLOCK_TYPE_LOCAL_HW_TIME 1 -/** - * The source of the time value reported by GPS clock is the GPS time derived from satellites - * (epoch = Jan 6, 1980) - */ -#define GPS_CLOCK_TYPE_GPS_TIME 2 - -/** - * Flags to indicate what fields in GpsMeasurement are valid. - */ -typedef uint32_t GpsMeasurementFlags; -/** A valid 'snr' is stored in the data structure. */ -#define GPS_MEASUREMENT_HAS_SNR (1<<0) -/** A valid 'elevation' is stored in the data structure. */ -#define GPS_MEASUREMENT_HAS_ELEVATION (1<<1) -/** A valid 'elevation uncertainty' is stored in the data structure. */ -#define GPS_MEASUREMENT_HAS_ELEVATION_UNCERTAINTY (1<<2) -/** A valid 'azimuth' is stored in the data structure. */ -#define GPS_MEASUREMENT_HAS_AZIMUTH (1<<3) -/** A valid 'azimuth uncertainty' is stored in the data structure. */ -#define GPS_MEASUREMENT_HAS_AZIMUTH_UNCERTAINTY (1<<4) -/** A valid 'pseudorange' is stored in the data structure. */ -#define GPS_MEASUREMENT_HAS_PSEUDORANGE (1<<5) -/** A valid 'pseudorange uncertainty' is stored in the data structure. */ -#define GPS_MEASUREMENT_HAS_PSEUDORANGE_UNCERTAINTY (1<<6) -/** A valid 'code phase' is stored in the data structure. */ -#define GPS_MEASUREMENT_HAS_CODE_PHASE (1<<7) -/** A valid 'code phase uncertainty' is stored in the data structure. */ -#define GPS_MEASUREMENT_HAS_CODE_PHASE_UNCERTAINTY (1<<8) -/** A valid 'carrier frequency' is stored in the data structure. */ -#define GPS_MEASUREMENT_HAS_CARRIER_FREQUENCY (1<<9) -/** A valid 'carrier cycles' is stored in the data structure. */ -#define GPS_MEASUREMENT_HAS_CARRIER_CYCLES (1<<10) -/** A valid 'carrier phase' is stored in the data structure. */ -#define GPS_MEASUREMENT_HAS_CARRIER_PHASE (1<<11) -/** A valid 'carrier phase uncertainty' is stored in the data structure. */ -#define GPS_MEASUREMENT_HAS_CARRIER_PHASE_UNCERTAINTY (1<<12) -/** A valid 'bit number' is stored in the data structure. */ -#define GPS_MEASUREMENT_HAS_BIT_NUMBER (1<<13) -/** A valid 'time from last bit' is stored in the data structure. */ -#define GPS_MEASUREMENT_HAS_TIME_FROM_LAST_BIT (1<<14) -/** A valid 'doppler shift' is stored in the data structure. */ -#define GPS_MEASUREMENT_HAS_DOPPLER_SHIFT (1<<15) -/** A valid 'doppler shift uncertainty' is stored in the data structure. */ -#define GPS_MEASUREMENT_HAS_DOPPLER_SHIFT_UNCERTAINTY (1<<16) -/** A valid 'used in fix' flag is stored in the data structure. */ -#define GPS_MEASUREMENT_HAS_USED_IN_FIX (1<<17) - -/** - * Enumeration of the available values for the GPS Measurement's loss of lock. - */ -typedef uint8_t GpsLossOfLock; -/** The indicator is not available or it is unknown. */ -#define GPS_LOSS_OF_LOCK_UNKNOWN 0 -/** The measurement does not present any indication of loss of lock. */ -#define GPS_LOSS_OF_LOCK_OK 1 -/** Loss of lock between previous and current observation: cycle slip possible. */ -#define GPS_LOSS_OF_LOCK_CYCLE_SLIP 2 - -/** - * Enumeration of available values for the GPS Measurement's multipath indicator. - */ -typedef uint8_t GpsMultipathIndicator; -/** The indicator is not available or unknown. */ -#define GPS_MULTIPATH_INDICATOR_UNKNOWN 0 -/** The measurement has been indicated to use multipath. */ -#define GPS_MULTIPATH_INDICATOR_DETECTED 1 -/** The measurement has been indicated Not to use multipath. */ -#define GPS_MULTIPATH_INDICATOR_NOT_USED 2 - -/** - * Flags indicating the GPS measurement state. - */ -typedef uint16_t GpsMeasurementState; -#define GPS_MEASUREMENT_STATE_UNKNOWN 0 -#define GPS_MEASUREMENT_STATE_CODE_LOCK (1<<0) -#define GPS_MEASUREMENT_STATE_BIT_SYNC (1<<1) -#define GPS_MEASUREMENT_STATE_SUBFRAME_SYNC (1<<2) -#define GPS_MEASUREMENT_STATE_TOW_DECODED (1<<3) - -/** - * Flags indicating the Accumulated Delta Range's states. - */ -typedef uint16_t GpsAccumulatedDeltaRangeState; -#define GPS_ADR_STATE_UNKNOWN 0 -#define GPS_ADR_STATE_VALID (1<<0) -#define GPS_ADR_STATE_RESET (1<<1) -#define GPS_ADR_STATE_CYCLE_SLIP (1<<2) - -/** - * Enumeration of available values to indicate the available GPS Natigation message types. - */ -typedef uint8_t GpsNavigationMessageType; -/** The message type is unknown. */ -#define GPS_NAVIGATION_MESSAGE_TYPE_UNKNOWN 0 -/** L1 C/A message contained in the structure. */ -#define GPS_NAVIGATION_MESSAGE_TYPE_L1CA 1 -/** L2-CNAV message contained in the structure. */ -#define GPS_NAVIGATION_MESSAGE_TYPE_L2CNAV 2 -/** L5-CNAV message contained in the structure. */ -#define GPS_NAVIGATION_MESSAGE_TYPE_L5CNAV 3 -/** CNAV-2 message contained in the structure. */ -#define GPS_NAVIGATION_MESSAGE_TYPE_CNAV2 4 - - -/** - * Name for the GPS XTRA interface. - */ -#define GPS_XTRA_INTERFACE "gps-xtra" - -/** - * Name for the GPS DEBUG interface. - */ -#define GPS_DEBUG_INTERFACE "gps-debug" - -/** - * Name for the AGPS interface. - */ -#define AGPS_INTERFACE "agps" - -/** - * Name of the Supl Certificate interface. - */ -#define SUPL_CERTIFICATE_INTERFACE "supl-certificate" - -/** - * Name for NI interface - */ -#define GPS_NI_INTERFACE "gps-ni" - -/** - * Name for the AGPS-RIL interface. - */ -#define AGPS_RIL_INTERFACE "agps_ril" - -/** - * Name for the GPS_Geofencing interface. - */ -#define GPS_GEOFENCING_INTERFACE "gps_geofencing" - -/** - * Name of the GPS Measurements interface. - */ -#define GPS_MEASUREMENT_INTERFACE "gps_measurement" - -/** - * Name of the GPS navigation message interface. - */ -#define GPS_NAVIGATION_MESSAGE_INTERFACE "gps_navigation_message" - -/** - * Name of the GNSS/GPS configuration interface. - */ -#define GNSS_CONFIGURATION_INTERFACE "gnss_configuration" - - -/** Represents a location. */ -typedef struct { - /** set to sizeof(GpsLocation) */ - size_t size; - /** Contains GpsLocationFlags bits. */ - uint16_t flags; - /** Represents latitude in degrees. */ - double latitude; - /** Represents longitude in degrees. */ - double longitude; - /** Represents altitude in meters above the WGS 84 reference - * ellipsoid. */ - double altitude; - /** Represents speed in meters per second. */ - float speed; - /** Represents heading in degrees. */ - float bearing; - /** Represents expected accuracy in meters. */ - float accuracy; - /** Timestamp for the location fix. */ - GpsUtcTime timestamp; -} GpsLocation; - -/** Represents the status. */ -typedef struct { - /** set to sizeof(GpsStatus) */ - size_t size; - GpsStatusValue status; -} GpsStatus; - -/** Represents SV information. */ -typedef struct { - /** set to sizeof(GpsSvInfo) */ - size_t size; - /** Pseudo-random number for the SV. */ - int prn; - /** Signal to noise ratio. */ - float snr; - /** Elevation of SV in degrees. */ - float elevation; - /** Azimuth of SV in degrees. */ - float azimuth; - - /** Needed by vendor blob */ - int used; -} GpsSvInfo; - -/** Represents SV status. */ -typedef struct { - /** set to sizeof(GpsSvStatus) */ - size_t size; - - /** Number of SVs currently visible. */ - int num_svs; - - /** Contains an array of SV information. */ - GpsSvInfo sv_list[GPS_MAX_SVS]; - - /** Represents a bit mask indicating which SVs - * have ephemeris data. - */ - uint32_t ephemeris_mask; - - /** Represents a bit mask indicating which SVs - * have almanac data. - */ - uint32_t almanac_mask; - - /** - * Represents a bit mask indicating which SVs - * were used for computing the most recent position fix. - */ - uint32_t used_in_fix_mask; -} GpsSvStatus; - - -/* 2G and 3G */ -/* In 3G lac is discarded */ -typedef struct { - uint16_t type; - uint16_t mcc; - uint16_t mnc; - uint16_t lac; - uint32_t cid; -} AGpsRefLocationCellID; - -typedef struct { - uint8_t mac[6]; -} AGpsRefLocationMac; - -/** Represents ref locations */ -typedef struct { - uint16_t type; - union { - AGpsRefLocationCellID cellID; - AGpsRefLocationMac mac; - } u; -} AGpsRefLocation; - -/** Callback with location information. - * Can only be called from a thread created by create_thread_cb. - */ -typedef void (* gps_location_callback)(GpsLocation* location); - -/** Callback with status information. - * Can only be called from a thread created by create_thread_cb. - */ -typedef void (* gps_status_callback)(GpsStatus* status); - -/** - * Callback with SV status information. - * Can only be called from a thread created by create_thread_cb. - */ -typedef void (* gps_sv_status_callback)(GpsSvStatus* sv_info); - -/** Callback for reporting NMEA sentences. - * Can only be called from a thread created by create_thread_cb. - */ -typedef void (* gps_nmea_callback)(GpsUtcTime timestamp, const char* nmea, int length); - -/** Callback to inform framework of the GPS engine's capabilities. - * Capability parameter is a bit field of GPS_CAPABILITY_* flags. - */ -typedef void (* gps_set_capabilities)(uint32_t capabilities); - -/** Callback utility for acquiring the GPS wakelock. - * This can be used to prevent the CPU from suspending while handling GPS events. - */ -typedef void (* gps_acquire_wakelock)(); - -/** Callback utility for releasing the GPS wakelock. */ -typedef void (* gps_release_wakelock)(); - -/** Callback for requesting NTP time */ -typedef void (* gps_request_utc_time)(); - -/** Callback for creating a thread that can call into the Java framework code. - * This must be used to create any threads that report events up to the framework. - */ -typedef pthread_t (* gps_create_thread)(const char* name, void (*start)(void *), void* arg); - -/** GPS callback structure. */ -typedef struct { - /** set to sizeof(GpsCallbacks) */ - size_t size; - gps_location_callback location_cb; - gps_status_callback status_cb; - gps_sv_status_callback sv_status_cb; - gps_nmea_callback nmea_cb; - gps_set_capabilities set_capabilities_cb; - gps_acquire_wakelock acquire_wakelock_cb; - gps_release_wakelock release_wakelock_cb; - gps_create_thread create_thread_cb; - gps_request_utc_time request_utc_time_cb; -} GpsCallbacks; - - -/** Represents the standard GPS interface. */ -typedef struct { - /** set to sizeof(GpsInterface) */ - size_t size; - /** - * Opens the interface and provides the callback routines - * to the implementation of this interface. - */ - int (*init)( GpsCallbacks* callbacks ); - - /** Starts navigating. */ - int (*start)( void ); - - /** Stops navigating. */ - int (*stop)( void ); - - /** Closes the interface. */ - void (*cleanup)( void ); - - /** Injects the current time. */ - int (*inject_time)(GpsUtcTime time, int64_t timeReference, - int uncertainty); - - /** Injects current location from another location provider - * (typically cell ID). - * latitude and longitude are measured in degrees - * expected accuracy is measured in meters - */ - int (*inject_location)(double latitude, double longitude, float accuracy); - - /** - * Specifies that the next call to start will not use the - * information defined in the flags. GPS_DELETE_ALL is passed for - * a cold start. - */ - void (*delete_aiding_data)(GpsAidingData flags); - - /** - * min_interval represents the time between fixes in milliseconds. - * preferred_accuracy represents the requested fix accuracy in meters. - * preferred_time represents the requested time to first fix in milliseconds. - */ - int (*set_position_mode)(GpsPositionMode mode, GpsPositionRecurrence recurrence, - uint32_t min_interval, uint32_t preferred_accuracy, uint32_t preferred_time); - - /** Get a pointer to extension information. */ - const void* (*get_extension)(const char* name); -} GpsInterface; - -/** Callback to request the client to download XTRA data. - * The client should download XTRA data and inject it by calling inject_xtra_data(). - * Can only be called from a thread created by create_thread_cb. - */ -typedef void (* gps_xtra_download_request)(); - -/** Callback structure for the XTRA interface. */ -typedef struct { - gps_xtra_download_request download_request_cb; - gps_create_thread create_thread_cb; -} GpsXtraCallbacks; - -/** Extended interface for XTRA support. */ -typedef struct { - /** set to sizeof(GpsXtraInterface) */ - size_t size; - /** - * Opens the XTRA interface and provides the callback routines - * to the implementation of this interface. - */ - int (*init)( GpsXtraCallbacks* callbacks ); - /** Injects XTRA data into the GPS. */ - int (*inject_xtra_data)( char* data, int length ); -} GpsXtraInterface; - -/** Extended interface for DEBUG support. */ -typedef struct { - /** set to sizeof(GpsDebugInterface) */ - size_t size; - - /** - * This function should return any information that the native - * implementation wishes to include in a bugreport. - */ - size_t (*get_internal_state)(char* buffer, size_t bufferSize); -} GpsDebugInterface; - -/** Represents the status of AGPS. */ -typedef struct { - /** set to sizeof(AGpsStatus_v1) */ - size_t size; - - AGpsType type; - AGpsStatusValue status; -} AGpsStatus_v1; - -/** Represents the status of AGPS augmented with a IPv4 address field. */ -typedef struct { - /** set to sizeof(AGpsStatus_v2) */ - size_t size; - - AGpsType type; - AGpsStatusValue status; - uint32_t ipaddr; -} AGpsStatus_v2; - -/* Represents the status of AGPS augmented to support IPv4 and IPv6. */ -typedef struct { - /** set to sizeof(AGpsStatus_v3) */ - size_t size; - - AGpsType type; - AGpsStatusValue status; - - /** - * Must be set to a valid IPv4 address if the field 'addr' contains an IPv4 - * address, or set to INADDR_NONE otherwise. - */ - uint32_t ipaddr; - - /** - * Must contain the IPv4 (AF_INET) or IPv6 (AF_INET6) address to report. - * Any other value of addr.ss_family will be rejected. - * */ - struct sockaddr_storage addr; -} AGpsStatus_v3; - -typedef AGpsStatus_v3 AGpsStatus; - -/** Callback with AGPS status information. - * Can only be called from a thread created by create_thread_cb. - */ -typedef void (* agps_status_callback)(AGpsStatus* status); - -/** Callback structure for the AGPS interface. */ -typedef struct { - agps_status_callback status_cb; - gps_create_thread create_thread_cb; -} AGpsCallbacks; - - -/** Extended interface for AGPS support. */ -typedef struct { - /** set to sizeof(AGpsInterface_v1) */ - size_t size; - - /** - * Opens the AGPS interface and provides the callback routines - * to the implementation of this interface. - */ - void (*init)( AGpsCallbacks* callbacks ); - /** - * Notifies that a data connection is available and sets - * the name of the APN to be used for SUPL. - */ - int (*data_conn_open)( const char* apn ); - /** - * Notifies that the AGPS data connection has been closed. - */ - int (*data_conn_closed)(); - /** - * Notifies that a data connection is not available for AGPS. - */ - int (*data_conn_failed)(); - /** - * Sets the hostname and port for the AGPS server. - */ - int (*set_server)( AGpsType type, const char* hostname, int port ); -} AGpsInterface_v1; - -/** - * Extended interface for AGPS support, it is augmented to enable to pass - * extra APN data. - */ -typedef struct { - /** set to sizeof(AGpsInterface_v2) */ - size_t size; - - /** - * Opens the AGPS interface and provides the callback routines to the - * implementation of this interface. - */ - void (*init)(AGpsCallbacks* callbacks); - /** - * Deprecated. - * If the HAL supports AGpsInterface_v2 this API will not be used, see - * data_conn_open_with_apn_ip_type for more information. - */ - int (*data_conn_open)(const char* apn); - /** - * Notifies that the AGPS data connection has been closed. - */ - int (*data_conn_closed)(); - /** - * Notifies that a data connection is not available for AGPS. - */ - int (*data_conn_failed)(); - /** - * Sets the hostname and port for the AGPS server. - */ - int (*set_server)(AGpsType type, const char* hostname, int port); - - /** - * Notifies that a data connection is available and sets the name of the - * APN, and its IP type, to be used for SUPL connections. - */ - int (*data_conn_open_with_apn_ip_type)( - const char* apn, - ApnIpType apnIpType); -} AGpsInterface_v2; - -typedef AGpsInterface_v2 AGpsInterface; - -/** Error codes associated with certificate operations */ -#define AGPS_CERTIFICATE_OPERATION_SUCCESS 0 -#define AGPS_CERTIFICATE_ERROR_GENERIC -100 -#define AGPS_CERTIFICATE_ERROR_TOO_MANY_CERTIFICATES -101 - -/** A data structure that represents an X.509 certificate using DER encoding */ -typedef struct { - size_t length; - u_char* data; -} DerEncodedCertificate; - -/** - * A type definition for SHA1 Fingerprints used to identify X.509 Certificates - * The Fingerprint is a digest of the DER Certificate that uniquely identifies it. - */ -typedef struct { - u_char data[20]; -} Sha1CertificateFingerprint; - -/** AGPS Interface to handle SUPL certificate operations */ -typedef struct { - /** set to sizeof(SuplCertificateInterface) */ - size_t size; - - /** - * Installs a set of Certificates used for SUPL connections to the AGPS server. - * If needed the HAL should find out internally any certificates that need to be removed to - * accommodate the certificates to install. - * The certificates installed represent a full set of valid certificates needed to connect to - * AGPS SUPL servers. - * The list of certificates is required, and all must be available at the same time, when trying - * to establish a connection with the AGPS Server. - * - * Parameters: - * certificates - A pointer to an array of DER encoded certificates that are need to be - * installed in the HAL. - * length - The number of certificates to install. - * Returns: - * AGPS_CERTIFICATE_OPERATION_SUCCESS if the operation is completed successfully - * AGPS_CERTIFICATE_ERROR_TOO_MANY_CERTIFICATES if the HAL cannot store the number of - * certificates attempted to be installed, the state of the certificates stored should - * remain the same as before on this error case. - * - * IMPORTANT: - * If needed the HAL should find out internally the set of certificates that need to be - * removed to accommodate the certificates to install. - */ - int (*install_certificates) ( const DerEncodedCertificate* certificates, size_t length ); - - /** - * Notifies the HAL that a list of certificates used for SUPL connections are revoked. It is - * expected that the given set of certificates is removed from the internal store of the HAL. - * - * Parameters: - * fingerprints - A pointer to an array of SHA1 Fingerprints to identify the set of - * certificates to revoke. - * length - The number of fingerprints provided. - * Returns: - * AGPS_CERTIFICATE_OPERATION_SUCCESS if the operation is completed successfully. - * - * IMPORTANT: - * If any of the certificates provided (through its fingerprint) is not known by the HAL, - * it should be ignored and continue revoking/deleting the rest of them. - */ - int (*revoke_certificates) ( const Sha1CertificateFingerprint* fingerprints, size_t length ); -} SuplCertificateInterface; - -/** Represents an NI request */ -typedef struct { - /** set to sizeof(GpsNiNotification) */ - size_t size; - - /** - * An ID generated by HAL to associate NI notifications and UI - * responses - */ - int notification_id; - - /** - * An NI type used to distinguish different categories of NI - * events, such as GPS_NI_TYPE_VOICE, GPS_NI_TYPE_UMTS_SUPL, ... - */ - GpsNiType ni_type; - - /** - * Notification/verification options, combinations of GpsNiNotifyFlags constants - */ - GpsNiNotifyFlags notify_flags; - - /** - * Timeout period to wait for user response. - * Set to 0 for no time out limit. - */ - int timeout; - - /** - * Default response when time out. - */ - GpsUserResponseType default_response; - - /** - * Requestor ID - */ - char requestor_id[GPS_NI_SHORT_STRING_MAXLEN]; - - /** - * Notification message. It can also be used to store client_id in some cases - */ - char text[GPS_NI_LONG_STRING_MAXLEN]; - - /** - * Client name decoding scheme - */ - GpsNiEncodingType requestor_id_encoding; - - /** - * Client name decoding scheme - */ - GpsNiEncodingType text_encoding; - - /** - * A pointer to extra data. Format: - * key_1 = value_1 - * key_2 = value_2 - */ - char extras[GPS_NI_LONG_STRING_MAXLEN]; - -} GpsNiNotification; - -/** Callback with NI notification. - * Can only be called from a thread created by create_thread_cb. - */ -typedef void (*gps_ni_notify_callback)(GpsNiNotification *notification); - -/** GPS NI callback structure. */ -typedef struct -{ - /** - * Sends the notification request from HAL to GPSLocationProvider. - */ - gps_ni_notify_callback notify_cb; - gps_create_thread create_thread_cb; -} GpsNiCallbacks; - -/** - * Extended interface for Network-initiated (NI) support. - */ -typedef struct -{ - /** set to sizeof(GpsNiInterface) */ - size_t size; - - /** Registers the callbacks for HAL to use. */ - void (*init) (GpsNiCallbacks *callbacks); - - /** Sends a response to HAL. */ - void (*respond) (int notif_id, GpsUserResponseType user_response); -} GpsNiInterface; - -struct gps_device_t { - struct hw_device_t common; - - /** - * Set the provided lights to the provided values. - * - * Returns: 0 on succes, error code on failure. - */ - const GpsInterface* (*get_gps_interface)(struct gps_device_t* dev); -}; - -#define AGPS_RIL_REQUEST_SETID_IMSI (1<<0L) -#define AGPS_RIL_REQUEST_SETID_MSISDN (1<<1L) - -#define AGPS_RIL_REQUEST_REFLOC_CELLID (1<<0L) -#define AGPS_RIL_REQUEST_REFLOC_MAC (1<<1L) - -typedef void (*agps_ril_request_set_id)(uint32_t flags); -typedef void (*agps_ril_request_ref_loc)(uint32_t flags); - -typedef struct { - agps_ril_request_set_id request_setid; - agps_ril_request_ref_loc request_refloc; - gps_create_thread create_thread_cb; -} AGpsRilCallbacks; - -/** Extended interface for AGPS_RIL support. */ -typedef struct { - /** set to sizeof(AGpsRilInterface) */ - size_t size; - /** - * Opens the AGPS interface and provides the callback routines - * to the implementation of this interface. - */ - void (*init)( AGpsRilCallbacks* callbacks ); - - /** - * Sets the reference location. - */ - void (*set_ref_location) (const AGpsRefLocation *agps_reflocation, size_t sz_struct); - /** - * Sets the set ID. - */ - void (*set_set_id) (AGpsSetIDType type, const char* setid); - - /** - * Send network initiated message. - */ - void (*ni_message) (uint8_t *msg, size_t len); - - /** - * Notify GPS of network status changes. - * These parameters match values in the android.net.NetworkInfo class. - */ - void (*update_network_state) (int connected, int type, int roaming, const char* extra_info); - - /** - * Notify GPS of network status changes. - * These parameters match values in the android.net.NetworkInfo class. - */ - void (*update_network_availability) (int avaiable, const char* apn); -} AGpsRilInterface; - -/** - * GPS Geofence. - * There are 3 states associated with a Geofence: Inside, Outside, Unknown. - * There are 3 transitions: ENTERED, EXITED, UNCERTAIN. - * - * An example state diagram with confidence level: 95% and Unknown time limit - * set as 30 secs is shown below. (confidence level and Unknown time limit are - * explained latter) - * ____________________________ - * | Unknown (30 secs) | - * """""""""""""""""""""""""""" - * ^ | | ^ - * UNCERTAIN| |ENTERED EXITED| |UNCERTAIN - * | v v | - * ________ EXITED _________ - * | Inside | -----------> | Outside | - * | | <----------- | | - * """""""" ENTERED """"""""" - * - * Inside state: We are 95% confident that the user is inside the geofence. - * Outside state: We are 95% confident that the user is outside the geofence - * Unknown state: Rest of the time. - * - * The Unknown state is better explained with an example: - * - * __________ - * | c| - * | ___ | _______ - * | |a| | | b | - * | """ | """"""" - * | | - * """""""""" - * In the diagram above, "a" and "b" are 2 geofences and "c" is the accuracy - * circle reported by the GPS subsystem. Now with regard to "b", the system is - * confident that the user is outside. But with regard to "a" is not confident - * whether it is inside or outside the geofence. If the accuracy remains the - * same for a sufficient period of time, the UNCERTAIN transition would be - * triggered with the state set to Unknown. If the accuracy improves later, an - * appropriate transition should be triggered. This "sufficient period of time" - * is defined by the parameter in the add_geofence_area API. - * In other words, Unknown state can be interpreted as a state in which the - * GPS subsystem isn't confident enough that the user is either inside or - * outside the Geofence. It moves to Unknown state only after the expiry of the - * timeout. - * - * The geofence callback needs to be triggered for the ENTERED and EXITED - * transitions, when the GPS system is confident that the user has entered - * (Inside state) or exited (Outside state) the Geofence. An implementation - * which uses a value of 95% as the confidence is recommended. The callback - * should be triggered only for the transitions requested by the - * add_geofence_area call. - * - * Even though the diagram and explanation talks about states and transitions, - * the callee is only interested in the transistions. The states are mentioned - * here for illustrative purposes. - * - * Startup Scenario: When the device boots up, if an application adds geofences, - * and then we get an accurate GPS location fix, it needs to trigger the - * appropriate (ENTERED or EXITED) transition for every Geofence it knows about. - * By default, all the Geofences will be in the Unknown state. - * - * When the GPS system is unavailable, gps_geofence_status_callback should be - * called to inform the upper layers of the same. Similarly, when it becomes - * available the callback should be called. This is a global state while the - * UNKNOWN transition described above is per geofence. - * - * An important aspect to note is that users of this API (framework), will use - * other subsystems like wifi, sensors, cell to handle Unknown case and - * hopefully provide a definitive state transition to the third party - * application. GPS Geofence will just be a signal indicating what the GPS - * subsystem knows about the Geofence. - * - */ -#define GPS_GEOFENCE_ENTERED (1<<0L) -#define GPS_GEOFENCE_EXITED (1<<1L) -#define GPS_GEOFENCE_UNCERTAIN (1<<2L) - -#define GPS_GEOFENCE_UNAVAILABLE (1<<0L) -#define GPS_GEOFENCE_AVAILABLE (1<<1L) - -#define GPS_GEOFENCE_OPERATION_SUCCESS 0 -#define GPS_GEOFENCE_ERROR_TOO_MANY_GEOFENCES -100 -#define GPS_GEOFENCE_ERROR_ID_EXISTS -101 -#define GPS_GEOFENCE_ERROR_ID_UNKNOWN -102 -#define GPS_GEOFENCE_ERROR_INVALID_TRANSITION -103 -#define GPS_GEOFENCE_ERROR_GENERIC -149 - -/** - * The callback associated with the geofence. - * Parameters: - * geofence_id - The id associated with the add_geofence_area. - * location - The current GPS location. - * transition - Can be one of GPS_GEOFENCE_ENTERED, GPS_GEOFENCE_EXITED, - * GPS_GEOFENCE_UNCERTAIN. - * timestamp - Timestamp when the transition was detected. - * - * The callback should only be called when the caller is interested in that - * particular transition. For instance, if the caller is interested only in - * ENTERED transition, then the callback should NOT be called with the EXITED - * transition. - * - * IMPORTANT: If a transition is triggered resulting in this callback, the GPS - * subsystem will wake up the application processor, if its in suspend state. - */ -typedef void (*gps_geofence_transition_callback) (int32_t geofence_id, GpsLocation* location, - int32_t transition, GpsUtcTime timestamp); - -/** - * The callback associated with the availability of the GPS system for geofencing - * monitoring. If the GPS system determines that it cannot monitor geofences - * because of lack of reliability or unavailability of the GPS signals, it will - * call this callback with GPS_GEOFENCE_UNAVAILABLE parameter. - * - * Parameters: - * status - GPS_GEOFENCE_UNAVAILABLE or GPS_GEOFENCE_AVAILABLE. - * last_location - Last known location. - */ -typedef void (*gps_geofence_status_callback) (int32_t status, GpsLocation* last_location); - -/** - * The callback associated with the add_geofence call. - * - * Parameter: - * geofence_id - Id of the geofence. - * status - GPS_GEOFENCE_OPERATION_SUCCESS - * GPS_GEOFENCE_ERROR_TOO_MANY_GEOFENCES - geofence limit has been reached. - * GPS_GEOFENCE_ERROR_ID_EXISTS - geofence with id already exists - * GPS_GEOFENCE_ERROR_INVALID_TRANSITION - the monitorTransition contains an - * invalid transition - * GPS_GEOFENCE_ERROR_GENERIC - for other errors. - */ -typedef void (*gps_geofence_add_callback) (int32_t geofence_id, int32_t status); - -/** - * The callback associated with the remove_geofence call. - * - * Parameter: - * geofence_id - Id of the geofence. - * status - GPS_GEOFENCE_OPERATION_SUCCESS - * GPS_GEOFENCE_ERROR_ID_UNKNOWN - for invalid id - * GPS_GEOFENCE_ERROR_GENERIC for others. - */ -typedef void (*gps_geofence_remove_callback) (int32_t geofence_id, int32_t status); - - -/** - * The callback associated with the pause_geofence call. - * - * Parameter: - * geofence_id - Id of the geofence. - * status - GPS_GEOFENCE_OPERATION_SUCCESS - * GPS_GEOFENCE_ERROR_ID_UNKNOWN - for invalid id - * GPS_GEOFENCE_ERROR_INVALID_TRANSITION - - * when monitor_transitions is invalid - * GPS_GEOFENCE_ERROR_GENERIC for others. - */ -typedef void (*gps_geofence_pause_callback) (int32_t geofence_id, int32_t status); - -/** - * The callback associated with the resume_geofence call. - * - * Parameter: - * geofence_id - Id of the geofence. - * status - GPS_GEOFENCE_OPERATION_SUCCESS - * GPS_GEOFENCE_ERROR_ID_UNKNOWN - for invalid id - * GPS_GEOFENCE_ERROR_GENERIC for others. - */ -typedef void (*gps_geofence_resume_callback) (int32_t geofence_id, int32_t status); - -typedef struct { - gps_geofence_transition_callback geofence_transition_callback; - gps_geofence_status_callback geofence_status_callback; - gps_geofence_add_callback geofence_add_callback; - gps_geofence_remove_callback geofence_remove_callback; - gps_geofence_pause_callback geofence_pause_callback; - gps_geofence_resume_callback geofence_resume_callback; - gps_create_thread create_thread_cb; -} GpsGeofenceCallbacks; - -/** Extended interface for GPS_Geofencing support */ -typedef struct { - /** set to sizeof(GpsGeofencingInterface) */ - size_t size; - - /** - * Opens the geofence interface and provides the callback routines - * to the implementation of this interface. - */ - void (*init)( GpsGeofenceCallbacks* callbacks ); - - /** - * Add a geofence area. This api currently supports circular geofences. - * Parameters: - * geofence_id - The id for the geofence. If a geofence with this id - * already exists, an error value (GPS_GEOFENCE_ERROR_ID_EXISTS) - * should be returned. - * latitude, longtitude, radius_meters - The lat, long and radius - * (in meters) for the geofence - * last_transition - The current state of the geofence. For example, if - * the system already knows that the user is inside the geofence, - * this will be set to GPS_GEOFENCE_ENTERED. In most cases, it - * will be GPS_GEOFENCE_UNCERTAIN. - * monitor_transition - Which transitions to monitor. Bitwise OR of - * GPS_GEOFENCE_ENTERED, GPS_GEOFENCE_EXITED and - * GPS_GEOFENCE_UNCERTAIN. - * notification_responsiveness_ms - Defines the best-effort description - * of how soon should the callback be called when the transition - * associated with the Geofence is triggered. For instance, if set - * to 1000 millseconds with GPS_GEOFENCE_ENTERED, the callback - * should be called 1000 milliseconds within entering the geofence. - * This parameter is defined in milliseconds. - * NOTE: This is not to be confused with the rate that the GPS is - * polled at. It is acceptable to dynamically vary the rate of - * sampling the GPS for power-saving reasons; thus the rate of - * sampling may be faster or slower than this. - * unknown_timer_ms - The time limit after which the UNCERTAIN transition - * should be triggered. This parameter is defined in milliseconds. - * See above for a detailed explanation. - */ - void (*add_geofence_area) (int32_t geofence_id, double latitude, double longitude, - double radius_meters, int last_transition, int monitor_transitions, - int notification_responsiveness_ms, int unknown_timer_ms); - - /** - * Pause monitoring a particular geofence. - * Parameters: - * geofence_id - The id for the geofence. - */ - void (*pause_geofence) (int32_t geofence_id); - - /** - * Resume monitoring a particular geofence. - * Parameters: - * geofence_id - The id for the geofence. - * monitor_transitions - Which transitions to monitor. Bitwise OR of - * GPS_GEOFENCE_ENTERED, GPS_GEOFENCE_EXITED and - * GPS_GEOFENCE_UNCERTAIN. - * This supersedes the value associated provided in the - * add_geofence_area call. - */ - void (*resume_geofence) (int32_t geofence_id, int monitor_transitions); - - /** - * Remove a geofence area. After the function returns, no notifications - * should be sent. - * Parameter: - * geofence_id - The id for the geofence. - */ - void (*remove_geofence_area) (int32_t geofence_id); -} GpsGeofencingInterface; - - -/** - * Represents an estimate of the GPS clock time. - */ -typedef struct { - /** set to sizeof(GpsClock) */ - size_t size; - - /** A set of flags indicating the validity of the fields in this data structure. */ - GpsClockFlags flags; - - /** - * Leap second data. - * The sign of the value is defined by the following equation: - * utc_time_ns = time_ns + (full_bias_ns + bias_ns) - leap_second * 1,000,000,000 - * - * If the data is available 'flags' must contain GPS_CLOCK_HAS_LEAP_SECOND. - */ - int16_t leap_second; - - /** - * Indicates the type of time reported by the 'time_ns' field. - * This is a Mandatory field. - */ - GpsClockType type; - - /** - * The GPS receiver internal clock value. This can be either the local hardware clock value - * (GPS_CLOCK_TYPE_LOCAL_HW_TIME), or the current GPS time derived inside GPS receiver - * (GPS_CLOCK_TYPE_GPS_TIME). The field 'type' defines the time reported. - * - * For local hardware clock, this value is expected to be monotonically increasing during - * the reporting session. The real GPS time can be derived by compensating the 'full bias' - * (when it is available) from this value. - * - * For GPS time, this value is expected to be the best estimation of current GPS time that GPS - * receiver can achieve. Set the 'time uncertainty' appropriately when GPS time is specified. - * - * Sub-nanosecond accuracy can be provided by means of the 'bias' field. - * The value contains the 'time uncertainty' in it. - * - * This is a Mandatory field. - */ - int64_t time_ns; - - /** - * 1-Sigma uncertainty associated with the clock's time in nanoseconds. - * The uncertainty is represented as an absolute (single sided) value. - * - * This value should be set if GPS_CLOCK_TYPE_GPS_TIME is set. - * If the data is available 'flags' must contain GPS_CLOCK_HAS_TIME_UNCERTAINTY. - */ - double time_uncertainty_ns; - - /** - * The difference between hardware clock ('time' field) inside GPS receiver and the true GPS - * time since 0000Z, January 6, 1980, in nanoseconds. - * This value is used if and only if GPS_CLOCK_TYPE_LOCAL_HW_TIME is set, and GPS receiver - * has solved the clock for GPS time. - * The caller is responsible for using the 'bias uncertainty' field for quality check. - * - * The sign of the value is defined by the following equation: - * true time (GPS time) = time_ns + (full_bias_ns + bias_ns) - * - * This value contains the 'bias uncertainty' in it. - * If the data is available 'flags' must contain GPS_CLOCK_HAS_FULL_BIAS. - - */ - int64_t full_bias_ns; - - /** - * Sub-nanosecond bias. - * The value contains the 'bias uncertainty' in it. - * - * If the data is available 'flags' must contain GPS_CLOCK_HAS_BIAS. - */ - double bias_ns; - - /** - * 1-Sigma uncertainty associated with the clock's bias in nanoseconds. - * The uncertainty is represented as an absolute (single sided) value. - * - * If the data is available 'flags' must contain GPS_CLOCK_HAS_BIAS_UNCERTAINTY. - */ - double bias_uncertainty_ns; - - /** - * The clock's drift in nanoseconds (per second). - * A positive value means that the frequency is higher than the nominal frequency. - * - * The value contains the 'drift uncertainty' in it. - * If the data is available 'flags' must contain GPS_CLOCK_HAS_DRIFT. - */ - double drift_nsps; - - /** - * 1-Sigma uncertainty associated with the clock's drift in nanoseconds (per second). - * The uncertainty is represented as an absolute (single sided) value. - * - * If the data is available 'flags' must contain GPS_CLOCK_HAS_DRIFT_UNCERTAINTY. - */ - double drift_uncertainty_nsps; -} GpsClock; - -/** - * Represents a GPS Measurement, it contains raw and computed information. - */ -typedef struct { - /** set to sizeof(GpsMeasurement) */ - size_t size; - - /** A set of flags indicating the validity of the fields in this data structure. */ - GpsMeasurementFlags flags; - - /** - * Pseudo-random number in the range of [1, 32] - * This is a Mandatory value. - */ - int8_t prn; - - /** - * Time offset at which the measurement was taken in nanoseconds. - * The reference receiver's time is specified by GpsData::clock::time_ns and should be - * interpreted in the same way as indicated by GpsClock::type. - * - * The sign of time_offset_ns is given by the following equation: - * measurement time = GpsClock::time_ns + time_offset_ns - * - * It provides an individual time-stamp for the measurement, and allows sub-nanosecond accuracy. - * This is a Mandatory value. - */ - double time_offset_ns; - - /** - * Per satellite sync state. It represents the current sync state for the associated satellite. - * Based on the sync state, the 'received GPS tow' field should be interpreted accordingly. - * - * This is a Mandatory value. - */ - GpsMeasurementState state; - - /** - * Received GPS Time-of-Week at the measurement time, in nanoseconds. - * The value is relative to the beginning of the current GPS week. - * - * Given the sync state of GPS receiver, per each satellite, valid range for this field can be: - * Searching : [ 0 ] : GPS_MEASUREMENT_STATE_UNKNOWN - * Ranging code lock : [ 0 1ms ] : GPS_MEASUREMENT_STATE_CODE_LOCK is set - * Bit sync : [ 0 20ms ] : GPS_MEASUREMENT_STATE_BIT_SYNC is set - * Subframe sync : [ 0 6ms ] : GPS_MEASUREMENT_STATE_SUBFRAME_SYNC is set - * TOW decoded : [ 0 1week ] : GPS_MEASUREMENT_STATE_TOW_DECODED is set - */ - int64_t received_gps_tow_ns; - - /** - * 1-Sigma uncertainty of the Received GPS Time-of-Week in nanoseconds. - */ - int64_t received_gps_tow_uncertainty_ns; - - /** - * Carrier-to-noise density in dB-Hz, in the range [0, 63]. - * It contains the measured C/N0 value for the signal at the antenna input. - * - * This is a Mandatory value. - */ - double c_n0_dbhz; - - /** - * Pseudorange rate at the timestamp in m/s. - * The value also includes the effects of the receiver clock frequency and satellite clock - * frequency errors. - * - * The value includes the 'pseudorange rate uncertainty' in it. - * A positive value indicates that the pseudorange is getting larger. - * - * This is a Mandatory value. - */ - double pseudorange_rate_mps; - - /** - * 1-Sigma uncertainty of the pseudurange rate in m/s. - * The uncertainty is represented as an absolute (single sided) value. - * - * This is a Mandatory value. - */ - double pseudorange_rate_uncertainty_mps; - - /** - * Accumulated delta range's state. It indicates whether ADR is reset or there is a cycle slip - * (indicating loss of lock). - * - * This is a Mandatory value. - */ - GpsAccumulatedDeltaRangeState accumulated_delta_range_state; - - /** - * Accumulated delta range since the last channel reset in meters. - * The data is available if 'accumulated delta range state' != GPS_ADR_STATE_UNKNOWN. - */ - double accumulated_delta_range_m; - - /** - * 1-Sigma uncertainty of the accumulated delta range in meters. - * The data is available if 'accumulated delta range state' != GPS_ADR_STATE_UNKNOWN. - */ - double accumulated_delta_range_uncertainty_m; - - /** - * Best derived Pseudorange by the chip-set, in meters. - * The value contains the 'pseudorange uncertainty' in it. - * - * If the data is available, 'flags' must contain GPS_MEASUREMENT_HAS_PSEUDORANGE. - */ - double pseudorange_m; - - /** - * 1-Sigma uncertainty of the pseudorange in meters. - * The value contains the 'pseudorange' and 'clock' uncertainty in it. - * The uncertainty is represented as an absolute (single sided) value. - * - * If the data is available, 'flags' must contain GPS_MEASUREMENT_HAS_PSEUDORANGE_UNCERTAINTY. - */ - double pseudorange_uncertainty_m; - - /** - * A fraction of the current C/A code cycle, in the range [0.0, 1023.0] - * This value contains the time (in Chip units) since the last C/A code cycle (GPS Msec epoch). - * - * The reference frequency is given by the field 'carrier_frequency_hz'. - * The value contains the 'code-phase uncertainty' in it. - * - * If the data is available, 'flags' must contain GPS_MEASUREMENT_HAS_CODE_PHASE. - */ - double code_phase_chips; - - /** - * 1-Sigma uncertainty of the code-phase, in a fraction of chips. - * The uncertainty is represented as an absolute (single sided) value. - * - * If the data is available, 'flags' must contain GPS_MEASUREMENT_HAS_CODE_PHASE_UNCERTAINTY. - */ - double code_phase_uncertainty_chips; - - /** - * Carrier frequency at which codes and messages are modulated, it can be L1 or L2. - * If the field is not set, the carrier frequency is assumed to be L1. - * - * If the data is available, 'flags' must contain GPS_MEASUREMENT_HAS_CARRIER_FREQUENCY. - */ - float carrier_frequency_hz; - - /** - * The number of full carrier cycles between the satellite and the receiver. - * The reference frequency is given by the field 'carrier_frequency_hz'. - * - * If the data is available, 'flags' must contain GPS_MEASUREMENT_HAS_CARRIER_CYCLES. - */ - int64_t carrier_cycles; - - /** - * The RF phase detected by the receiver, in the range [0.0, 1.0]. - * This is usually the fractional part of the complete carrier phase measurement. - * - * The reference frequency is given by the field 'carrier_frequency_hz'. - * The value contains the 'carrier-phase uncertainty' in it. - * - * If the data is available, 'flags' must contain GPS_MEASUREMENT_HAS_CARRIER_PHASE. - */ - double carrier_phase; - - /** - * 1-Sigma uncertainty of the carrier-phase. - * If the data is available, 'flags' must contain GPS_MEASUREMENT_HAS_CARRIER_PHASE_UNCERTAINTY. - */ - double carrier_phase_uncertainty; - - /** - * An enumeration that indicates the 'loss of lock' state of the event. - */ - GpsLossOfLock loss_of_lock; - - /** - * The number of GPS bits transmitted since Sat-Sun midnight (GPS week). - * If the data is available, 'flags' must contain GPS_MEASUREMENT_HAS_BIT_NUMBER. - */ - int32_t bit_number; - - /** - * The elapsed time since the last received bit in milliseconds, in the range [0, 20] - * If the data is available, 'flags' must contain GPS_MEASUREMENT_HAS_TIME_FROM_LAST_BIT. - */ - int16_t time_from_last_bit_ms; - - /** - * Doppler shift in Hz. - * A positive value indicates that the SV is moving toward the receiver. - * - * The reference frequency is given by the field 'carrier_frequency_hz'. - * The value contains the 'doppler shift uncertainty' in it. - * - * If the data is available, 'flags' must contain GPS_MEASUREMENT_HAS_DOPPLER_SHIFT. - */ - double doppler_shift_hz; - - /** - * 1-Sigma uncertainty of the doppler shift in Hz. - * If the data is available, 'flags' must contain GPS_MEASUREMENT_HAS_DOPPLER_SHIFT_UNCERTAINTY. - */ - double doppler_shift_uncertainty_hz; - - /** - * An enumeration that indicates the 'multipath' state of the event. - */ - GpsMultipathIndicator multipath_indicator; - - /** - * Signal-to-noise ratio in dB. - * If the data is available, 'flags' must contain GPS_MEASUREMENT_HAS_SNR. - */ - double snr_db; - - /** - * Elevation in degrees, the valid range is [-90, 90]. - * The value contains the 'elevation uncertainty' in it. - * If the data is available, 'flags' must contain GPS_MEASUREMENT_HAS_ELEVATION. - */ - double elevation_deg; - - /** - * 1-Sigma uncertainty of the elevation in degrees, the valid range is [0, 90]. - * The uncertainty is represented as the absolute (single sided) value. - * - * If the data is available, 'flags' must contain GPS_MEASUREMENT_HAS_ELEVATION_UNCERTAINTY. - */ - double elevation_uncertainty_deg; - - /** - * Azimuth in degrees, in the range [0, 360). - * The value contains the 'azimuth uncertainty' in it. - * If the data is available, 'flags' must contain GPS_MEASUREMENT_HAS_AZIMUTH. - * */ - double azimuth_deg; - - /** - * 1-Sigma uncertainty of the azimuth in degrees, the valid range is [0, 180]. - * The uncertainty is represented as an absolute (single sided) value. - * - * If the data is available, 'flags' must contain GPS_MEASUREMENT_HAS_AZIMUTH_UNCERTAINTY. - */ - double azimuth_uncertainty_deg; - - /** - * Whether the GPS represented by the measurement was used for computing the most recent fix. - * If the data is available, 'flags' must contain GPS_MEASUREMENT_HAS_USED_IN_FIX. - */ - bool used_in_fix; -} GpsMeasurement; - -/** Represents a reading of GPS measurements. */ -typedef struct { - /** set to sizeof(GpsData) */ - size_t size; - - /** Number of measurements. */ - size_t measurement_count; - - /** The array of measurements. */ - GpsMeasurement measurements[GPS_MAX_MEASUREMENT]; - - /** The GPS clock time reading. */ - GpsClock clock; -} GpsData; - -/** - * The callback for to report measurements from the HAL. - * - * Parameters: - * data - A data structure containing the measurements. - */ -typedef void (*gps_measurement_callback) (GpsData* data); - -typedef struct { - /** set to sizeof(GpsMeasurementCallbacks) */ - size_t size; - gps_measurement_callback measurement_callback; -} GpsMeasurementCallbacks; - -#define GPS_MEASUREMENT_OPERATION_SUCCESS 0 -#define GPS_MEASUREMENT_ERROR_ALREADY_INIT -100 -#define GPS_MEASUREMENT_ERROR_GENERIC -101 - -/** - * Extended interface for GPS Measurements support. - */ -typedef struct { - /** Set to sizeof(GpsMeasurementInterface) */ - size_t size; - - /** - * Initializes the interface and registers the callback routines with the HAL. - * After a successful call to 'init' the HAL must begin to provide updates at its own phase. - * - * Status: - * GPS_MEASUREMENT_OPERATION_SUCCESS - * GPS_MEASUREMENT_ERROR_ALREADY_INIT - if a callback has already been registered without a - * corresponding call to 'close' - * GPS_MEASUREMENT_ERROR_GENERIC - if any other error occurred, it is expected that the HAL - * will not generate any updates upon returning this error code. - */ - int (*init) (GpsMeasurementCallbacks* callbacks); - - /** - * Stops updates from the HAL, and unregisters the callback routines. - * After a call to stop, the previously registered callbacks must be considered invalid by the - * HAL. - * If stop is invoked without a previous 'init', this function should perform no work. - */ - void (*close) (); - -} GpsMeasurementInterface; - - -/** Represents a GPS navigation message (or a fragment of it). */ -typedef struct { - /** set to sizeof(GpsNavigationMessage) */ - size_t size; - - /** - * Pseudo-random number in the range of [1, 32] - * This is a Mandatory value. - */ - int8_t prn; - - /** - * The type of message contained in the structure. - * This is a Mandatory value. - */ - GpsNavigationMessageType type; - - /** - * Message identifier. - * It provides an index so the complete Navigation Message can be assembled. i.e. fo L1 C/A - * subframe 4 and 5, this value corresponds to the 'frame id' of the navigation message. - * Subframe 1, 2, 3 does not contain a 'frame id' and this value can be set to -1. - */ - int16_t message_id; - - /** - * Sub-message identifier. - * If required by the message 'type', this value contains a sub-index within the current - * message (or frame) that is being transmitted. - * i.e. for L1 C/A the submessage id corresponds to the sub-frame id of the navigation message. - */ - int16_t submessage_id; - - /** - * The length of the data (in bytes) contained in the current message. - * If this value is different from zero, 'data' must point to an array of the same size. - * e.g. for L1 C/A the size of the sub-frame will be 40 bytes (10 words, 30 bits/word). - * - * This is a Mandatory value. - */ - size_t data_length; - - /** - * The data of the reported GPS message. - * The bytes (or words) specified using big endian format (MSB first). - * - * For L1 C/A, each subframe contains 10 30-bit GPS words. Each GPS word (30 bits) should be - * fitted into the last 30 bits in a 4-byte word (skip B31 and B32), with MSB first. - */ - uint8_t* data; - -} GpsNavigationMessage; - -/** - * The callback to report an available fragment of a GPS navigation messages from the HAL. - * - * Parameters: - * message - The GPS navigation submessage/subframe representation. - */ -typedef void (*gps_navigation_message_callback) (GpsNavigationMessage* message); - -typedef struct { - /** set to sizeof(GpsNavigationMessageCallbacks) */ - size_t size; - gps_navigation_message_callback navigation_message_callback; -} GpsNavigationMessageCallbacks; - -#define GPS_NAVIGATION_MESSAGE_OPERATION_SUCCESS 0 -#define GPS_NAVIGATION_MESSAGE_ERROR_ALREADY_INIT -100 -#define GPS_NAVIGATION_MESSAGE_ERROR_GENERIC -101 - -/** - * Extended interface for GPS navigation message reporting support. - */ -typedef struct { - /** Set to sizeof(GpsNavigationMessageInterface) */ - size_t size; - - /** - * Initializes the interface and registers the callback routines with the HAL. - * After a successful call to 'init' the HAL must begin to provide updates as they become - * available. - * - * Status: - * GPS_NAVIGATION_MESSAGE_OPERATION_SUCCESS - * GPS_NAVIGATION_MESSAGE_ERROR_ALREADY_INIT - if a callback has already been registered - * without a corresponding call to 'close'. - * GPS_NAVIGATION_MESSAGE_ERROR_GENERIC - if any other error occurred, it is expected that - * the HAL will not generate any updates upon returning this error code. - */ - int (*init) (GpsNavigationMessageCallbacks* callbacks); - - /** - * Stops updates from the HAL, and unregisters the callback routines. - * After a call to stop, the previously registered callbacks must be considered invalid by the - * HAL. - * If stop is invoked without a previous 'init', this function should perform no work. - */ - void (*close) (); - -} GpsNavigationMessageInterface; - -/** - * Interface for passing GNSS configuration contents from platform to HAL. - */ -typedef struct { - /** Set to sizeof(GnssConfigurationInterface) */ - size_t size; - - /** - * Deliver GNSS configuration contents to HAL. - * Parameters: - * config_data - a pointer to a char array which holds what usually is expected from - file(/etc/gps.conf), i.e., a sequence of UTF8 strings separated by '\n'. - * length - total number of UTF8 characters in configuraiton data. - * - * IMPORTANT: - * GPS HAL should expect this function can be called multiple times. And it may be - * called even when GpsLocationProvider is already constructed and enabled. GPS HAL - * should maintain the existing requests for various callback regardless the change - * in configuration data. - */ - void (*configuration_update) (const char* config_data, int32_t length); -} GnssConfigurationInterface; - -__END_DECLS - -#endif /* ANDROID_INCLUDE_HARDWARE_GPS_H */ - diff --git a/liquid.dependencies b/liquid.dependencies index 41a03e5..0b77809 100644 --- a/liquid.dependencies +++ b/liquid.dependencies @@ -6,6 +6,12 @@ "revision": "5.1" }, { + "remote": "lsd", + "repository": "android_device_samsung_exynos5420-common", + "target_path": "device/samsung/exynos5420-common", + "revision": "5.1" + }, + { "remote": "cm", "repository": "android_hardware_samsung", "target_path": "hardware/samsung", @@ -36,9 +42,9 @@ "revision": "cm-12.1" }, { - "remote": "tm", - "repository": "proprietary_vendor_samsung", + "remote": "gh", + "repository": "schwabe93/vendor_samsung_klimtlte", "target_path": "vendor/samsung", - "revision": "cm-12.1" + "revision": "master" } ] diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml index 8caaea0..e44d6ee 100644 --- a/overlay/frameworks/base/core/res/res/values/config.xml +++ b/overlay/frameworks/base/core/res/res/values/config.xml @@ -21,8 +21,6 @@ for different hardware and product builds. --> <resources> - <bool name="config_deskDockEnablesAccelerometer">false</bool> - <!-- Default color for notification LED is white. --> <color name="config_defaultNotificationColor">#ffffffff</color> @@ -30,62 +28,9 @@ <!-- The green LED is brighter than red, bias closer to yellow. --> <integer name="config_notificationsBatteryMediumARGB">0xFFFF6000</integer> - <!-- Flag indicating whether the we should enable the automatic brightness in Settings. - Software implementation will be used if config_hardware_auto_brightness_available is not set --> - <bool name="config_automatic_brightness_available">true</bool> - - <!-- If this is true, the screen will come on when you unplug usb/power/whatever. --> - <bool name="config_unplugTurnsOnScreen">true</bool> - - <!-- Array of light sensor LUX values to define our levels for auto backlight brightness support. - The N entries of this array define N 1 zones as follows: - - Zone 0: 0 <= LUX < array[0] - Zone 1: array[0] <= LUX < array[1] - ... - Zone N: array[N - 1] <= LUX < array[N] - Zone N + 1 array[N] <= LUX < infinity - - Must be overridden in platform specific overlays --> - <integer-array name="config_autoBrightnessLevels"> - <item>15</item> - <item>150</item> - <item>1000</item> - <item>5000</item> - </integer-array> - - <!-- Array of output values for LCD backlight corresponding to the LUX values - in the config_autoBrightnessLevels array. This array should have size one greater - than the size of the config_autoBrightnessLevels array. - This must be overridden in platform specific overlays --> - <integer-array name="config_autoBrightnessLcdBacklightValues"> - <item>10</item> - <item>80</item> - <item>130</item> - <item>190</item> - <item>255</item> - </integer-array> - - <!-- Array of output values for button backlight corresponding to the LUX values - in the config_autoBrightnessLevels array. This array should have size one greater - than the size of the config_autoBrightnessLevels array. - This must be overridden in platform specific overlays --> - <integer-array name="config_autoBrightnessButtonBacklightValues"> - <item>1</item> - <item>1</item> - <item>0</item> - <item>0</item> - <item>0</item> - </integer-array> - - <!-- Minimum screen brightness allowed by the power manager. --> <integer name="config_screenBrightnessDim">3</integer> - <!-- Default screen brightness setting. - Must be in the range specified by minimum and maximum. --> - <integer name="config_screenBrightnessSettingDefault">115</integer> - <!-- Minimum screen brightness setting allowed by the power manager. The user is forbidden from setting the brightness below this level. --> <integer name="config_screenBrightnessSettingMinimum">3</integer> @@ -154,128 +99,12 @@ <item>7</item> </integer-array> - <!-- Boolean indicating whether the wifi chipset has dual frequency band support --> - <bool translatable="false" name="config_wifi_dual_band_support">true</bool> - <!-- Boolean indicating whether the wifi chipset has background scan support --> <bool translatable="false" name="config_wifi_background_scan_support">false</bool> - <!-- Boolean indicating if restoring network selection should be skipped --> - <!-- The restoring is handled by modem if it is true--> - <bool name="skip_restoring_network_selection">true</bool> - <!-- The default iface on which to monitor data use --> <string name="config_datause_iface" translatable="false">rmnet0</string> - <!-- Vibrator pattern for feedback about a long screen/key press --> - <integer-array name="config_longPressVibePattern"> - <item>0</item> - <item>1</item> - <item>20</item> - <item>21</item> - </integer-array> - - <!-- Vibrator pattern for feedback about touching a virtual key --> - <integer-array name="config_virtualKeyVibePattern"> - <item>0</item> - <item>10</item> - <item>20</item> - <item>30</item> - </integer-array> - - <!-- Vibrator pattern for a very short but reliable vibration for soft keyboard tap --> - <integer-array name="config_keyboardTapVibePattern"> - <item>10</item> - </integer-array> - - <!-- Vibrator pattern for feedback about booting with safe mode disabled --> - <integer-array name="config_safeModeDisabledVibePattern"> - <item>0</item> - <item>1</item> - <item>20</item> - <item>21</item> - </integer-array> - - <!-- Vibrator pattern for feedback about booting with safe mode disabled --> - <integer-array name="config_safeModeEnabledVibePattern"> - <item>0</item> - <item>1</item> - <item>20</item> - <item>21</item> - <item>500</item> - <item>600</item> - </integer-array> - - <!-- Vibrator pattern for feedback about hitting a scroll barrier --> - <integer-array name="config_scrollBarrierVibePattern"> - <item>0</item> - <item>15</item> - <item>10</item> - <item>10</item> - </integer-array> - - <!-- Hide this setting because we are forcing it to be enabled in build.prop. - Note: This is declared in both values/config.xml and values-sw600dp/config.xml. - It is actually the latter definition that wins but overlay both - to be on the safe side. - --> - <bool name="config_enableLockScreenRotation">false</bool> - <!-- Indicate whether the SD card is accessible without removing the battery. --> <bool name="config_batterySdCardAccessibility">true</bool> - - <!-- Disable the home key unlock setting --> - <!-- <bool name="config_disableHomeUnlockSetting">false</bool> --> - - <!-- Hardware keys present on the device, stored as a bit field. - This integer should equal the sum of the corresponding value for each - of the following keys present: - 1 - Home - 2 - Back - 4 - Menu - 8 - Assistant (search) - 16 - App switch - 32 - Camera - 64 - Volume rocker - For example, a device with Home, Back and Menu keys would set this - config to 7. --> - <integer name="config_deviceHardwareKeys">83</integer> - - <!-- Hardware keys present on the device with the ability to wake, stored as a bit field. - This integer should equal the sum of the corresponding value for each - of the following keys present: - 1 - Home - 2 - Back - 4 - Menu - 8 - Assistant (search) - 16 - App switch - 32 - Camera - 64 - Volume rocker - For example, a device with Home, Back and Menu keys would set this - config to 7. --> - <integer name="config_deviceHardwareWakeKeys">65</integer> - - <bool name="config_enableWifiDisplay">true</bool> - - <!-- Enable translucent UI --> - <bool name="config_enableLockScreenTranslucentDecor">true</bool> - <bool name="config_enableTranslucentDecor">true</bool> - - <!-- Maximum number of supported users --> - <integer name="config_multiuserMaximumUsers">8</integer> - - <!-- Whether UI for multi user should be shown --> - <bool name="config_enableMultiUserUI">true</bool> - - <!-- Indicate whether closing the lid causes the device to go to sleep and opening - it causes the device to wake up. - The default is false. --> - <bool name="config_lidControlsSleep">true</bool> - - <!-- Set to true to add links to Cell Broadcast app from Settings and MMS app. --> - <bool name="config_cellBroadcastAppLinks">true</bool> - - <!-- The duration (in milliseconds) that the radio will scan for a signal - when there's no network connection. If the scan doesn't timeout, use zero --> - <integer name="config_radioScanningTimeout">0</integer> </resources> diff --git a/overlay/frameworks/base/core/res/res/xml/storage_list.xml b/overlay/frameworks/base/core/res/res/xml/storage_list.xml deleted file mode 100644 index be3c809..0000000 --- a/overlay/frameworks/base/core/res/res/xml/storage_list.xml +++ /dev/null @@ -1,53 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- -** -** Copyright 2011, 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. -*/ ---> - -<!-- The <device> element should contain one or more <storage> elements. - Exactly one of these should have the attribute primary="true". - This storage will be the primary external storage and should have path="/mnt/sdcard". - Each storage should have both a path and description attribute set. - The following boolean attributes are optional: - - primary: this storage is the primary external storage - removable: this is removable storage (for example, a real SD card) - emulated: the storage is emulated via the FUSE sdcard daemon - mtp-reserve: number of megabytes of storage MTP should reserve for free storage - (used for emulated storage that is shared with system's data partition) - - A storage should not have both emulated and removable set to true ---> - -<StorageList xmlns:android="http://schemas.android.com/apk/res/android"> - <storage android:mountPoint="/storage/sdcard0" - android:storageDescription="@string/storage_internal" - android:primary="true" - android:emulated="true" - android:mtpReserve="100" /> - - <storage android:mountPoint="/storage/sdcard1" - android:storageDescription="@string/storage_sd_card" - android:primary="false" - android:removable="true" - android:allowMassStorage="true" /> - - <storage android:mountPoint="/storage/usbdisk" - android:storageDescription="@string/storage_usb" - android:primary="false" - android:removable="true" /> - -</StorageList> diff --git a/overlay/frameworks/base/packages/SettingsProvider/res/values/config.xml b/overlay/frameworks/base/packages/SettingsProvider/res/values/config.xml deleted file mode 100644 index 13c9dfe..0000000 --- a/overlay/frameworks/base/packages/SettingsProvider/res/values/config.xml +++ /dev/null @@ -1,23 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- -/** - * Copyright (c) 2012, 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> - <bool name="def_accelerometer_rotation">true</bool> - <bool name="def_screen_brightness_automatic_mode">true</bool> -</resources> - diff --git a/overlay/frameworks/base/packages/SystemUI/res/values/config.xml b/overlay/frameworks/base/packages/SystemUI/res/values/config.xml deleted file mode 100644 index 3a2c4fb..0000000 --- a/overlay/frameworks/base/packages/SystemUI/res/values/config.xml +++ /dev/null @@ -1,34 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- -/* -** Copyright 2009, The Android Open Source Project -** -** Licensed under the Apache License, Version 2.0 (the "License"); -** you may not use this file except in compliance with the License. -** You may obtain a copy of the License at -** -** http://www.apache.org/licenses/LICENSE-2.0 -** -** Unless required by applicable law or agreed to in writing, software -** distributed under the License is distributed on an "AS IS" BASIS, -** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -** See the License for the specific language governing permissions and -** limitations under the License. -*/ ---> - -<!-- These resources are around just to allow their values to be customized - for different hardware and product builds. --> -<resources> - - <!-- Whether we're using the tablet-optimized recents interface (we use this - value at runtime for some things) --> - <bool name="config_recents_interface_for_tablets">true</bool> - - <!-- Control whether status bar should distinguish HSPA data icon form UMTS - data icon on devices --> - <bool name="config_hspa_data_distinguishable">true</bool> - - <!-- Whether rotation lock shows up in quick settings or not --> - <bool name="quick_settings_show_rotation_lock">true</bool> -</resources> diff --git a/overlay/frameworks/base/packages/SystemUI/res/values/dimens.xml b/overlay/frameworks/base/packages/SystemUI/res/values/dimens.xml deleted file mode 100644 index 3874625..0000000 --- a/overlay/frameworks/base/packages/SystemUI/res/values/dimens.xml +++ /dev/null @@ -1,21 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - * Copyright (c) 2006, The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. -*/ ---> -<resources> -<!-- Width for the notification panel and related windows --> - <dimen name="standard_notification_panel_width">496dp</dimen><!-- includes notification_side_padding on each side --> -</resources> diff --git a/overlay/packages/apps/Settings/res/values/bools.xml b/overlay/packages/apps/Settings/res/values/bools.xml deleted file mode 100644 index bd7e488..0000000 --- a/overlay/packages/apps/Settings/res/values/bools.xml +++ /dev/null @@ -1,24 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- Copyright (C) 2009 The Android Open Source Project - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> - -<resources> - <!-- Whether or not the dock settings are to be displayed for this device when docked - <bool name="has_dock_settings">true</bool>--> - <bool name="has_powercontrol_widget">true</bool> - - <!-- make home button wake configurable in display settings --> - <bool name="config_show_homeWake">true</bool> -</resources> diff --git a/overlay/packages/apps/Settings/res/values/config.xml b/overlay/packages/apps/Settings/res/values/config.xml deleted file mode 100644 index bb9eca4..0000000 --- a/overlay/packages/apps/Settings/res/values/config.xml +++ /dev/null @@ -1,20 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- Copyright (C) 2012 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> - <!-- Volume Rocker Wake --> - <bool name="config_show_volumeRockerWake">true</bool> -</resources> diff --git a/overlay/packages/apps/Torch/res/values/config.xml b/overlay/packages/apps/Torch/res/values/config.xml deleted file mode 100644 index aadaeb4..0000000 --- a/overlay/packages/apps/Torch/res/values/config.xml +++ /dev/null @@ -1,24 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - Copyright (C) 2014 The CyanogenMod Project - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License - version 3 as published by the Free Software Foundation. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - MA 02110-1301, USA. ---> - -<resources> - <!-- Our torch mode requires the camera interface to boost the - power needed for the flash --> - <bool name="useCameraInterface">true</bool> -</resources> diff --git a/rootdir/Android.mk b/rootdir/Android.mk index 82f4fda..2a4ac69 100644 --- a/rootdir/Android.mk +++ b/rootdir/Android.mk @@ -1,30 +1,6 @@ LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) -LOCAL_MODULE := fstab.universal5420 -LOCAL_MODULE_TAGS := optional eng -LOCAL_MODULE_CLASS := ETC -LOCAL_SRC_FILES := etc/fstab.universal5420 -LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) -include $(BUILD_PREBUILT) - -include $(CLEAR_VARS) -LOCAL_MODULE := init.universal5420.usb.rc -LOCAL_MODULE_TAGS := optional eng -LOCAL_MODULE_CLASS := ETC -LOCAL_SRC_FILES := etc/init.universal5420.usb.rc -LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) -include $(BUILD_PREBUILT) - -include $(CLEAR_VARS) -LOCAL_MODULE := init.universal5420.wifi.rc -LOCAL_MODULE_TAGS := optional eng -LOCAL_MODULE_CLASS := ETC -LOCAL_SRC_FILES := etc/init.universal5420.wifi.rc -LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) -include $(BUILD_PREBUILT) - -include $(CLEAR_VARS) LOCAL_MODULE := init.universal5420.rc LOCAL_MODULE_TAGS := optional eng LOCAL_MODULE_CLASS := ETC @@ -33,14 +9,6 @@ LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) include $(BUILD_PREBUILT) include $(CLEAR_VARS) -LOCAL_MODULE := init.samsung.rc -LOCAL_MODULE_TAGS := optional eng -LOCAL_MODULE_CLASS := ETC -LOCAL_SRC_FILES := etc/init.samsung.rc -LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) -include $(BUILD_PREBUILT) - -include $(CLEAR_VARS) LOCAL_MODULE := ueventd.universal5420.rc LOCAL_MODULE_TAGS := optional eng LOCAL_MODULE_CLASS := ETC @@ -49,14 +17,6 @@ LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) include $(BUILD_PREBUILT) include $(CLEAR_VARS) -LOCAL_MODULE := init.recovery.universal5420.rc -LOCAL_MODULE_TAGS := optional eng -LOCAL_MODULE_CLASS := ETC -LOCAL_SRC_FILES := etc/init.recovery.universal5420.rc -LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) -include $(BUILD_PREBUILT) - -include $(CLEAR_VARS) LOCAL_MODULE := init.baseband.rc LOCAL_MODULE_TAGS := optional eng LOCAL_MODULE_CLASS := ETC diff --git a/rootdir/etc/.fstab.universal5420.swp b/rootdir/etc/.fstab.universal5420.swp Binary files differdeleted file mode 100644 index cb2e610..0000000 --- a/rootdir/etc/.fstab.universal5420.swp +++ /dev/null diff --git a/rootdir/etc/fstab.universal5420 b/rootdir/etc/fstab.universal5420 deleted file mode 100644 index 1c8a3c2..0000000 --- a/rootdir/etc/fstab.universal5420 +++ /dev/null @@ -1,17 +0,0 @@ -# Android fstab file. -#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags> -# The filesystem that contains the filesystem checker binary (typically /system) cannot -# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK -# data partition must be located at the bottom for supporting device encryption - -/dev/block/platform/dw_mmc.0/by-name/BOOT /boot emmc defaults defaults -/dev/block/platform/dw_mmc.0/by-name/RECOVERY /recovery emmc defaults defaults -/dev/block/platform/dw_mmc.0/by-name/HIDDEN /preload ext4 defaults defaults -/dev/block/platform/dw_mmc.0/by-name/SYSTEM /system ext4 ro,errors=panic wait -/dev/block/platform/dw_mmc.0/by-name/EFS /efs ext4 nosuid,nodev,noatime,noauto_da_alloc,discard,journal_async_commit,errors=panic wait,check -/dev/block/platform/dw_mmc.0/by-name/CACHE /cache ext4 nosuid,nodev,noatime,noauto_da_alloc,discard,journal_async_commit,errors=panic wait,check -/dev/block/platform/dw_mmc.0/by-name/USERDATA /data ext4 nosuid,nodev,noatime,noauto_da_alloc,discard,journal_async_commit,errors=panic wait,check,encryptable=footer - -# VOLD -/devices/platform/dw_mmc.2/mmc_host/mmc2 auto auto defaults voldmanaged=sdcard1:auto,noemulatedsd -/devices/platform/exynos-dwc3.0/exynos-xhci.0/ auto auto defaults voldmanaged=usbdisk:auto diff --git a/rootdir/etc/init.samsung.rc b/rootdir/etc/init.samsung.rc deleted file mode 100644 index 731a9ce..0000000 --- a/rootdir/etc/init.samsung.rc +++ /dev/null @@ -1,62 +0,0 @@ -# -# Changes that Samsung made to /init.rc, keeping them separate to keep -# the init.universal5420.rc file closer to stock. -# - -on post-fs-data -# SA, System SW, SAMSUNG create log directory - mkdir /data/log 0775 system log - chown system log /data/log - mkdir /data/anr 0775 system system - chown system system /data/anr - chmod 0775 /data/log - chmod 0775 /data/anr - restorecon /data/log - restorecon /data/anr - -#drm permission - mkdir /efs/drm 0774 drm system - -# [ SEC_MM_DRM - # sdrm - mkdir /efs/drm 0774 drm system - mkdir /efs/drm/sdrm 0774 drm system - mkdir /efs/drm/sdrm/data_agent 0774 drm system - restorecon /efs/drm - restorecon /efs/drm/sdrm - restorecon /efs/drm/data_agent - - # DRM directory creation - mkdir /system/etc/security/.drm 0775 - chown root root /system/etc/security/.drm - chmod 0775 /system/etc/security/.drm - - # Added for Playready DRM Support - mkdir /data/data/.drm 0775 - chown drm system /data/data/.drm - chmod 0775 /data/data/.drm - mkdir /data/data/.drm/.playready 0775 - chown drm system /data/data/.drm/.playready - chmod 0775 /data/data/.drm/.playready - - # Added drm folder to copy drm plugins - mkdir /system/lib/drm 0775 - chown root root /system/lib/drm - chmod 0775 /system/lib/drm - restorecon_recursive /efs -#] - - mkdir /mnt/shell 0750 shell shell - mkdir /mnt/media_rw 0750 media_rw media_rw - -service_redefine drm /system/bin/drmserver.samsung - class main - user drm - group system drm inet drmrpc sdcard_r sdcard_rw media_rw radio shell - -service_redefine media /system/bin/mediaserver - class main - user media - group system audio camera inet net_bt net_bt_admin net_bw_acct drmrpc mediadrm sdcard_rw sdcard_r media_rw shell lgt_gid qcom_diag - ioprio rt 4 - diff --git a/rootdir/etc/init.universal5420.usb.rc b/rootdir/etc/init.universal5420.usb.rc deleted file mode 100755 index 3723b66..0000000 --- a/rootdir/etc/init.universal5420.usb.rc +++ /dev/null @@ -1,177 +0,0 @@ -on init - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/f_rndis/manufacturer Samsung - write /sys/class/android_usb/android0/f_rndis/vendorID 04e8 - write /sys/class/android_usb/android0/f_rndis/wceis 1 - -on boot - write /sys/class/android_usb/android0/iManufacturer ${ro.product.manufacturer} - write /sys/class/android_usb/android0/iProduct ${ro.product.model} - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/f_mass_storage/inquiry_string "Samsung" - -on property:sys.usb.config=mtp - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/idVendor 04e8 - write /sys/class/android_usb/android0/idProduct 6860 - write /sys/class/android_usb/android0/functions ${sys.usb.config} - write /sys/class/android_usb/android0/enable 1 - start adbd - setprop sys.usb.state ${sys.usb.config} - - -on property:sys.usb.config=mtp,adb - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/idVendor 04e8 - write /sys/class/android_usb/android0/idProduct 6860 - write /sys/class/android_usb/android0/functions ${sys.usb.config} - write /sys/class/android_usb/android0/enable 1 - start adbd - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=rndis - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/idVendor 04e8 - write /sys/class/android_usb/android0/idProduct 6863 - write /sys/class/android_usb/android0/functions ${sys.usb.config} - write /sys/class/android_usb/android0/bDeviceClass 224 - write /sys/class/android_usb/android0/enable 1 - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=rndis,adb - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/idVendor 04e8 - write /sys/class/android_usb/android0/idProduct 6864 - write /sys/class/android_usb/android0/functions ${sys.usb.config} - write /sys/class/android_usb/android0/bDeviceClass 224 - write /sys/class/android_usb/android0/enable 1 - start adbd - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=ptp - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/idVendor 04e8 - write /sys/class/android_usb/android0/idProduct 6865 - write /sys/class/android_usb/android0/functions ${sys.usb.config} - write /sys/class/android_usb/android0/enable 1 - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=ptp,adb - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/idVendor 04e8 - write /sys/class/android_usb/android0/idProduct 6866 - write /sys/class/android_usb/android0/functions ${sys.usb.config} - write /sys/class/android_usb/android0/enable 1 - start adbd - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=rndis,dm - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/idVendor 04e8 - write /sys/class/android_usb/android0/idProduct 6862 - write /sys/class/android_usb/android0/functions ${sys.usb.config} - write /sys/class/android_usb/android0/enable 1 - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=rndis,acm,dm - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/idVendor 04e8 - write /sys/class/android_usb/android0/idProduct 6862 - write /sys/class/android_usb/android0/functions ${sys.usb.config} - write /sys/class/android_usb/android0/enable 1 - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=mass_storage - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/idVendor 04e8 - write /sys/class/android_usb/android0/idProduct 685B - write /sys/class/android_usb/android0/functions ${sys.usb.config} - write /sys/class/android_usb/android0/enable 1 - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=mass_storage,adb - - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/idVendor 04e8 - write /sys/class/android_usb/android0/idProduct 685e - write /sys/class/android_usb/android0/functions ${sys.usb.config} - write /sys/class/android_usb/android0/enable 1 - start adbd - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=mass_storage,acm - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/idVendor 04e8 - write /sys/class/android_usb/android0/idProduct 685e - write /sys/class/android_usb/android0/functions ${sys.usb.config} - write /sys/class/android_usb/android0/enable 1 - setprop sys.usb.state ${sys.usb.config} - -# Askon Mode : VZW required - -on property:sys.usb.config=askon - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/functions ${sys.usb.config} - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=askon,adb - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/functions ${sys.usb.config} - setprop sys.usb.state ${sys.usb.config} - -# rndis,acm,diag and diag,acm,adb used for Hidden Menu - -on property:sys.usb.config=rndis,diag - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/idVendor 04e8 - write /sys/class/android_usb/android0/idProduct 6862 - write /sys/class/android_usb/android0/f_diag/clients diag_mdm - write /sys/class/android_usb/android0/functions ${sys.usb.config} - write /sys/class/android_usb/android0/enable 1 - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,acm,adb - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/idVendor 04E8 - write /sys/class/android_usb/android0/idProduct 6860 - write /sys/class/android_usb/android0/f_diag/clients diag_mdm - write /sys/class/android_usb/android0/functions ${sys.usb.config} - write /sys/class/android_usb/android0/enable 1 - start adbd - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=diag,acm - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/idVendor 04E8 - write /sys/class/android_usb/android0/idProduct 6860 - write /sys/class/android_usb/android0/f_diag/clients diag_mdm - write /sys/class/android_usb/android0/functions ${sys.usb.config} - write /sys/class/android_usb/android0/enable 1 - setprop sys.usb.state ${sys.usb.config} - - -on property:sys.usb.config=rndis,acm,diag - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/idVendor 04E8 - write /sys/class/android_usb/android0/idProduct 6864 - write /sys/class/android_usb/android0/f_diag/clients diag_mdm - write /sys/class/android_usb/android0/functions ${sys.usb.config} - write /sys/class/android_usb/android0/enable 1 - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=mtp,conn_gadget - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/idVendor 04e8 - write /sys/class/android_usb/android0/idProduct 6860 - write /sys/class/android_usb/android0/functions ${sys.usb.config} - write /sys/class/android_usb/android0/enable 1 - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=mtp,conn_gadget,adb - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/idVendor 04e8 - write /sys/class/android_usb/android0/idProduct 6860 - write /sys/class/android_usb/android0/functions ${sys.usb.config} - write /sys/class/android_usb/android0/enable 1 - start adbd - setprop sys.usb.state ${sys.usb.config} diff --git a/rootdir/etc/init.universal5420.wifi.rc b/rootdir/etc/init.universal5420.wifi.rc deleted file mode 100755 index 0676161..0000000 --- a/rootdir/etc/init.universal5420.wifi.rc +++ /dev/null @@ -1,127 +0,0 @@ -# Wi-Fi init file - - #Create directory for hostapd - mkdir /data/hostapd 0770 system wifi - -on post-fs-data - # Create the directories used by the Wireless subsystem - mkdir /data/misc/wifi 0770 wifi wifi - mkdir /data/misc/wifi/sockets 0770 wifi wifi - mkdir /data/misc/wifi/wpa_supplicant 0770 wifi wifi - mkdir /data/misc/dhcp 0770 dhcp dhcp - chown dhcp dhcp /data/misc/dhcp - - # for WIFI TRP/TIS - chown system root /data/.psm.info - chmod 0664 /data/.psm.info - - # for WIFI Antenna Selection - chown system root /data/.ant.info - chmod 0664 /data/.ant.info - - # for WIFI Version - write /data/.wifiver.info 0 - chown system root /data/.wifiver.info - chmod 0666 /data/.wifiver.info - - # for WIFI Cert - chmod 0664 /data/.bustxglom.info - chmod 0664 /data/.roamoff.info - chmod 0664 /data/.frameburst.info - chmod 0664 /data/.txbf.info - # for WIFI MAC address - mkdir /efs/wifi 0775 radio system - chown system system /efs/wifi/.mac.info - chmod 0664 /efs/wifi/.mac.info - -on boot - setprop wifi.interface wlan0 - -service p2p_supplicant /system/bin/wpa_supplicant \ - -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \ - -I/system/etc/wifi/wpa_supplicant_overlay.conf -O/data/misc/wifi/sockets -N \ - -ip2p0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf \ - -I/system/etc/wifi/p2p_supplicant_overlay.conf \ - -puse_p2p_group_interface=1 -puse_multi_chan_concurrent=1 \ - -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0 - class main - socket wpa_wlan0 dgram 660 wifi wifi - disabled - oneshot - -service wpa_supplicant /system/bin/wpa_supplicant \ - -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \ - -I/system/etc/wifi/wpa_supplicant_overlay.conf \ - -O/data/misc/wifi/sockets \ - -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0 - class main - socket wpa_wlan0 dgram 660 wifi wifi - disabled - oneshot - -service dhcpcd_wlan0 /system/bin/dhcpcd -ABKL - class main - disabled - oneshot - -service dhcpcd_ibss /system/bin/dhcpcd -BKM - class late_start - disabled - oneshot - -service dhcpcd_p2p /system/bin/dhcpcd -aABKL - class main - disabled - oneshot - -service iprenew_wlan0 /system/bin/dhcpcd -n - class main - disabled - oneshot - -service iprenew_p2p /system/bin/dhcpcd -n - class main - disabled - oneshot - -# start for WiFi MFG (TestMode) -service mfgloader /system/bin/mfgloader - class main - disabled - oneshot - -service wlandutservice /system/bin/wlandutservice - class main - user system - group wifi net_raw net_admin system inet - disabled - oneshot - -service macloader /system/bin/macloader - class main - oneshot - -on property:init.svc.macloader=stopped - chown system root /data/.cid.info - chmod 0664 /data/.cid.info - chown system root /data/.rev - chmod 0664 /data/.rev -# end of WiFi MFG (TestMode) - -service olsrd /system/bin/olsrd -f /etc/wifi/olsrd.conf - class main - disabled - oneshot - -on property:init.svc.dhcpcd_ibss=running - start olsrd - -on property:init.svc.dhcpcd_ibss=stopped - stop olsrd - -service hostapd /system/bin/hostapd -dddd /data/hostapd/hostapd.conf - class late_start - user root - group root - oneshot - disabled diff --git a/sepolicy/device.te b/sepolicy/device.te deleted file mode 100644 index e00b116..0000000 --- a/sepolicy/device.te +++ /dev/null @@ -1,3 +0,0 @@ -type secmem_device, dev_type; -# Unified Memory Management device -type ump_device, dev_type; diff --git a/sepolicy/domain.te b/sepolicy/domain.te deleted file mode 100644 index 17cc5f0..0000000 --- a/sepolicy/domain.te +++ /dev/null @@ -1 +0,0 @@ -dontaudit domain rootfs:chr_file { read write }; diff --git a/sepolicy/drmserver.te b/sepolicy/drmserver.te deleted file mode 100644 index eba2500..0000000 --- a/sepolicy/drmserver.te +++ /dev/null @@ -1 +0,0 @@ -allow drmserver secmem_device:chr_file rw_file_perms; diff --git a/sepolicy/file.te b/sepolicy/file.te deleted file mode 100644 index 117b989..0000000 --- a/sepolicy/file.te +++ /dev/null @@ -1,2 +0,0 @@ -type sysfs_input_file, fs_type, sysfs_type; -type wifi_efs_file, fs_type; diff --git a/sepolicy/file_contexts b/sepolicy/file_contexts deleted file mode 100644 index d2d0b6e..0000000 --- a/sepolicy/file_contexts +++ /dev/null @@ -1,46 +0,0 @@ -/dev/mali0 u:object_r:gpu_device:s0 - -/dev/ttySAC0 u:object_r:hci_attach_dev:s0 -/dev/ttySAC1 u:object_r:gps_device:s0 -/dev/s5p-smem u:object_r:secmem_device:s0 -/dev/ump u:object_r:ump_device:s0 - -/dev/mobicore u:object_r:tee_device:s0 -/dev/mobicore-user u:object_r:tee_device:s0 - -/dev/v4l-subdev[0-9]* u:object_r:video_device:s0 -/dev/media0 u:object_r:video_device:s0 -/dev/media1 u:object_r:video_device:s0 - -/dev/video16 u:object_r:video_device:s0 -/dev/video17 u:object_r:video_device:s0 -/dev/video18 u:object_r:video_device:s0 -/dev/video19 u:object_r:video_device:s0 - -/dev/fimg2d u:object_r:video_device:s0 - -/dev/video40 u:object_r:camera_device:s0 -/dev/video41 u:object_r:camera_device:s0 -/dev/video42 u:object_r:camera_device:s0 -/dev/video43 u:object_r:camera_device:s0 -/dev/video44 u:object_r:camera_device:s0 -/dev/media2 u:object_r:camera_device:s0 - -/efs/bluetooth(/.*)? u:object_r:bluetooth_data_file:s0 - -/data/\.gps\.interface\.pipe\.to_gpsd u:object_r:gps_data_file:s0 -/data/\.gps\.interface\.pipe\.to_jni u:object_r:gps_data_file:s0 -/data/system/gps(/.*)? u:object_r:gps_data_file:s0 - -/data/app/tlcd_sock u:object_r:drmserver_socket:s0 - -/data/.wifiver.info u:object_r:wifi_data_file:s0 -/efs/wifi(/.*)? u:object_r:wifi_efs_file:s0 - -/system/bin/mcDriverDaemon -- u:object_r:tee_exec:s0 -/system/bin/drmserver.samsung u:object_r:drmserver_exec:s0 -/system/bin/gpsd u:object_r:gpsd_exec:s0 - -/sys/devices/platform/bcm4339_bluetooth/rfkill/rfkill0/state -- u:object_r:sysfs_bluetooth_writable:s0 -/sys/devices/platform/bcm4339_bluetooth/rfkill/rfkill0/type -- u:object_r:sysfs_bluetooth_writable:s0 -/sys/devices/virtual/sec/sec_touchkey/tsp_keys_enabled u:object_r:sysfs_input_file:s0 diff --git a/sepolicy/gpsd.te b/sepolicy/gpsd.te deleted file mode 100644 index a63c0c6..0000000 --- a/sepolicy/gpsd.te +++ /dev/null @@ -1,2 +0,0 @@ -file_type_auto_trans(gpsd, system_data_file, gps_data_file); -allow gpsd sysfs_wake_lock:file rw_file_perms; diff --git a/sepolicy/init.te b/sepolicy/init.te deleted file mode 100644 index 17940ae..0000000 --- a/sepolicy/init.te +++ /dev/null @@ -1 +0,0 @@ -allow init drmserver_service:service_manager add; diff --git a/sepolicy/mediaserver.te b/sepolicy/mediaserver.te deleted file mode 100644 index 1750376..0000000 --- a/sepolicy/mediaserver.te +++ /dev/null @@ -1,9 +0,0 @@ -allow mediaserver sysfs_wake_lock:file { open read write }; -allow mediaserver system_data_file:file { create open read write }; -allow mediaserver system_data_file:dir { add_name write }; -allow mediaserver system_server:unix_stream_socket { read write setopt }; -allow mediaserver system_prop:property_service set; - -# Playback DRM protected content -allow mediaserver secmem_device:chr_file rw_file_perms; -r_dir_file(mediaserver, efs_file) diff --git a/sepolicy/service_contexts b/sepolicy/service_contexts deleted file mode 100644 index 62b09fc..0000000 --- a/sepolicy/service_contexts +++ /dev/null @@ -1 +0,0 @@ -Exynos.HWCService u:object_r:surfaceflinger_service:s0 diff --git a/sepolicy/servicemanager.te b/sepolicy/servicemanager.te deleted file mode 100644 index 90fc6d9..0000000 --- a/sepolicy/servicemanager.te +++ /dev/null @@ -1,3 +0,0 @@ -allow servicemanager init:dir search; -allow servicemanager init:file { read open }; -allow servicemanager init:process getattr; diff --git a/sepolicy/system_app.te b/sepolicy/system_app.te deleted file mode 100644 index de76153..0000000 --- a/sepolicy/system_app.te +++ /dev/null @@ -1,3 +0,0 @@ -allow system_app sysfs_input_file:file rw_file_perms; -allow system_app system_data_file:dir { read getattr open }; -allow system_app system_data_file:file { write getattr setattr read lock open }; diff --git a/sepolicy/system_server.te b/sepolicy/system_server.te deleted file mode 100644 index 24a2f82..0000000 --- a/sepolicy/system_server.te +++ /dev/null @@ -1,7 +0,0 @@ -allow system_server efs_file:file { read open write }; -allow system_server efs_file:dir search; - -# Label the .gps.interface.pipe.to_jni pipe with gps_data_file. -type_transition system_server system_data_file:fifo_file gps_data_file ".gps.interface.pipe.to_jni"; -allow system_server gps_data_file:fifo_file create_file_perms; -allow system_server gps_data_file:dir rw_dir_perms; diff --git a/sepolicy/vold.te b/sepolicy/vold.te deleted file mode 100644 index 7e83901..0000000 --- a/sepolicy/vold.te +++ /dev/null @@ -1 +0,0 @@ -allow vold vold_tmpfs:file create_file_perms; diff --git a/sepolicy/wpa.te b/sepolicy/wpa.te deleted file mode 100644 index 0e52e97..0000000 --- a/sepolicy/wpa.te +++ /dev/null @@ -1,5 +0,0 @@ -allow wpa wifi_data_file:file open; -allow wpa wifi_efs_file:dir search; -allow wpa wifi_efs_file:file { open read write }; -allow wpa efs_file:dir search; -allow wpa system_data_file:file { write open }; diff --git a/system.prop b/system.prop index f9d6586..eb97ade 100644 --- a/system.prop +++ b/system.prop @@ -2,39 +2,7 @@ # system.prop for klimtlte # -# Media -ro.sapa.jack.master=alsa -ro.hdcp2.rx=tz - -# UI -lockscreen.rot_override=true -ro.sf.lcd_density=320 -ro.opengles.version=196608 -ro.hwui.texture_cache_size=96 -ro.hwui.layer_cache_size=64 -ro.hwui.path_cache_size=16 -ro.hwui.shape_cache_size=4 -ro.hwui.gradient_cache_size=2 -ro.hwui.drop_shadow_cache_size=8 -ro.hwui.texture_cache_flushrate=0.5 -ro.hwui.text_small_cache_width=1024 -ro.hwui.text_small_cache_height=512 -ro.hwui.text_large_cache_width=2048 -ro.hwui.text_large_cache_height=1024 - -# USB -persist.sys.isUsbOtgEnabled=true -persist.sys.usb.config=mtp - # Radio rild.libargs=-d /dev/ttyS0 rild.libpath=/system/lib/libsec-ril.so ro.telephony.ril_class=KlimtLteRIL - -# Randomly from stock -ro.sec.fle.encryption=true -ro.secwvk=220 -ro.securestorage.support=true - -# Wifi -wifi.interface=wlan0 |
