Commit f71100be authored by mnaganov@chromium.org's avatar mnaganov@chromium.org

[Android] Set the PowerSaveBlocker's View to have zero dimensions

Currently the View created by PowerSaveBlocker has the same size as the parent
view. This is not acceptable at least for WebView applications, since such a
View can interfere with application logic in case when the application maintains
its own child Views for WebView.

The view must be visible (otherwise, KeepScreenOn has no effect), but we can
set it to have zero dimensions, thus minimizing interference.

BUG=270903,386087

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@278505 0039d316-1c4b-4281-b951-d872f2087c98
parent e5e69c1b
......@@ -64,6 +64,7 @@ public class ViewAndroid {
mKeepScreenOnCount++;
if (mKeepScreenOnCount == 1) {
mKeepScreenOnView = mViewAndroidDelegate.acquireAnchorView();
mViewAndroidDelegate.setAnchorViewPosition(mKeepScreenOnView, 0, 0, 0, 0);
mKeepScreenOnView.setKeepScreenOn(true);
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment