Merge "Merge TQ2A.230405.003"

This commit is contained in:
Treehugger Robot 2023-04-12 17:22:27 +00:00 committed by Gerrit Code Review
commit 4a03b2a928
10 changed files with 180 additions and 1 deletions

View file

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
* Copyright (C) 2022 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-->
<resources>
<!-- Whether the device should automatically switch away from Wi-Fi networks that lose
Internet access. Actual device behaviour is controlled by
Settings.Global.NETWORK_AVOID_BAD_WIFI. This is the default value of that setting. -->
<integer translatable="false" name="config_networkAvoidBadWifi">0</integer>
<!-- Whether the device should actively prefer bad wifi to good cell on Android 12/13
for configurations where config_avoidBadWifi=0. -->
<integer translatable="false" name="config_activelyPreferBadWifi">0</integer>
</resources>

View file

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
* Copyright (C) 2022 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-->
<resources>
<!-- Whether the device should automatically switch away from Wi-Fi networks that lose
Internet access. Actual device behaviour is controlled by
Settings.Global.NETWORK_AVOID_BAD_WIFI. This is the default value of that setting. -->
<integer translatable="false" name="config_networkAvoidBadWifi">0</integer>
</resources>

View file

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
* Copyright (C) 2022 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-->
<resources>
<!-- Whether the device should automatically switch away from Wi-Fi networks that lose
Internet access. Actual device behaviour is controlled by
Settings.Global.NETWORK_AVOID_BAD_WIFI. This is the default value of that setting. -->
<integer translatable="false" name="config_networkAvoidBadWifi">0</integer>
</resources>

View file

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
* Copyright (C) 2022 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-->
<resources>
<!-- Whether the device should automatically switch away from Wi-Fi networks that lose
Internet access. Actual device behaviour is controlled by
Settings.Global.NETWORK_AVOID_BAD_WIFI. This is the default value of that setting. -->
<integer translatable="false" name="config_networkAvoidBadWifi">0</integer>
</resources>

View file

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
* Copyright (C) 2022 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-->
<resources>
<!-- Whether the device should automatically switch away from Wi-Fi networks that lose
Internet access. Actual device behaviour is controlled by
Settings.Global.NETWORK_AVOID_BAD_WIFI. This is the default value of that setting. -->
<integer translatable="false" name="config_networkAvoidBadWifi">0</integer>
</resources>

View file

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
* Copyright (C) 2022 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-->
<resources>
<!-- Whether the device should automatically switch away from Wi-Fi networks that lose
Internet access. Actual device behaviour is controlled by
Settings.Global.NETWORK_AVOID_BAD_WIFI. This is the default value of that setting. -->
<integer translatable="false" name="config_networkAvoidBadWifi">0</integer>
</resources>

View file

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
* Copyright (C) 2022 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-->
<resources>
<!-- Whether the device should automatically switch away from Wi-Fi networks that lose
Internet access. Actual device behaviour is controlled by
Settings.Global.NETWORK_AVOID_BAD_WIFI. This is the default value of that setting. -->
<integer translatable="false" name="config_networkAvoidBadWifi">0</integer>
</resources>

View file

@ -23,4 +23,8 @@
<!-- Mask to use when checking skb mark defined in config_networkWakeupPacketMark above. -->
<integer translatable="false" name="config_networkWakeupPacketMask">0x80000000</integer>
<!-- Whether the device should actively prefer bad wifi to good cell on Android 12/13
for configurations where config_avoidBadWifi=0. -->
<integer translatable="false" name="config_activelyPreferBadWifi">1</integer>
</resources>

View file

@ -76,7 +76,9 @@ constexpr char kSmpAffinityList[] = "/smp_affinity_list";
#ifndef UDC_PATH
#define UDC_PATH "/sys/class/udc/11110000.dwc3/"
#endif
static MonitorFfs monitorFfs(kGadgetName);
constexpr char kExtconTypecState[] = "/sys/class/extcon/extcon0/cable.0/state";
constexpr char kUsbGadgetState[] = "/sys/devices/platform/11110000.usb/dwc3_exynos_gadget_state";
static MonitorFfs monitorFfs(kGadgetName, kExtconTypecState, kUsbGadgetState);
#define SPEED_PATH UDC_PATH "current_speed"

View file

@ -15,6 +15,7 @@ on post-fs
chown root system /sys/devices/platform/11110000.usb/dwc3_exynos_otg_b_sess
chown root system /sys/devices/platform/11110000.usb/dwc3_exynos_otg_id
chown root system /sys/devices/platform/11110000.usb/usb_data_enabled
chown root system /sys/devices/platform/11110000.usb/dwc3_exynos_gadget_state
chmod 664 /sys/class/typec/port0/power_role
chmod 664 /sys/class/typec/port0/data_role
chmod 664 /sys/class/typec/port0/port_type