Fix NPE when running ActivityManagerServiceTest

Since ATM is not passed to WindowProcessController, NPE happened when trying to access mAtm.mGlobalLock
Add a null check to prevent this kind of NPE.

Test: atest ActivityManagerServiceTest
Change-Id: I813386adcd6eab5206a75c8bf56b0c26968b26c8
Fixes: 111651991
2 files changed