summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings
diff options
context:
space:
mode:
authorJake Hamby <jhamby@google.com>2010-08-18 19:36:53 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2010-08-18 19:36:53 -0700
commit2876ad62082207e0e02cbc38b65ce9993cb121bf (patch)
treec5fa5932e02c695402dd4c4b16b74fd49f1c3089 /src/com/android/settings
parent4962c855b871f1657ca6d90817567203e6863551 (diff)
parent2fcfb28982b84a6383774cfd50d6a963b1a985e1 (diff)
downloadpackages_apps_settings-2876ad62082207e0e02cbc38b65ce9993cb121bf.zip
packages_apps_settings-2876ad62082207e0e02cbc38b65ce9993cb121bf.tar.gz
packages_apps_settings-2876ad62082207e0e02cbc38b65ce9993cb121bf.tar.bz2
am 2fcfb289: Merge " Fix Bluetooth Settings activity memory leak."
Merge commit '2fcfb28982b84a6383774cfd50d6a963b1a985e1' into gingerbread-plus-aosp * commit '2fcfb28982b84a6383774cfd50d6a963b1a985e1': Fix Bluetooth Settings activity memory leak.
Diffstat (limited to 'src/com/android/settings')
-rw-r--r--src/com/android/settings/ProgressCategory.java10
-rw-r--r--src/com/android/settings/bluetooth/BluetoothSettings.java3
2 files changed, 11 insertions, 2 deletions
diff --git a/src/com/android/settings/ProgressCategory.java b/src/com/android/settings/ProgressCategory.java
index 15810b3..f611137 100644
--- a/src/com/android/settings/ProgressCategory.java
+++ b/src/com/android/settings/ProgressCategory.java
@@ -26,7 +26,8 @@ import java.util.Map;
public class ProgressCategory extends PreferenceCategory {
private boolean mProgress = false;
-
+ private View oldView = null;
+
public ProgressCategory(Context context, AttributeSet attrs) {
super(context, attrs);
setLayoutResource(R.layout.preference_progress_category);
@@ -41,6 +42,13 @@ public class ProgressCategory extends PreferenceCategory {
int visibility = mProgress ? View.VISIBLE : View.INVISIBLE;
textView.setVisibility(visibility);
progressBar.setVisibility(visibility);
+
+ if (oldView != null) {
+ oldView.findViewById(R.id.scanning_progress).setVisibility(View.GONE);
+ oldView.findViewById(R.id.scanning_text).setVisibility(View.GONE);
+ oldView.setVisibility(View.GONE);
+ }
+ oldView = view;
}
/**
diff --git a/src/com/android/settings/bluetooth/BluetoothSettings.java b/src/com/android/settings/bluetooth/BluetoothSettings.java
index 1e73b2d..78c531c 100644
--- a/src/com/android/settings/bluetooth/BluetoothSettings.java
+++ b/src/com/android/settings/bluetooth/BluetoothSettings.java
@@ -188,7 +188,8 @@ public class BluetoothSettings extends PreferenceActivity
super.onPause();
mLocalManager.setForegroundActivity(null);
-
+ mDevicePreferenceMap.clear();
+ mDeviceList.removeAll();
unregisterReceiver(mReceiver);
mLocalManager.unregisterCallback(this);