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

Commit f9dc857a authored by Hyunyoung Song's avatar Hyunyoung Song
Browse files

Make com.android.launcher3.action.LAUNCH intent explicit

b/27967359

Change-Id: I355ffc0af07d5bddcf87d41cf42bead9d5c824dc
parent 04907eea
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -71,6 +71,10 @@
         filter the activities shown in the launcher. Can be empty. -->
    <string name="app_filter_class" translatable="false"></string>

    <!-- Name of a packages that com.android.launcher3.action.LAUNCH
         should be targeting. Can be empty. -->
    <array name="launch_broadcast_targets" translatable="false"></array>

    <!-- View ID to use for QSB widget -->
    <item type="id" name="qsb_widget" />

+7 −1
Original line number Diff line number Diff line
@@ -132,6 +132,7 @@ public class Stats {

        final String flat = intent.toUri(0);
        Intent broadcastIntent = new Intent(ACTION_LAUNCH).putExtra(EXTRA_INTENT, flat);

        if (shortcut != null) {
            broadcastIntent.putExtra(EXTRA_CONTAINER, shortcut.container)
                    .putExtra(EXTRA_SCREEN, shortcut.screenId)
@@ -142,6 +143,11 @@ public class Stats {
        Bundle sourceExtras = LaunchSourceUtils.createSourceData();
        LaunchSourceUtils.populateSourceDataFromAncestorProvider(v, sourceExtras);
        broadcastIntent.putExtra(EXTRA_SOURCE, sourceExtras);

        String[] packages = mLauncher.getResources().getStringArray(R.array.launch_broadcast_targets);
        for(String p: packages) {
            broadcastIntent.setPackage(p);
            mLauncher.sendBroadcast(broadcastIntent, mLaunchBroadcastPermission);
        }
    }
}