diff options
author | Mike Lockwood <lockwood@android.com> | 2011-03-14 20:17:13 -0400 |
---|---|---|
committer | Mike Lockwood <lockwood@android.com> | 2011-03-14 20:17:13 -0400 |
commit | 8f6dce44e34504b891b53ff8ea524268b9095a8d (patch) | |
tree | 195c99646528da60f4eb8034d5077a244db2dc60 /packages/SystemUI/src/com/android/systemui/usb | |
parent | 015b1ecaec27b7cf5f1a78099d9ae34a0c3169f2 (diff) | |
download | frameworks_base-8f6dce44e34504b891b53ff8ea524268b9095a8d.zip frameworks_base-8f6dce44e34504b891b53ff8ea524268b9095a8d.tar.gz frameworks_base-8f6dce44e34504b891b53ff8ea524268b9095a8d.tar.bz2 |
Fix broadcast receiver leak in UsbConfirmActivity
Change-Id: Ie1db70d9a57f16f192178583871994467f50a636
Signed-off-by: Mike Lockwood <lockwood@android.com>
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/usb')
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/usb/UsbConfirmActivity.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/usb/UsbConfirmActivity.java b/packages/SystemUI/src/com/android/systemui/usb/UsbConfirmActivity.java index 4e6f81f..2781246 100644 --- a/packages/SystemUI/src/com/android/systemui/usb/UsbConfirmActivity.java +++ b/packages/SystemUI/src/com/android/systemui/usb/UsbConfirmActivity.java @@ -100,6 +100,14 @@ public class UsbConfirmActivity extends AlertActivity } + @Override + protected void onDestroy() { + if (mDisconnectedReceiver != null) { + unregisterReceiver(mDisconnectedReceiver); + } + super.onDestroy(); + } + public void onClick(DialogInterface dialog, int which) { if (which == AlertDialog.BUTTON_POSITIVE) { try { |