Home
last modified time | relevance | path

Searched refs:UsbBackend (Results 1 – 20 of 20) 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()
DUsbDefaultFragmentTest.java54 private UsbBackend mUsbBackend;
75 .isEqualTo(UsbBackend.usbFunctionsToString(UsbManager.FUNCTION_NONE)); in getDefaultKey_isNone_shouldReturnNone()
82 .isEqualTo(UsbBackend.usbFunctionsToString(UsbManager.FUNCTION_MTP)); in getDefaultKey_isMtp_shouldReturnMtp()
89 .isEqualTo(UsbBackend.usbFunctionsToString(UsbManager.FUNCTION_PTP)); in getDefaultKey_isPtp_shouldReturnPtp()
96 .isEqualTo(UsbBackend.usbFunctionsToString(UsbManager.FUNCTION_RNDIS)); in getDefaultKey_isRndis_shouldReturnRndis()
103 .isEqualTo(UsbBackend.usbFunctionsToString(UsbManager.FUNCTION_MIDI)); in getDefaultKey_isMidi_shouldReturnMidi()
111 .isEqualTo(UsbBackend.usbFunctionsToString(UsbManager.FUNCTION_RNDIS)); in getDefaultKey_isNcm_returnsRndis()
116 mFragment.setDefaultKey(UsbBackend.usbFunctionsToString(UsbManager.FUNCTION_NONE)); in setDefaultKey_isNone_shouldSetNone()
122 mFragment.setDefaultKey(UsbBackend.usbFunctionsToString(UsbManager.FUNCTION_MTP)); in setDefaultKey_isMtp_shouldSetMtp()
128 mFragment.setDefaultKey(UsbBackend.usbFunctionsToString(UsbManager.FUNCTION_PTP)); in setDefaultKey_isPtp_shouldSetPtp()
[all …]
DUsbDetailsFunctionsControllerTest.java71 private UsbBackend mUsbBackend;
116 assertThat(pref.getKey()).isEqualTo(UsbBackend.usbFunctionsToString(iter.next())); in displayRefresh_allAllowed_shouldCreatePrefs()
141 .isEqualTo(UsbBackend.usbFunctionsToString(UsbManager.FUNCTION_MIDI)); in displayRefresh_onlyMidiAllowed_shouldCreateOnlyMidiPref()
153 .isEqualTo(UsbBackend.usbFunctionsToString(UsbManager.FUNCTION_MTP)); in displayRefresh_mtpEnabled_shouldCheckSwitches()
166 .isEqualTo(UsbBackend.usbFunctionsToString(UsbManager.FUNCTION_MTP)); in displayRefresh_accessoryEnabled_shouldCheckSwitches()
179 .isEqualTo(UsbBackend.usbFunctionsToString(UsbManager.FUNCTION_RNDIS)); in displayRefresh_ncmEnabled_checksSwitches()
194 .isEqualTo(UsbBackend.usbFunctionsToString(UsbManager.FUNCTION_MTP)); in onClickMtp_noneEnabled_shouldEnableMtp()
212 .isEqualTo(UsbBackend.usbFunctionsToString(UsbManager.FUNCTION_MTP)); in onClickMtp_ptpEnabled_shouldEnableMtp()
218 .isEqualTo(UsbBackend.usbFunctionsToString(UsbManager.FUNCTION_PTP)); in onClickMtp_ptpEnabled_shouldEnableMtp()
233 .isEqualTo(UsbBackend.usbFunctionsToString(UsbManager.FUNCTION_NONE)); in onClickNone_mtpEnabled_shouldDisableMtp()
[all …]
DUsbDetailsDataRoleControllerTest.java64 private UsbBackend mUsbBackend;
219 mPreference.findPreference(UsbBackend.dataRoleToString(role)); in getRadioPreference()
DConnectedUsbDeviceUpdaterTest.java63 private UsbBackend mUsbBackend;
DUsbDetailsHeaderControllerTest.java68 private UsbBackend mUsbBackend;
DUsbConnectionBroadcastReceiverTest.java53 private UsbBackend mUsbBackend;
DUsbDetailsTranscodeMtpControllerTest.java58 private UsbBackend mUsbBackend;
DUsbDetailsPowerRoleControllerTest.java67 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()
101 int role = UsbBackend.dataRoleFromString(preference.getKey()); in onRadioButtonClicked()
109 mUsbBackend.areAllRolesSupported() ? UsbBackend.PD_ROLE_SWAP_TIMEOUT_MS in onRadioButtonClicked()
110 : UsbBackend.NONPD_ROLE_SWAP_TIMEOUT_MS); in onRadioButtonClicked()
DUsbDefaultFragment.java53 UsbBackend mUsbBackend;
96 mUsbBackend = new UsbBackend(context); in onAttach()
128 final String key = UsbBackend.usbFunctionsToString(option); in getCandidates()
158 return UsbBackend.usbFunctionsToString(defaultUsbFunctions == UsbManager.FUNCTION_NCM in getDefaultKey()
164 long functions = UsbBackend.usbFunctionsFromString(key); in setDefaultKey()
218 screen.findPreference(UsbBackend.usbFunctionsToString(option)); in refresh()
DUsbDetailsFragment.java47 private UsbBackend mUsbBackend;
82 mUsbBackend = new UsbBackend(context); in createPreferenceControllers()
92 UsbBackend usbBackend, UsbDetailsFragment fragment) { in createControllerList()
117 createControllerList(context, new UsbBackend(context), null));
DUsbDetailsFunctionsController.java67 UsbBackend backend) { in UsbDetailsFunctionsController()
114 pref = getProfilePreference(UsbBackend.usbFunctionsToString(option), title); in refresh()
132 final long function = UsbBackend.usbFunctionsFromString(preference.getKey()); in onRadioButtonClicked()
147 UsbBackend.usbFunctionsToString(mPreviousFunction)); in onRadioButtonClicked()
DUsbDetailsPowerRoleController.java53 UsbBackend backend) { in UsbDetailsPowerRoleController()
115 mUsbBackend.areAllRolesSupported() ? UsbBackend.PD_ROLE_SWAP_TIMEOUT_MS in onPreferenceClick()
116 : 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()
DUsbBackend.java42 public class UsbBackend { class
62 public UsbBackend(Context context) { in UsbBackend() method in UsbBackend
67 public UsbBackend(Context context, UserManager userManager) { in UsbBackend() method in UsbBackend
DUsbDetailsController.java36 protected final UsbBackend mUsbBackend;
41 public UsbDetailsController(Context context, UsbDetailsFragment fragment, UsbBackend backend) { in UsbDetailsController()
DUsbConnectionBroadcastReceiver.java37 private UsbBackend mUsbBackend;
45 UsbConnectionListener usbConnectionListener, UsbBackend backend) { in UsbConnectionBroadcastReceiver()
DUsbDetailsHeaderController.java36 UsbBackend backend) { in UsbDetailsHeaderController()
DUsbDetailsTranscodeMtpController.java46 UsbBackend backend) { in UsbDetailsTranscodeMtpController()