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

Commit e3306241 authored by Sunny Goyal's avatar Sunny Goyal
Browse files

Prevent a broken widget from crashing the Launcher

A widget can provide a wrong service intent causing the Launcher
to go in a crash loop

Bug: 115533593
Test: Verified on device
Change-Id: I28666d8559fd23a60fbd3f1539f3b3126a0fa62d
parent 37fa1033
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -253,8 +253,12 @@ public class RemoteViewsAdapter extends BaseAdapter implements Handler.Callback
                    final IServiceConnection sd = mContext.getServiceDispatcher(this, this, flags);
                    Intent intent = (Intent) msg.obj;
                    int appWidgetId = msg.arg1;
                    try {
                        mBindRequested = AppWidgetManager.getInstance(mContext)
                                .bindRemoteViewsService(mContext, appWidgetId, intent, sd, flags);
                    } catch (Exception e) {
                        Log.e(TAG, "Failed to bind remoteViewsService: " + e.getMessage());
                    }
                    return;
                }
                case MSG_NOTIFY_DATA_SET_CHANGED: {