i don't know what I did

This commit is contained in:
hyb1996
2017-09-11 13:42:07 +08:00
parent 56920cd707
commit a64a92276c
34 changed files with 499 additions and 408 deletions

View File

@@ -214,12 +214,23 @@ public class ScriptRuntime {
}
public void setClip(final String text) {
final Object lock = new Object();
mUiHandler.post(new Runnable() {
@Override
public void run() {
ClipboardUtil.setClip(mUiHandler.getContext(), text);
synchronized (lock) {
lock.notify();
}
}
});
synchronized (lock) {
try {
lock.wait();
} catch (InterruptedException e) {
throw new ScriptInterruptedException();
}
}
}
public String getClip() {

View File

@@ -165,7 +165,7 @@ public class StardustConsole extends AbstractConsole {
if (!mShown) {
show();
}
waitConsoleView();
waitForConsoleView();
}
mConsoleView.showEditText();
try {
@@ -175,7 +175,7 @@ public class StardustConsole extends AbstractConsole {
}
}
private void waitConsoleView() {
private void waitForConsoleView() {
synchronized (this) {
try {
this.wait();