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

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

Merge "connect/disconnect is now called from our EGL wrapper"

parents a971214f c3da3434
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -201,11 +201,11 @@ status_t MediaPlayer::getMetadata(bool update_only, bool apply_filter, Parcel *m

void MediaPlayer::disconnectNativeWindow() {
    if (mConnectedWindow != NULL) {
        status_t err = native_window_disconnect(mConnectedWindow.get(),
        status_t err = native_window_api_disconnect(mConnectedWindow.get(),
                NATIVE_WINDOW_API_MEDIA);

        if (err != OK) {
            LOGW("native_window_disconnect returned an error: %s (%d)",
            LOGW("native_window_api_disconnect returned an error: %s (%d)",
                    strerror(-err), err);
        }
    }
@@ -224,7 +224,7 @@ status_t MediaPlayer::setVideoSurface(const sp<Surface>& surface)
    }

    if (surface != NULL) {
        status_t err = native_window_connect(surface.get(),
        status_t err = native_window_api_connect(surface.get(),
                NATIVE_WINDOW_API_MEDIA);

        if (err != OK) {
@@ -274,7 +274,7 @@ status_t MediaPlayer::setVideoSurfaceTexture(
    sp<ANativeWindow> anw;
    if (surfaceTexture != NULL) {
        anw = new SurfaceTextureClient(surfaceTexture);
        status_t err = native_window_connect(anw.get(),
        status_t err = native_window_api_connect(anw.get(),
                NATIVE_WINDOW_API_MEDIA);

        if (err != OK) {
+4 −4
Original line number Diff line number Diff line
@@ -460,10 +460,10 @@ status_t CameraService::Client::connect(const sp<ICameraClient>& client) {

static void disconnectWindow(const sp<ANativeWindow>& window) {
    if (window != 0) {
        status_t result = native_window_disconnect(window.get(),
        status_t result = native_window_api_disconnect(window.get(),
                NATIVE_WINDOW_API_CAMERA);
        if (result != NO_ERROR) {
            LOGW("native_window_disconnect failed: %s (%d)", strerror(-result),
            LOGW("native_window_api_disconnect failed: %s (%d)", strerror(-result),
                    result);
        }
    }
@@ -526,9 +526,9 @@ status_t CameraService::Client::setPreviewWindow(const sp<IBinder>& binder,
    }

    if (window != 0) {
        result = native_window_connect(window.get(), NATIVE_WINDOW_API_CAMERA);
        result = native_window_api_connect(window.get(), NATIVE_WINDOW_API_CAMERA);
        if (result != NO_ERROR) {
            LOGE("native_window_connect failed: %s (%d)", strerror(-result),
            LOGE("native_window_api_connect failed: %s (%d)", strerror(-result),
                    result);
            return result;
        }