Close the TV PiP menu when losing window focus.
Bug: 219885877 Test: manual - open a PiP, then long press HOME -> menu should close Change-Id: I20b255f78e9e21a05a8138ef09ab00cce3f2521c
This commit is contained in:
@@ -494,6 +494,14 @@ public class TvPipMenuView extends FrameLayout implements View.OnClickListener {
|
||||
setFrameHighlighted(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onWindowFocusChanged(boolean hasWindowFocus) {
|
||||
super.onWindowFocusChanged(hasWindowFocus);
|
||||
if (!hasWindowFocus) {
|
||||
hideAllUserControls();
|
||||
}
|
||||
}
|
||||
|
||||
private void animateAlphaTo(float alpha, View view) {
|
||||
if (view.getAlpha() == alpha) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user