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

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

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

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

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2370509



Change-Id: I7d5df42cc5bfe8aada970b9bbfae1f24b4e0922b
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents c4c40d4b 75e703a7
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -588,12 +588,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);
@@ -605,6 +599,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());
                }