Merge changes from topic "presubmit-am-14c0d0dd1ab9408c8fbd89013e2295b5" into tm-dev
* changes: Fix NPE when PiP actions, but no close action set Fix gravity issue when enabling expanded PiP (TV) Fix orientation change between PiPs when collapsed
This commit is contained in:
committed by
Android (Google) Code Review
commit
7436573ad9
@@ -95,13 +95,14 @@ public class TvPipBoundsAlgorithm extends PipBoundsAlgorithm {
|
||||
ProtoLog.d(ShellProtoLogGroup.WM_SHELL_PICTURE_IN_PICTURE,
|
||||
"%s: getEntryDestinationBounds()", TAG);
|
||||
}
|
||||
if (mTvPipBoundsState.isTvExpandedPipSupported()
|
||||
updateExpandedPipSize();
|
||||
final boolean isPipExpanded = mTvPipBoundsState.isTvExpandedPipSupported()
|
||||
&& mTvPipBoundsState.getDesiredTvExpandedAspectRatio() != 0
|
||||
&& !mTvPipBoundsState.isTvPipManuallyCollapsed()) {
|
||||
updateExpandedPipSize();
|
||||
&& !mTvPipBoundsState.isTvPipManuallyCollapsed();
|
||||
if (isPipExpanded) {
|
||||
updateGravityOnExpandToggled(Gravity.NO_GRAVITY, true);
|
||||
mTvPipBoundsState.setTvPipExpanded(true);
|
||||
}
|
||||
mTvPipBoundsState.setTvPipExpanded(isPipExpanded);
|
||||
return getTvPipBounds().getBounds();
|
||||
}
|
||||
|
||||
|
||||
@@ -303,7 +303,7 @@ public class TvPipMenuView extends FrameLayout implements View.OnClickListener {
|
||||
*/
|
||||
private boolean actionsMatch(RemoteAction action1, RemoteAction action2) {
|
||||
if (action1 == action2) return true;
|
||||
if (action1 == null) return false;
|
||||
if (action1 == null || action2 == null) return false;
|
||||
return Objects.equals(action1.getTitle(), action2.getTitle())
|
||||
&& Objects.equals(action1.getContentDescription(), action2.getContentDescription())
|
||||
&& Objects.equals(action1.getActionIntent(), action2.getActionIntent());
|
||||
|
||||
Reference in New Issue
Block a user