Fix an accidentally reverted condition

The conditional was accidentally reversed so bringing it
back to the correct state and also bringing back the security
exception being thrown on violation.

Test: manual

bug:67773960

Change-Id: I1223297b8662e94413cc0bdcbe86089d1af296c2
1 file changed