OSDN Git Service

Align id selection from QueryTask to sort order from Media query
authorAlan Newberger <alann@google.com>
Mon, 27 Oct 2014 18:29:34 +0000 (11:29 -0700)
committerAlan Newberger <alann@google.com>
Mon, 27 Oct 2014 18:59:00 +0000 (11:59 -0700)
commit8644ffceaa0968cb3c4e8736d37ef1683aa30977
treecb022f8781565c27ceb57f739bd041c484bc5f84
parentf4857ffa50a4fe6fcead0abde524376c0e9d6a5a
Align id selection from QueryTask to sort order from Media query

In QueryTask we pick the id from the first result and consider it
the max id, yet we query ordered by date taken. On most phones
they're the same but by correcting the query to satisfy the
assumption in QueryTask, we remove costly scenarios where most
photos are reprocessed in LoadNewPhotosTask. One line fix in
LocalMediaData with more verbose logging added in CameraDataAdapter.

Bug: 17437217
Change-Id: Ia643f38d1bfb77ff0beaba989f0effe9a4dec31c
src/com/android/camera/data/CameraDataAdapter.java
src/com/android/camera/data/LocalMediaData.java