Use SparseArray instead of HashMap<Integer, …>
Avoid using BroadcastReceiver to deliver the decision

Using an exported BroadcastReceiver should be avoided in this case. It
would be possible for a malicious app to send "fake" decisions.