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

Commit 6dafeccb authored by Jerry Zhang's avatar Jerry Zhang
Browse files

Add support for MTP_RESET_DEVICE operation.

Since we only support one open session, this
command is the same as CLOSE_SESSION.

Test: mtp-reset
Change-Id: I2e95687a685af239c92473feb7c98419fcd55a1e
parent 1df67b1b
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -54,7 +54,7 @@ static const MtpOperationCode kSupportedOperationCodes[] = {
    MTP_OPERATION_SEND_OBJECT,
//    MTP_OPERATION_INITIATE_CAPTURE,
//    MTP_OPERATION_FORMAT_STORE,
//    MTP_OPERATION_RESET_DEVICE,
    MTP_OPERATION_RESET_DEVICE,
//    MTP_OPERATION_SELF_TEST,
//    MTP_OPERATION_SET_OBJECT_PROTECTION,
//    MTP_OPERATION_POWER_DOWN,
@@ -362,6 +362,7 @@ bool MtpServer::handleRequest() {
        case MTP_OPERATION_OPEN_SESSION:
            response = doOpenSession();
            break;
        case MTP_OPERATION_RESET_DEVICE:
        case MTP_OPERATION_CLOSE_SESSION:
            response = doCloseSession();
            break;