Home
last modified time | relevance | path

Searched refs:MtpDeviceRecord (Results 1 – 15 of 15) sorted by relevance

/frameworks/base/packages/MtpDocumentsProvider/tests/src/com/android/mtp/
DTestMtpManager.java38 private final SparseArray<MtpDeviceRecord> mDevices = new SparseArray<>();
49 void addValidDevice(MtpDeviceRecord device) { in addValidDevice()
78 synchronized MtpDeviceRecord[] getDevices() { in getDevices()
79 final MtpDeviceRecord[] result = new MtpDeviceRecord[mDevices.size()]; in getDevices()
81 final MtpDeviceRecord device = mDevices.valueAt(i); in getDevices()
85 result[i] = new MtpDeviceRecord( in getDevices()
94 synchronized MtpDeviceRecord openDevice(int deviceId) throws IOException { in openDevice()
95 final MtpDeviceRecord device = mDevices.get(deviceId); in openDevice()
99 final MtpDeviceRecord record = new MtpDeviceRecord( in openDevice()
108 final MtpDeviceRecord device = mDevices.get(deviceId); in closeDevice()
[all …]
DMtpManagerTest.java84 final MtpDeviceRecord[] records = mManager.getDevices(); in testOperationsSupported()
91 final MtpDeviceRecord[] records = mManager.getDevices(); in testEventsSupported()
98 final MtpDeviceRecord[] records = mManager.getDevices(); in testDeviceKey()
119 for (final MtpDeviceRecord record : mManager.getDevices()) { in testCreateDocumentAndGetPartialObject()
DMtpDocumentsProviderTest.java68 mMtpManager.addValidDevice(new MtpDeviceRecord( in testOpenAndCloseDevice()
106 mMtpManager.addValidDevice(new MtpDeviceRecord( in testOpenAndCloseErrorDevice()
130 mMtpManager.addValidDevice(new MtpDeviceRecord( in testOpenDeviceOnDemand()
160 final MtpDeviceRecord[] openedDevice = mProvider.getOpenedDeviceRecordsCache(); in testOpenDeviceOnDemand()
167 final MtpDeviceRecord[] openedDevice = mProvider.getOpenedDeviceRecordsCache(); in testOpenDeviceOnDemand()
175 mMtpManager.addValidDevice(new MtpDeviceRecord( in testQueryRoots()
191 mMtpManager.addValidDevice(new MtpDeviceRecord( in testQueryRoots()
245 mMtpManager.addValidDevice(new MtpDeviceRecord( in testQueryRoots_error()
253 mMtpManager.addValidDevice(new MtpDeviceRecord( in testQueryRoots_error()
633 synchronized MtpDeviceRecord openDevice(int deviceId) in testBusyDevice()
[all …]
DTestUtil.java71 database.getMapper().putDeviceDocument(new MtpDeviceRecord( in addTestDevice()
113 MtpDeviceRecord device = null; in waitForStorages()
114 for (final MtpDeviceRecord deviceCandidate : manager.getDevices()) { in waitForStorages()
DTestServiceIntentSender.java21 void sendUpdateNotificationIntent(MtpDeviceRecord[] record) {} in sendUpdateNotificationIntent()
DMtpDatabaseTest.java448 mDatabase.getMapper().putDeviceDocument(new MtpDeviceRecord( in testRestoreIdForDifferentDevices()
450 mDatabase.getMapper().putDeviceDocument(new MtpDeviceRecord( in testRestoreIdForDifferentDevices()
492 mDatabase.getMapper().putDeviceDocument(new MtpDeviceRecord( in testRestoreIdForDifferentDevices()
494 mDatabase.getMapper().putDeviceDocument(new MtpDeviceRecord( in testRestoreIdForDifferentDevices()
954 mDatabase.getMapper().putDeviceDocument(new MtpDeviceRecord( in testGetClosedDevice()
975 mDatabase.getMapper().putDeviceDocument(new MtpDeviceRecord( in testMappingWithoutKey()
981 mDatabase.getMapper().putDeviceDocument(new MtpDeviceRecord( in testMappingWithoutKey()
996 mDatabase.getMapper().putDeviceDocument(new MtpDeviceRecord( in testMappingFailsWithoutKey()
1006 mDatabase.getMapper().putDeviceDocument(new MtpDeviceRecord( in testMappingFailsWithoutKey()
1021 assertTrue(mDatabase.getMapper().putDeviceDocument(new MtpDeviceRecord( in testUpdateDocumentWithoutChange()
[all …]
DDocumentLoaderTest.java49 new MtpDeviceRecord(0, "Device", null, true, new MtpRoot[0], null, null)); in setUp()
180 new MtpDeviceRecord( in setUpLoader()
/frameworks/base/packages/MtpDocumentsProvider/src/com/android/mtp/
DMtpDocumentsProvider.java286 final MtpDeviceRecord device = getDeviceToolkit(identifier.mDeviceId).mDeviceRecord; in openDocument()
297 if (MtpDeviceRecord.isPartialReadSupported( in openDocument()
311 if (MtpDeviceRecord.isWritingSupported(device.operationsSupported)) { in openDocument()
389 final MtpDeviceRecord record; in createDocument()
395 if (!MtpDeviceRecord.isWritingSupported(record.operationsSupported)) { in createDocument()
586 final MtpDeviceRecord device = mMtpManager.openDevice(deviceId); in openDevice()
610 MtpDeviceRecord[] getOpenedDeviceRecordsCache() { in getOpenedDeviceRecordsCache()
612 final MtpDeviceRecord[] records = new MtpDeviceRecord[mDeviceToolkits.size()]; in getOpenedDeviceRecordsCache()
749 public final MtpDeviceRecord mDeviceRecord;
754 MtpDeviceRecord record) { in DeviceToolkit()
[all …]
DMtpManager.java76 synchronized MtpDeviceRecord openDevice(int deviceId) throws IOException { in openDevice()
119 synchronized MtpDeviceRecord[] getDevices() { in getDevices()
120 final ArrayList<MtpDeviceRecord> devices = new ArrayList<>(); in getDevices()
127 return devices.toArray(new MtpDeviceRecord[devices.size()]); in getDevices()
266 private MtpDeviceRecord createDeviceRecord(UsbDevice device) { in createDeviceRecord()
291 return new MtpDeviceRecord( in createDeviceRecord()
DRootScanner.java136 final MtpDeviceRecord[] devices = mManager.getDevices(); in run()
139 for (final MtpDeviceRecord device : devices) { in run()
156 for (final MtpDeviceRecord device : devices) { in run()
DMtpDeviceRecord.java22 class MtpDeviceRecord { class
31 MtpDeviceRecord(int deviceId, String name, @Nullable String deviceKey, boolean opened, in MtpDeviceRecord() method in MtpDeviceRecord
DDocumentLoader.java50 private final MtpDeviceRecord mDevice;
57 DocumentLoader(MtpDeviceRecord device, MtpManager mtpManager, ContentResolver resolver, in DocumentLoader()
350 if (!MtpDeviceRecord.isSupported( in loadObjectInfoList()
353 !MtpDeviceRecord.isSupported( in loadObjectInfoList()
DServiceIntentSender.java59 void sendUpdateNotificationIntent(@NonNull MtpDeviceRecord[] records) { in sendUpdateNotificationIntent()
78 private static Notification createNotification(Context context, MtpDeviceRecord device) { in createNotification()
DMtpDatabase.java742 MtpDeviceRecord device) { in getDeviceDocumentValues()
859 if (MtpDeviceRecord.isWritingSupported(operationsSupported)) { in getRootFlags()
870 MtpDeviceRecord.isWritingSupported(operationsSupported) && in getDocumentFlags()
874 if (MtpDeviceRecord.isSupported( in getDocumentFlags()
882 MtpDeviceRecord.isWritingSupported(operationsSupported) && in getDocumentFlags()
DMapper.java61 synchronized boolean putDeviceDocument(MtpDeviceRecord device) throws FileNotFoundException { in putDeviceDocument()