Merge "Handle concurrent exit and wake lock acquisition."