Code example for SynchronousQueue

Methods: put

0
        ThreadUtils.postToBackgroundThread(new Runnable() {
            @Override 
            public void run() { 
                String text = getClipboardTextImpl();
                try { 
                    sClipboardQueue.put(text != null ? text : "");
                } catch (InterruptedException ie) {}
            } 
        }); 
        try { 
            return sClipboardQueue.take();
        } catch (InterruptedException ie) {
            return ""; 
        } 
    } 
 
    @GeneratableAndroidBridgeTarget(stubName = "SetClipboardText") 
    public static void setText(final CharSequence text) {
        ThreadUtils.postToBackgroundThread(new Runnable() {
            @Override 
Connect your IDE to all the code out there  Get Codota for Java