Store whether the Dialog was previously dismissed

The dialog can be dismissed by either the framework automatically (i.e.
when the screen is rotated) or when the subscriptions change.

If both of these things happen while the class is not deleted, then
dismiss() will be called twice and there will be a crash

Bug: 184899699
Test: atest -c SettingsUnitTests
Change-Id: Ibaef59696feb566664a424f65f806396f02497e8
3 files changed