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

Change-Id: I012093b52efda2cdffa47143c40e2708007158f5