onSaveInstanceState() is not working if system-initiated process death has occurred on Huawei P20 (EMUI 10). In the case of a configuration change, everything works
onSaveInstanceState()