How to make device permissions stick?