Put safeguard in dismissPip
Not able to reproduce the crash but in general, dismissPip should not happen when not in PiP mode. Bug: 155024023 Test: N/A Change-Id: Iea19ffc632ca8ca411b25d8b08ee4e91b2dd7360
This commit is contained in:
@@ -238,6 +238,11 @@ public class PipTaskOrganizer extends TaskOrganizer {
|
||||
* @param animationDurationMs duration in millisecond for the exiting PiP transition
|
||||
*/
|
||||
public void dismissPip(int animationDurationMs) {
|
||||
if (!mInPip || mToken == null) {
|
||||
Log.wtf(TAG, "Not allowed to dismissPip in current state"
|
||||
+ " mInPip=" + mInPip + " mToken=" + mToken);
|
||||
return;
|
||||
}
|
||||
final WindowContainerTransaction wct = new WindowContainerTransaction();
|
||||
wct.setActivityWindowingMode(mToken, WINDOWING_MODE_UNDEFINED);
|
||||
WindowOrganizer.applyTransaction(wct);
|
||||
|
||||
Reference in New Issue
Block a user