Avoid deadlock during boot up

Cp from aosp/1382500 to fix merge conflict

Avoid a deadlock that may occurs during boosting time.
if we are starting system ui while another thread is executing
the enableScreenAfterBoot function at the same time,
the deadlock occurs

BUG: 162566198

Change-Id: Ief47cad91cbbc498179cd38e653bd1fa565cee2e
Merged-In: Ief47cad91cbbc498179cd38e653bd1fa565cee2e
1 file changed