Fix importer crashes when unplugging during indexing

Bug: 8027984
Slightly refactored the indexing step to encapsulate all
of the indexing work within the runnable that does it and
to correctly handle the cases where the device is unplugged
in the middle of the indexing.

Change-Id: I338657bbbedd6b82d012f65cd1ea28e0afd890c2
1 file changed
tree: 146e5e4df7318211280152a46646133aadbe8268
  1. gallerycommon/
  2. src/
  3. src_pd/
  4. tests/