OSDN Git Service

Fix an NPE in WifiP2pSettings UI
authorVinit Deshapnde <vinitd@google.com>
Mon, 10 Jun 2013 19:28:48 +0000 (12:28 -0700)
committerVinit Deshapnde <vinitd@google.com>
Mon, 10 Jun 2013 19:28:48 +0000 (12:28 -0700)
commit1a9819df165c6891248ca53e50ed44ac81a516be
tree1bd1b443c6742a7dd957db31051b2d2c8bb45c2a
parentbed7bada875c7e7badebd07368d73edd83b6b423
Fix an NPE in WifiP2pSettings UI

The NPE happens becase we save a references to the group that is to be
deleted, when the confirmation dialog is being shown to the user. We lose
that reference if orientation is changed (because the UI creates a new
WifiP2pSettings to interact with).

The fix is to save the name of the group that is being deleted in
persistent store, and re-select the group based on that.

Bug: 9004915
Change-Id: I1387a5b17fa2773748f4c8b34adddfc9516cfcf3
src/com/android/settings/wifi/p2p/WifiP2pSettings.java