Fix volume panel hang
SliceLiveData changed its behavior, if slice is null, it will not notify LiveData observer but callback to onErrorListener. We only reduce PanelSlicesLoaderCountdownLatch in LiveData observer. Therefore the error slice caused PanelSlicesLoaderCountdownLatch never count to 0, the UI was not displayed. It is solved by reducing PanelSlicesLoaderCountdownLatch in onErrorListener and also not return null in MediaOutputIndicatorSlice. Test: manual Fixes: 141084035 Change-Id: Iddb2dbdc0e0d2ac3e26071960bb667937f181121
This commit is contained in:
@@ -65,7 +65,9 @@ public class MediaOutputIndicatorSlice implements CustomSliceable {
|
||||
@Override
|
||||
public Slice getSlice() {
|
||||
if (!isVisible()) {
|
||||
return null;
|
||||
return new ListBuilder(mContext, MEDIA_OUTPUT_INDICATOR_SLICE_URI, ListBuilder.INFINITY)
|
||||
.setIsError(true)
|
||||
.build();
|
||||
}
|
||||
final IconCompat icon = IconCompat.createWithResource(mContext,
|
||||
com.android.internal.R.drawable.ic_settings_bluetooth);
|
||||
|
Reference in New Issue
Block a user