Update the method about foreground time.

For now it uses MIN(STATE_TOP_TIME, FOREGROUND_ACTIVITY_TIME) and this
method is used in both display and screen smearing.

Bug: 63080621
Test: RunSettingsRoboTests
Change-Id: I2ca3109697aa66fae67d8b2f4f10c4d08bb99d59
3 files changed