Merge "attempt to fix bug 5313580" into ics-mr1

This commit is contained in:
Mathias Agopian 2011-11-18 12:11:15 -08:00 committed by Android (Google) Code Review
commit 6285c6cf10
2 changed files with 7 additions and 0 deletions

View File

@ -40,6 +40,7 @@ public:
protected: protected:
SurfaceTextureClient(); SurfaceTextureClient();
virtual ~SurfaceTextureClient();
void setISurfaceTexture(const sp<ISurfaceTexture>& surfaceTexture); void setISurfaceTexture(const sp<ISurfaceTexture>& surfaceTexture);
private: private:

View File

@ -36,6 +36,12 @@ SurfaceTextureClient::SurfaceTextureClient() {
SurfaceTextureClient::init(); SurfaceTextureClient::init();
} }
SurfaceTextureClient::~SurfaceTextureClient() {
if (mConnectedToCpu) {
SurfaceTextureClient::disconnect(NATIVE_WINDOW_API_CPU);
}
}
void SurfaceTextureClient::init() { void SurfaceTextureClient::init() {
// Initialize the ANativeWindow function pointers. // Initialize the ANativeWindow function pointers.
ANativeWindow::setSwapInterval = hook_setSwapInterval; ANativeWindow::setSwapInterval = hook_setSwapInterval;