Update Bonito SVN to 18 am: 045064f10e am: 32c4e943e5
Change-Id: I9500dc74bf99920930fc38de49bec46adb1665c2
diff --git a/BoardConfig-common.mk b/BoardConfig-common.mk
index 5c5d83f..0193ba0 100644
--- a/BoardConfig-common.mk
+++ b/BoardConfig-common.mk
@@ -153,6 +153,12 @@
# Sensors
USE_SENSOR_MULTI_HAL := true
TARGET_SUPPORT_DIRECT_REPORT := true
+# Enable sensor Version V_2
+USE_SENSOR_HAL_VER := 2.0
+
+# CHRE
+CHRE_DAEMON_ENABLED := true
+CHRE_DAEMON_LOAD_INTO_SENSORSPD := true
# wlan
BOARD_WLAN_DEVICE := qcwcn
@@ -164,6 +170,9 @@
BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE)
WIFI_HIDL_FEATURE_AWARE := true
WIFI_HIDL_FEATURE_DUAL_INTERFACE:= true
+WIFI_FEATURE_WIFI_EXT_HAL := true
+WIFI_FEATURE_IMU_DETECTION := false
+WIFI_HIDL_UNIFIED_SUPPLICANT_SERVICE_RC_ENTRY := true
# Audio
BOARD_USES_ALSA_AUDIO := true
diff --git a/CleanSpec.mk b/CleanSpec.mk
index 6d71bc6..060a347 100644
--- a/CleanSpec.mk
+++ b/CleanSpec.mk
@@ -177,3 +177,16 @@
# Remove obsolete android.hardware.boot@1.0-impl-wrapper.recovery.so
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/recovery/root/system/lib64/hw/android.hardware.boot@1.0-impl-wrapper.recovery.so)
+
+# Vibrator HAL 1.2 renamed from 'bonito' to 'drv2624'
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/etc/init/android.hardware.vibrator@1.2-service.bonito.rc)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/bin/hw/android.hardware.vibrator@1.2-service.bonito)
+
+# Vibrator HAL upgraded from 1-2 to 1-3
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/etc/init/android.hardware.vibrator@1.2-service.drv2624.rc)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/bin/hw/android.hardware.vibrator@1.2-service.drv2624)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/etc/vintf/manifest/android.hardware.vibrator@1.2-service.drv2624.xml)
+
+# Move android.hidl.base@1.0.so to system_ext
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib/android.hidl.base@1.0.so)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib64/android.hidl.base@1.0.so)
diff --git a/audio_policy_volumes.xml b/audio_policy_volumes.xml
index 635f721..f119317 100644
--- a/audio_policy_volumes.xml
+++ b/audio_policy_volumes.xml
@@ -44,7 +44,7 @@
<volume stream="AUDIO_STREAM_VOICE_CALL" deviceCategory="DEVICE_CATEGORY_EXT_MEDIA"
ref="DEFAULT_MEDIA_VOLUME_CURVE"/>
<volume stream="AUDIO_STREAM_VOICE_CALL" deviceCategory="DEVICE_CATEGORY_HEARING_AID"
- ref="DEFAULT_HEARING_AID_VOLUME_CURVE"/>
+ ref="DEFAULT_NON_MUTABLE_HEARING_AID_VOLUME_CURVE"/>
<volume stream="AUDIO_STREAM_SYSTEM" deviceCategory="DEVICE_CATEGORY_HEADSET">
<point>1,-3000</point>
<point>33,-2600</point>
diff --git a/bonito/overlay/frameworks/base/core/res/res/values/config.xml b/bonito/overlay/frameworks/base/core/res/res/values/config.xml
index 0c28a5a..fbb8b52 100755
--- a/bonito/overlay/frameworks/base/core/res/res/values/config.xml
+++ b/bonito/overlay/frameworks/base/core/res/res/values/config.xml
@@ -138,11 +138,6 @@
Must be in the range specified by minimum and maximum. -->
<integer name="config_screenBrightnessSettingDefault">98</integer>
- <!-- Default screen brightness for VR setting. Default value: 0x1F => 127. -->
- <integer name="config_screenBrightnessForVrSettingDefault">127</integer>
-
- <integer name="config_screenBrightnessForVrSettingMinimum">127</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">1</integer>
diff --git a/component-overrides.xml b/component-overrides.xml
new file mode 100644
index 0000000..bb3419d
--- /dev/null
+++ b/component-overrides.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2019 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.
+-->
+<config>
+ <component-override package="com.android.bluetooth" >
+ <component class=".sap.SapService" enabled="true" />
+ </component-override>
+</config>
\ No newline at end of file
diff --git a/default-permissions.xml b/default-permissions.xml
index 733b272..1fcf7ee 100644
--- a/default-permissions.xml
+++ b/default-permissions.xml
@@ -79,17 +79,6 @@
</exception>
<exception
- package="com.google.android.apps.restore"
- sha256-cert-digest="56:BE:13:2B:78:06:56:FE:24:44:CD:34:32:6E:B5:D7:AA:C9:1D:20:96:AB:F0:FE:67:3A:99:27:06:22:EC:87">
- <!-- External storage -->
- <permission name="android.permission.READ_EXTERNAL_STORAGE" fixed="false"/>
- <permission name="android.permission.WRITE_EXTERNAL_STORAGE" fixed="false"/>
- <!-- Contacts -->
- <permission name="android.permission.READ_CONTACTS" fixed="false"/>
- <permission name="android.permission.WRITE_CONTACTS" fixed="false"/>
- </exception>
-
- <exception
package="com.verizon.mips.services">
<!-- Call -->
<permission name="android.permission.PROCESS_OUTGOING_CALLS" fixed="false"/>
diff --git a/device-bonito.mk b/device-bonito.mk
index f98bd39..f5a1f94 100644
--- a/device-bonito.mk
+++ b/device-bonito.mk
@@ -25,6 +25,7 @@
# Vibrator HAL
PRODUCT_PRODUCT_PROPERTIES +=\
+ ro.vibrator.hal.config.dynamic=1 \
ro.vibrator.hal.click.duration=8 \
ro.vibrator.hal.tick.duration=5 \
ro.vibrator.hal.heavyclick.duration=12 \
diff --git a/device-sargo.mk b/device-sargo.mk
index 8362fd2..5e1c8c4 100644
--- a/device-sargo.mk
+++ b/device-sargo.mk
@@ -27,6 +27,7 @@
# Vibrator HAL
PRODUCT_PRODUCT_PROPERTIES +=\
+ ro.vibrator.hal.config.dynamic=1 \
ro.vibrator.hal.click.duration=8 \
ro.vibrator.hal.tick.duration=5 \
ro.vibrator.hal.heavyclick.duration=12 \
diff --git a/device.mk b/device.mk
index 03f1189..f810f58 100644
--- a/device.mk
+++ b/device.mk
@@ -19,6 +19,7 @@
PRODUCT_SOONG_NAMESPACES += \
device/google/bonito \
hardware/google/av \
+ hardware/google/camera \
hardware/google/interfaces \
hardware/google/pixel \
hardware/qcom/sdm845 \
@@ -40,6 +41,7 @@
PRODUCT_COPY_FILES += \
device/google/bonito/default-permissions.xml:$(TARGET_COPY_OUT_VENDOR)/etc/default-permissions/default-permissions.xml \
+ device/google/bonito/component-overrides.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sysconfig/component-overrides.xml \
frameworks/native/data/etc/handheld_core_hardware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/handheld_core_hardware.xml \
frameworks/native/data/etc/android.software.verified_boot.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/permissions/android.software.verified_boot.xml
@@ -54,6 +56,10 @@
PRODUCT_PACKAGES += \
messaging
+ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
+PRODUCT_PACKAGES += chre_test_client
+endif
+
LOCAL_PATH := device/google/bonito
TARGET_PRODUCT_PROP := $(LOCAL_PATH)/product.prop
@@ -319,6 +325,10 @@
ro.zram.first_wb_delay_mins=180 \
ro.zram.periodic_wb_delay_hours=24 \
+PRODUCT_PRODUCT_PROPERTIES += \
+ ro.telephony.max.active.modems=2 \
+ persist.radio.reboot_on_modem_change=false
+
# Disable snapshot timer
PRODUCT_PROPERTY_OVERRIDES += \
persist.vendor.radio.snapshot_enabled=0 \
@@ -383,10 +393,6 @@
PRODUCT_PROPERTY_OVERRIDES += \
ro.vendor.bt.bdaddr_path=/proc/device-tree/chosen/cdt/cdb2/bt_addr
-# Enable Perfetto traced
-PRODUCT_PRODUCT_PROPERTIES += \
- persist.traced.enable=1
-
# Bluetooth WiPower
PRODUCT_PROPERTY_OVERRIDES += \
ro.vendor.bluetooth.emb_wp_mode=false \
@@ -396,8 +402,8 @@
PRODUCT_PACKAGES += \
android.hardware.drm@1.0-impl \
android.hardware.drm@1.0-service \
- android.hardware.drm@1.2-service.clearkey \
- android.hardware.drm@1.2-service.widevine
+ android.hardware.drm@1.3-service.clearkey \
+ android.hardware.drm@1.3-service.widevine
# NFC and Secure Element packages
PRODUCT_PACKAGES += \
@@ -457,17 +463,21 @@
android.hardware.camera.provider@2.4-service_64 \
camera.device@3.2-impl \
camera.sdm710 \
- libgooglecamerahal \
- libgoogle_camera_hal_tests \
libqomx_core \
libmmjpeg_interface \
libmmcamera_interface \
libcameradepthcalibrator
+# Google Camera HAL test libraries in debug builds
+PRODUCT_PACKAGES_DEBUG += \
+ libgoogle_camera_hal_proprietary_tests \
+ libgoogle_camera_hal_tests.vendor
+
PRODUCT_PACKAGES += \
sensors.$(PRODUCT_HARDWARE) \
- android.hardware.sensors@1.0-impl \
- android.hardware.sensors@1.0-service
+ android.hardware.sensors@2.0-impl \
+ android.hardware.sensors@2.0-service \
+ android.hardware.sensors@2.0-service.rc
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/sensors/hals.conf:vendor/etc/sensors/hals.conf
@@ -493,12 +503,17 @@
# Vibrator HAL
PRODUCT_PACKAGES += \
- android.hardware.vibrator@1.2-service.bonito \
+ android.hardware.vibrator@1.3-service.drv2624
# Thermal HAL
PRODUCT_PACKAGES += \
android.hardware.thermal@2.0-service.pixel
+ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
+PRODUCT_PACKAGES += \
+ thermal_logd
+endif
+
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/thermal_info_config_$(PRODUCT_HARDWARE).json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config.json
@@ -560,9 +575,8 @@
audio.bluetooth.default
PRODUCT_PACKAGES += \
- android.hardware.audio@5.0-impl:32 \
- android.hardware.audio.effect@5.0-impl:32 \
- android.hardware.broadcastradio@1.0-impl \
+ android.hardware.audio@6.0-impl:32 \
+ android.hardware.audio.effect@6.0-impl:32 \
android.hardware.soundtrigger@2.2-impl \
android.hardware.bluetooth.audio@2.0-impl \
android.hardware.audio@2.0-service
@@ -615,13 +629,6 @@
$(LOCAL_PATH)/media_profiles_V1_0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_profiles_V1_0.xml \
$(LOCAL_PATH)/media_codecs_omx.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_omx.xml
-# configures both aac and xaac decoders
-PRODUCT_COPY_FILES += \
- device/google/bonito/media_codecs_google_audio.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_audio.xml \
-# and ensure that the xaac decoder is built
-PRODUCT_PACKAGES += \
- libstagefright_soft_xaacdec.vendor
-
PRODUCT_PROPERTY_OVERRIDES += \
audio.snd_card.open.retries=50
@@ -647,6 +654,13 @@
PRODUCT_PROPERTY_OVERRIDES += \
persist.vendor.sys.ssr.restart_level=modem,slpi,adsp
+ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
+# Sensor debug flag
+PRODUCT_PROPERTY_OVERRIDES += \
+ persist.vendor.debug.ash.logger=0 \
+ persist.vendor.debug.ash.logger.time=0
+endif
+
# setup dalvik vm configs
$(call inherit-product, frameworks/native/build/phone-xhdpi-2048-dalvik-heap.mk)
@@ -658,10 +672,14 @@
PRODUCT_PACKAGES += \
charger_res_images
-# b/36703476
-# Set default log size on userdebug/eng build to 1M
ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
-PRODUCT_PROPERTY_OVERRIDES += ro.logd.size=1M
+# b/36703476: Set default log size to 1M
+PRODUCT_PROPERTY_OVERRIDES += \
+ ro.logd.size=1M
+# b/114766334: persist all logs by default rotating on 30 files of 1MiB
+PRODUCT_PROPERTY_OVERRIDES += \
+ logd.logpersistd=logcatd \
+ logd.logpersistd.size=30
endif
# Dumpstate HAL
@@ -694,8 +712,8 @@
dalvik.vm.heapgrowthlimit=256m
PRODUCT_COPY_FILES += \
- device/google/bonito/hidl/android.hidl.base@1.0.so-32:system/lib/android.hidl.base@1.0.so \
- device/google/bonito/hidl/android.hidl.base@1.0.so-64:system/lib64/android.hidl.base@1.0.so \
+ device/google/bonito/hidl/android.hidl.base@1.0.so-32:system_ext/lib/android.hidl.base@1.0.so \
+ device/google/bonito/hidl/android.hidl.base@1.0.so-64:system_ext/lib64/android.hidl.base@1.0.so \
device/google/bonito/hidl/android.hidl.base@1.0.so-32:vendor/lib/android.hidl.base@1.0.so \
device/google/bonito/hidl/android.hidl.base@1.0.so-64:vendor/lib64/android.hidl.base@1.0.so \
diff --git a/device_framework_matrix.xml b/device_framework_matrix.xml
index 036a645..720b125 100644
--- a/device_framework_matrix.xml
+++ b/device_framework_matrix.xml
@@ -172,7 +172,7 @@
<hal format="hidl" optional="true">
<name>vendor.google.wifi_ext</name>
<transport>hwbinder</transport>
- <version>1.0</version>
+ <version>1.1</version>
<interface>
<name>IWifiExt</name>
<instance>default</instance>
diff --git a/dumpstate/Android.mk b/dumpstate/Android.mk
index 0981477..5461766 100644
--- a/dumpstate/Android.mk
+++ b/dumpstate/Android.mk
@@ -30,8 +30,6 @@
libcutils \
libdumpstateutil \
libhidlbase \
- libhidltransport \
- libhwbinder \
liblog \
libutils
diff --git a/dumpstate/DumpstateDevice.cpp b/dumpstate/DumpstateDevice.cpp
index 6a6ade1..d5f20ab 100755
--- a/dumpstate/DumpstateDevice.cpp
+++ b/dumpstate/DumpstateDevice.cpp
@@ -138,6 +138,8 @@
const std::string extendedLogDir = "/data/vendor/radio/extended_logs";
const std::vector <std::string> rilAndNetmgrLogs
{
+ "/data/vendor/radio/haldebug_ril0",
+ "/data/vendor/radio/haldebug_ril1",
"/data/vendor/radio/ril_log0",
"/data/vendor/radio/ril_log0_old",
"/data/vendor/radio/ril_log1",
@@ -148,6 +150,7 @@
"/data/vendor/radio/imsdatadaemon_log_old",
"/data/vendor/netmgr/netmgr_log",
"/data/vendor/netmgr/netmgr_log_old",
+ "/data/vendor/radio/omadm_logs.txt",
"/data/vendor/radio/power_anomaly_data.txt",
"/data/vendor/radio/diag_logs/diag_trace.txt",
"/data/vendor/radio/diag_logs/diag_trace_old.txt",
@@ -276,6 +279,18 @@
}
}
+static void DumpSensorLog(int fd) {
+ const std::string logPath = "/data/vendor/sensors/log/sensor_log.txt";
+ const std::string lastlogPath = "/data/vendor/sensors/log/sensor_lastlog.txt";
+
+ if (!access(logPath.c_str(), R_OK)) {
+ DumpFileToFd(fd, "sensor log", logPath);
+ }
+ if (!access(lastlogPath.c_str(), R_OK)) {
+ DumpFileToFd(fd, "sensor lastlog", lastlogPath);
+ }
+}
+
static void DumpF2FS(int fd) {
DumpFileToFd(fd, "F2FS", "/sys/kernel/debug/f2fs/status");
DumpFileToFd(fd, "F2FS - fragmentation", "/proc/fs/f2fs/dm-6/segment_info");
@@ -341,11 +356,16 @@
DumpF2FS(fd);
DumpeMMC(fd);
+ DumpSensorLog(fd);
+
DumpFileToFd(fd, "INTERRUPTS", "/proc/interrupts");
DumpPower(fd);
DumpFileToFd(fd, "LL-Stats", "/d/wlan0/ll_stats");
+ DumpFileToFd(fd, "WLAN Connect Info", "/d/wlan0/connect_info");
+ DumpFileToFd(fd, "WLAN Offload Info", "/d/wlan0/offload_info");
+ DumpFileToFd(fd, "WLAN Roaming Stats", "/d/wlan0/roam_stats");
DumpFileToFd(fd, "ICNSS Stats", "/d/icnss/stats");
DumpFileToFd(fd, "SMD Log", "/d/ipc_logging/smd/log");
RunCommandToFd(fd, "ION HEAPS", {"/vendor/bin/sh", "-c", "for d in $(ls -d /d/ion/*); do for f in $(ls $d); do echo --- $d/$f; cat $d/$f; done; done"});
@@ -393,6 +413,9 @@
dumpModem(fd, fdModem);
}
+ // Dump various events in WiFi data path
+ DumpFileToFd(fd, "WLAN DP Trace", "/d/wlan/dpt_stats/dump_set_dpt_logs");
+
// Keep this at the end as very long on not for humans
DumpFileToFd(fd, "WLAN FW Log Symbol Table", "/vendor/firmware/Data.msc");
diff --git a/fstab.hardware b/fstab.hardware
index 8346e91..3d41165 100644
--- a/fstab.hardware
+++ b/fstab.hardware
@@ -18,5 +18,5 @@
# and fails if it does not find it.
/dev/block/bootdevice/by-name/misc /misc emmc defaults defaults
/devices/platform/soc/a600000.ssusb/a600000.dwc3/xhci-hcd.*.auto* /storage/usbotg vfat nosuid,nodev wait,voldmanaged=usbotg:auto
-/dev/block/zram0 none swap defaults zramsize=2147483648,max_comp_streams=8,zram_loopback_path=/data/per_boot/zram_swap,zram_loopback_size=512M
+/dev/block/zram0 none swap defaults zramsize=2147483648,max_comp_streams=8,zram_backingdev_size=512M
/dev/block/platform/soc/7c4000.sdhci/by-name/persist /mnt/vendor/persist ext4 nosuid,nodev,noatime,barrier=1 wait,first_stage_mount
diff --git a/health/Android.bp b/health/Android.bp
index b06227b..9eb609f 100644
--- a/health/Android.bp
+++ b/health/Android.bp
@@ -43,8 +43,6 @@
"libbase",
"libcutils",
"libhidlbase",
- "libhidltransport",
- "libhwbinder",
"libpixelhealth",
"libutils",
"android.hardware.health@2.0",
diff --git a/health/HealthService.cpp b/health/HealthService.cpp
index 37c1c24..7d780f1 100644
--- a/health/HealthService.cpp
+++ b/health/HealthService.cpp
@@ -14,9 +14,8 @@
* limitations under the License.
*/
#define LOG_TAG "android.hardware.health@2.0-service.bonito"
-#include <android-base/logging.h>
-
#include <android-base/file.h>
+#include <android-base/logging.h>
#include <android-base/parseint.h>
#include <android-base/strings.h>
#include <health2/Health.h>
@@ -24,18 +23,20 @@
#include <healthd/healthd.h>
#include <hidl/HidlTransportSupport.h>
#include <pixelhealth/BatteryMetricsLogger.h>
+#include <pixelhealth/BatteryThermalControl.h>
#include <pixelhealth/CycleCountBackupRestore.h>
#include <pixelhealth/DeviceHealth.h>
#include <pixelhealth/LowBatteryShutdownMetrics.h>
-#include "BatteryRechargingControl.h"
-#include "BatteryInfoUpdate.h"
-#include "LearnedCapacityBackupRestore.h"
#include <fstream>
#include <iomanip>
#include <string>
#include <vector>
+#include "BatteryInfoUpdate.h"
+#include "BatteryRechargingControl.h"
+#include "LearnedCapacityBackupRestore.h"
+
namespace {
using android::hardware::health::V2_0::DiskStats;
@@ -45,6 +46,7 @@
using ::device::google::bonito::health::BatteryInfoUpdate;
using ::device::google::bonito::health::LearnedCapacityBackupRestore;
using hardware::google::pixel::health::BatteryMetricsLogger;
+using hardware::google::pixel::health::BatteryThermalControl;
using hardware::google::pixel::health::CycleCountBackupRestore;
using hardware::google::pixel::health::DeviceHealth;
using hardware::google::pixel::health::LowBatteryShutdownMetrics;
@@ -57,6 +59,7 @@
static BatteryRechargingControl battRechargingControl;
static BatteryInfoUpdate battInfoUpdate;
+static BatteryThermalControl battThermalControl("sys/devices/virtual/thermal/tz-by-name/soc/mode");
static BatteryMetricsLogger battMetricsLogger(kBatteryResistance, kBatteryOCV);
static LowBatteryShutdownMetrics shutdownMetrics(kVoltageAvg);
static CycleCountBackupRestore ccBackupRestoreBMS(
@@ -111,6 +114,7 @@
int healthd_board_battery_update(struct android::BatteryProperties *props) {
battRechargingControl.updateBatteryProperties(props);
deviceHealth.update(props);
+ battThermalControl.updateThermalState(props);
battInfoUpdate.update(props);
battMetricsLogger.logBatteryProperties(props);
shutdownMetrics.logShutdownVoltage(props);
diff --git a/init.hardware.rc b/init.hardware.rc
index 81f8847..4c0d28b 100644
--- a/init.hardware.rc
+++ b/init.hardware.rc
@@ -148,6 +148,7 @@
chown system system /sys/devices/virtual/thermal/tz-by-name/mb-therm-monitor/trip_point_0_hyst
chown system system /sys/devices/virtual/thermal/tz-by-name/usbc-therm-monitor/trip_point_0_temp
chown system system /sys/devices/virtual/thermal/tz-by-name/usbc-therm-monitor/trip_point_0_hyst
+ chown system system /sys/devices/virtual/thermal/tz-by-name/soc/mode
on fs
mount_all /vendor/etc/fstab.${ro.boot.hardware.platform} --early
@@ -304,6 +305,8 @@
mkdir /data/vendor/sensors 0770
chown system system /data/vendor/sensors
+ mkdir /data/vendor/sensors/log 0770
+ chown system system /data/vendor/sensors/log
chmod 770 /mnt/vendor/persist/audio
chmod 660 /mnt/vendor/persist/audio/audio.cal
@@ -386,7 +389,6 @@
chown system system /sys/class/leds/green/rgb_start
chown system system /sys/class/leds/blue/rgb_start
chown system system /sys/class/backlight/panel0-backlight/brightness
- chown system system /sys/class/backlight/panel0-backlight/vr_mode
# Permission for Wireless charger
chown system system /sys/devices/platform/soc/a88000.i2c/i2c-0/0-0061/rxdata
@@ -638,21 +640,6 @@
group system
capabilities NET_BIND_SERVICE
-service wpa_supplicant /vendor/bin/hw/wpa_supplicant \
- -O/data/vendor/wifi/wpa/sockets -puse_p2p_group_interface=1 -dd \
- -g@android:wpa_wlan0
- # we will start as root and wpa_supplicant will switch to user wifi
- # after setting up the capabilities required for WEXT
- # user wifi
- # group wifi inet keystore
- interface android.hardware.wifi.supplicant@1.0::ISupplicant default
- interface android.hardware.wifi.supplicant@1.1::ISupplicant default
- interface android.hardware.wifi.supplicant@1.2::ISupplicant default
- class main
- socket wpa_wlan0 dgram 660 wifi wifi
- disabled
- oneshot
-
service cnss-daemon /vendor/bin/cnss-daemon -n -l
class late_start
user system
@@ -724,20 +711,12 @@
class core
# bugreport is triggered by holding down volume down, volume up and power
-service bugreport /system/bin/dumpstate -d -p -B -z \
- -o /data/user_de/0/com.android.shell/files/bugreports/bugreport
+service bugreport /system/bin/dumpstate -d -p -z
class main
disabled
oneshot
keycodes 114 115 116
-service vendor.chre /vendor/bin/chre
- class late_start
- user system
- group system
- socket chre seqpacket 0660 root system
- shutdown critical
-
service devstart_sh /vendor/bin/init.qcom.devstart.sh
class main
user root
@@ -866,10 +845,21 @@
chown system system /sys/devices/platform/soc/a84000.i2c/i2c-2/2-0020/input/input2/suspend
# DSDS feature
+# Restart 1st qcrild after SIM config changed
+on property:vendor.radio.sim_num.switch=1to2 && property:persist.radio.multisim.config=dsds
+ restart vendor.qcrild
+
+on property:vendor.radio.sim_num.switch=2to1 && property:persist.radio.multisim.config=
+ restart vendor.qcrild
+
# Enable 2nd qcrild when the property set to dsds
on property:persist.radio.multisim.config=dsds
start vendor.qcrild2
+# Stop 2nd qcrild when the property set to empty string
+on property:persist.radio.multisim.config=
+ stop vendor.qcrild2
+
on property:sys.boot_completed=1 && property:ro.boot.mode=firstboot
start init-firstboot-sh
diff --git a/init.qcom.devstart.sh b/init.qcom.devstart.sh
index 4d5c4f9..9f67a0b 100644
--- a/init.qcom.devstart.sh
+++ b/init.qcom.devstart.sh
@@ -8,4 +8,4 @@
version=`grep -ao "OEM_IMAGE_VERSION_STRING[ -~]*" \
/vendor/firmware/adsp.b04 | \
sed -e s/OEM_IMAGE_VERSION_STRING=ADSP.version.// -e s/\(.*\).//`
-setprop sys.adsp.firmware.version "$version"
+setprop vendor.sys.adsp.firmware.version "$version"
diff --git a/keymaster/Android.bp b/keymaster/Android.bp
index 168ed8f..8e07d6b 100644
--- a/keymaster/Android.bp
+++ b/keymaster/Android.bp
@@ -21,6 +21,7 @@
"android.hardware.keymaster@4.0",
"libbase",
"libkeymaster4support",
+ "libutils",
],
proprietary: true,
}
diff --git a/manifest.xml b/manifest.xml
index 8000b1d..6e47a2e 100644
--- a/manifest.xml
+++ b/manifest.xml
@@ -2,7 +2,7 @@
<hal format="hidl">
<name>android.hardware.audio</name>
<transport>hwbinder</transport>
- <version>5.0</version>
+ <version>6.0</version>
<interface>
<name>IDevicesFactory</name>
<instance>default</instance>
@@ -11,7 +11,7 @@
<hal format="hidl">
<name>android.hardware.audio.effect</name>
<transport>hwbinder</transport>
- <version>5.0</version>
+ <version>6.0</version>
<interface>
<name>IEffectsFactory</name>
<instance>default</instance>
@@ -112,8 +112,6 @@
</interface>
<fqname>@1.2::ICryptoFactory/clearkey</fqname>
<fqname>@1.2::IDrmFactory/clearkey</fqname>
- <fqname>@1.2::ICryptoFactory/widevine</fqname>
- <fqname>@1.2::IDrmFactory/widevine</fqname>
</hal>
<hal format="hidl">
<name>android.hardware.dumpstate</name>
@@ -309,7 +307,7 @@
<hal format="hidl">
<name>android.hardware.sensors</name>
<transport>hwbinder</transport>
- <version>1.0</version>
+ <version>2.0</version>
<interface>
<name>ISensors</name>
<instance>default</instance>
@@ -361,15 +359,6 @@
</interface>
</hal>
<hal format="hidl">
- <name>android.hardware.vibrator</name>
- <transport>hwbinder</transport>
- <version>1.2</version>
- <interface>
- <name>IVibrator</name>
- <instance>default</instance>
- </interface>
- </hal>
- <hal format="hidl">
<name>android.hardware.weaver</name>
<transport>hwbinder</transport>
<version>1.0</version>
@@ -379,33 +368,6 @@
</interface>
</hal>
<hal format="hidl">
- <name>android.hardware.wifi</name>
- <transport>hwbinder</transport>
- <version>1.3</version>
- <interface>
- <name>IWifi</name>
- <instance>default</instance>
- </interface>
- </hal>
- <hal format="hidl">
- <name>android.hardware.wifi.hostapd</name>
- <transport>hwbinder</transport>
- <version>1.1</version>
- <interface>
- <name>IHostapd</name>
- <instance>default</instance>
- </interface>
- </hal>
- <hal format="hidl">
- <name>android.hardware.wifi.supplicant</name>
- <transport>hwbinder</transport>
- <version>1.2</version>
- <interface>
- <name>ISupplicant</name>
- <instance>default</instance>
- </interface>
- </hal>
- <hal format="hidl">
<name>vendor.qti.hardware.radio.ims</name>
<transport>hwbinder</transport>
<version>1.2</version>
diff --git a/media_codecs_google_audio.xml b/media_codecs_google_audio.xml
deleted file mode 100644
index 7e586fe..0000000
--- a/media_codecs_google_audio.xml
+++ /dev/null
@@ -1,103 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<!-- 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.
-
--->
-
-<Included>
- <Decoders>
- <MediaCodec name="OMX.google.mp3.decoder" type="audio/mpeg">
- <Limit name="channel-count" max="2" />
- <Limit name="sample-rate" ranges="8000,11025,12000,16000,22050,24000,32000,44100,48000" />
- <Limit name="bitrate" range="8000-320000" />
- </MediaCodec>
- <MediaCodec name="OMX.google.amrnb.decoder" type="audio/3gpp">
- <Limit name="channel-count" max="1" />
- <Limit name="sample-rate" ranges="8000" />
- <Limit name="bitrate" range="4750-12200" />
- </MediaCodec>
- <MediaCodec name="OMX.google.amrwb.decoder" type="audio/amr-wb">
- <Limit name="channel-count" max="1" />
- <Limit name="sample-rate" ranges="16000" />
- <Limit name="bitrate" range="6600-23850" />
- </MediaCodec>
- <MediaCodec name="OMX.google.aac.decoder" type="audio/mp4a-latm">
- <Limit name="channel-count" max="8" />
- <Limit name="sample-rate" ranges="7350,8000,11025,12000,16000,22050,24000,32000,44100,48000" />
- <Limit name="bitrate" range="8000-960000" />
- </MediaCodec>
- <MediaCodec name="OMX.google.xaac.decoder" type="audio/mp4a-latm">
- <Limit name="channel-count" max="8" />
- <Limit name="sample-rate" ranges="7350,8000,11025,12000,16000,22050,24000,32000,44100,48000" />
- <Limit name="bitrate" range="8000-960000" />
- </MediaCodec>
- <MediaCodec name="OMX.google.g711.alaw.decoder" type="audio/g711-alaw">
- <Limit name="channel-count" max="1" />
- <Limit name="sample-rate" ranges="8000-48000" />
- <Limit name="bitrate" range="64000" />
- </MediaCodec>
- <MediaCodec name="OMX.google.g711.mlaw.decoder" type="audio/g711-mlaw">
- <Limit name="channel-count" max="1" />
- <Limit name="sample-rate" ranges="8000-48000" />
- <Limit name="bitrate" range="64000" />
- </MediaCodec>
- <MediaCodec name="OMX.google.vorbis.decoder" type="audio/vorbis">
- <Limit name="channel-count" max="8" />
- <Limit name="sample-rate" ranges="8000-96000" />
- <Limit name="bitrate" range="32000-500000" />
- </MediaCodec>
- <MediaCodec name="OMX.google.opus.decoder" type="audio/opus">
- <Limit name="channel-count" max="8" />
- <Limit name="sample-rate" ranges="48000" />
- <Limit name="bitrate" range="6000-510000" />
- </MediaCodec>
- <MediaCodec name="OMX.google.raw.decoder" type="audio/raw">
- <Limit name="channel-count" max="8" />
- <Limit name="sample-rate" ranges="8000-96000" />
- <Limit name="bitrate" range="1-10000000" />
- </MediaCodec>
- <MediaCodec name="OMX.google.flac.decoder" type="audio/flac">
- <Limit name="channel-count" max="8" />
- <Limit name="sample-rate" ranges="1-655350" />
- <Limit name="bitrate" range="1-21000000" />
- </MediaCodec>
- </Decoders>
- <Encoders>
- <MediaCodec name="OMX.google.aac.encoder" type="audio/mp4a-latm">
- <Limit name="channel-count" max="6" />
- <Limit name="sample-rate" ranges="8000,11025,12000,16000,22050,24000,32000,44100,48000" />
- <!-- also may support 64000, 88200 and 96000 Hz -->
- <Limit name="bitrate" range="8000-960000" />
- </MediaCodec>
- <MediaCodec name="OMX.google.amrnb.encoder" type="audio/3gpp">
- <Limit name="channel-count" max="1" />
- <Limit name="sample-rate" ranges="8000" />
- <Limit name="bitrate" range="4750-12200" />
- <Feature name="bitrate-modes" value="CBR" />
- </MediaCodec>
- <MediaCodec name="OMX.google.amrwb.encoder" type="audio/amr-wb">
- <Limit name="channel-count" max="1" />
- <Limit name="sample-rate" ranges="16000" />
- <Limit name="bitrate" range="6600-23850" />
- <Feature name="bitrate-modes" value="CBR" />
- </MediaCodec>
- <MediaCodec name="OMX.google.flac.encoder" type="audio/flac">
- <Limit name="channel-count" max="2" />
- <Limit name="sample-rate" ranges="1-655350" />
- <Limit name="bitrate" range="1-21000000" />
- <Limit name="complexity" range="0-8" default="5" />
- <Feature name="bitrate-modes" value="CQ" />
- </MediaCodec>
- </Encoders>
-</Included>
diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml
index 89b99f5..be462e4 100644
--- a/overlay/frameworks/base/core/res/res/values/config.xml
+++ b/overlay/frameworks/base/core/res/res/values/config.xml
@@ -120,6 +120,13 @@
</string-array>
<!-- List of regexpressions describing the interface (if any) that represent tetherable
+ Wifi P2P interfaces. If the device doesn't want to support tethering over Wifi P2p this
+ should be empty. An example would be "p2p-p2p.*" -->
+ <string-array translatable="false" name="config_tether_wifi_p2p_regexs">
+ <item>"p2p-p2p\\d-.*"</item>
+ </string-array>
+
+ <!-- List of regexpressions describing the interface (if any) that represent tetherable
bluetooth interfaces. If the device doesn't want to support tethering over bluetooth this
should be empty. -->
<string-array translatable="false" name="config_tether_bluetooth_regexs">
@@ -182,20 +189,6 @@
<item>"9,1"</item>
</string-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 requires the softap band be -->
- <!-- converted from 5GHz to ANY due to hardware restrictions -->
- <bool translatable="false" name="config_wifi_convert_apband_5ghz_to_any">true</bool>
-
- <!-- Boolean indicating whether 802.11r Fast BSS Transition is enabled on this platform -->
- <bool translatable="false" name="config_wifi_fast_bss_transition_enabled">true</bool>
-
- <!-- Boolean indicating whether the wifi chipset has background scan support -->
- <bool translatable="false" name="config_wifi_background_scan_support">true</bool>
-
-
<!-- Vibrator pattern for feedback about a long screen/key press -->
<integer-array name="config_longPressVibePattern">
<item>8</item>
@@ -204,16 +197,6 @@
<!-- Make things go fast -->
<bool name="config_ui_enableFadingMarquee">false</bool>
- <!-- Wifi driver supports batched scan -->
- <bool translatable="false" name="config_wifi_batched_scan_supported">true</bool>
-
- <!-- Boolean indicating whether or not to revert to default country code when cellular
- radio is unable to find any MCC information to infer wifi country code from -->
- <bool translatable="false" name="config_wifi_revert_country_code_on_cellular_loss">true</bool>
-
- <!-- Boolean indicating whether or not wifi should turn off when emergency call is made -->
- <bool translatable="false" name="config_wifi_turn_off_during_emergency_call">true</bool>
-
<!-- Enable doze mode
ComponentName of a dream to show whenever the system would otherwise have gone to sleep. -->
<string translatable="false" name="config_dozeComponent">com.android.systemui/com.android.systemui.doze.DozeService</string>
@@ -269,25 +252,6 @@
<item>lte:524288,1048576,8388608,262144,524288,4194304</item>
</string-array>
- <!-- Configure wifi tcp buffersizes in the form:
- rmem_min,rmem_def,rmem_max,wmem_min,wmem_def,wmem_max -->
- <string name="config_wifi_tcp_buffers" translatable="false">524288,2097152,8388608,262144,524288,4194304</string>
-
- <!-- Idle Receive current for wifi radio. 0 by default-->
- <integer translatable="false" name="config_wifi_idle_receive_cur_ma">1</integer>
-
- <!-- Rx current for wifi radio. 0 by default-->
- <integer translatable="false" name="config_wifi_active_rx_cur_ma">100</integer>
-
- <!-- Tx current for wifi radio. 0 by default-->
- <integer translatable="false" name="config_wifi_tx_cur_ma">250</integer>
-
- <!-- Operating volatage for wifi radio. 0 by default-->
- <integer translatable="false" name="config_wifi_operating_voltage_mv">3800</integer>
-
- <!-- Config SoftAP 2G channel list -->
- <string translatable="false" name="config_wifi_framework_sap_2G_channel_list">6</string>
-
<!-- Config determines whether to update phone object when voice registration
state changes. Voice radio tech change will always trigger an update of
phone object irrespective of this config -->
@@ -316,11 +280,11 @@
<item>"/system/framework/services.jar"</item>
<item>"/system/framework/arm64/boot.oat"</item>
<item>"/system/framework/arm64/boot-core-libart.oat"</item>
- <item>"/apex/com.android.runtime/javalib/core-oj.jar"</item>
- <item>"/apex/com.android.runtime/javalib/core-libart.jar"</item>
+ <item>"/apex/com.android.art/javalib/core-oj.jar"</item>
+ <item>"/apex/com.android.art/javalib/core-libart.jar"</item>
<item>"/apex/com.android.media/javalib/updatable-media.jar"</item>
- <item>"/product/priv-app/SystemUIGoogle/SystemUIGoogle.apk"</item>
- <item>"/product/priv-app/SystemUIGoogle/oat/arm64/SystemUIGoogle.odex"</item>
+ <item>"/system_ext/priv-app/SystemUIGoogle/SystemUIGoogle.apk"</item>
+ <item>"/system_ext/priv-app/SystemUIGoogle/oat/arm64/SystemUIGoogle.odex"</item>
<item>"/system/lib64/libsurfaceflinger.so"</item>
</string-array>
@@ -366,20 +330,6 @@
<!-- Whether the new Auto Selection Network UI should be shown -->
<bool name="config_enableNewAutoSelectNetworkUI">true</bool>
- <!-- Enable ACS (auto channel selection) for Wifi hotspot (SAP) -->
- <bool translatable="false" name="config_wifi_softap_acs_supported">true</bool>
-
- <!-- Enable 802.11ac for Wifi hotspot (SAP) -->
- <bool translatable="false" name="config_wifi_softap_ieee80211ac_supported">true</bool>
-
- <!-- Integer thresholds, do not connect to APs with RSSI lower than these values -->
- <integer translatable="false" name="config_wifi_framework_wifi_score_entry_rssi_threshold_5GHz">-77</integer>
- <integer translatable="false" name="config_wifi_framework_wifi_score_entry_rssi_threshold_24GHz">-80</integer>
- <!-- Integer thresholds for low network score, should be somewhat less than the entry threshholds -->
- <integer translatable="false" name="config_wifi_framework_wifi_score_bad_rssi_threshold_5GHz">-80</integer>
- <integer translatable="false" name="config_wifi_framework_wifi_score_bad_rssi_threshold_24GHz">-83</integer>
-
-
<!-- The default intensity level for haptic feedback. See
Settings.System.HAPTIC_FEEDBACK_INTENSITY more details on the constant values and
meanings. -->
@@ -398,12 +348,6 @@
<item>com.felicanetworks.mfc</item>
<item>com.felicanetworks.mfm</item>
</string-array>
-
- <!-- True if the firmware supports Wi-Fi link probing -->
- <bool name="config_wifi_link_probing_supported">true</bool>
-
- <!-- True if the firmware supports connected MAC randomization -->
- <bool name="config_wifi_connected_mac_randomization_supported">true</bool>
<!-- Enable Zram writeback feature to allow unused pages in zram be written to flash. -->
<bool name="config_zramWriteback">true</bool>
</resources>
diff --git a/overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml b/overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml
deleted file mode 100644
index 378e34b..0000000
--- a/overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/**
- * Copyright (c) 2018, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
--->
-<resources>
- <!-- Default for Settings.System.VIBRATE_WHEN_RINGING -->
- <bool name="def_vibrate_when_ringing">true</bool>
- <!-- Default for Settings.Global.APPLY_RAMPING_RINGER -->
- <bool name="def_apply_ramping_ringer">false</bool>
-</resources>
diff --git a/overlay/packages/apps/Bluetooth/res/values/config.xml b/overlay/packages/apps/Bluetooth/res/values/config.xml
deleted file mode 100644
index e403105..0000000
--- a/overlay/packages/apps/Bluetooth/res/values/config.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-Copyright (c) 2017, The Linux Foundation. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above
- copyright notice, this list of conditions and the following
- disclaimer in the documentation and/or other materials provided
- with the distribution.
- * Neither the name of The Linux Foundation nor the names of its
- contributors may be used to endorse or promote products derived
- from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
-WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
-ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
-BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
-OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
-IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--->
-<resources>
- <bool name="profile_supported_sap">true</bool>
- <bool name="profile_supported_hearing_aid">true</bool>
-</resources>
diff --git a/pixelstats/Android.bp b/pixelstats/Android.bp
index bb65839..dadea9d 100644
--- a/pixelstats/Android.bp
+++ b/pixelstats/Android.bp
@@ -24,7 +24,6 @@
"libbinder",
"libcutils",
"libhidlbase",
- "libhidltransport",
"liblog",
"libutils",
"libpixelstats",
diff --git a/powerstats/Android.bp b/powerstats/Android.bp
index 5c4fac6..ad273df 100644
--- a/powerstats/Android.bp
+++ b/powerstats/Android.bp
@@ -28,7 +28,6 @@
"libbase",
"libcutils",
"libhidlbase",
- "libhidltransport",
"libfmq",
"liblog",
"libutils",
diff --git a/sargo/overlay/frameworks/base/core/res/res/values/config.xml b/sargo/overlay/frameworks/base/core/res/res/values/config.xml
index f798762..85f54f3 100755
--- a/sargo/overlay/frameworks/base/core/res/res/values/config.xml
+++ b/sargo/overlay/frameworks/base/core/res/res/values/config.xml
@@ -138,11 +138,6 @@
Must be in the range specified by minimum and maximum. -->
<integer name="config_screenBrightnessSettingDefault">98</integer>
- <!-- Default screen brightness for VR setting. Default value: 0x7F => 127. -->
- <integer name="config_screenBrightnessForVrSettingDefault">127</integer>
-
- <integer name="config_screenBrightnessForVrSettingMinimum">127</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">1</integer>
diff --git a/usb/Android.bp b/usb/Android.bp
index 449b067..124f468 100644
--- a/usb/Android.bp
+++ b/usb/Android.bp
@@ -20,7 +20,6 @@
shared_libs: [
"libbase",
"libhidlbase",
- "libhidltransport",
"liblog",
"libutils",
"libhardware",
diff --git a/vibrator/Android.bp b/vibrator/Android.bp
deleted file mode 100644
index 2462082..0000000
--- a/vibrator/Android.bp
+++ /dev/null
@@ -1,34 +0,0 @@
-//
-// Copyright (C) 2017 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-cc_binary {
- name: "android.hardware.vibrator@1.2-service.bonito",
- relative_install_path: "hw",
- init_rc: ["android.hardware.vibrator@1.2-service.bonito.rc"],
- srcs: ["service.cpp", "Vibrator.cpp"],
- cflags: ["-Wall", "-Werror"],
- shared_libs: [
- "libhidlbase",
- "libcutils",
- "libhidltransport",
- "liblog",
- "libhwbinder",
- "libutils",
- "libhardware",
- "android.hardware.vibrator@1.0",
- "android.hardware.vibrator@1.1",
- "android.hardware.vibrator@1.2"
- ],
- proprietary: true,
-}
diff --git a/vibrator/OWNERS b/vibrator/OWNERS
deleted file mode 100644
index 2ce9955..0000000
--- a/vibrator/OWNERS
+++ /dev/null
@@ -1,3 +0,0 @@
-eliptus@google.com
-michaelwr@google.com
-chasewu@google.com
diff --git a/vibrator/Vibrator.cpp b/vibrator/Vibrator.cpp
deleted file mode 100644
index 509d739..0000000
--- a/vibrator/Vibrator.cpp
+++ /dev/null
@@ -1,231 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#define LOG_TAG "VibratorService"
-
-#include <log/log.h>
-
-#include <cutils/properties.h>
-#include <hardware/hardware.h>
-#include <hardware/vibrator.h>
-
-#include "Vibrator.h"
-
-#include <cinttypes>
-#include <cmath>
-#include <fstream>
-#include <iostream>
-
-namespace android {
-namespace hardware {
-namespace vibrator {
-namespace V1_2 {
-namespace implementation {
-
-static constexpr int8_t MAX_RTP_INPUT = 127;
-static constexpr int8_t MIN_RTP_INPUT = 0;
-
-static constexpr char RTP_MODE[] = "rtp";
-static constexpr char WAVEFORM_MODE[] = "waveform";
-
-static constexpr uint32_t LOOP_MODE_OPEN = 1;
-static constexpr uint32_t SINE_WAVE = 1;
-static constexpr uint32_t SQUARE_WAVE = 0;
-
-// Default max voltage 2.15V
-static constexpr uint32_t VOLTAGE_MAX = 107;
-
-// Use effect #1 in the waveform library for CLICK effect
-static constexpr char WAVEFORM_CLICK_EFFECT_SEQ[] = "1 0";
-static constexpr int32_t WAVEFORM_CLICK_EFFECT_MS = 6;
-
-// Use effect #2 in the waveform library for TICK effect
-static constexpr char WAVEFORM_TICK_EFFECT_SEQ[] = "2 0";
-static constexpr int32_t WAVEFORM_TICK_EFFECT_MS = 2;
-
-// Use effect #3 in the waveform library for DOUBLE_CLICK effect
-static constexpr char WAVEFORM_DOUBLE_CLICK_EFFECT_SEQ[] = "3 0";
-static constexpr uint32_t WAVEFORM_DOUBLE_CLICK_EFFECT_MS = 182;
-
-// Use effect #4 in the waveform library for HEAVY_CLICK effect
-static constexpr char WAVEFORM_HEAVY_CLICK_EFFECT_SEQ[] = "4 0";
-static constexpr uint32_t WAVEFORM_HEAVY_CLICK_EFFECT_MS = 8;
-
-using Status = ::android::hardware::vibrator::V1_0::Status;
-using EffectStrength = ::android::hardware::vibrator::V1_0::EffectStrength;
-
-Vibrator::Vibrator(HwApi &&hwapi, std::uint32_t short_lra_period, std::uint32_t long_lra_period)
- : mHwApi(std::move(hwapi)), mShortLraPeriod(short_lra_period), mLongLraPeriod(long_lra_period) {
- mClickDuration = property_get_int32("ro.vibrator.hal.click.duration", WAVEFORM_CLICK_EFFECT_MS);
- mTickDuration = property_get_int32("ro.vibrator.hal.tick.duration", WAVEFORM_TICK_EFFECT_MS);
- mHeavyClickDuration =
- property_get_int32("ro.vibrator.hal.heavyclick.duration", WAVEFORM_HEAVY_CLICK_EFFECT_MS);
- mShortVoltageMax = property_get_int32("ro.vibrator.hal.short.voltage", VOLTAGE_MAX);
- mLongVoltageMax = property_get_int32("ro.vibrator.hal.long.voltage", VOLTAGE_MAX);
-
- // This enables effect #1 from the waveform library to be triggered by SLPI
- // while the AP is in suspend mode
- mHwApi.lpTriggerEffect << 1 << std::endl;
- if (!mHwApi.lpTriggerEffect) {
- ALOGW("Failed to set LP trigger mode (%d): %s", errno, strerror(errno));
- }
-}
-
-Return<Status> Vibrator::on(uint32_t timeoutMs, bool isWaveform) {
- // Bonito / Sargo only support open-loop mode
- mHwApi.ctrlLoop << LOOP_MODE_OPEN << std::endl;
- mHwApi.duration << timeoutMs << std::endl;
- if (!mHwApi.duration) {
- ALOGE("Failed to set duration (%d): %s", errno, strerror(errno));
- return Status::UNKNOWN_ERROR;
- }
-
- if (isWaveform) {
- mHwApi.mode << WAVEFORM_MODE << std::endl;
- mHwApi.lraWaveShape << SINE_WAVE << std::endl;
- mHwApi.odClamp << mShortVoltageMax << std::endl;
- mHwApi.olLraPeriod << mShortLraPeriod << std::endl;
- } else {
- mHwApi.mode << RTP_MODE << std::endl;
- mHwApi.lraWaveShape << SQUARE_WAVE << std::endl;
- mHwApi.odClamp << mLongVoltageMax << std::endl;
- mHwApi.olLraPeriod << mLongLraPeriod << std::endl;
- }
-
- mHwApi.activate << 1 << std::endl;
- if (!mHwApi.activate) {
- ALOGE("Failed to activate (%d): %s", errno, strerror(errno));
- return Status::UNKNOWN_ERROR;
- }
-
- return Status::OK;
-}
-
-// Methods from ::android::hardware::vibrator::V1_2::IVibrator follow.
-Return<Status> Vibrator::on(uint32_t timeoutMs) {
- return on(timeoutMs, false /* isWaveform */);
-}
-
-Return<Status> Vibrator::off() {
- mHwApi.activate << 0 << std::endl;
- if (!mHwApi.activate) {
- ALOGE("Failed to turn vibrator off (%d): %s", errno, strerror(errno));
- return Status::UNKNOWN_ERROR;
- }
- return Status::OK;
-}
-
-Return<bool> Vibrator::supportsAmplitudeControl() {
- return (mHwApi.rtpInput ? true : false);
-}
-
-Return<Status> Vibrator::setAmplitude(uint8_t amplitude) {
- if (amplitude == 0) {
- return Status::BAD_VALUE;
- }
-
- int32_t rtp_input =
- std::round((amplitude - 1) / 254.0 * (MAX_RTP_INPUT - MIN_RTP_INPUT) + MIN_RTP_INPUT);
-
- mHwApi.rtpInput << rtp_input << std::endl;
- if (!mHwApi.rtpInput) {
- ALOGE("Failed to set amplitude (%d): %s", errno, strerror(errno));
- return Status::UNKNOWN_ERROR;
- }
-
- return Status::OK;
-}
-
-static uint8_t convertEffectStrength(EffectStrength strength) {
- uint8_t scale;
-
- switch (strength) {
- case EffectStrength::LIGHT:
- scale = 2; // 50%
- break;
- case EffectStrength::MEDIUM:
- case EffectStrength::STRONG:
- scale = 0; // 100%
- break;
- }
-
- return scale;
-}
-
-Return<void> Vibrator::perform(V1_0::Effect effect, EffectStrength strength, perform_cb _hidl_cb) {
- return performWrapper(effect, strength, _hidl_cb);
-}
-
-Return<void> Vibrator::perform_1_1(V1_1::Effect_1_1 effect, EffectStrength strength,
- perform_cb _hidl_cb) {
- return performWrapper(effect, strength, _hidl_cb);
-}
-
-Return<void> Vibrator::perform_1_2(Effect effect, EffectStrength strength, perform_cb _hidl_cb) {
- return performWrapper(effect, strength, _hidl_cb);
-}
-
-template <typename T>
-Return<void> Vibrator::performWrapper(T effect, EffectStrength strength, perform_cb _hidl_cb) {
- auto validEffectRange = hidl_enum_range<T>();
- if (effect < *validEffectRange.begin() || effect > *std::prev(validEffectRange.end())) {
- _hidl_cb(Status::UNSUPPORTED_OPERATION, 0);
- return Void();
- }
- auto validStrengthRange = hidl_enum_range<EffectStrength>();
- if (strength < *validStrengthRange.begin() || strength > *std::prev(validStrengthRange.end())) {
- _hidl_cb(Status::UNSUPPORTED_OPERATION, 0);
- return Void();
- }
- return performEffect(static_cast<Effect>(effect), strength, _hidl_cb);
-}
-
-Return<void> Vibrator::performEffect(Effect effect, EffectStrength strength, perform_cb _hidl_cb) {
- Status status = Status::OK;
- uint32_t timeMS;
-
- switch (effect) {
- case Effect::CLICK:
- mHwApi.sequencer << WAVEFORM_CLICK_EFFECT_SEQ << std::endl;
- timeMS = mClickDuration;
- break;
- case Effect::DOUBLE_CLICK:
- mHwApi.sequencer << WAVEFORM_DOUBLE_CLICK_EFFECT_SEQ << std::endl;
- timeMS = WAVEFORM_DOUBLE_CLICK_EFFECT_MS;
- break;
- case Effect::TICK:
- mHwApi.sequencer << WAVEFORM_TICK_EFFECT_SEQ << std::endl;
- timeMS = mTickDuration;
- break;
- case Effect::HEAVY_CLICK:
- mHwApi.sequencer << WAVEFORM_HEAVY_CLICK_EFFECT_SEQ << std::endl;
- timeMS = mHeavyClickDuration;
- break;
- default:
- _hidl_cb(Status::UNSUPPORTED_OPERATION, 0);
- return Void();
- }
- mHwApi.scale << convertEffectStrength(strength) << std::endl;
- on(timeMS, true /* isWaveform */);
- _hidl_cb(status, timeMS);
- return Void();
-}
-
-} // namespace implementation
-} // namespace V1_2
-} // namespace vibrator
-} // namespace hardware
-} // namespace android
diff --git a/vibrator/Vibrator.h b/vibrator/Vibrator.h
deleted file mode 100644
index 08635cf..0000000
--- a/vibrator/Vibrator.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef ANDROID_HARDWARE_VIBRATOR_V1_2_VIBRATOR_H
-#define ANDROID_HARDWARE_VIBRATOR_V1_2_VIBRATOR_H
-
-#include <android/hardware/vibrator/1.2/IVibrator.h>
-#include <hidl/Status.h>
-
-#include <fstream>
-
-namespace android {
-namespace hardware {
-namespace vibrator {
-namespace V1_2 {
-namespace implementation {
-
-class Vibrator : public IVibrator {
- public:
- typedef struct {
- std::ofstream activate;
- std::ofstream ctrlLoop;
- std::ofstream duration;
- std::ofstream lpTriggerEffect;
- std::ofstream lraWaveShape;
- std::ofstream mode;
- std::ofstream odClamp;
- std::ofstream olLraPeriod;
- std::ofstream rtpInput;
- std::ofstream scale;
- std::ofstream sequencer;
- std::ofstream state;
- } HwApi;
-
- public:
- Vibrator(HwApi &&hwapi, std::uint32_t short_lra_period, std::uint32_t long_lra_period);
-
- // Methods from ::android::hardware::vibrator::V1_0::IVibrator follow.
- using Status = ::android::hardware::vibrator::V1_0::Status;
- Return<Status> on(uint32_t timeoutMs) override;
- Return<Status> off() override;
- Return<bool> supportsAmplitudeControl() override;
- Return<Status> setAmplitude(uint8_t amplitude) override;
-
- using EffectStrength = ::android::hardware::vibrator::V1_0::EffectStrength;
- Return<void> perform(V1_0::Effect effect, EffectStrength strength,
- perform_cb _hidl_cb) override;
- Return<void> perform_1_1(V1_1::Effect_1_1 effect, EffectStrength strength,
- perform_cb _hidl_cb) override;
- Return<void> perform_1_2(Effect effect, EffectStrength strength, perform_cb _hidl_cb) override;
-
- private:
- Return<Status> on(uint32_t timeoutMs, bool isWaveform);
- template <typename T>
- Return<void> performWrapper(T effect, EffectStrength strength, perform_cb _hidl_cb);
- Return<void> performEffect(Effect effect, EffectStrength strength, perform_cb _hidl_cb);
- HwApi mHwApi;
- std::uint32_t mShortLraPeriod;
- std::uint32_t mLongLraPeriod;
- int32_t mClickDuration;
- int32_t mTickDuration;
- int32_t mHeavyClickDuration;
- int32_t mShortVoltageMax;
- int32_t mLongVoltageMax;
-};
-} // namespace implementation
-} // namespace V1_2
-} // namespace vibrator
-} // namespace hardware
-} // namespace android
-
-#endif // ANDROID_HARDWARE_VIBRATOR_V1_2_VIBRATOR_H
diff --git a/vibrator/android.hardware.vibrator@1.2-service.bonito.rc b/vibrator/android.hardware.vibrator@1.2-service.bonito.rc
deleted file mode 100644
index b47bee8..0000000
--- a/vibrator/android.hardware.vibrator@1.2-service.bonito.rc
+++ /dev/null
@@ -1,4 +0,0 @@
-service vendor.vibrator-1-2 /vendor/bin/hw/android.hardware.vibrator@1.2-service.bonito
- class hal
- user system
- group system
diff --git a/vibrator/service.cpp b/vibrator/service.cpp
deleted file mode 100644
index b090420..0000000
--- a/vibrator/service.cpp
+++ /dev/null
@@ -1,247 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#define LOG_TAG "android.hardware.vibrator@1.2-service.bonito"
-
-#include <android/hardware/vibrator/1.2/IVibrator.h>
-#include <cutils/properties.h>
-#include <hidl/HidlSupport.h>
-#include <hidl/HidlTransportSupport.h>
-#include <utils/Errors.h>
-#include <utils/StrongPointer.h>
-
-#include "Vibrator.h"
-
-using android::hardware::configureRpcThreadpool;
-using android::hardware::joinRpcThreadpool;
-using android::hardware::vibrator::V1_2::IVibrator;
-using android::hardware::vibrator::V1_2::implementation::Vibrator;
-using namespace android;
-
-// Refer to Documentation/ABI/testing/sysfs-class-led-driver-drv2624
-// kernel documentation on the detail usages for ABIs below
-static constexpr char ACTIVATE_PATH[] = "/sys/class/leds/vibrator/activate";
-static constexpr char DURATION_PATH[] = "/sys/class/leds/vibrator/duration";
-static constexpr char STATE_PATH[] = "/sys/class/leds/vibrator/state";
-static constexpr char RTP_INPUT_PATH[] = "/sys/class/leds/vibrator/device/rtp_input";
-static constexpr char MODE_PATH[] = "/sys/class/leds/vibrator/device/mode";
-static constexpr char SEQUENCER_PATH[] = "/sys/class/leds/vibrator/device/set_sequencer";
-static constexpr char SCALE_PATH[] = "/sys/class/leds/vibrator/device/scale";
-static constexpr char CTRL_LOOP_PATH[] = "/sys/class/leds/vibrator/device/ctrl_loop";
-static constexpr char LP_TRIGGER_PATH[] = "/sys/class/leds/vibrator/device/lp_trigger_effect";
-static constexpr char LRA_WAVE_SHAPE_PATH[] = "/sys/class/leds/vibrator/device/lra_wave_shape";
-static constexpr char OD_CLAMP_PATH[] = "/sys/class/leds/vibrator/device/od_clamp";
-
-// File path to the calibration file
-static constexpr char CALIBRATION_FILEPATH[] = "/persist/haptics/drv2624.cal";
-
-// Kernel ABIs for updating the calibration data
-static constexpr char AUTOCAL_CONFIG[] = "autocal";
-static constexpr char LRA_PERIOD_CONFIG[] = "lra_period";
-static constexpr char AUTOCAL_FILEPATH[] = "/sys/class/leds/vibrator/device/autocal";
-static constexpr char OL_LRA_PERIOD_FILEPATH[] = "/sys/class/leds/vibrator/device/ol_lra_period";
-
-// Set a default lra period in case there is no calibration file
-static constexpr uint32_t DEFAULT_LRA_PERIOD = 262;
-static constexpr uint32_t DEFAULT_FREQUENCY_SHIFT = 10;
-
-static std::uint32_t freqPeriodFormula(std::uint32_t in) {
- return 1000000000 / (24615 * in);
-}
-
-static std::string trim(const std::string &str, const std::string &whitespace = " \t") {
- const auto str_begin = str.find_first_not_of(whitespace);
- if (str_begin == std::string::npos) {
- return "";
- }
-
- const auto str_end = str.find_last_not_of(whitespace);
- const auto str_range = str_end - str_begin + 1;
-
- return str.substr(str_begin, str_range);
-}
-
-static bool loadCalibrationData(std::uint32_t &short_lra_period, std::uint32_t &long_lra_period) {
- std::map<std::string, std::string> config_data;
-
- std::ofstream autocal{AUTOCAL_FILEPATH};
- if (!autocal) {
- int error = errno;
- ALOGE("Failed to open %s (%d): %s", AUTOCAL_FILEPATH, error, strerror(error));
- return false;
- }
-
- std::ofstream ol_lra_period{OL_LRA_PERIOD_FILEPATH};
- if (!ol_lra_period) {
- int error = errno;
- ALOGE("Failed to open %s (%d): %s", OL_LRA_PERIOD_FILEPATH, error, strerror(error));
- return false;
- }
-
- std::ifstream cal_data{CALIBRATION_FILEPATH};
- if (!cal_data) {
- int error = errno;
- ALOGE("Failed to open %s (%d): %s", CALIBRATION_FILEPATH, error, strerror(error));
- return false;
- }
-
- std::string line;
-
- while (std::getline(cal_data, line)) {
- if (line.empty() || line[0] == '#') {
- continue;
- }
- std::istringstream is_line(line);
- std::string key;
- if (std::getline(is_line, key, ':')) {
- std::string value;
-
- if (std::getline(is_line, value)) {
- config_data[trim(key)] = trim(value);
- }
- }
- }
-
- if (config_data.find(AUTOCAL_CONFIG) != config_data.end()) {
- autocal << config_data[AUTOCAL_CONFIG] << std::endl;
- }
-
- if (config_data.find(LRA_PERIOD_CONFIG) != config_data.end()) {
- uint32_t thisFrequency;
- uint32_t thisPeriod;
- ol_lra_period << config_data[LRA_PERIOD_CONFIG] << std::endl;
- thisPeriod = std::stoul(config_data[LRA_PERIOD_CONFIG]);
- short_lra_period = thisPeriod;
- // 1. Change long lra period to frequency
- // 2. Get frequency': subtract the frequency shift from the frequency
- // 3. Get final long lra period after put the frequency' to formula
- thisFrequency =
- freqPeriodFormula(thisPeriod) -
- property_get_int32("ro.vibrator.hal.long.frequency.shift", DEFAULT_FREQUENCY_SHIFT);
- long_lra_period = freqPeriodFormula(thisFrequency);
- }
-
- return true;
-}
-
-status_t registerVibratorService() {
- // Calibration data: lra period 262(i.e. 155Hz)
- std::uint32_t short_lra_period(DEFAULT_LRA_PERIOD);
- std::uint32_t long_lra_period(DEFAULT_LRA_PERIOD);
- Vibrator::HwApi hwapi;
-
- // ostreams below are required
- hwapi.activate.open(ACTIVATE_PATH);
- if (!hwapi.activate) {
- int error = errno;
- ALOGE("Failed to open %s (%d): %s", ACTIVATE_PATH, error, strerror(error));
- return -error;
- }
-
- hwapi.duration.open(DURATION_PATH);
- if (!hwapi.duration) {
- int error = errno;
- ALOGE("Failed to open %s (%d): %s", DURATION_PATH, error, strerror(error));
- return -error;
- }
-
- hwapi.state.open(STATE_PATH);
- if (!hwapi.state) {
- int error = errno;
- ALOGE("Failed to open %s (%d): %s", STATE_PATH, error, strerror(error));
- return -error;
- }
-
- hwapi.state << 1 << std::endl;
- if (!hwapi.state) {
- int error = errno;
- ALOGE("Failed to set state (%d): %s", errno, strerror(errno));
- return -error;
- }
-
- // ostreams below are optional
- hwapi.rtpInput.open(RTP_INPUT_PATH);
- if (!hwapi.rtpInput) {
- int error = errno;
- ALOGW("Failed to open %s (%d): %s", RTP_INPUT_PATH, error, strerror(error));
- }
-
- hwapi.mode.open(MODE_PATH);
- if (!hwapi.mode) {
- int error = errno;
- ALOGW("Failed to open %s (%d): %s", MODE_PATH, error, strerror(error));
- }
-
- hwapi.sequencer.open(SEQUENCER_PATH);
- if (!hwapi.sequencer) {
- int error = errno;
- ALOGW("Failed to open %s (%d): %s", SEQUENCER_PATH, error, strerror(error));
- }
-
- hwapi.scale.open(SCALE_PATH);
- if (!hwapi.scale) {
- int error = errno;
- ALOGW("Failed to open %s (%d): %s", SCALE_PATH, error, strerror(error));
- }
-
- hwapi.ctrlLoop.open(CTRL_LOOP_PATH);
- if (!hwapi.ctrlLoop) {
- int error = errno;
- ALOGW("Failed to open %s (%d): %s", CTRL_LOOP_PATH, error, strerror(error));
- }
-
- hwapi.lpTriggerEffect.open(LP_TRIGGER_PATH);
- if (!hwapi.lpTriggerEffect) {
- int error = errno;
- ALOGW("Failed to open %s (%d): %s", LP_TRIGGER_PATH, error, strerror(error));
- }
-
- hwapi.lraWaveShape.open(LRA_WAVE_SHAPE_PATH);
- if (!hwapi.lraWaveShape) {
- int error = errno;
- ALOGW("Failed to open %s (%d): %s", LRA_WAVE_SHAPE_PATH, error, strerror(error));
- }
-
- hwapi.odClamp.open(OD_CLAMP_PATH);
- if (!hwapi.odClamp) {
- int error = errno;
- ALOGW("Failed to open %s (%d): %s", OD_CLAMP_PATH, error, strerror(error));
- }
-
- hwapi.olLraPeriod.open(OL_LRA_PERIOD_FILEPATH);
- if (!hwapi.olLraPeriod) {
- int error = errno;
- ALOGW("Failed to open %s (%d): %s", OL_LRA_PERIOD_FILEPATH, error, strerror(error));
- }
-
- if (!loadCalibrationData(short_lra_period, long_lra_period)) {
- ALOGW("Failed load calibration data");
- }
-
- sp<IVibrator> vibrator = new Vibrator(std::move(hwapi), short_lra_period, long_lra_period);
-
- return vibrator->registerAsService();
-}
-
-int main() {
- configureRpcThreadpool(1, true);
- status_t status = registerVibratorService();
-
- if (status != OK) {
- return status;
- }
-
- joinRpcThreadpool();
-}
diff --git a/vr/Android.bp b/vr/Android.bp
deleted file mode 100644
index 952338e..0000000
--- a/vr/Android.bp
+++ /dev/null
@@ -1,30 +0,0 @@
-//
-// Copyright (C) 2017 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-cc_binary {
- name: "android.hardware.vr@1.0-service.bonito",
- relative_install_path: "hw",
- init_rc: ["android.hardware.vr@1.0-service.bonito.rc"],
- srcs: ["service.cpp", "VrDevice.cpp"],
- cflags: ["-Werror", "-Wall"],
- shared_libs: [
- "libbase",
- "libhidlbase",
- "libhidltransport",
- "liblog",
- "libutils",
- "android.hardware.vr@1.0",
- ],
- proprietary: true,
-}
diff --git a/vr/NOTICE b/vr/NOTICE
deleted file mode 100644
index 667db97..0000000
--- a/vr/NOTICE
+++ /dev/null
@@ -1,10 +0,0 @@
-Copyright (C) 2017 The Android Open Source Project
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-
-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.
diff --git a/vr/VrDevice.cpp b/vr/VrDevice.cpp
deleted file mode 100644
index dc8f3d7..0000000
--- a/vr/VrDevice.cpp
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#define LOG_TAG "VrDevice"
-
-#include <android-base/file.h>
-#include <android-base/logging.h>
-#include <android-base/properties.h>
-#include <android-base/stringprintf.h>
-
-#include "VrDevice.h"
-
-namespace android {
-namespace hardware {
-namespace vr {
-namespace V1_0 {
-namespace implementation {
-
-VrDevice::VrDevice() : mVRmode(false) {}
-
-Return<void> VrDevice::init() {
- // NOOP
- return Void();
-}
-
-Return<void> VrDevice::setVrMode(bool enabled) {
- std::string hwProp = android::base::GetProperty("ro.hardware", "default");
- std::string vrMode = enabled ? "-vr" : "";
- std::string thermalConf = "/vendor/etc/thermal-engine-" + hwProp + vrMode + ".conf";
- mVRmode = enabled;
-
- if (!android::base::SetProperty("vendor.sys.qcom.thermalcfg", thermalConf)) {
- LOG(ERROR) << "Couldn't set vendor.sys.qcom.thermalcfg to " << thermalConf;
- return Void();
- }
- if (!android::base::SetProperty("ctl.restart", "vendor.thermal-engine")) {
- LOG(ERROR) << "Couldn't set thermal_engine restart property";
- }
- return Void();
-}
-
-Return<void> VrDevice::debug(const hidl_handle& handle, const hidl_vec<hidl_string>&) {
- if (handle != nullptr && handle->numFds >= 1) {
- int fd = handle->data[0];
- std::string buf(android::base::StringPrintf("VRMode: %s\n",
- (mVRmode ? "true" : "false")));
- if (!android::base::WriteStringToFd(buf, fd)) {
- PLOG(ERROR) << "Failed to dump state to fd";
- }
- fsync(fd);
- }
- return Void();
-}
-
-} // namespace implementation
-} // namespace V1_0
-} // namespace vr
-} // namespace hardware
-} // namespace android
diff --git a/vr/VrDevice.h b/vr/VrDevice.h
deleted file mode 100644
index f5f1210..0000000
--- a/vr/VrDevice.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef ANDROID_HARDWARE_VR_V1_0_VR_H
-#define ANDROID_HARDWARE_VR_V1_0_VR_H
-
-#include <android/hardware/vr/1.0/IVr.h>
-
-namespace android {
-namespace hardware {
-namespace vr {
-namespace V1_0 {
-namespace implementation {
-
-using ::android::hardware::vr::V1_0::IVr;
-using ::android::hardware::Return;
-
-class VrDevice : public IVr {
- public:
- VrDevice();
-
- Return<void> init() override;
- Return<void> setVrMode(bool enabled) override;
- Return<void> debug(const hidl_handle& handle, const hidl_vec<hidl_string>&) override;
-
- private:
- bool mVRmode;
-};
-
-} // namespace implementation
-} // namespace V1_0
-} // namespace vr
-} // namespace hardware
-} // namespace android
-
-#endif // ANDROID_HARDWARE_VR_V1_0_VR_H
diff --git a/vr/android.hardware.vr@1.0-service.bonito.rc b/vr/android.hardware.vr@1.0-service.bonito.rc
deleted file mode 100644
index c546021..0000000
--- a/vr/android.hardware.vr@1.0-service.bonito.rc
+++ /dev/null
@@ -1,9 +0,0 @@
-service vendor.vr-bonito-1-0 /vendor/bin/hw/android.hardware.vr@1.0-service.bonito
- class hal
- user system
- group system
-
-# reset thermal-engine when framework died and thermal-engine is in VR mode
-on property:init.svc.zygote=restarting && property:vendor.sys.qcom.thermalcfg=/vendor/etc/thermal-engine-${ro.hardware}-vr.conf
- setprop vendor.sys.qcom.thermalcfg /vendor/etc/thermal-engine-${ro.hardware}.conf
- restart vendor.thermal-engine
diff --git a/vr/service.cpp b/vr/service.cpp
deleted file mode 100644
index 1ff9cdf..0000000
--- a/vr/service.cpp
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#define LOG_TAG "android.hardware.vr@1.0-service.bonito"
-
-#include <android-base/logging.h>
-#include <hidl/HidlSupport.h>
-#include <hidl/HidlTransportSupport.h>
-#include <utils/StrongPointer.h>
-
-#include "VrDevice.h"
-
-using ::android::hardware::configureRpcThreadpool;
-using ::android::hardware::joinRpcThreadpool;
-using ::android::hardware::vr::V1_0::implementation::VrDevice;
-using ::android::hardware::vr::V1_0::IVr;
-using ::android::sp;
-
-int main(int /* argc */, char* /* argv */ []) {
- sp<IVr> vr = new VrDevice;
- configureRpcThreadpool(1, true);
- CHECK_EQ(vr->registerAsService(), android::NO_ERROR)
- << "Failed to register vr HAL";
- joinRpcThreadpool();
- return 0;
-}
diff --git a/wpa_supplicant_overlay.conf b/wpa_supplicant_overlay.conf
index 3ac13d1..e63a4bb 100644
--- a/wpa_supplicant_overlay.conf
+++ b/wpa_supplicant_overlay.conf
@@ -4,3 +4,4 @@
wowlan_triggers=magic_pkt
bss_max_count=512
bss_no_flush_when_down=1
+driver_param=use_p2p_group_interface=1