Make sure to move InCallScreen to back on disconnect

... even when the activity has been paused.

This fixes the issue where the display won't turn on when:
1. Get a phone call when the display is off.
2. Silence the call by pressing power.
3. Wait until the call is hung up.
4. Get another call.

If the activity is not in background at step 4, FLAG_TURN_SCREEN_ON won't
take effect.

TESTED:
11. have the screen off when the 1st call ends
  -> make outgoing call

12. have the screen on when the 1st call ends
  -> make outgoing call

211. have the screen off when the 1st call ends
  -> while the screen is still off, get another incoming call (screen turns on)
  -> while the screen is still on, hang up
  -> make outgoing call

212. have the screen off when the 1st call ends
  -> while the screen is still off, get another incoming call (screen turns on)
  -> turn the screen off and hang up
  -> make outgoing call

221. have the screen off when the 1st call ends
  -> turn the screen on, get another incoming call
  -> while the screen is still on, hang up
  -> make outgoing call

222. have the screen off when the 1st call ends
  -> turn the screen on, get another incoming call
  -> turn the screen off and hang up
  -> make outgoing call

- Repeat 211-222 with the screen initially on.

bug 7438025

Change-Id: Ib0315c6e1e943c422d29b0037444854a14718c1c
1 file changed