summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2011-04-06 12:22:29 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-04-06 12:22:29 -0700
commit59ad81e19bf8312d4abb5f1b754502a750568be5 (patch)
treebecf5105fe408407552f78d4396b8547f7ef494e /services
parent5a4fb5c735f82b26eb9a9da589856dc877e208c8 (diff)
parentc8a04b536bb8ad12a87e6dd68d66cff1e7fcd7e7 (diff)
downloadframeworks_base-59ad81e19bf8312d4abb5f1b754502a750568be5.zip
frameworks_base-59ad81e19bf8312d4abb5f1b754502a750568be5.tar.gz
frameworks_base-59ad81e19bf8312d4abb5f1b754502a750568be5.tar.bz2
Merge "remove more unused references to ISurface"
Diffstat (limited to 'services')
-rw-r--r--services/camera/libcameraservice/CameraService.cpp14
-rw-r--r--services/camera/libcameraservice/CameraService.h6
-rw-r--r--services/surfaceflinger/tests/resize/resize.cpp7
3 files changed, 3 insertions, 24 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
diff --git a/services/camera/libcameraservice/CameraService.h b/services/camera/libcameraservice/CameraService.h
index 28e8cc0..9a9ab0e 100644
--- a/services/camera/libcameraservice/CameraService.h
+++ b/services/camera/libcameraservice/CameraService.h
@@ -79,12 +79,6 @@ private:
sp<MediaPlayer> mSoundPlayer[NUM_SOUNDS];
int mSoundRef; // reference count (release all MediaPlayer when 0)
- // Used by Client objects to extract the ISurface from a Surface object.
- // This is used because making Client a friend class of Surface would
- // require including this header in Surface.h since Client is a nested
- // class.
- static sp<ISurface> getISurface(const sp<Surface>& surface);
-
class Client : public BnCamera
{
public:
diff --git a/services/surfaceflinger/tests/resize/resize.cpp b/services/surfaceflinger/tests/resize/resize.cpp
index 0ccca77..18c54b3 100644
--- a/services/surfaceflinger/tests/resize/resize.cpp
+++ b/services/surfaceflinger/tests/resize/resize.cpp
@@ -29,13 +29,6 @@
using namespace android;
namespace android {
-class Test {
-public:
- static const sp<ISurface>& getISurface(const sp<Surface>& s) {
- return s->getISurface();
- }
-};
-};
int main(int argc, char** argv)
{