Manage the permissions correctly on the device