Commit 470eab52 authored by Nicolas Fella's avatar Nicolas Fella

Inhibit screen lock when remote keyboard is open

parent 9ff223e2
......@@ -29,6 +29,7 @@ import android.inputmethodservice.KeyboardView.OnKeyboardActionListener;
import android.os.Handler;
import android.util.Log;
import android.view.View;
import android.view.WindowManager;
import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.InputMethodManager;
import android.widget.Toast;
......@@ -119,6 +120,8 @@ public class RemoteKeyboardService
} finally {
RemoteKeyboardPlugin.releaseInstances();
}
getWindow().getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
}
@Override
......@@ -133,6 +136,8 @@ public class RemoteKeyboardService
} finally {
RemoteKeyboardPlugin.releaseInstances();
}
getWindow().getWindow().clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
}
@Override
......
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