Fix race condition bug related to freezing apps.
am: 41d2be0f0f

Change-Id: I0b308d992725d0ffb0643157fdad27b394ff992a