Loading media/mtp/MtpServer.cpp +15 −3 Original line number Diff line number Diff line Loading @@ -95,10 +95,11 @@ static const MtpEventCode kSupportedEventCodes[] = { MTP_EVENT_STORE_REMOVED, }; MtpServer::MtpServer(int fd, MtpDatabase* database, MtpServer::MtpServer(int fd, MtpDatabase* database, bool ptp, int fileGroup, int filePerm, int directoryPerm) : mFD(fd), mDatabase(database), mPtp(ptp), mFileGroup(fileGroup), mFilePermission(filePerm), mDirectoryPermission(directoryPerm), Loading Loading @@ -426,9 +427,20 @@ MtpResponseCode MtpServer::doGetDeviceInfo() { // fill in device info mData.putUInt16(MTP_STANDARD_VERSION); mData.putUInt32(6); // MTP Vendor Extension ID if (mPtp) { mData.putUInt32(0); } else { // MTP Vendor Extension ID mData.putUInt32(6); } mData.putUInt16(MTP_STANDARD_VERSION); if (mPtp) { // no extensions string.set(""); } else { // MTP extensions string.set("microsoft.com: 1.0; android.com: 1.0;"); } mData.putString(string); // MTP Extensions mData.putUInt16(0); //Functional Mode mData.putAUInt16(kSupportedOperationCodes, Loading media/mtp/MtpServer.h +4 −1 Original line number Diff line number Diff line Loading @@ -39,6 +39,9 @@ private: MtpDatabase* mDatabase; // appear as a PTP device bool mPtp; // group to own new files and folders int mFileGroup; // permissions for new files and directories Loading Loading @@ -87,7 +90,7 @@ private: Vector<ObjectEdit*> mObjectEditList; public: MtpServer(int fd, MtpDatabase* database, MtpServer(int fd, MtpDatabase* database, bool ptp, int fileGroup, int filePerm, int directoryPerm); virtual ~MtpServer(); Loading Loading
media/mtp/MtpServer.cpp +15 −3 Original line number Diff line number Diff line Loading @@ -95,10 +95,11 @@ static const MtpEventCode kSupportedEventCodes[] = { MTP_EVENT_STORE_REMOVED, }; MtpServer::MtpServer(int fd, MtpDatabase* database, MtpServer::MtpServer(int fd, MtpDatabase* database, bool ptp, int fileGroup, int filePerm, int directoryPerm) : mFD(fd), mDatabase(database), mPtp(ptp), mFileGroup(fileGroup), mFilePermission(filePerm), mDirectoryPermission(directoryPerm), Loading Loading @@ -426,9 +427,20 @@ MtpResponseCode MtpServer::doGetDeviceInfo() { // fill in device info mData.putUInt16(MTP_STANDARD_VERSION); mData.putUInt32(6); // MTP Vendor Extension ID if (mPtp) { mData.putUInt32(0); } else { // MTP Vendor Extension ID mData.putUInt32(6); } mData.putUInt16(MTP_STANDARD_VERSION); if (mPtp) { // no extensions string.set(""); } else { // MTP extensions string.set("microsoft.com: 1.0; android.com: 1.0;"); } mData.putString(string); // MTP Extensions mData.putUInt16(0); //Functional Mode mData.putAUInt16(kSupportedOperationCodes, Loading
media/mtp/MtpServer.h +4 −1 Original line number Diff line number Diff line Loading @@ -39,6 +39,9 @@ private: MtpDatabase* mDatabase; // appear as a PTP device bool mPtp; // group to own new files and folders int mFileGroup; // permissions for new files and directories Loading Loading @@ -87,7 +90,7 @@ private: Vector<ObjectEdit*> mObjectEditList; public: MtpServer(int fd, MtpDatabase* database, MtpServer(int fd, MtpDatabase* database, bool ptp, int fileGroup, int filePerm, int directoryPerm); virtual ~MtpServer(); Loading