diff options
author | Jake Hamby <jhamby@google.com> | 2011-09-06 15:38:23 -0700 |
---|---|---|
committer | Jake Hamby <jhamby@google.com> | 2011-09-06 18:35:08 -0700 |
commit | de53b46b165ca65a464ecc6f062da55e11050389 (patch) | |
tree | f32bed4a3e4892ca43b823b9d86130429c801b5c /src/com/android/settings/ProgressCategory.java | |
parent | 491af0805dcf92185f1ee2767d11a933e8bb9053 (diff) | |
download | packages_apps_Settings-de53b46b165ca65a464ecc6f062da55e11050389.tar.gz packages_apps_Settings-de53b46b165ca65a464ecc6f062da55e11050389.tar.bz2 packages_apps_Settings-de53b46b165ca65a464ecc6f062da55e11050389.zip |
BT device picker: don't rescan after rotating the device
The Bluetooth device picker was restarting the device scan after
the screen is rotated. Fix this by only starting the scan when the
savedInstanceState Bundle passed to onCreate() is null.
Also removes "No Bluetooth devices were found nearby" from list if
the user switches to a different app and then switches back to
the device picker.
Bug: 5249380
Change-Id: I8959c850649eb713fb930ee0a8a7bcb73ca7c1aa
Diffstat (limited to 'src/com/android/settings/ProgressCategory.java')
-rw-r--r-- | src/com/android/settings/ProgressCategory.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/com/android/settings/ProgressCategory.java b/src/com/android/settings/ProgressCategory.java index 6c74846ce7..e854a0038d 100644 --- a/src/com/android/settings/ProgressCategory.java +++ b/src/com/android/settings/ProgressCategory.java @@ -45,13 +45,13 @@ public class ProgressCategory extends ProgressCategoryBase { textView.setVisibility(noDeviceFound ? View.INVISIBLE : View.VISIBLE); progressBar.setVisibility(mProgress ? View.VISIBLE : View.INVISIBLE); - if (mProgress) { + if (mProgress || !noDeviceFound) { if (mNoDeviceFoundAdded) { removePreference(mNoDeviceFoundPreference); mNoDeviceFoundAdded = false; } } else { - if (noDeviceFound && !mNoDeviceFoundAdded) { + if (!mNoDeviceFoundAdded) { if (mNoDeviceFoundPreference == null) { mNoDeviceFoundPreference = new Preference(getContext()); mNoDeviceFoundPreference.setLayoutResource(R.layout.preference_empty_list); @@ -70,4 +70,3 @@ public class ProgressCategory extends ProgressCategoryBase { notifyChanged(); } } - |