Example usage for android.os ParcelFileDescriptor closeWithError

List of usage examples for android.os ParcelFileDescriptor closeWithError

Introduction

In this page you can find the example usage for android.os ParcelFileDescriptor closeWithError.

Prototype

public void closeWithError(String msg) throws IOException 

Source Link

Document

Close the ParcelFileDescriptor, informing any peer that an error occurred while processing.

Usage

From source file:Main.java

public static void closeWithErrorQuietly(ParcelFileDescriptor pfd, String msg) {
    if (pfd != null) {
        try {/*  w  w w .j  a v  a2s .c  o m*/
            pfd.closeWithError(msg);
        } catch (IOException ignored) {
        }
    }
}