I know that a reboot is not just an animation. That is exactly what I am talking about. Moreover, animation is not required to evict encryption keys, and a reboot is not required either. For example,
FLAG_EVICT_CREDENTIAL_ENCRYPTION_KEY = 1;
DevicePolicyManager dpm = (DevicePolicyManager) getSystemService(DEVICE_POLICY_SERVICE);
dpm.lockNow(FLAG_EVICT_CREDENTIAL_ENCRYPTION_KEY);
works precisely without any animation. This is exactly what I mean. Why not just do something like dpm.lockNow(1); every time the screen is turned off? And as for the reboot software button, in an emergency situation you won't have enough time to hold down the physical buttons for it to appear, but you will have time to press the lock screen physical button. So, I am proposing to erase temporary encryption keys from RAM every time the screen locks. More precisely, to add such a feature so that a user could enable it.