Loading packages/MtpDocumentsProvider/tests/src/com/android/mtp/MtpDocumentsProviderTest.java +2 −1 Original line number Diff line number Diff line Loading @@ -561,7 +561,8 @@ public class MtpDocumentsProviderTest extends AndroidTestCase { public void testBusyDevice() throws Exception { mMtpManager = new TestMtpManager(getContext()) { @Override MtpDeviceRecord openDevice(int deviceId) throws IOException { synchronized MtpDeviceRecord openDevice(int deviceId) throws IOException { throw new BusyDeviceException(); } }; Loading packages/MtpDocumentsProvider/tests/src/com/android/mtp/TestMtpManager.java +3 −3 Original line number Diff line number Diff line Loading @@ -74,7 +74,7 @@ public class TestMtpManager extends MtpManager { } @Override MtpDeviceRecord[] getDevices() { synchronized MtpDeviceRecord[] getDevices() { final MtpDeviceRecord[] result = new MtpDeviceRecord[mDevices.size()]; for (int i = 0; i < mDevices.size(); i++) { final MtpDeviceRecord device = mDevices.valueAt(i); Loading @@ -90,7 +90,7 @@ public class TestMtpManager extends MtpManager { } @Override MtpDeviceRecord openDevice(int deviceId) throws IOException { synchronized MtpDeviceRecord openDevice(int deviceId) throws IOException { final MtpDeviceRecord device = mDevices.get(deviceId); if (device == null) { throw new IOException(); Loading @@ -103,7 +103,7 @@ public class TestMtpManager extends MtpManager { } @Override void closeDevice(int deviceId) throws IOException { synchronized void closeDevice(int deviceId) throws IOException { final MtpDeviceRecord device = mDevices.get(deviceId); if (device == null) { throw new IOException(); Loading Loading
packages/MtpDocumentsProvider/tests/src/com/android/mtp/MtpDocumentsProviderTest.java +2 −1 Original line number Diff line number Diff line Loading @@ -561,7 +561,8 @@ public class MtpDocumentsProviderTest extends AndroidTestCase { public void testBusyDevice() throws Exception { mMtpManager = new TestMtpManager(getContext()) { @Override MtpDeviceRecord openDevice(int deviceId) throws IOException { synchronized MtpDeviceRecord openDevice(int deviceId) throws IOException { throw new BusyDeviceException(); } }; Loading
packages/MtpDocumentsProvider/tests/src/com/android/mtp/TestMtpManager.java +3 −3 Original line number Diff line number Diff line Loading @@ -74,7 +74,7 @@ public class TestMtpManager extends MtpManager { } @Override MtpDeviceRecord[] getDevices() { synchronized MtpDeviceRecord[] getDevices() { final MtpDeviceRecord[] result = new MtpDeviceRecord[mDevices.size()]; for (int i = 0; i < mDevices.size(); i++) { final MtpDeviceRecord device = mDevices.valueAt(i); Loading @@ -90,7 +90,7 @@ public class TestMtpManager extends MtpManager { } @Override MtpDeviceRecord openDevice(int deviceId) throws IOException { synchronized MtpDeviceRecord openDevice(int deviceId) throws IOException { final MtpDeviceRecord device = mDevices.get(deviceId); if (device == null) { throw new IOException(); Loading @@ -103,7 +103,7 @@ public class TestMtpManager extends MtpManager { } @Override void closeDevice(int deviceId) throws IOException { synchronized void closeDevice(int deviceId) throws IOException { final MtpDeviceRecord device = mDevices.get(deviceId); if (device == null) { throw new IOException(); Loading