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
@@ -27,7 +27,14 @@ import android.widget.Toast;
|
||||
import java.net.URISyntaxException;
|
||||
|
||||
public class UninstallShortcutReceiver extends BroadcastReceiver {
|
||||
private static final String ACTION_UNINSTALL_SHORTCUT =
|
||||
"com.android.launcher.action.UNINSTALL_SHORTCUT";
|
||||
|
||||
public void onReceive(Context context, Intent data) {
|
||||
if (!ACTION_UNINSTALL_SHORTCUT.equals(data.getAction())) {
|
||||
return;
|
||||
}
|
||||
|
||||
Intent intent = data.getParcelableExtra(Intent.EXTRA_SHORTCUT_INTENT);
|
||||
String name = data.getStringExtra(Intent.EXTRA_SHORTCUT_NAME);
|
||||
boolean duplicate = data.getBooleanExtra(Launcher.EXTRA_SHORTCUT_DUPLICATE, true);
|
||||
|
||||
Reference in new issue
Block a user