summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI/src/com/android/systemui/usb
diff options
context:
space:
mode:
authorMike Lockwood <lockwood@android.com>2011-06-21 15:48:57 -0400
committerMike Lockwood <lockwood@android.com>2011-06-22 12:02:10 -0400
commit7730ad569d2c8dd6387be40685f5e99462a59352 (patch)
tree0a1eb55f4d62081df7f508e26c91bd72be230505 /packages/SystemUI/src/com/android/systemui/usb
parent8969d9924c662ab4cdacc342bbdc33756db730be (diff)
downloadframeworks_base-7730ad569d2c8dd6387be40685f5e99462a59352.zip
frameworks_base-7730ad569d2c8dd6387be40685f5e99462a59352.tar.gz
frameworks_base-7730ad569d2c8dd6387be40685f5e99462a59352.tar.bz2
Fix window leak in UsbPreferenceActivity
Change-Id: I4160e73a4e840662c6ac724e27460853fb259eae 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/UsbPreferenceActivity.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/usb/UsbPreferenceActivity.java b/packages/SystemUI/src/com/android/systemui/usb/UsbPreferenceActivity.java
index 187a486..7b07f79 100644
--- a/packages/SystemUI/src/com/android/systemui/usb/UsbPreferenceActivity.java
+++ b/packages/SystemUI/src/com/android/systemui/usb/UsbPreferenceActivity.java
@@ -39,6 +39,7 @@ public class UsbPreferenceActivity extends Activity implements View.OnClickListe
private String mCurrentFunction;
private String[] mFunctions;
private String mInstallerImagePath;
+ private AlertDialog mDialog;
private Button mMtpPtpButton;
private Button mInstallerCdButton;
private boolean mPtpActive;
@@ -71,7 +72,7 @@ public class UsbPreferenceActivity extends Activity implements View.OnClickListe
mInstallerCdButton.setVisibility(View.GONE);
}
- dialogBuilder.show();
+ mDialog = dialogBuilder.show();
}
public void onClick(View v) {
@@ -88,6 +89,9 @@ public class UsbPreferenceActivity extends Activity implements View.OnClickListe
mUsbManager.setMassStorageBackingFile(mInstallerImagePath);
}
+ if (mDialog != null) {
+ mDialog.dismiss();
+ }
finish();
}
}