Fix usb tethering switch back to none after off/on the screen
This CL adds conditions to check whether usb is connected or not. If usb is not connected or tethering is not started don't update the state. Bug: 157709648 Test: make RunSettingsRoboTests -j56 Change-Id: Ifbf5900923419d6abf35834b196aab12601076e4
This commit is contained in:
@@ -57,7 +57,7 @@ public class UsbDetailsFunctionsController extends UsbDetailsController
|
||||
|
||||
private PreferenceCategory mProfilesContainer;
|
||||
private TetheringManager mTetheringManager;
|
||||
private Handler mHandler = new Handler();
|
||||
private Handler mHandler;
|
||||
@VisibleForTesting
|
||||
OnStartTetheringCallback mOnStartTetheringCallback;
|
||||
@VisibleForTesting
|
||||
@@ -69,6 +69,7 @@ public class UsbDetailsFunctionsController extends UsbDetailsController
|
||||
mTetheringManager = context.getSystemService(TetheringManager.class);
|
||||
mOnStartTetheringCallback = new OnStartTetheringCallback();
|
||||
mPreviousFunction = mUsbBackend.getCurrentFunctions();
|
||||
mHandler = new Handler(context.getMainLooper());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user