Fix issue #3495749: Crash on choosing to open the downloaded images
This is due to the window doing a relayout after its activity is
stopped, at which point it may need to interact with the adapter
to load data.
The fix here is to tell ViewRoot about an activity being stopped
and, if in this state, hold off on doing any new measurements and
layouts of the hierarchy until it is no longer stopped.
In this case the relayout was happening due to the cursor
being deactivated, with causes the adapter to invalidate
its data. Because this is now in a dialog window, this
allows the window to actually be resized smaller (unlike when
in a full screen activity), and boom.
Change-Id: I26442b4679819b4a4e6bc56289afd3445526750b
3 files changed