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:
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)) {
|
||||
|
||||
Reference in new issue
Block a user