Merge "Improving diagnostics when Launcher dies while in ContentProvider call" into sc-dev am: 26cd946f29

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/14991671

Change-Id: I6257d9f5af5e237fbfeab0de1946825e677146a7
This commit is contained in:
Vadim Tryshev
2021-06-17 21:39:58 +00:00
committed by Automerger Merge Worker
@@ -39,6 +39,7 @@ import android.graphics.Point;
import android.graphics.Rect;
import android.net.Uri;
import android.os.Bundle;
import android.os.DeadObjectException;
import android.os.Parcelable;
import android.os.RemoteException;
import android.os.SystemClock;
@@ -269,6 +270,9 @@ public final class LauncherInstrumentation {
try (ContentProviderClient client = getContext().getContentResolver()
.acquireContentProviderClient(mTestProviderUri)) {
return client.call(request, null, null);
} catch (DeadObjectException e) {
fail("Launcher crashed");
return null;
} catch (RemoteException e) {
throw new RuntimeException(e);
}