diff --git a/api/removed.txt b/api/removed.txt index 0ff2476407494..15334beff3476 100644 --- a/api/removed.txt +++ b/api/removed.txt @@ -179,31 +179,6 @@ package android.media.tv { } -package android.mtp { - - public final class MtpConstants { - field public static final int EVENT_CANCEL_TRANSACTION = 16385; // 0x4001 - field public static final int EVENT_CAPTURE_COMPLETE = 16397; // 0x400d - field public static final int EVENT_DEVICE_INFO_CHANGED = 16392; // 0x4008 - field public static final int EVENT_DEVICE_PROP_CHANGED = 16390; // 0x4006 - field public static final int EVENT_DEVICE_RESET = 16395; // 0x400b - field public static final int EVENT_OBJECT_ADDED = 16386; // 0x4002 - field public static final int EVENT_OBJECT_INFO_CHANGED = 16391; // 0x4007 - field public static final int EVENT_OBJECT_PROP_CHANGED = 51201; // 0xc801 - field public static final int EVENT_OBJECT_PROP_DESC_CHANGED = 51202; // 0xc802 - field public static final int EVENT_OBJECT_REFERENCES_CHANGED = 51203; // 0xc803 - field public static final int EVENT_OBJECT_REMOVED = 16387; // 0x4003 - field public static final int EVENT_REQUEST_OBJECT_TRANSFER = 16393; // 0x4009 - field public static final int EVENT_STORAGE_INFO_CHANGED = 16396; // 0x400c - field public static final int EVENT_STORE_ADDED = 16388; // 0x4004 - field public static final int EVENT_STORE_FULL = 16394; // 0x400a - field public static final int EVENT_STORE_REMOVED = 16389; // 0x4005 - field public static final int EVENT_UNDEFINED = 16384; // 0x4000 - field public static final int EVENT_UNREPORTED_STATUS = 16398; // 0x400e - } - -} - package android.net { public class SSLCertificateSocketFactory extends javax.net.ssl.SSLSocketFactory { diff --git a/api/system-removed.txt b/api/system-removed.txt index 715312fdf6d49..fa6aea266bb86 100644 --- a/api/system-removed.txt +++ b/api/system-removed.txt @@ -177,31 +177,6 @@ package android.media.tv { } -package android.mtp { - - public final class MtpConstants { - field public static final int EVENT_CANCEL_TRANSACTION = 16385; // 0x4001 - field public static final int EVENT_CAPTURE_COMPLETE = 16397; // 0x400d - field public static final int EVENT_DEVICE_INFO_CHANGED = 16392; // 0x4008 - field public static final int EVENT_DEVICE_PROP_CHANGED = 16390; // 0x4006 - field public static final int EVENT_DEVICE_RESET = 16395; // 0x400b - field public static final int EVENT_OBJECT_ADDED = 16386; // 0x4002 - field public static final int EVENT_OBJECT_INFO_CHANGED = 16391; // 0x4007 - field public static final int EVENT_OBJECT_PROP_CHANGED = 51201; // 0xc801 - field public static final int EVENT_OBJECT_PROP_DESC_CHANGED = 51202; // 0xc802 - field public static final int EVENT_OBJECT_REFERENCES_CHANGED = 51203; // 0xc803 - field public static final int EVENT_OBJECT_REMOVED = 16387; // 0x4003 - field public static final int EVENT_REQUEST_OBJECT_TRANSFER = 16393; // 0x4009 - field public static final int EVENT_STORAGE_INFO_CHANGED = 16396; // 0x400c - field public static final int EVENT_STORE_ADDED = 16388; // 0x4004 - field public static final int EVENT_STORE_FULL = 16394; // 0x400a - field public static final int EVENT_STORE_REMOVED = 16389; // 0x4005 - field public static final int EVENT_UNDEFINED = 16384; // 0x4000 - field public static final int EVENT_UNREPORTED_STATUS = 16398; // 0x400e - } - -} - package android.net { public class SSLCertificateSocketFactory extends javax.net.ssl.SSLSocketFactory { diff --git a/api/test-removed.txt b/api/test-removed.txt index 0ff2476407494..15334beff3476 100644 --- a/api/test-removed.txt +++ b/api/test-removed.txt @@ -179,31 +179,6 @@ package android.media.tv { } -package android.mtp { - - public final class MtpConstants { - field public static final int EVENT_CANCEL_TRANSACTION = 16385; // 0x4001 - field public static final int EVENT_CAPTURE_COMPLETE = 16397; // 0x400d - field public static final int EVENT_DEVICE_INFO_CHANGED = 16392; // 0x4008 - field public static final int EVENT_DEVICE_PROP_CHANGED = 16390; // 0x4006 - field public static final int EVENT_DEVICE_RESET = 16395; // 0x400b - field public static final int EVENT_OBJECT_ADDED = 16386; // 0x4002 - field public static final int EVENT_OBJECT_INFO_CHANGED = 16391; // 0x4007 - field public static final int EVENT_OBJECT_PROP_CHANGED = 51201; // 0xc801 - field public static final int EVENT_OBJECT_PROP_DESC_CHANGED = 51202; // 0xc802 - field public static final int EVENT_OBJECT_REFERENCES_CHANGED = 51203; // 0xc803 - field public static final int EVENT_OBJECT_REMOVED = 16387; // 0x4003 - field public static final int EVENT_REQUEST_OBJECT_TRANSFER = 16393; // 0x4009 - field public static final int EVENT_STORAGE_INFO_CHANGED = 16396; // 0x400c - field public static final int EVENT_STORE_ADDED = 16388; // 0x4004 - field public static final int EVENT_STORE_FULL = 16394; // 0x400a - field public static final int EVENT_STORE_REMOVED = 16389; // 0x4005 - field public static final int EVENT_UNDEFINED = 16384; // 0x4000 - field public static final int EVENT_UNREPORTED_STATUS = 16398; // 0x400e - } - -} - package android.net { public class SSLCertificateSocketFactory extends javax.net.ssl.SSLSocketFactory { diff --git a/media/java/android/mtp/MtpConstants.java b/media/java/android/mtp/MtpConstants.java index 5bbf2ec4b3795..7d078d7a97cf5 100644 --- a/media/java/android/mtp/MtpConstants.java +++ b/media/java/android/mtp/MtpConstants.java @@ -583,43 +583,6 @@ public final class MtpConstants { */ public static final int ASSOCIATION_TYPE_GENERIC_FOLDER = 0x0001; - /** @removed */ - public static final int EVENT_UNDEFINED = 0x4000; - /** @removed */ - public static final int EVENT_CANCEL_TRANSACTION = 0x4001; - /** @removed */ - public static final int EVENT_OBJECT_ADDED = 0x4002; - /** @removed */ - public static final int EVENT_OBJECT_REMOVED = 0x4003; - /** @removed */ - public static final int EVENT_STORE_ADDED = 0x4004; - /** @removed */ - public static final int EVENT_STORE_REMOVED = 0x4005; - /** @removed */ - public static final int EVENT_DEVICE_PROP_CHANGED = 0x4006; - /** @removed */ - public static final int EVENT_OBJECT_INFO_CHANGED = 0x4007; - /** @removed */ - public static final int EVENT_DEVICE_INFO_CHANGED = 0x4008; - /** @removed */ - public static final int EVENT_REQUEST_OBJECT_TRANSFER = 0x4009; - /** @removed */ - public static final int EVENT_STORE_FULL = 0x400A; - /** @removed */ - public static final int EVENT_DEVICE_RESET = 0x400B; - /** @removed */ - public static final int EVENT_STORAGE_INFO_CHANGED = 0x400C; - /** @removed */ - public static final int EVENT_CAPTURE_COMPLETE = 0x400D; - /** @removed */ - public static final int EVENT_UNREPORTED_STATUS = 0x400E; - /** @removed */ - public static final int EVENT_OBJECT_PROP_CHANGED = 0xC801; - /** @removed */ - public static final int EVENT_OBJECT_PROP_DESC_CHANGED = 0xC802; - /** @removed */ - public static final int EVENT_OBJECT_REFERENCES_CHANGED = 0xC803; - /** Operation code for GetDeviceInfo */ public static final int OPERATION_GET_DEVICE_INFO = 0x1001; /** Operation code for OpenSession */ diff --git a/packages/MtpDocumentsProvider/tests/src/com/android/mtp/MtpManagerTest.java b/packages/MtpDocumentsProvider/tests/src/com/android/mtp/MtpManagerTest.java index 2e172b1fadf51..5ada14fa8b452 100644 --- a/packages/MtpDocumentsProvider/tests/src/com/android/mtp/MtpManagerTest.java +++ b/packages/MtpDocumentsProvider/tests/src/com/android/mtp/MtpManagerTest.java @@ -106,7 +106,7 @@ public class MtpManagerTest extends InstrumentationTestCase { 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) { + if (event.getEventCode() != MtpEvent.EVENT_OBJECT_ADDED) { continue; } assertTrue(event.getObjectHandle() != 0);