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" />
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)
Bundle sourceExtras = LaunchSourceUtils.createSourceData();
LaunchSourceUtils.populateSourceDataFromAncestorProvider(v, sourceExtras);
broadcastIntent.putExtra(EXTRA_SOURCE, sourceExtras);
- mLauncher.sendBroadcast(broadcastIntent, mLaunchBroadcastPermission);
+
+ String[] packages = mLauncher.getResources().getStringArray(R.array.launch_broadcast_targets);
+ for(String p: packages) {
+ broadcastIntent.setPackage(p);
+ mLauncher.sendBroadcast(broadcastIntent, mLaunchBroadcastPermission);
+ }
}
}