Update threshold state used for deciding if the app is in foreground.

This is needed because fg service and bound fg service states are
swapped.

Bug: 70808931
Bug: 71758358
Bug: 71864947
Test: atest com.android.server.am.ActivityManagerServiceTest
Test: cts-tradefed run singleCommand cts-dev -m CtsHostsideNetworkTests -t \
      com.android.cts.net.HostsideRestrictBackgroundNetworkTests

Change-Id: I961b6c048d6d40580ca77603d05197d7294eca9d
1 file changed