library/src/main/java/com/liulishuo/filedownloader/FileDownloadLine.java
public byte getStatus(final int id, final String path) {
        if (FileDownloader.getImpl().isServiceConnected()) {
            return FileDownloader.getImpl().getStatus(id, path);
        }

        if (path != null && new File(path).exists()) {
            return FileDownloadStatus.completed;
        }

        final ConnectSubscriber subscriber = new ConnectSubscriber() {
            private byte mValue;

            @Override
            public void connected() {
                mValue = FileDownloader.getImpl().getStatus(id, path);
            }

            @Override
            public Object getValue() {
                return mValue;
            }
        };

        wait(subscriber);

        return (byte) subscriber.getValue();
    }
public byte getStatus(final int id, final String path) {
        if (FileDownloader.getImpl().isServiceConnected()) {
            return FileDownloader.getImpl().getStatus(id, path);
        }

        if (path != null && new File(path).exists()) {
            return FileDownloadStatus.completed;
        }

        final ConnectSubscriber subscriber = new ConnectSubscriber() {
            private byte mValue;

            @Override
            public void connected() {
                mValue = FileDownloader.getImpl().getStatus(id, path);
            }

            @Override
            public Object getValue() {
                return mValue;
            }
        };

        wait(subscriber);

        return (byte) subscriber.getValue();
    }
The {@link FileDownloader#getStatus(int, String)} request.