summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--api/current.txt36
-rw-r--r--api/system-current.txt36
-rw-r--r--api/test-current.txt36
-rw-r--r--media/java/android/mtp/MtpConstants.java37
-rw-r--r--media/java/android/mtp/MtpEvent.java21
5 files changed, 92 insertions, 74 deletions
diff --git a/api/current.txt b/api/current.txt
index 6c639f3c0733..fd13bde3f311 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -22379,6 +22379,24 @@ package android.mtp {
ctor public MtpConstants();
method public static boolean isAbstractObject(int);
field public static final int ASSOCIATION_TYPE_GENERIC_FOLDER = 1; // 0x1
+ 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
field public static final int FORMAT_3GP_CONTAINER = 47492; // 0xb984
field public static final int FORMAT_AAC = 47363; // 0xb903
field public static final int FORMAT_ABSTRACT_AUDIO_ALBUM = 47619; // 0xba03
@@ -22475,24 +22493,6 @@ package android.mtp {
public class MtpEvent {
ctor public MtpEvent();
method public int getEventCode();
- 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
}
public final class MtpObjectInfo {
diff --git a/api/system-current.txt b/api/system-current.txt
index 6359f842fb4f..3c330ffa6ff0 100644
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -23925,6 +23925,24 @@ package android.mtp {
ctor public MtpConstants();
method public static boolean isAbstractObject(int);
field public static final int ASSOCIATION_TYPE_GENERIC_FOLDER = 1; // 0x1
+ 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
field public static final int FORMAT_3GP_CONTAINER = 47492; // 0xb984
field public static final int FORMAT_AAC = 47363; // 0xb903
field public static final int FORMAT_ABSTRACT_AUDIO_ALBUM = 47619; // 0xba03
@@ -24021,24 +24039,6 @@ package android.mtp {
public class MtpEvent {
ctor public MtpEvent();
method public int getEventCode();
- 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
}
public final class MtpObjectInfo {
diff --git a/api/test-current.txt b/api/test-current.txt
index 9ed5a474b783..981df09a6e90 100644
--- a/api/test-current.txt
+++ b/api/test-current.txt
@@ -22387,6 +22387,24 @@ package android.mtp {
ctor public MtpConstants();
method public static boolean isAbstractObject(int);
field public static final int ASSOCIATION_TYPE_GENERIC_FOLDER = 1; // 0x1
+ 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
field public static final int FORMAT_3GP_CONTAINER = 47492; // 0xb984
field public static final int FORMAT_AAC = 47363; // 0xb903
field public static final int FORMAT_ABSTRACT_AUDIO_ALBUM = 47619; // 0xba03
@@ -22483,24 +22501,6 @@ package android.mtp {
public class MtpEvent {
ctor public MtpEvent();
method public int getEventCode();
- 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
}
public final class MtpObjectInfo {
diff --git a/media/java/android/mtp/MtpConstants.java b/media/java/android/mtp/MtpConstants.java
index d245f5886859..16577961bfbe 100644
--- a/media/java/android/mtp/MtpConstants.java
+++ b/media/java/android/mtp/MtpConstants.java
@@ -573,4 +573,41 @@ public final class MtpConstants {
* Association type for objects representing file system directories.
*/
public static final int ASSOCIATION_TYPE_GENERIC_FOLDER = 0x0001;
+
+ /** Event code for UNDEFINED event */
+ public static final int EVENT_UNDEFINED = 0x4000;
+ /** Event code for CANCEL_TRANSACTION event */
+ public static final int EVENT_CANCEL_TRANSACTION = 0x4001;
+ /** Event code for OBJECT_ADDED event */
+ public static final int EVENT_OBJECT_ADDED = 0x4002;
+ /** Event code for OBJECT_REMOVED event */
+ public static final int EVENT_OBJECT_REMOVED = 0x4003;
+ /** Event code for STORE_ADDED event */
+ public static final int EVENT_STORE_ADDED = 0x4004;
+ /** Event code for STORE_REMOVED event */
+ public static final int EVENT_STORE_REMOVED = 0x4005;
+ /** Event code for DEVICE_PROP_CHANGED event */
+ public static final int EVENT_DEVICE_PROP_CHANGED = 0x4006;
+ /** Event code for OBJECT_INFO_CHANGED event */
+ public static final int EVENT_OBJECT_INFO_CHANGED = 0x4007;
+ /** Event code for DEVICE_INFO_CHANGED event */
+ public static final int EVENT_DEVICE_INFO_CHANGED = 0x4008;
+ /** Event code for REQUEST_OBJECT_TRANSFER event */
+ public static final int EVENT_REQUEST_OBJECT_TRANSFER = 0x4009;
+ /** Event code for STORE_FULL event */
+ public static final int EVENT_STORE_FULL = 0x400A;
+ /** Event code for DEVICE_RESET event */
+ public static final int EVENT_DEVICE_RESET = 0x400B;
+ /** Event code for STORAGE_INFO_CHANGED event */
+ public static final int EVENT_STORAGE_INFO_CHANGED = 0x400C;
+ /** Event code for CAPTURE_COMPLETE event */
+ public static final int EVENT_CAPTURE_COMPLETE = 0x400D;
+ /** Event code for UNREPORTED_STATUS event */
+ public static final int EVENT_UNREPORTED_STATUS = 0x400E;
+ /** Event code for OBJECT_PROP_CHANGED event */
+ public static final int EVENT_OBJECT_PROP_CHANGED = 0xC801;
+ /** Event code for OBJECT_PROP_DESC_CHANGED event */
+ public static final int EVENT_OBJECT_PROP_DESC_CHANGED = 0xC802;
+ /** Event code for OBJECT_REFERENCES_CHANGED event */
+ public static final int EVENT_OBJECT_REFERENCES_CHANGED = 0xC803;
}
diff --git a/media/java/android/mtp/MtpEvent.java b/media/java/android/mtp/MtpEvent.java
index 4c8a74200ee0..6ec16dba42ac 100644
--- a/media/java/android/mtp/MtpEvent.java
+++ b/media/java/android/mtp/MtpEvent.java
@@ -21,26 +21,7 @@ package android.mtp;
* Event constants are defined by the USB-IF MTP specification.
*/
public class MtpEvent {
- public static final int EVENT_UNDEFINED = 0x4000;
- public static final int EVENT_CANCEL_TRANSACTION = 0x4001;
- public static final int EVENT_OBJECT_ADDED = 0x4002;
- public static final int EVENT_OBJECT_REMOVED = 0x4003;
- public static final int EVENT_STORE_ADDED = 0x4004;
- public static final int EVENT_STORE_REMOVED = 0x4005;
- public static final int EVENT_DEVICE_PROP_CHANGED = 0x4006;
- public static final int EVENT_OBJECT_INFO_CHANGED = 0x4007;
- public static final int EVENT_DEVICE_INFO_CHANGED = 0x4008;
- public static final int EVENT_REQUEST_OBJECT_TRANSFER = 0x4009;
- public static final int EVENT_STORE_FULL = 0x400A;
- public static final int EVENT_DEVICE_RESET = 0x400B;
- public static final int EVENT_STORAGE_INFO_CHANGED = 0x400C;
- public static final int EVENT_CAPTURE_COMPLETE = 0x400D;
- public static final int EVENT_UNREPORTED_STATUS = 0x400E;
- public static final int EVENT_OBJECT_PROP_CHANGED = 0xC801;
- public static final int EVENT_OBJECT_PROP_DESC_CHANGED = 0xC802;
- public static final int EVENT_OBJECT_REFERENCES_CHANGED = 0xC803;
-
- private int mEventCode = EVENT_UNDEFINED;
+ private int mEventCode = MtpConstants.EVENT_UNDEFINED;
/**
* Returns event code of MTP event.