Move hide scm button condition

Move shouldShowSizeCompatRestartButton to eligibleToShowLayout which
should release the layout if not eligible before view is created. This
should also let size compat restart button to be shown when
exiting/entering split screen and folding/unfolding.

Remove unnecessary check in createLayout and updateCompatInfo as the
eligibility is already checked in eligibleToShowLayout.

getLastTaskInfo can never be null as mTaskInfo is never null.

Fix: 321920640
Test: atest CompatUIWindowManagerTest
      atest CompatUILayoutTest
Change-Id: I78cdd070e43ae0e8a43314abbac73c6948047e47
4 files changed