Fix it will auto switch back to "No data transfer" after selecting "USB Tethering"
Before this CL, the USB option didn't handle whether FUNCTION_NCM existed in the intent extra when tethering was started which resulted in some devices that enable NCM will have incorrect UI. This CL added a condition to check whether FUNCTION_NCM existed in the intent extra or not to fix this UI issue. Bug: 192046902 Test: make -j42 RunSettingsRoboTests Change-Id: Icb8548409930d59dc3a08c25e418c9a1ddb9f33c
This commit is contained in:
@@ -75,6 +75,9 @@ public class UsbConnectionBroadcastReceiver extends BroadcastReceiver implements
|
||||
if (intent.getExtras().getBoolean(UsbManager.USB_FUNCTION_ACCESSORY)) {
|
||||
functions |= UsbManager.FUNCTION_ACCESSORY;
|
||||
}
|
||||
if (intent.getExtras().getBoolean(UsbManager.USB_FUNCTION_NCM)) {
|
||||
functions |= UsbManager.FUNCTION_NCM;
|
||||
}
|
||||
mFunctions = functions;
|
||||
mDataRole = mUsbBackend.getDataRole();
|
||||
mPowerRole = mUsbBackend.getPowerRole();
|
||||
|
Reference in New Issue
Block a user