Fix volume expand arrow to be displayed correctly
Sometimes, the volume control expand arrow would be displayed incorrectly. When different apps use different volume controls and force different orientations, the position of the arrow (expand button) will not be updated correctly. When this happens the arrow cannot be pressed and the volume settings cannot be expanded. The underlying reason is that onLayoutChange only compares the old dimensions of a view with the new dimensions, which doesn't take into account that the last time onLayoutChange was run it may have been run for a different view (a different volume control), in which case the dimensions of the new view may not have changed, but the arrow needs to be repositioned anyway as it needs to be positioned in relation to another view. Fix this problem by storing the last stream (volume control) that the arrow was positioned in relation to, and checking if we're positioning in relation to the same stream the next time the position of the arrow is updated. Change-Id: Id23e7605d50857292e09c1909b3e27f01bdf5e22
Loading
Please register or sign in to comment