Merge "Remove shape detection logic for icon legacy treatment Bug: 117991192" into ub-launcher3-master
diff --git a/src/com/android/launcher3/popup/RemoteActionShortcut.java b/src/com/android/launcher3/popup/RemoteActionShortcut.java
index af0d3da..c76fb96 100644
--- a/src/com/android/launcher3/popup/RemoteActionShortcut.java
+++ b/src/com/android/launcher3/popup/RemoteActionShortcut.java
@@ -18,6 +18,7 @@
 
 import android.app.PendingIntent;
 import android.app.RemoteAction;
+import android.content.Intent;
 import android.os.Handler;
 import android.os.Looper;
 import android.util.Log;
@@ -48,14 +49,20 @@
             AbstractFloatingView.closeAllOpenViews(launcher);
 
             try {
-                mAction.getActionIntent().send(0,
+                mAction.getActionIntent().send(
+                        launcher,
+                        0,
+                        new Intent().putExtra(
+                                Intent.EXTRA_PACKAGE_NAME,
+                                itemInfo.getTargetComponent().getPackageName()),
                         (pendingIntent, intent, resultCode, resultData, resultExtras) -> {
                             if (resultData != null && !resultData.isEmpty()) {
                                 Log.e(TAG, "Remote action returned result: " + mAction.getTitle()
                                         + " : " + resultData);
                                 Toast.makeText(launcher, resultData, Toast.LENGTH_SHORT).show();
                             }
-                        }, new Handler(Looper.getMainLooper()));
+                        },
+                        new Handler(Looper.getMainLooper()));
             } catch (PendingIntent.CanceledException e) {
                 Log.e(TAG, "Remote action canceled: " + mAction.getTitle(), e);
                 Toast.makeText(launcher, launcher.getString(