Simplify the mechanism of the pending activity and dialog

The mechanism of the pending activity and dialog can be more simplified
because the coming change will introduce new method to detect the screen
transition to the home screen and it is not so costly.

Bug: 130142364
Test: Performed manual test cases which includes regression tests.

Change-Id: Iaec0551dece215941d73871f74035792dfbce13b
4 files changed