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

Commit c25019ff authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "[Bugfix]create different pendingintent via appwidgetId" am: 71a5559a

parents 5a85d8a7 71a5559a
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -573,12 +573,6 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku
                }
            }

            if (onClickIntent != null) {
                views.setOnClickPendingIntent(android.R.id.background,
                        PendingIntent.getActivity(mContext, 0, onClickIntent,
                                PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE));
            }

            Icon icon = appInfo.icon != 0
                    ? Icon.createWithResource(appInfo.packageName, appInfo.icon)
                    : Icon.createWithResource(mContext, android.R.drawable.sym_def_app_icon);
@@ -590,6 +584,12 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku
            for (int j = 0; j < widgetCount; j++) {
                Widget widget = provider.widgets.get(j);
                if (targetWidget != null && targetWidget != widget) continue;
                if (onClickIntent != null) {
                    views.setOnClickPendingIntent(android.R.id.background,
                            PendingIntent.getActivity(mContext, widget.appWidgetId, onClickIntent,
                                    PendingIntent.FLAG_UPDATE_CURRENT
                                       | PendingIntent.FLAG_IMMUTABLE));
                }
                if (widget.replaceWithMaskedViewsLocked(views)) {
                    scheduleNotifyUpdateAppWidgetLocked(widget, widget.getEffectiveViewsLocked());
                }