In device settings, select that user installed applications are wiped and enable Content Protection / Encryption.
More info: