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

Skip to content
Commit f7afded1 authored by Jason Chiu's avatar Jason Chiu
Browse files

Fix Slice not pinned error

Slices should be pinned before being bound. The original design calls
registerSliceCallback() to pin a slice, and then calls bindSlice() and
passes the result to the callback directly. When the callback is
called, it executes unregisterSliceCallback() and unpins the slice.

However, registerSliceCallback() starts to observe the slice change and
then rebind it in an AsyncTask. If the slice is updating via its
background worker and the timing of the binding overlaps the callback
execution, it's possible to bind the slice right after unpinning it and
causes the error.

The solution is to remove the callback mechanism, and just to pin, bind
and unpin the slice directly.

Fixes: 157387583
Test: robotest
Change-Id: I8748dd3038a3662599935f07420d07cf254a4073
parent 03b20f86
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment