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

Commit 32871f62 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix a security issue in app widget service." into tm-qpr-dev

parents 47e8a772 263d7d0b
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1130,7 +1130,9 @@ public class AppWidgetManager {
     * @param intent        The intent of the service which will be providing the data to the
     *                      RemoteViewsAdapter.
     * @param connection    The callback interface to be notified when a connection is made or lost.
     * @param flags         Flags used for binding to the service
     * @param flags         Flags used for binding to the service. Currently only
     *                     {@link Context#BIND_AUTO_CREATE} and
     *                     {@link Context#BIND_FOREGROUND_SERVICE_WHILE_AWAKE} are supported.
     *
     * @see Context#getServiceDispatcher(ServiceConnection, Handler, int)
     * @hide
+4 −3
Original line number Diff line number Diff line
@@ -1225,8 +1225,9 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku
                if (ActivityManager.getService().bindService(
                        caller, activtiyToken, intent,
                        intent.resolveTypeIfNeeded(mContext.getContentResolver()),
                        connection, flags, mContext.getOpPackageName(),
                        widget.provider.getUserId()) != 0) {
                        connection, flags & (Context.BIND_AUTO_CREATE
                                | Context.BIND_FOREGROUND_SERVICE_WHILE_AWAKE),
                        mContext.getOpPackageName(), widget.provider.getUserId()) != 0) {

                    // Add it to the mapping of RemoteViewsService to appWidgetIds so that we
                    // can determine when we can call back to the RemoteViewsService later to