Fix memory leak in Bluetooth settings
Bluetooth settings screen has two categories. Each category should call removeAll() method to unregister a callback from CachedBluetoothDevice. But the method is not called for mPairedDevicesCategory. Bug: 30004142 Test: manual - connect to Bluetooth device and then open and close Bluetooth settings screen repeatedly Change-Id: I5a72994473ee2bb5fc3ad00176d9a930b4839099
This commit is contained in:
committed by
Yoshinori Hirano
parent
3cbae7d6b5
commit
36c25af6a1
@@ -210,6 +210,7 @@ public final class BluetoothSettings extends DeviceListPreferenceFragment implem
|
|||||||
@Override
|
@Override
|
||||||
public void onStop() {
|
public void onStop() {
|
||||||
super.onStop();
|
super.onStop();
|
||||||
|
mPairedDevicesCategory.removeAll();
|
||||||
if (mBluetoothEnabler != null) {
|
if (mBluetoothEnabler != null) {
|
||||||
mBluetoothEnabler.pause();
|
mBluetoothEnabler.pause();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user