diff options
author | Mathias Agopian <mathias@google.com> | 2011-04-05 15:44:20 -0700 |
---|---|---|
committer | Mathias Agopian <mathias@google.com> | 2011-04-05 20:11:55 -0700 |
commit | c8a04b536bb8ad12a87e6dd68d66cff1e7fcd7e7 (patch) | |
tree | 8e8018a9898f9785eeef5e8484c93d51cee4f052 /services/camera/libcameraservice/CameraService.cpp | |
parent | fb96b5ece35ed3c0f3e682d1f9864d7700fe63fc (diff) | |
download | frameworks_base-c8a04b536bb8ad12a87e6dd68d66cff1e7fcd7e7.zip frameworks_base-c8a04b536bb8ad12a87e6dd68d66cff1e7fcd7e7.tar.gz frameworks_base-c8a04b536bb8ad12a87e6dd68d66cff1e7fcd7e7.tar.bz2 |
remove more unused references to ISurface
Change-Id: I2201f1ca2bb8f203a081d94a0134f798778dfbef
Diffstat (limited to 'services/camera/libcameraservice/CameraService.cpp')
-rw-r--r-- | services/camera/libcameraservice/CameraService.cpp | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/services/camera/libcameraservice/CameraService.cpp b/services/camera/libcameraservice/CameraService.cpp index f3c9959..7e3c643 100644 --- a/services/camera/libcameraservice/CameraService.cpp +++ b/services/camera/libcameraservice/CameraService.cpp @@ -472,15 +472,15 @@ status_t CameraService::Client::setPreviewDisplay(const sp<Surface>& surface) { result = NO_ERROR; // return if no change in surface. - // asBinder() is safe on NULL (returns NULL) - if (getISurface(surface)->asBinder() == mSurface) { + sp<IBinder> binder(surface != 0 ? surface->asBinder() : 0); + if (binder == mSurface) { return result; } if (mSurface != 0) { LOG1("clearing old preview surface %p", mSurface.get()); } - mSurface = getISurface(surface)->asBinder(); + mSurface = binder; mPreviewWindow = surface; // If preview has been already started, register preview @@ -1241,12 +1241,4 @@ status_t CameraService::dump(int fd, const Vector<String16>& args) { return NO_ERROR; } -sp<ISurface> CameraService::getISurface(const sp<Surface>& surface) { - if (surface != 0) { - return surface->getISurface(); - } else { - return sp<ISurface>(0); - } -} - }; // namespace android |