Merge \"Fix the memory leak in TetherSettings\"
am: 03393c4109
Change-Id: Iec6e2b02efe28491c988a530f401350f8ee5b52f
This commit is contained in:
@@ -182,6 +182,16 @@ public class TetherSettings extends SettingsPreferenceFragment
|
||||
com.android.internal.R.array.config_mobile_hotspot_provision_app);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();
|
||||
BluetoothProfile profile = mBluetoothPan.getAndSet(null);
|
||||
if (profile != null && adapter != null) {
|
||||
adapter.closeProfileProxy(BluetoothProfile.PAN, profile);
|
||||
}
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSaveInstanceState(Bundle savedInstanceState) {
|
||||
savedInstanceState.putInt(TETHER_CHOICE, mTetherChoice);
|
||||
|
Reference in New Issue
Block a user