Fix the OOM issue while capturing the screenshot.

This is not really an OOM issue. In fact, before capturing a screenshot,
it would be great if we wait for the stability of a view. (Otherwise,
the width and height were probably observed with super large values -
10^6 for both or so).

Bug: 338457856
Test: atest -c --iteration 150 \
    SystemUIGoogleRobo2RNGTests:com/android/systemui/biometrics/ui/BiometricPromptIconOnlyScreenshotTest
    (Results: https://screenshot.googleplex.com/3AWjfY9nPTkY7HT.png, 150
    iterations all passed.)
Change-Id: I043d2fe3ff889fa59724969d3369fb6630ddce64
1 file changed