Avoid CalledFromWrongThreadException in BubbleController
Problem: {
1.CalledFromWrongThreadException can happen if OneHandedTransitionCallback is called from another thread
}
Solution: {
1. Update the views in UI thread to avoid CalledFromWrongThreadException
}
Bug: 288588813
Change-Id: I23f535f89be9a14491d19dd16ec844d946dc486a
This commit is contained in:
@@ -277,16 +277,20 @@ public class BubbleController implements ConfigurationChangeListener {
|
||||
new OneHandedTransitionCallback() {
|
||||
@Override
|
||||
public void onStartFinished(Rect bounds) {
|
||||
if (mStackView != null) {
|
||||
mStackView.onVerticalOffsetChanged(bounds.top);
|
||||
}
|
||||
mMainExecutor.execute(() -> {
|
||||
if (mStackView != null) {
|
||||
mStackView.onVerticalOffsetChanged(bounds.top);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStopFinished(Rect bounds) {
|
||||
if (mStackView != null) {
|
||||
mStackView.onVerticalOffsetChanged(bounds.top);
|
||||
}
|
||||
mMainExecutor.execute(() -> {
|
||||
if (mStackView != null) {
|
||||
mStackView.onVerticalOffsetChanged(bounds.top);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user