Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cf62fdc0 authored by Daichi Hirono's avatar Daichi Hirono
Browse files

Move MTP event code to MtpConstants class.

BUG=25128276

Change-Id: I49530c50d7889e1b04931b8ec61f5f92a1c7e68f
parent 76774af1
Loading
Loading
Loading
Loading
+18 −18
Original line number Diff line number Diff line
@@ -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 {
+18 −18
Original line number Diff line number Diff line
@@ -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 {
+18 −18
Original line number Diff line number Diff line
@@ -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 {
+37 −0
Original line number Diff line number Diff line
@@ -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;
}
+1 −20
Original line number Diff line number Diff line
@@ -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.