Make com.android.launcher3.action.LAUNCH intent explicit
b/27967359 Change-Id: I355ffc0af07d5bddcf87d41cf42bead9d5c824dc
This commit is contained in:
@@ -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" />
|
||||
|
||||
|
||||
@@ -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);
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user