Added shutdown handler

This commit is contained in:
M66B 2023-12-14 13:38:51 +01:00
parent 37dea4eb32
commit 0dd29abd06
1 changed files with 10 additions and 0 deletions

View File

@ -68,6 +68,16 @@ public class ApplicationEx extends Application
@Override
protected void attachBaseContext(Context base) {
TinyLogConfigurationLoader.setup(base);
Runtime.getRuntime().addShutdownHook(new Thread() {
@Override
public void run() {
Log.i("App shutdown" +
" version=" + BuildConfig.VERSION_NAME + BuildConfig.REVISION +
" process=" + android.os.Process.myPid());
}
});
super.attachBaseContext(getLocalizedContext(base));
}