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.
This commit is contained in:
Romain Guy committed 2009-06-17 10:20:34 -07:00
1 parent ded9ec91f6
commit 51ed5b9bc0
2 files changed
+14

No files matched your search

@@ -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)) {