Fix window leak problems in settings.

There were window leak in the settings application.
These leak happens when an AlertDialog displays, rotate the phone,
then it would cause window leak.

Change-Id: I914897bf657933efea72eeea66076dc288098420
6 files changed