History log of /frameworks/av/media/mtp/MtpUtils.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
dc148de23ea1437f0e9f9794c8977ad6cf70f361 14-May-2018 Jerry Zhang <zhangjerry@google.com> Call access(2) on all files/dirs modified by Mtp

External sdcards are accessed through /mnt/media_rw,
so access() each touched file for sdcardfs to update
its metadata. This is done for all created/deleted/renamed
folders and files.

Bug: 77849654
Test: use mtp with emulated sdcard
Change-Id: Ic8cef9dc90e9cbc9783ff45a87c481833f910665
/frameworks/av/media/mtp/MtpUtils.cpp
e5aa05d12a48f7c5766a80d5bd2dc8cd068c1bcd 13-Oct-2017 Jerry Zhang <zhangjerry@google.com> MtpServer changes for MtpStorageManager

MoveObject and DeleteObject require
begin() and end() methods in order to
maintain database consistency. delete() now
has to return errors.

Allow sendObject after sendObjectInfo since
the spec allows this.

Test: See tests for main MtpStorageManager change
Bug: 63143623
Change-Id: Ied105e884cafd36e861521dcc59740e23b330f5f
/frameworks/av/media/mtp/MtpUtils.cpp
e242f12c0f33518e0760fabfdad8cb93a1c8a2fb 16-Oct-2017 Jerry Zhang <zhangjerry@google.com> Account for folders in copy and move.

Copy and move will use mkdir() if target
is a folder, and copyFile() if target is a file.

Move will recursively copy contents if moving
between different storages. Move will also
change the storageId.

Bug: 67028892
Test: Copy and move folders on win 10
Change-Id: If114ef74b9d8668cf66d45953d9ea8b17bc11ae8
/frameworks/av/media/mtp/MtpUtils.cpp
708b3e0b72189d2d2e932459bd0391f98c9ff9a2 27-Sep-2017 Jerry Zhang <zhangjerry@google.com> Add implementations for move and copy operations.

Previously, we didn't have these implemented so the
host OS would emulate them by pulling the object
and pushing it to a new location. This can result
in data being lost and it is slow.

With the operations implemented, moving objects
on the same storage is instantaneous since the data
doesn't need to move. Moving objects between storages
and copying objects are both much faster since no
data has to be moved through USB.

Bug: 66679910
Test: Move and copy objects, verify they are correct
Change-Id: I38c69eee41d883af46fa2f1b9e091193b2847e8c
/frameworks/av/media/mtp/MtpUtils.cpp
d4b473884617987e02155cd1aae9e573e2f79a58 06-Jan-2016 Elliott Hughes <enh@google.com> Clean up time zone handling in MtpUtils::parseDateTime.

The intent here is supposed to be to use local time (which mktime(3) does)
unless the string ends 'Z' in which case we're supposed to use UTC. The UTC
equivalent of mktime(3) is timegm(3).

This code has come to my attention in two ways. Externally it was pointed
out that the localtime_r(3) was accessing uninitialized memory leading to
unpredicatable results. Internally, this is the only caller of the
non-standard mktime_tz --- ironically using it in a way that -- apart from
the flakiness caused by the uninitialized variable -- would make it behave
like the standard mktime(3).

Bug: https://code.google.com/p/android/issues/detail?id=185159
Bug: http://b/15765976
Change-Id: I5f015727c4c08a139ef478fafba5811a9758d5df
/frameworks/av/media/mtp/MtpUtils.cpp
37b216c75ca5e38f1a56a86a95b04ff6b4e71ae7 25-Jul-2014 Elliott Hughes <enh@google.com> Remove last user of <cutils/tztime.h>.

Bug: 15765976

(cherry picked from commit 56687f7cbf0a3d7909830fc1390a98c713a05e6f)

Change-Id: Iacb225584c3acdbb512f46b638a215b75b32cdcb
/frameworks/av/media/mtp/MtpUtils.cpp
ea1db0a716cc937af5371153b959610baa2c6d52 26-Jan-2011 Mike Lockwood <lockwood@android.com> MTP: Fix month off by one error in date parsing and formatting code

BUG: 3379100

Change-Id: Ib386f0def9d611529ce0528b8159cef48df9cd85
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/av/media/mtp/MtpUtils.cpp
b14e588bec4d5e39e61b020b5b575f2ce555d316 30-Jun-2010 Mike Lockwood <lockwood@android.com> MTP: replace printfs with logcat

Change-Id: I2c30921098e2dc049dc5fc1e0a548ead33c363e0
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/av/media/mtp/MtpUtils.cpp
335dd2be955607f2632eabc25045857f2cc8b674 19-May-2010 Mike Lockwood <mike@spruce.(none)> More work on PTP host support.

Change-Id: Ifbd5bd5efa3cdb750ae1a2aae38181457554d34d
Signed-off-by: Mike Lockwood <mike@spruce.(none)>
/frameworks/av/media/mtp/MtpUtils.cpp
7850ef999740f214a1990a9c090d3f3865d435aa 14-May-2010 Mike Lockwood <lockwood@android.com> Move MTP code to the android namespace

Change-Id: I5da48038fd5e4cdeefaeba42cdc74eb588b3448d
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/av/media/mtp/MtpUtils.cpp
16864bae0f51c32c456da2c43adf7a057c0c4882 11-May-2010 Mike Lockwood <lockwood@android.com> Checkpoint work on MTP and PTP investigation.

This change includes work in progress on a C++ library for both host and device
MTP and PTP support.
Currently the makefile builds two test programs:

mtptest - a command line test program that implements a small subset of device side MTP.
Requires a kernel driver that has not been checked in yet.

ptptest - a host tool to test USB host support for detecting and communicating with
digital cameras over PTP. Runs on Linux host.

Later this will be reformulated as a native library that will be used in the media process.

Change-Id: I81aab279975b600b59d99013ab97f9adf0b58da7
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/av/media/mtp/MtpUtils.cpp