Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2fcfb289 authored by Jake Hamby's avatar Jake Hamby Committed by Android Code Review
Browse files

Merge " Fix Bluetooth Settings activity memory leak."

parents 0008d219 d4cebee1
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@ 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);
@@ -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;
    }
    
    /**
+2 −1
Original line number Diff line number Diff line
@@ -188,7 +188,8 @@ public class BluetoothSettings extends PreferenceActivity
        super.onPause();

        mLocalManager.setForegroundActivity(null);

        mDevicePreferenceMap.clear();
        mDeviceList.removeAll();
        unregisterReceiver(mReceiver);

        mLocalManager.unregisterCallback(this);