Code example for ParcelFileDescriptor

Methods: close

0
		mInputStream = null;
		mOutputStream = null;
 
		if (mFileDescriptor != null) {
			try { 
				mFileDescriptor.close();
			} catch (IOException e) {
			} 
		} 
	} 
	 
	private class UsbReceiver extends BroadcastReceiver {
		@Override 
		public void onReceive(Context context, Intent intent) {
			String action = intent.getAction();
			if (UsbManager.ACTION_USB_ACCESSORY_DETACHED.equals(action)) {
				UsbAccessory accessory = (UsbAccessory)
		                   intent.getParcelableExtra(UsbManager.EXTRA_ACCESSORY);
				if (accessory != null && accessory.equals(mAccessory)) {
					Log.i(TAG, "closing accessory");
Contextual code suggestions in your IDE  Get Codota for Java