Add visibility check to [ActivityStatus]
commit1707654f83f93ccafce142bc2565c8ce431542e0
authordfalcantara@chromium.org <dfalcantara@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Thu, 17 Oct 2013 17:52:58 +0000 (17 17:52 +0000)
committerdfalcantara@chromium.org <dfalcantara@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Thu, 17 Oct 2013 17:52:58 +0000 (17 17:52 +0000)
tree1bd246134b3fcacb1528aa42cbffa003839e95f5
parent0dac61ea5928fbd3b61455faf7113e31adf00515
Add visibility check to [ActivityStatus]

Some Java code checks to see whether Chrome is in the foreground when
it should really be checking if the Application's top Activity is
visible for scenarios where a little popup partially covers Chrome.

Add a method to make the check more explicit, then change obvious places
that do checks on whether Chrome is running to use the new function.

Precursor to https://gerrit-int.chromium.org/#/c/45073/

BUG=308211
R=nyquist@chromium.org, tedchoc@chromium.org, yfriedman@chromium.org

Review URL: https://codereview.chromium.org/27509007

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@229172 0039d316-1c4b-4281-b951-d872f2087c98
base/android/java/src/org/chromium/base/ActivityStatus.java
chrome/android/java/src/org/chromium/chrome/browser/sync/DelayedSyncController.java
chrome/android/javatests/src/org/chromium/chrome/browser/sync/DelayedSyncControllerTest.java
sync/android/java/src/org/chromium/sync/notifier/InvalidationService.java