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

Commit a7d81598 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix content observer in SliceView"

parents 993ebff1 603e779a
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -212,11 +212,15 @@ public class SliceView extends ViewGroup {
        validate(sliceUri);
        Slice s = Slice.bindSlice(mContext.getContentResolver(), sliceUri);
        if (s != null) {
            if (mObserver != null) {
                getContext().getContentResolver().unregisterContentObserver(mObserver);
            }
            mObserver = new SliceObserver(new Handler(Looper.getMainLooper()));
            if (isAttachedToWindow()) {
                registerSlice(sliceUri);
            }
            showSlice(s);
            mCurrentSlice = s;
            reinflate();
        }
        return s != null;
    }