PiP: Early return on MenusAlgorithm if there are no views.

If there are any missing views, there's nothing to do.

Bug: 161760276
Test: None
Change-Id: If63a1e855b1924dab981dd55b7bc663ed9ee26e5
This commit is contained in:
Ben Lin
2020-11-05 11:33:50 -08:00
parent 416274754e
commit e0cf6e4427

View File

@@ -60,6 +60,7 @@ public class PipMenuIconsAlgorithm {
if (mViewRoot == null || mTopEndContainer == null || mDragHandle == null
|| mSettingsButton == null || mDismissButton == null) {
Log.e(TAG, "One if the required views is null.");
return;
}
//We only need to calculate the layout once since it does not change.