Merge "Fixed a memory leak in the bluetooth settings"

This commit is contained in:
Jake Hamby
2011-02-04 16:12:54 -08:00
committed by Android Code Review

View File

@@ -161,8 +161,6 @@ public class BluetoothSettings extends PreferenceActivity
// Repopulate (which isn't too bad since it's cached in the settings
// bluetooth manager
mDevicePreferenceMap.clear();
mDeviceList.removeAll();
addDevices();
if (mScreenType == SCREEN_TYPE_SETTINGS) {
@@ -187,6 +185,9 @@ public class BluetoothSettings extends PreferenceActivity
protected void onPause() {
super.onPause();
mDevicePreferenceMap.clear();
mDeviceList.removeAll();
mLocalManager.setForegroundActivity(null);
mDevicePreferenceMap.clear();
mDeviceList.removeAll();