remove more unused references to ISurface
Change-Id: I2201f1ca2bb8f203a081d94a0134f798778dfbef
diff --git a/include/surfaceflinger/Surface.h b/include/surfaceflinger/Surface.h
index a59d9e5..3923e61 100644
--- a/include/surfaceflinger/Surface.h
+++ b/include/surfaceflinger/Surface.h
@@ -102,10 +102,6 @@
friend class Test;
// videoEditor preview classes
friend class VideoEditorPreviewController;
-
- const sp<ISurface>& getISurface() const { return mSurface; }
-
-
friend class Surface;
SurfaceControl(
@@ -169,6 +165,7 @@
// setSwapRectangle() is intended to be used by GL ES clients
void setSwapRectangle(const Rect& r);
+ sp<IBinder> asBinder() const;
private:
/*
@@ -242,7 +239,6 @@
*/
void init();
status_t validate(bool inCancelBuffer = false) const;
- sp<ISurface> getISurface() const;
// When the buffer pool is a fixed size we want to make sure SurfaceFlinger
// won't stall clients, so we require an extra buffer.
diff --git a/libs/gui/Surface.cpp b/libs/gui/Surface.cpp
index 0dfbf01..44d9b4b 100644
--- a/libs/gui/Surface.cpp
+++ b/libs/gui/Surface.cpp
@@ -502,8 +502,8 @@
return NO_ERROR;
}
-sp<ISurface> Surface::getISurface() const {
- return mSurface;
+sp<IBinder> Surface::asBinder() const {
+ return mSurface!=0 ? mSurface->asBinder() : 0;
}
// ----------------------------------------------------------------------------
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)
{