| Index: device/power_save_blocker/android/java/src/org/chromium/device/power_save_blocker/PowerSaveBlocker.java
|
| diff --git a/device/power_save_blocker/android/java/src/org/chromium/device/power_save_blocker/PowerSaveBlocker.java b/device/power_save_blocker/android/java/src/org/chromium/device/power_save_blocker/PowerSaveBlocker.java
|
| index c29dfe32eb80650bf604b936c3918272af42eb35..f83cb43fa2a642b6f261d7796c0c89891038eeee 100644
|
| --- a/device/power_save_blocker/android/java/src/org/chromium/device/power_save_blocker/PowerSaveBlocker.java
|
| +++ b/device/power_save_blocker/android/java/src/org/chromium/device/power_save_blocker/PowerSaveBlocker.java
|
| @@ -24,21 +24,21 @@ class PowerSaveBlocker {
|
| private PowerSaveBlocker() {}
|
|
|
| @CalledByNative
|
| - private void applyBlock(View anchorView) {
|
| + private void applyBlock(View view) {
|
| assert mKeepScreenOnView == null;
|
| - mKeepScreenOnView = new WeakReference<>(anchorView);
|
| - anchorView.setKeepScreenOn(true);
|
| + mKeepScreenOnView = new WeakReference<>(view);
|
| + view.setKeepScreenOn(true);
|
| }
|
|
|
| @CalledByNative
|
| private void removeBlock() {
|
| - // mKeepScreenOnView may be null since it's possible that |applyBlock()|
|
| - // was not invoked due to having failed to acquire an anchor view.
|
| + // mKeepScreenOnView may be null since it's possible that |applyBlock()| was
|
| + // not invoked due to having failed to get a view to call |setKeepScrenOn| on.
|
| if (mKeepScreenOnView == null) return;
|
| - View anchorView = mKeepScreenOnView.get();
|
| + View view = mKeepScreenOnView.get();
|
| mKeepScreenOnView = null;
|
| - if (anchorView == null) return;
|
| + if (view == null) return;
|
|
|
| - anchorView.setKeepScreenOn(false);
|
| + view.setKeepScreenOn(false);
|
| }
|
| }
|
|
|