OSDN Git Service

Refactored Mtp driver interface into multiple classes.
authorJerry Zhang <zhangjerry@google.com>
Mon, 24 Oct 2016 19:10:41 +0000 (12:10 -0700)
committerJerry Zhang <zhangjerry@google.com>
Mon, 12 Dec 2016 22:36:06 +0000 (14:36 -0800)
commit487be61fb0a38873aec1d12da92437fba5e728f2
tree29bfa5273c091b25b31ac5353580f67229a8b07c
parentb985e3c6bab78c60ef53164f157dd5bccf3045f9
Refactored Mtp driver interface into multiple classes.

Added new interface for FunctionFS. This allows most of
the driver code to exist in userspace. The driver will
automatically use FunctionFS if it is enabled for that
device, otherwise it will default to the kernel driver.

The intention is to eventually deprecate the kernel driver.

Bug: 30976142
Change-Id: I36b8d16ca254fddd995b3ea1bd3d37b0ff4a28f7
Test: New automated tests for MtpFfsHandle, AsyncIO.
Manual testing on each device.
21 files changed:
media/mtp/Android.mk
media/mtp/AsyncIO.cpp [new file with mode: 0644]
media/mtp/AsyncIO.h [new file with mode: 0644]
media/mtp/IMtpHandle.h [new file with mode: 0644]
media/mtp/MtpDataPacket.cpp
media/mtp/MtpDataPacket.h
media/mtp/MtpDevHandle.cpp [new file with mode: 0644]
media/mtp/MtpEventPacket.cpp
media/mtp/MtpEventPacket.h
media/mtp/MtpFfsHandle.cpp [new file with mode: 0644]
media/mtp/MtpFfsHandle.h [new file with mode: 0644]
media/mtp/MtpPacket.h
media/mtp/MtpRequestPacket.cpp
media/mtp/MtpRequestPacket.h
media/mtp/MtpResponsePacket.cpp
media/mtp/MtpResponsePacket.h
media/mtp/MtpServer.cpp
media/mtp/MtpServer.h
media/mtp/tests/Android.mk [new file with mode: 0644]
media/mtp/tests/AsyncIO_test.cpp [new file with mode: 0644]
media/mtp/tests/MtpFfsHandle_test.cpp [new file with mode: 0644]