Avoid making post state to RESUMED for a PAUSING activity

Make sure the client post execution lifecycle state to RESUMED
only if the activity was RESUMED while delivering new intent.

Bug: 135715788
Test: making skype calls
Test: atest ActivityThreadTest

Change-Id: I1e3054e1d1611aecf6ddf6d482abf2cb3ebdf9a4
6 files changed