[automerger skipped] Change TARGET_RECOVERY_UI_LIB to use fully qualified names in gs101 am: 1736bb0cd3 am: 15b18e1536 -s ours
am skip reason: Merged-In If65f320a32840a42f5b99ae22f7396cc048593ec with SHA-1 c3aac00c01 is already in history
Original change: https://android-review.googlesource.com/c/device/google/gs101/+/3393999
Change-Id: I7990348b5e58fc3ab3c23ba29f25b1f06cd70a3c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/BoardConfig-common.mk b/BoardConfig-common.mk
index 38d9943..febe480 100644
--- a/BoardConfig-common.mk
+++ b/BoardConfig-common.mk
@@ -22,6 +22,7 @@
TARGET_SOC_NAME := google
USES_DEVICE_GOOGLE_GS101 := true
+$(call soong_config_set,CitadelProvision,target_soc,gs101)
TARGET_ARCH := arm64
TARGET_ARCH_VARIANT := armv8-2a
@@ -44,6 +45,7 @@
BOARD_KERNEL_CMDLINE += cma_sysfs.experimental=Y
BOARD_KERNEL_CMDLINE += rcupdate.rcu_expedited=1 rcu_nocbs=all rcutree.enable_rcu_lazy
BOARD_KERNEL_CMDLINE += swiotlb=noforce
+BOARD_KERNEL_CMDLINE += cgroup.memory=nokmem
BOARD_BOOTCONFIG += androidboot.boot_devices=14700000.ufs
TARGET_NO_BOOTLOADER := true
@@ -168,7 +170,16 @@
BOARD_USE_BLOB_ALLOCATOR := false
BOARD_SUPPORT_MFC_ENC_BT2020 := true
BOARD_SUPPORT_FLEXIBLE_P010 := true
-
+$(call soong_config_set,video_codec,target_soc_name,$(TARGET_SOC_NAME))
+$(call soong_config_set_bool,video_codec,board_use_codec2_hidl_1_2,$(BOARD_USE_CODEC2_HIDL_1_2))
+$(call soong_config_set_bool,video_codec,board_use_csc_filter,$(BOARD_USE_CSC_FILTER))
+$(call soong_config_set_bool,video_codec,board_use_dec_sw_csc,$(BOARD_USE_DEC_SW_CSC))
+$(call soong_config_set_bool,video_codec,board_use_enc_sw_csc,$(BOARD_USE_ENC_SW_CSC))
+$(call soong_config_set_bool,video_codec,board_support_mfc_enc_rgb,$(BOARD_SUPPORT_MFC_ENC_RGB))
+$(call soong_config_set_bool,video_codec,board_use_blob_allocator,$(BOARD_USE_BLOB_ALLOCATOR))
+$(call soong_config_set_bool,video_codec,board_support_mfc_enc_bt2020,$(BOARD_SUPPORT_MFC_ENC_BT2020))
+$(call soong_config_set_bool,video_codec,board_support_flexible_p010,$(BOARD_SUPPORT_FLEXIBLE_P010))
+$(call soong_config_set_bool,video_codec,board_use_codec2_aidl,$(if $(BOARD_USE_CODEC2_AIDL),true,false))
########################
BOARD_SUPER_PARTITION_SIZE := 8531214336
diff --git a/conf/init.gs101.rc b/conf/init.gs101.rc
index 0edace5..2aa9867 100644
--- a/conf/init.gs101.rc
+++ b/conf/init.gs101.rc
@@ -93,7 +93,7 @@
chmod 0220 /proc/vendor_sched/groups/ota/set_proc_group
chmod 0220 /proc/vendor_sched/prefer_idle_set
chmod 0220 /proc/vendor_sched/prefer_idle_clear
- chmod 0220 /proc/vendor_sched/pmu_poll_enable
+ chmod 0660 /proc/vendor_sched/pmu_poll_enable
chmod 0220 /proc/vendor_sched/pmu_poll_time
chmod 0220 /proc/vendor_sched/uclamp_fork_reset_clear
chmod 0220 /proc/vendor_sched/uclamp_fork_reset_set
@@ -149,14 +149,11 @@
# governor setting
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor sched_pixel
write /sys/devices/system/cpu/cpu0/cpufreq/sched_pixel/up_rate_limit_us 500
- write /sys/devices/system/cpu/cpu0/cpufreq/sched_pixel/down_rate_limit_us 5000
write /sys/devices/system/cpu/cpu0/cpufreq/sched_pixel/down_rate_limit_scale_pow 2
write /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor sched_pixel
write /sys/devices/system/cpu/cpu4/cpufreq/sched_pixel/up_rate_limit_us 500
- write /sys/devices/system/cpu/cpu4/cpufreq/sched_pixel/down_rate_limit_us 20000
write /sys/devices/system/cpu/cpu6/cpufreq/scaling_governor sched_pixel
write /sys/devices/system/cpu/cpu6/cpufreq/sched_pixel/up_rate_limit_us 500
- write /sys/devices/system/cpu/cpu6/cpufreq/sched_pixel/down_rate_limit_us 20000
# memlat cpuidle awareness setting
write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu0_memlat@17000010/memlat_cpuidle_state_aware 2
@@ -362,6 +359,11 @@
# Mount RW partitions which need run fsck
mount_all --late
+on late-init
+ write /sys/devices/system/cpu/cpu0/cpufreq/sched_pixel/down_rate_limit_us 5000
+ write /sys/devices/system/cpu/cpu4/cpufreq/sched_pixel/down_rate_limit_us 20000
+ write /sys/devices/system/cpu/cpu6/cpufreq/sched_pixel/down_rate_limit_us 20000
+
on post-fs-data
# Log data folder
mkdir /data/vendor 0771 radio system
@@ -417,8 +419,8 @@
restorecon /sys/kernel/debug/tracing/trace_marker
# ranging sensor
- chown system system /dev/stmvl53l1_ranging
- chmod 0660 /dev/stmvl53l1_ranging
+ chown system system /dev/ispolin_ranging
+ chmod 0660 /dev/ispolin_ranging
# Factory calibration files
chmod 0771 /mnt/vendor/persist/camera
diff --git a/default-permissions.xml b/default-permissions.xml
index 4a3e1c6..6177052 100644
--- a/default-permissions.xml
+++ b/default-permissions.xml
@@ -173,7 +173,7 @@
</exception>
<exception package="com.google.android.apps.pixel.relationships">
- <!-- Contacts -->
+ <permission name="android.permission.CALL_PHONE" fixed="false"/>
<permission name="android.permission.READ_CALL_LOG" fixed="false"/>
<permission name="android.permission.READ_CONTACTS" fixed="false"/>
<permission name="android.permission.WRITE_CONTACTS" fixed="false"/>
diff --git a/device.mk b/device.mk
index b0cd066..38c443d 100644
--- a/device.mk
+++ b/device.mk
@@ -210,9 +210,8 @@
TARGET_USES_VULKAN = true
PRODUCT_SOONG_NAMESPACES += \
- vendor/arm/mali/valhall
+ vendor/arm/mali/gs101
-$(call soong_config_set,pixel_mali,soc,$(TARGET_BOARD_PLATFORM))
# Used in gfx_tools when defining tests with composer2 interface for gs101 devices
$(call soong_config_set,gfx_tools,use_hwc2,true)
@@ -361,6 +360,10 @@
include device/google/gs-common/insmod/insmod.mk
+# Insmod config files
+PRODUCT_COPY_FILES += \
+ $(call find-copy-subdir-files,init.insmod.*.cfg,$(TARGET_KERNEL_DIR),$(TARGET_COPY_OUT_VENDOR_DLKM)/etc)
+
# For creating dtbo image
PRODUCT_HOST_PACKAGES += \
mkdtimg
@@ -956,9 +959,6 @@
device/google/gs101/default-permissions.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/default-permissions/default-permissions.xml \
device/google/gs101/component-overrides.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sysconfig/component-overrides.xml
-# modem_svc_sit daemon
-PRODUCT_PACKAGES += modem_svc_sit
-
# modem logging binary/configs
PRODUCT_PACKAGES += modem_logging_control
@@ -1066,7 +1066,7 @@
vendor/google_devices/gs101/proprietary/gchips/tpu/nnapi_stable_aidl \
vendor/google_devices/gs101/proprietary/gchips/tpu/aidl \
vendor/google_devices/gs101/proprietary/gchips/tpu/hal \
- vendor/google_devices/gs101/proprietary/gchips/tpu/tachyon/api \
+ vendor/google_devices/gs101/proprietary/gchips/tpu/tachyon/tachyon_apis \
vendor/google_devices/gs101/proprietary/gchips/tpu/tachyon/service
# TPU firmware
PRODUCT_PACKAGES += edgetpu-abrolhos.fw
@@ -1136,12 +1136,19 @@
DEVICE_PRODUCT_COMPATIBILITY_MATRIX_FILE += device/google/gs101/device_framework_matrix_product.xml
# Preopt SystemUI
+ifneq ($(RELEASE_SYSTEMUI_USE_SPEED_PROFILE), true)
PRODUCT_DEXPREOPT_SPEED_APPS += SystemUIGoogle # For internal
-PRODUCT_DEXPREOPT_SPEED_APPS += SystemUI # For AOSP
+PRODUCT_DEXPREOPT_SPEED_APPS += SystemUI # For AOSP
+endif
-# Compile SystemUI on device with `speed`.
+# Set on-device compilation mode for SystemUI.
+ifeq ($(RELEASE_SYSTEMUI_USE_SPEED_PROFILE), true)
+PRODUCT_PROPERTY_OVERRIDES += \
+ dalvik.vm.systemuicompilerfilter=speed-profile
+else
PRODUCT_PROPERTY_OVERRIDES += \
dalvik.vm.systemuicompilerfilter=speed
+endif
# Keymaster configuration
PRODUCT_COPY_FILES += \
diff --git a/device_framework_matrix_product.xml b/device_framework_matrix_product.xml
index 4536712..f1e620c 100644
--- a/device_framework_matrix_product.xml
+++ b/device_framework_matrix_product.xml
@@ -118,7 +118,7 @@
</hal>
<hal format="aidl" optional="true">
<name>vendor.google.wifi_ext</name>
- <version>2-3</version>
+ <version>2-4</version>
<interface>
<name>IWifiExt</name>
<instance>default</instance>
diff --git a/dumpstate/dump_power.cpp b/dumpstate/dump_power.cpp
index ba96a0c..e8e4a38 100644
--- a/dumpstate/dump_power.cpp
+++ b/dumpstate/dump_power.cpp
@@ -44,9 +44,19 @@
return 0;
}
bool isValidFile(const char *file) {
- if (!access(file, R_OK)) {
- return false;
+ FILE *fp = fopen(file, "r");
+ if (fp != NULL) {
+ fclose(fp);
+ return true;
}
+ return false;
+}
+bool isValidDir(const char *directory) {
+ DIR *dir = opendir(directory);
+ if (dir == NULL)
+ return false;
+
+ closedir(dir);
return true;
}
bool isUserBuild() {
@@ -123,8 +133,8 @@
{"Power supply property gcpm", "/sys/class/power_supply/gcpm/uevent"},
{"Power supply property gcpm_pps", "/sys/class/power_supply/gcpm_pps/uevent"},
{"Power supply property main-charger", "/sys/class/power_supply/main-charger/uevent"},
- {"Power supply property dc-mains", "/sys/class/power_supply/dc-mains/uevent"},
- {"Power supply property tcpm", "/sys/class/power_supply/tcpm-source-psy-8-0025/uevent"},
+ {"Power supply property pca9468-mains", "/sys/class/power_supply/pca9468-mains/uevent"},
+ {"Power supply property tcpm", "/sys/class/power_supply/tcpm-source-psy-i2c-max77759tcpc/uevent"},
{"Power supply property usb", "/sys/class/power_supply/usb/uevent"},
{"Power supply property wireless", "/sys/class/power_supply/wireless/uevent"},
};
@@ -137,32 +147,15 @@
const char *maxfg [][2] = {
{"Power supply property maxfg", "/sys/class/power_supply/maxfg/uevent"},
{"m5_state", "/sys/class/power_supply/maxfg/m5_model_state"},
- {"maxfg", "/dev/logbuffer_maxfg"},
- {"maxfg", "/dev/logbuffer_maxfg_monitor"},
+ {"maxfg registers", "/sys/class/power_supply/maxfg/registers_dump"},
+ {"maxfg logbuffer", "/dev/logbuffer_maxfg"},
+ {"maxfg_monitor logbuffer", "/dev/logbuffer_maxfg_monitor"},
};
- const char *maxfgFlip [][2] = {
- {"Power supply property maxfg_base", "/sys/class/power_supply/maxfg_base/uevent"},
- {"Power supply property maxfg_flip", "/sys/class/power_supply/maxfg_flip/uevent"},
- {"m5_state", "/sys/class/power_supply/maxfg_base/m5_model_state"},
- {"maxfg_base", "/dev/logbuffer_maxfg_base"},
- {"maxfg_flip", "/dev/logbuffer_maxfg_flip"},
- {"maxfg_base", "/dev/logbuffer_maxfg_base_monitor"},
- {"maxfg_flip", "/dev/logbuffer_maxfg_flip_monitor"},
- };
- const char *maxfgHistoryName = "Maxim FG History";
- const char *maxfgHistoryDir = "/dev/maxfg_history";
std::string content;
- if (isValidFile(maxfgLoc)) {
+ if (isValidDir(maxfgLoc)) {
for (const auto &row : maxfg) {
dumpFileContent(row[0], row[1]);
}
- } else {
- for (const auto &row : maxfgFlip) {
- dumpFileContent(row[0], row[1]);
- }
- }
- if (isValidFile(maxfgHistoryDir)) {
- dumpFileContent(maxfgHistoryName, maxfgHistoryDir);
}
}
void dumpPowerSupplyDock() {
@@ -224,26 +217,17 @@
void dumpPdEngine() {
const char* pdEngine [][2] {
{"PD Engine", "/dev/logbuffer_usbpd"},
- {"PPS-google_cpm", "/dev/logbuffer_cpm"},
- {"PPS-dc", "/dev/logbuffer_pca9468"},
+ {"PPS-google_cpm logbuffer", "/dev/logbuffer_cpm"},
+ {"PPS-pca9468 logbuffer", "/dev/logbuffer_pca9468"},
};
for (const auto &row : pdEngine) {
dumpFileContent(row[0], row[1]);
}
}
-void dumpWc68() {
- const char* wc68Title = "WC68";
- const char* wc68File = "/dev/logbuffer_wc68";
- dumpFileContent(wc68Title, wc68File);
-}
-void dumpLn8411() {
- const char* ln8411Title = "LN8411";
- const char* ln8411File = "/dev/logbuffer_ln8411";
- dumpFileContent(ln8411Title, ln8411File);
-}
void dumpBatteryHealth() {
const char* batteryHealth [][2] {
{"Battery Health", "/sys/class/power_supply/battery/health_index_stats"},
+ {"Battery Health SoC Residency", "/sys/class/power_supply/battery/swelling_data"},
{"BMS", "/dev/logbuffer_ssoc"},
{"TTF", "/dev/logbuffer_ttf"},
{"TTF details", "/sys/class/power_supply/battery/ttf_details"},
@@ -282,7 +266,7 @@
sort(files.begin(), files.end());
for (auto &file : files) {
fileLocation = std::string(config[1]) + std::string(file);
- if (!android::base::ReadFileToString(fileLocation, &content)) {
+ if (!android::base::ReadFileToString(fileLocation, &content) || content.empty()) {
content = "\n";
}
printf("%s: %s", file.c_str(), content.c_str());
@@ -292,15 +276,102 @@
files.clear();
}
}
+void printValuesOfDirectory(const char *directory, std::string debugfs, const char *strMatch) {
+ std::vector<std::string> files;
+ auto info = directory;
+ std::string content;
+ struct dirent *entry;
+ DIR *dir = opendir(debugfs.c_str());
+ if (dir == NULL)
+ return;
+
+ printTitle((debugfs + std::string(strMatch) + "/" + std::string(info)).c_str());
+ while ((entry = readdir(dir)) != NULL)
+ if (std::string(entry->d_name).find(strMatch) != std::string::npos)
+ files.push_back(entry->d_name);
+ closedir(dir);
+
+ sort(files.begin(), files.end());
+
+ for (auto &file : files) {
+ std::string fileDirectory = debugfs + file;
+ std::string fileLocation = fileDirectory + "/" + std::string(info);
+ if (!android::base::ReadFileToString(fileLocation, &content)) {
+ content = "\n";
+ }
+
+ printf("%s:\n%s", fileDirectory.c_str(), content.c_str());
+
+ if (content.back() != '\n')
+ printf("\n");
+ }
+ files.clear();
+}
+void dumpChg() {
+ const std::string pmic_bus = "/sys/devices/platform/10d50000.hsi2c/i2c-12/12-0066";
+ const char* chg_reg_dump_file = "/sys/class/power_supply/main-charger/device/registers_dump";
+ const std::string chg_name_cmd = "/sys/class/power_supply/main-charger/device/name";
+ const std::string pmic_name_cmd = pmic_bus + "/name";
+ const std::string pmic_reg_dump_file = pmic_bus + "/registers_dump";
+ const std::string reg_dump_str = " registers dump";
+ const char* chgConfig [][2] {
+ {"DC_registers dump", "/sys/class/power_supply/pca9468-mains/device/registers_dump"},
+ };
+ std::string chg_name;
+ std::string pmic_name;
+
+ printf("\n");
+
+ int ret = android::base::ReadFileToString(chg_name_cmd, &chg_name);
+ if (ret && !chg_name.empty()) {
+ chg_name.erase(chg_name.length() - 1); // remove new line
+ const std::string chg_reg_dump_title = chg_name + reg_dump_str;
+
+ /* CHG reg dump */
+ dumpFileContent(chg_reg_dump_title.c_str(), chg_reg_dump_file);
+ }
+
+ ret = android::base::ReadFileToString(pmic_name_cmd, &pmic_name);
+ if (ret && !pmic_name.empty()) {
+ pmic_name.erase(pmic_name.length() - 1); // remove new line
+ const std::string pmic_reg_dump_title = pmic_name + reg_dump_str;
+
+ /* PMIC reg dump */
+ dumpFileContent(pmic_reg_dump_title.c_str(), pmic_reg_dump_file.c_str());
+ }
+
+ for (auto &config : chgConfig) {
+ dumpFileContent(config[0], config[1]);
+ }
+}
+void dumpChgUserDebug() {
+ const std::string debugfs = "/d/";
+ const char *maxFgDir = "/d/maxfg";
+ const char *maxFgStrMatch = "maxfg";
+ const char *chgTblName = "Charging table dump";
+ const char *chgTblDir = "/d/google_battery/chg_raw_profile";
+
+ const char *maxFgInfo [] {
+ "fg_model",
+ "algo_ver",
+ "model_ok",
+ };
+
+ if (isUserBuild())
+ return;
+
+ dumpFileContent(chgTblName, chgTblDir);
+
+ if (isValidDir(maxFgDir)) {
+ for (auto & directory : maxFgInfo) {
+ printValuesOfDirectory(directory, debugfs, maxFgStrMatch);
+ }
+ }
+}
void dumpBatteryEeprom() {
const char *title = "Battery EEPROM";
const char *files[] {
- "/sys/devices/platform/10970000.hsi2c/i2c-4/4-0050/eeprom",
- "/sys/devices/platform/10970000.hsi2c/i2c-5/5-0050/eeprom",
- "/sys/devices/platform/10da0000.hsi2c/i2c-6/6-0050/eeprom",
- "/sys/devices/platform/10da0000.hsi2c/i2c-7/7-0050/eeprom",
- "/sys/devices/platform/10c90000.hsi2c/i2c-7/7-0050/eeprom",
- "/sys/devices/platform/10c90000.hsi2c/i2c-6/6-0050/eeprom",
+ "/sys/devices/platform/10970000.hsi2c/i2c-8/8-0050/eeprom",
};
std::string result;
std::string xxdCmd;
@@ -326,7 +397,7 @@
std::string content;
struct dirent *entry;
dumpFileContent(chgStatsTitle, chgStatsLocation);
- if (!isUserBuild())
+ if (isUserBuild())
return;
for (auto &stat : chargerStats) {
DIR *dir = opendir(stat[1]);
@@ -371,7 +442,7 @@
std::string content;
std::vector<std::string> files;
int ret;
- if (!isUserBuild())
+ if (isUserBuild())
return;
ret = getFilesInDir(directory, &files);
if (ret < 0)
@@ -659,10 +730,10 @@
dumpLogBufferTcpm();
dumpTcpc();
dumpPdEngine();
- dumpWc68();
- dumpLn8411();
dumpBatteryHealth();
dumpBatteryDefend();
+ dumpChg();
+ dumpChgUserDebug();
dumpBatteryEeprom();
dumpChargerStats();
dumpWlcLogs();
diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml
index 964ebf6..6d4d023 100644
--- a/overlay/frameworks/base/core/res/res/values/config.xml
+++ b/overlay/frameworks/base/core/res/res/values/config.xml
@@ -272,6 +272,9 @@
<!-- Enable Zram writeback feature to allow unused pages in zram be written to flash. -->
<bool name="config_zramWriteback">true</bool>
+ <!-- the number of the max cached processes in the system. -->
+ <integer name="config_customizedMaxCachedProcesses">1024</integer>
+
<!-- List of system components which are allowed to receive ServiceState entries in an
un-sanitized form, even if the location toggle is off. This is intended ONLY for system
components, such as the telephony stack, which require access to the full ServiceState for
diff --git a/overlay/frameworks/base/packages/SettingsLib/res/values-mcc310-mnc004/strings.xml b/overlay/frameworks/base/packages/SettingsLib/res/values-mcc310-mnc004/strings.xml
deleted file mode 100644
index f8ed0c0..0000000
--- a/overlay/frameworks/base/packages/SettingsLib/res/values-mcc310-mnc004/strings.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/**
- * Copyright (c) 2020, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
--->
-<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- Content description of the data connection type 5G UW. [CHAR LIMIT=NONE] -->
- <string name="data_connection_5g_plus" translatable="false">5G UW</string>
-</resources>
diff --git a/overlay/frameworks/base/packages/SettingsLib/res/values-mcc311-mnc480/strings.xml b/overlay/frameworks/base/packages/SettingsLib/res/values-mcc311-mnc480/strings.xml
deleted file mode 100644
index f8ed0c0..0000000
--- a/overlay/frameworks/base/packages/SettingsLib/res/values-mcc311-mnc480/strings.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/**
- * Copyright (c) 2020, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
--->
-<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- Content description of the data connection type 5G UW. [CHAR LIMIT=NONE] -->
- <string name="data_connection_5g_plus" translatable="false">5G UW</string>
-</resources>
diff --git a/rro_overlays/WifiOverlay/res/values/config.xml b/rro_overlays/WifiOverlay/res/values/config.xml
index bba7b86..5479231 100644
--- a/rro_overlays/WifiOverlay/res/values/config.xml
+++ b/rro_overlays/WifiOverlay/res/values/config.xml
@@ -173,4 +173,6 @@
false: firmware roaming will not be affected. -->
<bool translatable="false" name ="config_wifiDisableFirmwareRoamingInIdleMode">true</bool>
+ <!-- Boolean indicating whether to trigger bugreport for WiFi subsystem restart issue -->
+ <bool translatable="false" name ="config_wifi_subsystem_restart_bugreport_enabled">false</bool>
</resources>
diff --git a/task_profiles.json b/task_profiles.json
index 81e5e41..47cada8 100644
--- a/task_profiles.json
+++ b/task_profiles.json
@@ -16,6 +16,21 @@
]
},
{
+ "Name": "PreferIdle",
+ "Actions": [
+ {
+ "Name": "WriteFile",
+ "Params":
+ {
+ "FilePath": "/proc/vendor_sched/prefer_idle_set",
+ "ProcFilePath": "/proc/vendor_sched/prefer_idle_set",
+ "Value": "<pid>",
+ "LogFailures": "false"
+ }
+ }
+ ]
+ },
+ {
"Name": "CameraServicePerformance",
"Actions": [
{
@@ -291,7 +306,7 @@
},
{
"Name": "InputPolicy",
- "Profiles": [ "ResetUclampGrp" ]
+ "Profiles": [ "MaxPerformance", "ResetUclampGrp", "PreferIdle" ]
}
]
}
diff --git a/usb/usb/Usb.cpp b/usb/usb/Usb.cpp
index 0736f4c..ab7932b 100644
--- a/usb/usb/Usb.cpp
+++ b/usb/usb/Usb.cpp
@@ -943,17 +943,21 @@
Status status;
pthread_mutex_lock(&usb->mLock);
status = getPortStatusHelper(usb, currentPortStatus);
- queryMoistureDetectionStatus(usb, currentPortStatus);
- queryPowerTransferStatus(usb, currentPortStatus);
- queryNonCompliantChargerStatus(currentPortStatus);
- queryUsbDataSession(usb, currentPortStatus);
- if (usb->mCallback != NULL) {
- ScopedAStatus ret = usb->mCallback->notifyPortStatusChange(*currentPortStatus,
- status);
- if (!ret.isOk())
- ALOGE("queryPortStatus error %s", ret.getDescription().c_str());
+ if (status == Status::SUCCESS && currentPortStatus->size() > 0) {
+ queryMoistureDetectionStatus(usb, currentPortStatus);
+ queryPowerTransferStatus(usb, currentPortStatus);
+ queryNonCompliantChargerStatus(currentPortStatus);
+ queryUsbDataSession(usb, currentPortStatus);
+ if (usb->mCallback != NULL) {
+ ScopedAStatus ret = usb->mCallback->notifyPortStatusChange(*currentPortStatus,
+ status);
+ if (!ret.isOk())
+ ALOGE("queryPortStatus error %s", ret.getDescription().c_str());
+ } else {
+ ALOGI("Notifying userspace skipped. Callback is NULL");
+ }
} else {
- ALOGI("Notifying userspace skipped. Callback is NULL");
+ ALOGI("%s skipped. currentPortStatus is empty", __func__);
}
pthread_mutex_unlock(&usb->mLock);
}