OSDN Git Service

Fix bug about Wi-Fi dialog rotation
authortmfang <tmfang@google.com>
Thu, 16 Aug 2018 06:20:29 +0000 (14:20 +0800)
committertmfang <tmfang@google.com>
Fri, 17 Aug 2018 06:09:02 +0000 (14:09 +0800)
commitb53cdf09ddd04b098b949cec4f6bce661f8587cd
tree75a6bcb47c8382edfa928d4cf9cb413209de8b49
parent259986da75d47db6193cc5cd533940aa9eb2fcea
Fix bug about Wi-Fi dialog rotation

When user clicks a Wi-Fi access point in WifiSettings,
screen pops up a Wi-Fi point dialog. And then user
rotates the screen, Wi-Fi access dialog changes to
"Add network" full screen dialog.

In old code, we check whether dialog is showing by
dialog.isShowing() in onSaveInstanceState.
For now, this design is not appropriate. Since isShowing()
won't return true anymore when fragment calls onSaveInstanceState.

So, we check dialog object whether is null or not now.
If dialog is null, it means that there is no dialog was shown,
before user rotates the screen.

Change-Id: I7dc26369c005f576fe679abc70327f6a02620935
Fixes: 112624846
Test: manual test, robo test
src/com/android/settings/wifi/WifiSettings.java