OSDN Git Service

Fix context leak in AudioSwitchPreferenceController.
authorFan Zhang <zhfan@google.com>
Thu, 7 Jun 2018 18:51:09 +0000 (11:51 -0700)
committerFan Zhang <zhfan@google.com>
Thu, 7 Jun 2018 18:53:59 +0000 (18:53 +0000)
commitee96c3a259ad1ee3a8604730f8c722224ec07a50
treec495cbedf0f09c174948809a78c47e628874a131
parent32d9f451f9a01ed257c7eb04248857b8b640fead
Fix context leak in AudioSwitchPreferenceController.

In this controller the context is stored into a global singleton but was
not cleared, thus leaking context and associated views.

Change-Id: I4247f8ff753bc0a331c6c81a0e4b5b4bc41588de
Fixes: 80507279
Test: robotests
Test: inspected hprof before/after change
src/com/android/settings/sound/AudioSwitchPreferenceController.java
tests/robotests/src/com/android/settings/sound/AudioOutputSwitchPreferenceControllerTest.java