Merge "A2DP: Don't suppress noisy intent while stopping A2dpService"
diff --git a/jni/bluetooth_socket_manager.cc b/jni/bluetooth_socket_manager.cc
index a63beed..50c06bb 100644
--- a/jni/bluetooth_socket_manager.cc
+++ b/jni/bluetooth_socket_manager.cc
@@ -57,8 +57,8 @@
     return Status::ok();
   }
 
-  _aidl_return->reset(new ParcelFileDescriptor());
-  (*_aidl_return)->setFileDescriptor(socket_fd, true);
+  _aidl_return->reset(
+      new ParcelFileDescriptor(android::base::unique_fd(socket_fd)));
   return Status::ok();
 }
 
@@ -97,8 +97,8 @@
     return Status::ok();
   }
 
-  _aidl_return->reset(new ParcelFileDescriptor());
-  (*_aidl_return)->setFileDescriptor(socket_fd, true);
+  _aidl_return->reset(
+      new ParcelFileDescriptor(android::base::unique_fd(socket_fd)));
   return Status::ok();
 }