OSDN Git Service

Camera2: Fix trying to release HAL stream twice
authorIgor Murashkin <iam@google.com>
Tue, 2 Oct 2012 22:21:31 +0000 (15:21 -0700)
committerAndroid (Google) Code Review <android-gerrit@google.com>
Wed, 3 Oct 2012 18:40:46 +0000 (11:40 -0700)
commita1e5dccf73c0b734204b0094241e4a6a0752a67e
tree94f5f98a460f6aa156447c64d2f16e289c74e793
parent8dcdb9553defafa1166c64b496e1ee390e4eadfa
Camera2: Fix trying to release HAL stream twice

When we fail to disconnect the native window, StreamAdapter::release
would fail and remain in the old (ALLOCATED) state, thus it thinks that
we haven't released the HAL stream yet.

With this change, ignore DEAD_OBJECT native window disconnect failures,
so the state transitions to RELEASED and we don't double release HAL
streams.

Bug: 7258314
Change-Id: I524893e4b4d6463d7b0a7ce32fb6f658afba8e11
services/camera/libcameraservice/Camera2Device.cpp