Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9d917715 authored by Mathias Agopian's avatar Mathias Agopian Committed by Android (Google) Code Review
Browse files

Merge "remove more unused references to ISurface"

parents 46bc5b88 8b1027d3
Loading
Loading
Loading
Loading
+3 −11
Original line number Diff line number Diff line
@@ -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
+0 −6
Original line number Diff line number Diff line
@@ -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: