Home
last modified time | relevance | path

Searched refs:UsbBackend (Results 1 – 21 of 21) sorted by relevance

/packages/apps/Settings/tests/robotests/src/com/android/settings/connecteddevice/usb/
DUsbBackendTest.java81 final UsbBackend usbBackend = new UsbBackend(mContext, mUserManager); in setDataRole_allRolesSupported_shouldSetDataRole()
104 final UsbBackend usbBackend = new UsbBackend(mContext, mUserManager); in setDataRole_notAllRolesSupported_shouldSetDataAndPowerRole()
121 final UsbBackend usbBackend = new UsbBackend(mContext, mUserManager); in setPowerRole_allRolesSupported_shouldSetPowerRole()
144 final UsbBackend usbBackend = new UsbBackend(mContext, mUserManager); in setPowerRole_notAllRolesSupported_shouldSetDataAndPowerRole()
167 final UsbBackend usbBackend = new UsbBackend(mContext, mUserManager); in areFunctionsSupported_fileTransferDisallowed_shouldReturnFalse()
180 final UsbBackend usbBackend = new UsbBackend(mContext, mUserManager); in areFunctionsSupported_fileTransferAllowed_shouldReturnTrue()
189 final UsbBackend usbBackend = new UsbBackend(mContext, mUserManager); in areFunctionsDisallowedByNonAdminUser_isAdminUser_returnFalse()
199 final UsbBackend usbBackend = new UsbBackend(mContext, mUserManager); in areFunctionsDisallowedByNonAdminUser_isNotAdminUser_returnTrue()
DUsbDetailsFunctionsControllerTest.java80 private UsbBackend mUsbBackend;
123 assertThat(pref.getKey()).isEqualTo(UsbBackend.usbFunctionsToString(iter.next())); in displayRefresh_allAllowed_shouldCreatePrefs()
148 .isEqualTo(UsbBackend.usbFunctionsToString(UsbManager.FUNCTION_MIDI)); in displayRefresh_onlyMidiAllowed_shouldCreateOnlyMidiPref()
160 .isEqualTo(UsbBackend.usbFunctionsToString(UsbManager.FUNCTION_MTP)); in displayRefresh_mtpEnabled_shouldCheckSwitches()
173 .isEqualTo(UsbBackend.usbFunctionsToString(UsbManager.FUNCTION_MTP)); in displayRefresh_accessoryEnabled_shouldCheckSwitches()
186 .isEqualTo(UsbBackend.usbFunctionsToString(UsbManager.FUNCTION_RNDIS)); in displayRefresh_ncmEnabled_checksSwitches()
201 .isEqualTo(UsbBackend.usbFunctionsToString(UsbManager.FUNCTION_MTP)); in onClickMtp_noneEnabled_shouldEnableMtp()
219 .isEqualTo(UsbBackend.usbFunctionsToString(UsbManager.FUNCTION_MTP)); in onClickMtp_ptpEnabled_shouldEnableMtp()
225 .isEqualTo(UsbBackend.usbFunctionsToString(UsbManager.FUNCTION_PTP)); in onClickMtp_ptpEnabled_shouldEnableMtp()
241 .isEqualTo(UsbBackend.usbFunctionsToString(UsbManager.FUNCTION_NONE)); in onClickNone_mtpEnabled_shouldDisableMtp()
[all …]
DUsbDefaultFragmentTest.java53 private UsbBackend mUsbBackend;
74 .isEqualTo(UsbBackend.usbFunctionsToString(UsbManager.FUNCTION_NONE)); in getDefaultKey_isNone_shouldReturnNone()
81 .isEqualTo(UsbBackend.usbFunctionsToString(UsbManager.FUNCTION_MTP)); in getDefaultKey_isMtp_shouldReturnMtp()
88 .isEqualTo(UsbBackend.usbFunctionsToString(UsbManager.FUNCTION_PTP)); in getDefaultKey_isPtp_shouldReturnPtp()
95 .isEqualTo(UsbBackend.usbFunctionsToString(UsbManager.FUNCTION_RNDIS)); in getDefaultKey_isRndis_shouldReturnRndis()
102 .isEqualTo(UsbBackend.usbFunctionsToString(UsbManager.FUNCTION_MIDI)); in getDefaultKey_isMidi_shouldReturnMidi()
110 .isEqualTo(UsbBackend.usbFunctionsToString(UsbManager.FUNCTION_RNDIS)); in getDefaultKey_isNcm_returnsRndis()
115 mFragment.setDefaultKey(UsbBackend.usbFunctionsToString(UsbManager.FUNCTION_NONE)); in setDefaultKey_isNone_shouldSetNone()
121 mFragment.setDefaultKey(UsbBackend.usbFunctionsToString(UsbManager.FUNCTION_MTP)); in setDefaultKey_isMtp_shouldSetMtp()
127 mFragment.setDefaultKey(UsbBackend.usbFunctionsToString(UsbManager.FUNCTION_PTP)); in setDefaultKey_isPtp_shouldSetPtp()
[all …]
DUsbDetailsDataRoleControllerTest.java74 private UsbBackend mUsbBackend;
234 mPreference.findPreference(UsbBackend.dataRoleToString(role)); in getRadioPreference()
DUsbDetailsControllerTest.java56 private UsbBackend mUsbBackend;
DConnectedUsbDeviceUpdaterTest.java63 private UsbBackend mUsbBackend;
DUsbDetailsHeaderControllerTest.java70 private UsbBackend mUsbBackend;
DUsbConnectionBroadcastReceiverTest.java53 private UsbBackend mUsbBackend;
DUsbDetailsTranscodeMtpControllerTest.java68 private UsbBackend mUsbBackend;
DUsbDetailsPowerRoleControllerTest.java72 private UsbBackend mUsbBackend;
/packages/apps/Settings/src/com/android/settings/connecteddevice/usb/
DUsbDetailsDataRoleController.java53 UsbBackend backend) { in UsbDetailsDataRoleController()
61 mHostPref = makeRadioPreference(UsbBackend.dataRoleToString(DATA_ROLE_HOST), in displayPreference()
63 mDevicePref = makeRadioPreference(UsbBackend.dataRoleToString(DATA_ROLE_DEVICE), in displayPreference()
87 if (UsbBackend.dataRoleFromString(mNextRolePref.getKey()) == dataRole) { in refresh()
102 int role = UsbBackend.dataRoleFromString(preference.getKey()); in onRadioButtonClicked()
110 mUsbBackend.areAllRolesSupported() ? UsbBackend.PD_ROLE_SWAP_TIMEOUT_MS in onRadioButtonClicked()
111 : UsbBackend.NONPD_ROLE_SWAP_TIMEOUT_MS); in onRadioButtonClicked()
DUsbDefaultFragment.java55 UsbBackend mUsbBackend;
99 mUsbBackend = new UsbBackend(context); in onAttach()
131 final String key = UsbBackend.usbFunctionsToString(option); in getCandidates()
161 return UsbBackend.usbFunctionsToString(defaultUsbFunctions == UsbManager.FUNCTION_NCM in getDefaultKey()
167 long functions = UsbBackend.usbFunctionsFromString(key); in setDefaultKey()
224 screen.findPreference(UsbBackend.usbFunctionsToString(option)); in refresh()
DUsbDetailsFragment.java47 private UsbBackend mUsbBackend;
97 mUsbBackend = new UsbBackend(context); in createPreferenceControllers()
107 UsbBackend usbBackend, UsbDetailsFragment fragment) { in createControllerList()
132 createControllerList(context, new UsbBackend(context), null));
DUsbDetailsFunctionsController.java68 UsbBackend backend) { in UsbDetailsFunctionsController()
115 pref = getProfilePreference(UsbBackend.usbFunctionsToString(option), title); in refresh()
134 final long function = UsbBackend.usbFunctionsFromString(preference.getKey()); in onRadioButtonClicked()
149 UsbBackend.usbFunctionsToString(mPreviousFunction)); in onRadioButtonClicked()
DUsbDetailsPowerRoleController.java55 UsbBackend backend) { in UsbDetailsPowerRoleController()
118 mUsbBackend.areAllRolesSupported() ? UsbBackend.PD_ROLE_SWAP_TIMEOUT_MS in onPreferenceClick()
119 : UsbBackend.NONPD_ROLE_SWAP_TIMEOUT_MS); in onPreferenceClick()
DConnectedUsbDeviceUpdater.java49 private UsbBackend mUsbBackend;
70 this(context, fragment, devicePreferenceCallback, new UsbBackend(context)); in ConnectedUsbDeviceUpdater()
75 DevicePreferenceCallback devicePreferenceCallback, UsbBackend usbBackend) { in ConnectedUsbDeviceUpdater()
DUsbDetailsController.java38 protected final UsbBackend mUsbBackend;
43 public UsbDetailsController(Context context, UsbDetailsFragment fragment, UsbBackend backend) { in UsbDetailsController()
DUsbBackend.java42 public class UsbBackend { class
66 public UsbBackend(Context context) { in UsbBackend() method in UsbBackend
71 public UsbBackend(Context context, UserManager userManager) { in UsbBackend() method in UsbBackend
DUsbConnectionBroadcastReceiver.java41 private UsbBackend mUsbBackend;
49 UsbConnectionListener usbConnectionListener, UsbBackend backend) { in UsbConnectionBroadcastReceiver()
DUsbDetailsHeaderController.java36 UsbBackend backend) { in UsbDetailsHeaderController()
DUsbDetailsTranscodeMtpController.java48 UsbBackend backend) { in UsbDetailsTranscodeMtpController()