Merge "Camera2: Unlink camera device death listener on disconnect" into nyc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
2a6f476836
@@ -974,6 +974,7 @@ public class CameraDeviceImpl extends CameraDevice
|
||||
|
||||
if (mRemoteDevice != null) {
|
||||
mRemoteDevice.disconnect();
|
||||
mRemoteDevice.unlinkToDeath(this, /*flags*/0);
|
||||
}
|
||||
|
||||
// Only want to fire the onClosed callback once;
|
||||
|
||||
@@ -31,6 +31,7 @@ import android.hardware.camera2.ICameraDeviceUser;
|
||||
import android.hardware.camera2.impl.CameraMetadataNative;
|
||||
import android.hardware.camera2.params.OutputConfiguration;
|
||||
import android.hardware.camera2.utils.SubmitInfo;
|
||||
import android.os.IBinder;
|
||||
import android.os.RemoteException;
|
||||
import android.view.Surface;
|
||||
|
||||
@@ -53,6 +54,10 @@ public class ICameraDeviceUserWrapper {
|
||||
mRemoteDevice = remoteDevice;
|
||||
}
|
||||
|
||||
public void unlinkToDeath(IBinder.DeathRecipient recipient, int flags) {
|
||||
mRemoteDevice.asBinder().unlinkToDeath(recipient, flags);
|
||||
}
|
||||
|
||||
public void disconnect() {
|
||||
try {
|
||||
mRemoteDevice.disconnect();
|
||||
|
||||
Reference in New Issue
Block a user