diff options
author | Mike Lockwood <lockwood@android.com> | 2011-01-18 11:06:19 -0800 |
---|---|---|
committer | Mike Lockwood <lockwood@android.com> | 2011-01-18 11:07:11 -0800 |
commit | 7a0bd17bceaf3efc3732e30c538fae420d3b742c (patch) | |
tree | 5a9753d5a4ec3491d0a63d5f556d92f106be7070 /media/java/android/mtp | |
parent | 8c05b54f237879c48796eadbe6c8c4b17ce5f743 (diff) | |
download | frameworks_base-7a0bd17bceaf3efc3732e30c538fae420d3b742c.zip frameworks_base-7a0bd17bceaf3efc3732e30c538fae420d3b742c.tar.gz frameworks_base-7a0bd17bceaf3efc3732e30c538fae420d3b742c.tar.bz2 |
MTP: Fix problems with modification dates for folders and non-media files
Also removed an unnecessary parameter to MtpDatabase.endSendobject()
BUG: 3352142
Change-Id: I6fd812dcba4814956bc8bc1cbd6bd5c868197790
Signed-off-by: Mike Lockwood <lockwood@android.com>
Diffstat (limited to 'media/java/android/mtp')
-rw-r--r-- | media/java/android/mtp/MtpDatabase.java | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/media/java/android/mtp/MtpDatabase.java b/media/java/android/mtp/MtpDatabase.java index ac476ff..d348e8b 100644 --- a/media/java/android/mtp/MtpDatabase.java +++ b/media/java/android/mtp/MtpDatabase.java @@ -185,7 +185,7 @@ public class MtpDatabase { } } - private void endSendObject(String path, int handle, int format, long actualSize, boolean succeeded) { + private void endSendObject(String path, int handle, int format, boolean succeeded) { if (succeeded) { // handle abstract playlists separately // they do not exist in the file system so don't use the media scanner here @@ -208,18 +208,6 @@ public class MtpDatabase { Log.e(TAG, "RemoteException in endSendObject", e); } } else { - if (actualSize >= 0) { - // update size if necessary - ContentValues values = new ContentValues(); - values.put(Files.FileColumns.SIZE, actualSize); - try { - String[] whereArgs = new String[] { Integer.toString(handle) }; - mMediaProvider.update(mObjectsUri, values, ID_WHERE, whereArgs); - } catch (RemoteException e) { - Log.e(TAG, "RemoteException in mMediaProvider.update", e); - } - } - mMediaScanner.scanMtpFile(path, mVolumeName, handle, format); } } else { |