Closed Bug 1074600 Opened 8 years ago Closed 8 years ago
[MTP][KK] PC could not sync pictures which were taken by device very well when MTP enable and USB plugged in
Gaia-Rev 13973ab50760d1e8bb773082163f0dff19d35a44 Gecko-Rev https://hg.mozilla.org/releases/mozilla-aurora/rev/6e317e075d04 Build-ID 20140928160204 Version 34.0a2 STR: 1. USB plugged in and enable MTP 2. Device take a picture Expect result: 1. The picture shows on PC Actual result: 1. Sometimes, PC could not show full image
[Blocking Requested - why for this release]: functional issue
blocking-b2g: --- → 2.1?
QA Whiteboard: [COM=Storage]
Summary: [MTP][KK] PC could not sync pictures which were taken by device very well → [MTP][KK] PC could not sync pictures which were taken by device very well when MTP enable and USB plugged in
Adding qawanted for branch checks.
Hi Eden, please take a look about this bug. Thanks.
Assignee: nobody → echuang
blocking-b2g: 2.1? → 2.1+
After analysis, this should be related to the timing of adding a new entry when there is file create. When taking a picture, gecko will new a file first. At this time, we got file create event. Mtp add a entry for this file. (not a complete file) Then camera will modify this file to complete a picture. As discussed with Eden, he will add code for "file modified event" and update the database accordingly.
Following is the logcat for the cast 4840 10-03 05:46:34.690 20989 20989 I MozMtp : Observe: file-watcher-update: file DCIM/100MZLLA/IMG_0004.jpg created 4841 10-03 05:46:34.690 280 21587 E mm-camera: invalid stats mask. Return back 4842 10-03 05:46:34.690 280 21650 E mm-camera-CORE: af_process_parse_stats: Invalid FV data! 4843 10-03 05:46:34.690 280 21650 E mm-camera-CORE: af_process: Error processing AF stats! 4844 10-03 05:46:34.700 20989 21659 I MozMtp : FileWatcherUpdate: file /storage/sdcard/DCIM/100MZLLA/IMG_0004.jpg created 4845 10-03 05:46:34.700 20989 21659 I MozMtp : FileWatcherUpdate: About to call sendObjectAdded Handle 0x00000004 file /storage/sdcard/DCIM/100MZLLA/IMG_0004.jpg 4846 10-03 05:46:34.700 20989 20989 I Gecko : DSF (parent) file-watcher-update: mStorageType 'pictures' mStorageName 'sdcard' mRootDir '' mPath 'DCIM/100MZLLA/IMG_0004.jpg' mFile->GetPath '/storage/sdca rd/DCIM/100MZLLA/IMG_0004.jpg' 4847 10-03 05:46:34.700 20989 20989 I MozMtp : Observe: file-watcher-update: file DCIM/100MZLLA/IMG_0004.jpg modified 4848 10-03 05:46:34.710 20989 21659 I MozMtp : FileWatcherUpdate: file /storage/sdcard/DCIM/100MZLLA/IMG_0004.jpg modified FileWatcherUpdate() is called while the picture is created at line 4844, but Camera app did not finish the file editing. Then Camera app finished the file editing at line 4848, and send event to fileWatcher, but MozMtpServer ignored this event. I add some "modified" event handle for MozMtpServer. Since MtpServer does not support "modified" notification directly, we support it as removing original entry and re-adding the entry in MozMtpDatabase.
Comment on attachment 8500251 [details] [diff] [review] Handle "modified" event for MozMtpDatabase in FileWatcherUpdate(). This bug is similar with bug 1074604. I integrate the solution and continue related discussion to bug 1074604.
(In reply to Eden Chuang[:edenchuang] from comment #7) > Comment on attachment 8500251 [details] [diff] [review] > Handle "modified" event for MozMtpDatabase in FileWatcherUpdate(). > > This bug is similar with bug 1074604. I integrate the solution and continue > related discussion to bug 1074604. Can I say bug 1074604 is a duplicate of this bug?
Yes, I think it is the same reason. I will make it dup with bug 1074604.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1074604
Clearing keywords and blocking flag due to this being closed as a dupe
blocking-b2g: 2.1+ → ---
Verified on [2.1] Gaia-Rev f5d4ff60ffed8961f7d0380ada9d0facfdfd56b1 Gecko-Rev https://hg.mozilla.org/releases/mozilla-aurora/rev/75cd3a8fa031 Build-ID 20141012160202 Version 34.0a2 [2.2] Gaia-Rev 3b81896f04a02697e615fa5390086bd5ecfed84f Gecko-Rev https://hg.mozilla.org/mozilla-central/rev/199fb29c3467 Build-ID 20141012160201 Version 35.0a1
Status: RESOLVED → VERIFIED
Resolution: DUPLICATE → FIXED
You need to log in before you can comment on or make changes to this bug.