Improve accuracy of notification creation/removal

Bug: 28992457

The DeskClock activity used to signal the app as being in the foreground
in onResume(). This was too aggressive and caused the notifications to
be displayed at the same time as the app in multiwindow mode.

Moving this to onStart() and the reverse state to onStop() tracks the
foreground of the state more accurately and avoids displaying the app
and notifications concurrently.

Change-Id: I0c41c4ff40b47b793749b234a76824f4480d55ed
1 file changed