Add a null check for runningAppProcesses.

The API activityManager.getRunningAppProcesses() returns null and not an
empty list if no apps are in foreground.

Test: atest HealthFitnessUnitTests:com.android.server.healthconnect.HealthConnectThreadSchedulerTest
Bug: 288429526
Change-Id: Ia6f6a3c6c3b492e2d0403f10405308b6e571f9cf
2 files changed