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

Commit 1b323794 authored by Sunny Goyal's avatar Sunny Goyal
Browse files

Ignoring DeadObjectException in startListening

> As of android M, the platform somtimes throws DeadObjectException
instead of TransactionTooLargeException

Bug: 25305031
Change-Id: I3a98db8a5041aef01640d16f9beb71b72bf598f1
parent 04e2c9ef
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ import android.appwidget.AppWidgetHost;
import android.appwidget.AppWidgetHostView;
import android.appwidget.AppWidgetProviderInfo;
import android.content.Context;
import android.os.DeadObjectException;
import android.os.TransactionTooLargeException;
import android.view.LayoutInflater;
import android.view.View;
@@ -69,7 +70,8 @@ public class LauncherAppWidgetHost extends AppWidgetHost {
        try {
            super.startListening();
        } catch (Exception e) {
            if (e.getCause() instanceof TransactionTooLargeException) {
            if (e.getCause() instanceof TransactionTooLargeException ||
                    e.getCause() instanceof DeadObjectException) {
                // We're willing to let this slide. The exception is being caused by the list of
                // RemoteViews which is being passed back. The startListening relationship will
                // have been established by this point, and we will end up populating the