commit | eb5f7a6a8ba0bdcf8627fb93ccd038dc6cbead11 | [log] [tgz] |
---|---|---|
author | Chong Zhang <chz@google.com> | Wed Aug 31 21:25:15 2016 -0700 |
committer | Chong Zhang <chz@google.com> | Fri Sep 02 18:30:24 2016 -0700 |
tree | 460cdef27b4aed9d22922dcf1a174e91383eba48 | |
parent | baeea4e0d113524ac9acb052232eb7152258ea66 [diff] |
Some fixes for MTP database corruption Sometimes the row for a directory could be accidentally deleted, when they're re-added the children's parent id could still point to the stale value, so the children were lost. Do not allow deletion of rows if some other rows are referencing it as parent. Also, run a query for orphans upon MTP connection, and try to fix up the parent id if possible. bug: 27542615 Change-Id: I305dc2f1335888c5d747bed1a7e0f28ac9bb49b4