Simplify PASTE option for "set clipboard"

When the client requests to set the clipboard, it may request to press
the PASTE key in addition. To be a bit generic, it was stored as a flag
in ControlMessage.java.

But flags suggest that it represents a bitwise union. Use a simple
boolean instead.
This commit is contained in:
Romain Vimont 2020-07-17 00:00:42 +02:00
parent 199c74f62f
commit eabaf6f7bd
4 changed files with 9 additions and 18 deletions

View file

@ -110,8 +110,7 @@ public class Controller {
}
break;
case ControlMessage.TYPE_SET_CLIPBOARD:
boolean paste = (msg.getFlags() & ControlMessage.FLAGS_PASTE) != 0;
setClipboard(msg.getText(), paste);
setClipboard(msg.getText(), msg.getPaste());
break;
case ControlMessage.TYPE_SET_SCREEN_POWER_MODE:
if (device.supportsInputEvents()) {