Retrying inserting image for clone profile in owner's MediaProvider till
successfully insertd.

Moving querying of newly inserted image within retry block. This will
ensure we have successfully added image associated to clone user in
owner's MediaProvider. Currently we are trying to
add image between this delay leading to failure in adding image causing
flaky testcase failures. This will reduce flakiness in cases where image
was not successfull added.

Bug: 220868413
Test: atest CtsAppCloningHostTest:com.android.cts.appcloning.AppCloningHostTest#testRemoveClonedProfileMediaProviderCleanup --iterations 100
Change-Id: I948745d7920754a20903f4e4454f9b104e00f2fa
1 file changed