Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5a03ade7 authored by vadimt's avatar vadimt
Browse files

Improving diagnostics when Launcher dies while in ContentProvider call

Test: presubmit
Bug: 191059619
Change-Id: Ib87a41663a63729024b41603973b782cf4763551
parent ce7084f4
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -39,6 +39,7 @@ import android.graphics.Point;
import android.graphics.Rect;
import android.graphics.Rect;
import android.net.Uri;
import android.net.Uri;
import android.os.Bundle;
import android.os.Bundle;
import android.os.DeadObjectException;
import android.os.Parcelable;
import android.os.Parcelable;
import android.os.RemoteException;
import android.os.RemoteException;
import android.os.SystemClock;
import android.os.SystemClock;
@@ -269,6 +270,9 @@ public final class LauncherInstrumentation {
        try (ContentProviderClient client = getContext().getContentResolver()
        try (ContentProviderClient client = getContext().getContentResolver()
                .acquireContentProviderClient(mTestProviderUri)) {
                .acquireContentProviderClient(mTestProviderUri)) {
            return client.call(request, null, null);
            return client.call(request, null, null);
        } catch (DeadObjectException e) {
            fail("Launcher crashed");
            return null;
        } catch (RemoteException e) {
        } catch (RemoteException e) {
            throw new RuntimeException(e);
            throw new RuntimeException(e);
        }
        }