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

Commit 2876ad62 authored by Jake Hamby's avatar Jake Hamby Committed by Android Git Automerger
Browse files

am 2fcfb289: Merge " Fix Bluetooth Settings activity memory leak."

Merge commit '2fcfb289' into gingerbread-plus-aosp

* commit '2fcfb289':
  Fix Bluetooth Settings activity memory leak.
parents 4962c855 2fcfb289
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);