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

Commit ff403f2c authored by Daichi Hirono's avatar Daichi Hirono Committed by Android (Google) Code Review
Browse files

Merge "Add constans for MTP event codes."

parents aee0b56b 85f7078f
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
@@ -18173,6 +18173,24 @@ 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 −0
Original line number Diff line number Diff line
@@ -19685,6 +19685,24 @@ 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 {
+22 −2
Original line number Diff line number Diff line
@@ -18,13 +18,33 @@ package android.mtp;

/**
 * This class encapsulates information about a MTP event.
 * Event constants are defined by the USB-IF MTP specification.
 */
public class MtpEvent {
    private int mEventCode;
    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;

    /**
     * Returns event code of MTP event.
     *
     * See the USB-IF MTP specification for the details of event constants.
     * @return event code
     */
    public int getEventCode() { return mEventCode; }