Revert "Revert "Don't let apps disable the SIM PIN entry screen.""

This reverts commit 14f0df3dd65ed4e8b95e33cb3f5a85650c3a7f5b.
Revert "Revert "A tiny optimalization""

This reverts commit 791d231bc71c47770136792c299d33904c91c885.