OSDN Git Service

Fix windows leaked in ZenModeScheduleRuleSettings
authortmfang <tmfang@google.com>
Tue, 31 Jul 2018 08:24:57 +0000 (16:24 +0800)
committertmfang <tmfang@google.com>
Tue, 31 Jul 2018 08:45:07 +0000 (16:45 +0800)
commit4b5cbca5c855b591b68e8bb36c04e75d85d330b8
tree00ebe7adfd379530001d5ef5400dfccbd9dbe23d
parent89d35f949c73daf764fc627e7261f3d5b1989455
Fix windows leaked in ZenModeScheduleRuleSettings

ZenModeScheduleRuleSettings creates an DaysDialog when user clicked
Days option.

If Activity was destroyed suddenly, WindowsManager throws a windows leaked exception.
And then DaysDialog try to do something(dismiss), settings app will crash.

So, we need to dismiss dialog when activity was destroyed.

Test: robo test, change code to recover symptom, manual test
Change-Id: I8d5370fe9673573581d613da91c7ab9be55d8199
Fixes: 111841375
src/com/android/settings/notification/ZenModeScheduleRuleSettings.java