@Override
    public boolean isInboundDone() {
        synchronized (ssl) {
            return (state == STATE_CLOSED
                    || state == STATE_CLOSED_INBOUND
                    || ssl.wasShutdownReceived())
                && (pendingInboundCleartextBytes() == 0);
        }
    }
Work-around to allow this method to be called on older versions of Android.
common/src/main/java/org/conscrypt/ConscryptEngine.java