summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher/InstallShortcutReceiver.java
diff options
context:
space:
mode:
authorRomain Guy <romainguy@android.com>2009-06-17 10:20:34 -0700
committerRomain Guy <romainguy@android.com>2009-06-17 10:20:34 -0700
commit51ed5b9bc05c6eb37dcb3fe38fa021f1044c0f88 (patch)
tree81c86f27621af9ba019863deda4bee83f3653917 /src/com/android/launcher/InstallShortcutReceiver.java
parentded9ec91f6623d2566e1b2439ab302b6451e1657 (diff)
downloadpackages_apps_trebuchet-51ed5b9bc05c6eb37dcb3fe38fa021f1044c0f88.zip
packages_apps_trebuchet-51ed5b9bc05c6eb37dcb3fe38fa021f1044c0f88.tar.gz
packages_apps_trebuchet-51ed5b9bc05c6eb37dcb3fe38fa021f1044c0f88.tar.bz2
Adds checks in Home's broadcast receivers to handle only known actions.
Previously, Home would handle any action sent directly to its broadcast receivers as if it was an UNINSTALL/INSTALL_SHORTCUT action.
Diffstat (limited to 'src/com/android/launcher/InstallShortcutReceiver.java')
-rw-r--r--src/com/android/launcher/InstallShortcutReceiver.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/com/android/launcher/InstallShortcutReceiver.java b/src/com/android/launcher/InstallShortcutReceiver.java
index fd2789c..7c727a8 100644
--- a/src/com/android/launcher/InstallShortcutReceiver.java
+++ b/src/com/android/launcher/InstallShortcutReceiver.java
@@ -24,9 +24,16 @@ import android.database.Cursor;
import android.widget.Toast;
public class InstallShortcutReceiver extends BroadcastReceiver {
+ private static final String ACTION_INSTALL_SHORTCUT =
+ "com.android.launcher.action.INSTALL_SHORTCUT";
+
private final int[] mCoordinates = new int[2];
public void onReceive(Context context, Intent data) {
+ if (!ACTION_INSTALL_SHORTCUT.equals(data.getAction())) {
+ return;
+ }
+
int screen = Launcher.getScreen();
if (!installShortcut(context, data, screen)) {