| Index: remoting/android/java/src/org/chromium/chromoting/Desktop.java
|
| diff --git a/remoting/android/java/src/org/chromium/chromoting/Desktop.java b/remoting/android/java/src/org/chromium/chromoting/Desktop.java
|
| index ebc7ad6c3427bbd8c554d210ed860d15aa853a97..4ad4324d816408f6fb351b04a96647f7a5e4ec69 100644
|
| --- a/remoting/android/java/src/org/chromium/chromoting/Desktop.java
|
| +++ b/remoting/android/java/src/org/chromium/chromoting/Desktop.java
|
| @@ -62,8 +62,8 @@ public class Desktop
|
| /** The amount of time to wait to hide the ActionBar after user input is seen. */
|
| private static final int ACTIONBAR_AUTO_HIDE_DELAY_MS = 3000;
|
|
|
| - private final Event.Raisable<SoftInputMethodVisibilityChangedEventParameter>
|
| - mOnSoftInputMethodVisibilityChanged = new Event.Raisable<>();
|
| + private final Event.Raisable<SystemUiVisibilityChangedEventParameter>
|
| + mOnSystemUiVisibilityChanged = new Event.Raisable<>();
|
|
|
| private final Event.Raisable<InputModeChangedEventParameter> mOnInputModeChanged =
|
| new Event.Raisable<>();
|
| @@ -253,9 +253,8 @@ public class Desktop
|
| return super.onCreateOptionsMenu(menu);
|
| }
|
|
|
| - public Event<SoftInputMethodVisibilityChangedEventParameter>
|
| - onSoftInputMethodVisibilityChanged() {
|
| - return mOnSoftInputMethodVisibilityChanged;
|
| + public Event<SystemUiVisibilityChangedEventParameter> onSystemUiVisibilityChanged() {
|
| + return mOnSystemUiVisibilityChanged;
|
| }
|
|
|
| public Event<InputModeChangedEventParameter> onInputModeChanged() {
|
| @@ -372,6 +371,10 @@ public class Desktop
|
| return getSupportActionBar() != null && getSupportActionBar().isShowing();
|
| }
|
|
|
| + private boolean isSystemUiVisible() {
|
| + return (getWindow().getDecorView().getSystemUiVisibility() & getFullscreenFlags()) == 0;
|
| + }
|
| +
|
| /** Called whenever the visibility of the system status bar or navigation bar changes. */
|
| @Override
|
| public void onSystemUiVisibilityChange(int visibility) {
|
| @@ -541,9 +544,8 @@ public class Desktop
|
| // whenever they occur.
|
| boolean oldSoftInputVisible = mSoftInputVisible;
|
| mSoftInputVisible = (bottom < mMaxBottomValue);
|
| - mOnSoftInputMethodVisibilityChanged.raise(
|
| - new SoftInputMethodVisibilityChangedEventParameter(
|
| - mSoftInputVisible, left, top, right, bottom));
|
| + mOnSystemUiVisibilityChanged.raise(new SystemUiVisibilityChangedEventParameter(
|
| + isSystemUiVisible(), mSoftInputVisible, left, top, right, bottom));
|
|
|
| boolean softInputVisibilityChanged = oldSoftInputVisible != mSoftInputVisible;
|
| if (!mSoftInputVisible && softInputVisibilityChanged && !isActionBarVisible()) {
|
|
|