Rather than having dynamic timing, I would suggest to register callback. Once the background task is completed, you can call callback. In callback, you can start a new activity or home screen.
I would also advise against keeping the splash screen for too long, as it may give users the impression that the app is stuck or not working. However, if it's a requirement, you can display a progress bar indicating the loading process, similar to how it's done in games, to reassure users that the app is working.