use of android.mtp.MtpEvent in project platform_frameworks_base by android.
the class MtpManagerTest method testEventObjectAdded.
public void testEventObjectAdded() throws Exception {
while (true) {
getInstrumentation().show("Please take a photo by using connected MTP device.");
final CancellationSignal signal = new CancellationSignal();
MtpEvent event = mManager.readEvent(mUsbDevice.getDeviceId(), signal);
if (event.getEventCode() != MtpConstants.EVENT_OBJECT_ADDED) {
continue;
}
assertTrue(event.getObjectHandle() != 0);
break;
}
}
use of android.mtp.MtpEvent in project android_frameworks_base by ResurrectionRemix.
the class MtpManagerTest method testEventObjectAdded.
public void testEventObjectAdded() throws Exception {
while (true) {
getInstrumentation().show("Please take a photo by using connected MTP device.");
final CancellationSignal signal = new CancellationSignal();
MtpEvent event = mManager.readEvent(mUsbDevice.getDeviceId(), signal);
if (event.getEventCode() != MtpConstants.EVENT_OBJECT_ADDED) {
continue;
}
assertTrue(event.getObjectHandle() != 0);
break;
}
}
use of android.mtp.MtpEvent in project android_frameworks_base by AOSPA.
the class MtpManagerTest method testEventObjectAdded.
public void testEventObjectAdded() throws Exception {
while (true) {
getInstrumentation().show("Please take a photo by using connected MTP device.");
final CancellationSignal signal = new CancellationSignal();
MtpEvent event = mManager.readEvent(mUsbDevice.getDeviceId(), signal);
if (event.getEventCode() != MtpConstants.EVENT_OBJECT_ADDED) {
continue;
}
assertTrue(event.getObjectHandle() != 0);
break;
}
}
use of android.mtp.MtpEvent in project android_frameworks_base by DirtyUnicorns.
the class MtpManagerTest method testEventObjectAdded.
public void testEventObjectAdded() throws Exception {
while (true) {
getInstrumentation().show("Please take a photo by using connected MTP device.");
final CancellationSignal signal = new CancellationSignal();
MtpEvent event = mManager.readEvent(mUsbDevice.getDeviceId(), signal);
if (event.getEventCode() != MtpConstants.EVENT_OBJECT_ADDED) {
continue;
}
assertTrue(event.getObjectHandle() != 0);
break;
}
}
use of android.mtp.MtpEvent in project android_frameworks_base by crdroidandroid.
the class MtpManagerTest method testEventObjectAdded.
public void testEventObjectAdded() throws Exception {
while (true) {
getInstrumentation().show("Please take a photo by using connected MTP device.");
final CancellationSignal signal = new CancellationSignal();
MtpEvent event = mManager.readEvent(mUsbDevice.getDeviceId(), signal);
if (event.getEventCode() != MtpConstants.EVENT_OBJECT_ADDED) {
continue;
}
assertTrue(event.getObjectHandle() != 0);
break;
}
}
Aggregations