|
|
|
|
@ -163,9 +163,11 @@ public final class Device {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setClipboardText(String text) {
|
|
|
|
|
serviceManager.getClipboardManager().setText(text);
|
|
|
|
|
boolean ok = serviceManager.getClipboardManager().setText(text);
|
|
|
|
|
if (ok) {
|
|
|
|
|
Ln.i("Device clipboard set");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param mode one of the {@code SCREEN_POWER_MODE_*} constants
|
|
|
|
|
@ -176,9 +178,11 @@ public final class Device {
|
|
|
|
|
Ln.e("Could not get built-in display");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
SurfaceControl.setDisplayPowerMode(d, mode);
|
|
|
|
|
boolean ok = SurfaceControl.setDisplayPowerMode(d, mode);
|
|
|
|
|
if (ok) {
|
|
|
|
|
Ln.i("Device screen turned " + (mode == Device.POWER_MODE_OFF ? "off" : "on"));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Disable auto-rotation (if enabled), set the screen rotation and re-enable auto-rotation (if it was enabled).
|
|
|
|
|
|