From 66d98f41ed1c8aa16067fd74d2e390479ec3afa1 Mon Sep 17 00:00:00 2001 From: TeYuan Wang Date: Wed, 5 Jul 2023 15:03:43 -0700 Subject: [PATCH 1/3] thermal: Provide smooth transient when switch VSKIN OPEN/CLOSE equation If the since_last_update time < 14s, apply the 20% stepRatio when VSKIN switch between open/close to prevent the sudden VSKIN thermal change Bug: 260531200 Test: on/off innser dispaly and check thermal log Change-Id: I00bd748b203dd8a2edae278503d8ddf1a914d3aa --- thermal_info_config_charge_felix.json | 42 ++++-------- thermal_info_config_felix.json | 42 ++++-------- thermal_info_config_proactive_skin_felix.json | 64 ++++++++++--------- 3 files changed, 60 insertions(+), 88 deletions(-) diff --git a/thermal_info_config_charge_felix.json b/thermal_info_config_charge_felix.json index ceb9181..fe7ce1e 100644 --- a/thermal_info_config_charge_felix.json +++ b/thermal_info_config_charge_felix.json @@ -60,23 +60,26 @@ "Multiplier":1 }, { - "Name":"IS_OPEN", + "Name":"OPEN_WEIGHT", "Type":"UNKNOWN", "Hidden":true, "VirtualSensor":true, "Formula":"COUNT_THRESHOLD", + "StepRatio":0.2, "Combination":["inner-disp"], "Coefficient":[1.0], - "Multiplier":1 + "Multiplier":1, + "PassiveDelay":7000 }, { - "Name":"IS_CLOSE", + "Name":"CLOSE_WEIGHT", "Type":"UNKNOWN", "Hidden":true, "VirtualSensor":true, - "Formula":"COUNT_THRESHOLD", - "Combination":["inner-disp"], - "Coefficient":[-1.0], + "Formula":"WEIGHTED_AVG", + "Combination":["1", "OPEN_WEIGHT"], + "CombinationType":["CONSTANT", "SENSOR"], + "Coefficient":[1.0, -1.0], "Multiplier":1 }, { @@ -144,16 +147,6 @@ "Coefficient":[1.0, 1.0, 1.0, 1.0], "Multiplier":0.001 }, - { - "Name":"VIRTUAL-SKIN-CLOSE", - "Type":"UNKNOWN", - "Hidden":true, - "VirtualSensor":true, - "Formula":"WEIGHTED_AVG", - "Combination":["CLOSE-SUB-MAX", "IS_OPEN"], - "Coefficient":[1.0, -1000000], - "Multiplier":0.001 - }, { "Name":"OPEN-SUB1", "Type":"UNKNOWN", @@ -219,16 +212,6 @@ "Coefficient":[1.0, 1.0, 1.0, 1.0, 1.0], "Multiplier":0.001 }, - { - "Name":"VIRTUAL-SKIN-OPEN", - "Type":"UNKNOWN", - "Hidden":true, - "VirtualSensor":true, - "Formula":"WEIGHTED_AVG", - "Combination":["OPEN-SUB-MAX", "IS_CLOSE"], - "Coefficient":[1.0, -1000000], - "Multiplier":0.001 - }, { "Name":"VIRTUAL-SKIN-CHARGE", "Type":"UNKNOWN", @@ -236,9 +219,10 @@ "Hidden":true, "VirtualSensor":true, "TriggerSensor":"skin_therm", - "Formula":"MAXIMUM", - "Combination":["VIRTUAL-SKIN-CLOSE", "VIRTUAL-SKIN-OPEN"], - "Coefficient":[1.0, 1.0], + "Formula":"WEIGHTED_AVG", + "Combination":["OPEN-SUB-MAX", "CLOSE-SUB-MAX"], + "Coefficient":["OPEN_WEIGHT", "CLOSE_WEIGHT"], + "CoefficientType":["SENSOR", "SENSOR"], "HotThreshold":["NAN", 25.0, 39.0, 41.0, 45.0, 46.5, 54.0], "HotHysteresis":[0.0, 1.9, 1.9, 1.9, 1.9, 1.4, 1.9], "Multiplier":0.001, diff --git a/thermal_info_config_felix.json b/thermal_info_config_felix.json index 6bbb5b0..1c3fbd3 100644 --- a/thermal_info_config_felix.json +++ b/thermal_info_config_felix.json @@ -66,23 +66,26 @@ "Multiplier":1 }, { - "Name":"IS_OPEN", + "Name":"OPEN_WEIGHT", "Type":"UNKNOWN", "Hidden":true, "VirtualSensor":true, "Formula":"COUNT_THRESHOLD", + "StepRatio":0.2, "Combination":["inner-disp"], "Coefficient":[1.0], - "Multiplier":1 + "Multiplier":1, + "PassiveDelay":7000 }, { - "Name":"IS_CLOSE", + "Name":"CLOSE_WEIGHT", "Type":"UNKNOWN", "Hidden":true, "VirtualSensor":true, - "Formula":"COUNT_THRESHOLD", - "Combination":["inner-disp"], - "Coefficient":[-1.0], + "Formula":"WEIGHTED_AVG", + "Combination":["1", "OPEN_WEIGHT"], + "CombinationType":["CONSTANT", "SENSOR"], + "Coefficient":[1.0, -1.0], "Multiplier":1 }, { @@ -150,16 +153,6 @@ "Coefficient":[1.0, 1.0, 1.0, 1.0], "Multiplier":0.001 }, - { - "Name":"VIRTUAL-SKIN-CLOSE", - "Type":"UNKNOWN", - "Hidden":true, - "VirtualSensor":true, - "Formula":"WEIGHTED_AVG", - "Combination":["CLOSE-SUB-MAX", "IS_OPEN"], - "Coefficient":[1.0, -1000000], - "Multiplier":0.001 - }, { "Name":"OPEN-SUB1", "Type":"UNKNOWN", @@ -225,25 +218,16 @@ "Coefficient":[1.0, 1.0, 1.0, 1.0, 1.0], "Multiplier":0.001 }, - { - "Name":"VIRTUAL-SKIN-OPEN", - "Type":"UNKNOWN", - "Hidden":true, - "VirtualSensor":true, - "Formula":"WEIGHTED_AVG", - "Combination":["OPEN-SUB-MAX", "IS_CLOSE"], - "Coefficient":[1.0, -1000000], - "Multiplier":0.001 - }, { "Name":"VIRTUAL-SKIN", "Type":"SKIN", "Version":"0.5", "VirtualSensor":true, "TriggerSensor":"skin_therm", - "Formula":"MAXIMUM", - "Combination":["VIRTUAL-SKIN-CLOSE", "VIRTUAL-SKIN-OPEN"], - "Coefficient":[1.0, 1.0], + "Formula":"WEIGHTED_AVG", + "Combination":["OPEN-SUB-MAX", "CLOSE-SUB-MAX"], + "Coefficient":["OPEN_WEIGHT", "CLOSE_WEIGHT"], + "CoefficientType":["SENSOR", "SENSOR"], "HotThreshold":["NAN", 39.0, 43.0, 45.0, 46.5, 51.0, 54.0], "HotHysteresis":[0.0, 1.9, 1.9, 1.9, 1.4, 1.9, 1.9], "Multiplier":0.001, diff --git a/thermal_info_config_proactive_skin_felix.json b/thermal_info_config_proactive_skin_felix.json index 1b7c446..2ae76fc 100644 --- a/thermal_info_config_proactive_skin_felix.json +++ b/thermal_info_config_proactive_skin_felix.json @@ -66,23 +66,26 @@ "Multiplier":1 }, { - "Name":"IS_OPEN", + "Name":"OPEN_WEIGHT", "Type":"UNKNOWN", "Hidden":true, "VirtualSensor":true, "Formula":"COUNT_THRESHOLD", + "StepRatio":0.2, "Combination":["inner-disp"], "Coefficient":[1.0], - "Multiplier":1 + "Multiplier":1, + "PassiveDelay":7000 }, { - "Name":"IS_CLOSE", + "Name":"CLOSE_WEIGHT", "Type":"UNKNOWN", "Hidden":true, "VirtualSensor":true, - "Formula":"COUNT_THRESHOLD", - "Combination":["inner-disp"], - "Coefficient":[-1.0], + "Formula":"WEIGHTED_AVG", + "Combination":["1", "OPEN_WEIGHT"], + "CombinationType":["CONSTANT", "SENSOR"], + "Coefficient":[1.0, -1.0], "Multiplier":1 }, { @@ -150,16 +153,6 @@ "Coefficient":[1.0, 1.0, 1.0, 1.0], "Multiplier":0.001 }, - { - "Name":"VIRTUAL-SKIN-CLOSE", - "Type":"UNKNOWN", - "Hidden":true, - "VirtualSensor":true, - "Formula":"WEIGHTED_AVG", - "Combination":["CLOSE-SUB-MAX", "IS_OPEN"], - "Coefficient":[1.0, -1000000], - "Multiplier":0.001 - }, { "Name":"OPEN-SUB1", "Type":"UNKNOWN", @@ -225,25 +218,16 @@ "Coefficient":[1.0, 1.0, 1.0, 1.0, 1.0], "Multiplier":0.001 }, - { - "Name":"VIRTUAL-SKIN-OPEN", - "Type":"UNKNOWN", - "Hidden":true, - "VirtualSensor":true, - "Formula":"WEIGHTED_AVG", - "Combination":["OPEN-SUB-MAX", "IS_CLOSE"], - "Coefficient":[1.0, -1000000], - "Multiplier":0.001 - }, { "Name":"VIRTUAL-SKIN", "Type":"SKIN", "Version":"0.5", "VirtualSensor":true, "TriggerSensor":"skin_therm", - "Formula":"MAXIMUM", - "Combination":["VIRTUAL-SKIN-CLOSE", "VIRTUAL-SKIN-OPEN"], - "Coefficient":[1.0, 1.0], + "Formula":"WEIGHTED_AVG", + "Combination":["OPEN-SUB-MAX", "CLOSE-SUB-MAX"], + "Coefficient":["OPEN_WEIGHT", "CLOSE_WEIGHT"], + "CoefficientType":["SENSOR", "SENSOR"], "HotThreshold":["NAN", 37.0, 41.0, 45.0, 46.5, 51.0, 54.0], "HotHysteresis":[0.0, 1.9, 1.9, 1.9, 1.4, 1.9, 1.9], "Multiplier":0.001, @@ -966,5 +950,25 @@ "PowerSampleDelay":60000, "PowerSampleCount":1 } - ] + ], + "Stats": { + "Sensors": { + "RecordWithDefaultThreshold": ["VIRTUAL-SKIN"], + "RecordWithThreshold": [ + { + "Name": "VIRTUAL-SKIN", + "Thresholds": [31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51] + }, + { + "Name": "VIRTUAL-USB-THROTTLING", + "Thresholds": [2.0] + } + ] + }, + "CoolingDevices": { + "RecordVotePerSensor": { + "DefaultThresholdEnableAll": true + } + } + } } From 1237bf64992db1b2b920c2f51ed6add8b976d14c Mon Sep 17 00:00:00 2001 From: TeYuan Wang Date: Wed, 5 Jul 2023 23:26:34 -0700 Subject: [PATCH 2/3] thermal: Update VSKIN equation V06.2 Bug: 289752109 Test: adb shell dumpsys android.hardware.thermal.IThermal/default Change-Id: Ib957fae2db39f421c0b11c3b3b106f3ec333e4f5 --- thermal_info_config_charge_felix.json | 6 +++--- thermal_info_config_felix.json | 8 ++++---- thermal_info_config_proactive_skin_felix.json | 8 ++++---- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/thermal_info_config_charge_felix.json b/thermal_info_config_charge_felix.json index fe7ce1e..b3731fc 100644 --- a/thermal_info_config_charge_felix.json +++ b/thermal_info_config_charge_felix.json @@ -197,9 +197,9 @@ "Hidden":true, "VirtualSensor":true, "Formula":"WEIGHTED_AVG", - "Combination":["neutral_therm", "skin_therm", "usb_pwr_therm", "usb_pwr_therm2", "inner_disp_therm"], - "Coefficient":[0.15, 1.05, -0.65, 1, -0.55], - "Offset":3540, + "Combination":["quiet_therm", "skin_therm", "usb_pwr_therm"], + "Coefficient":[0.429, 0.314, 0.205], + "Offset":2600, "Multiplier":0.001 }, { diff --git a/thermal_info_config_felix.json b/thermal_info_config_felix.json index 1c3fbd3..0903c38 100644 --- a/thermal_info_config_felix.json +++ b/thermal_info_config_felix.json @@ -203,9 +203,9 @@ "Hidden":true, "VirtualSensor":true, "Formula":"WEIGHTED_AVG", - "Combination":["neutral_therm", "skin_therm", "usb_pwr_therm", "usb_pwr_therm2", "inner_disp_therm"], - "Coefficient":[0.15, 1.05, -0.65, 1, -0.55], - "Offset":3540, + "Combination":["quiet_therm", "skin_therm", "usb_pwr_therm"], + "Coefficient":[0.429, 0.314, 0.205], + "Offset":2600, "Multiplier":0.001 }, { @@ -221,7 +221,7 @@ { "Name":"VIRTUAL-SKIN", "Type":"SKIN", - "Version":"0.5", + "Version":"6.2", "VirtualSensor":true, "TriggerSensor":"skin_therm", "Formula":"WEIGHTED_AVG", diff --git a/thermal_info_config_proactive_skin_felix.json b/thermal_info_config_proactive_skin_felix.json index 2ae76fc..3c78146 100644 --- a/thermal_info_config_proactive_skin_felix.json +++ b/thermal_info_config_proactive_skin_felix.json @@ -203,9 +203,9 @@ "Hidden":true, "VirtualSensor":true, "Formula":"WEIGHTED_AVG", - "Combination":["neutral_therm", "skin_therm", "usb_pwr_therm", "usb_pwr_therm2", "inner_disp_therm"], - "Coefficient":[0.15, 1.05, -0.65, 1, -0.55], - "Offset":3540, + "Combination":["quiet_therm", "skin_therm", "usb_pwr_therm"], + "Coefficient":[0.429, 0.314, 0.205], + "Offset":2600, "Multiplier":0.001 }, { @@ -221,7 +221,7 @@ { "Name":"VIRTUAL-SKIN", "Type":"SKIN", - "Version":"0.5", + "Version":"6.2", "VirtualSensor":true, "TriggerSensor":"skin_therm", "Formula":"WEIGHTED_AVG", From f3e62f0321753a6740d7b871a5fc9a90c096c63c Mon Sep 17 00:00:00 2001 From: Shawn Lin Date: Mon, 17 Jul 2023 12:26:12 +0000 Subject: [PATCH 3/3] Fix layout issue of pattern set up page in F10 Set the pattern view size to 290dp for F10 Bug: 285290323 Bug: 290721507 Test: manual Test: Test: m RunSettingsRoboTests -j30 ROBOTEST_FILTER=\ SetupChooseLockPatternTest Change-Id: I0bd45ad6f793afdec96ffd4a538539d040ad4993 --- .../Settings/res/values-sw410dp/dimens.xml | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 felix/overlay/packages/apps/Settings/res/values-sw410dp/dimens.xml diff --git a/felix/overlay/packages/apps/Settings/res/values-sw410dp/dimens.xml b/felix/overlay/packages/apps/Settings/res/values-sw410dp/dimens.xml new file mode 100644 index 0000000..179dcc5 --- /dev/null +++ b/felix/overlay/packages/apps/Settings/res/values-sw410dp/dimens.xml @@ -0,0 +1,21 @@ + + + + + + 290dp + +