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

Commit 74ae9713 authored by Yifei Zhang's avatar Yifei Zhang Committed by Android (Google) Code Review
Browse files

Merge "stop offload only when current display state is unsupported by offload" into main

parents 3dda6abf 0e978d80
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -842,7 +842,8 @@ final class LocalDisplayAdapter extends DisplayAdapter {
                        // We must tell sidekick/displayoffload to stop controlling the display
                        // before we can change its power mode, so do that first.
                        if (isDisplayOffloadEnabled) {
                            if (displayOffloadSession != null) {
                            if (displayOffloadSession != null
                                    && !DisplayOffloadSession.isSupportedOffloadState(state)) {
                                displayOffloadSession.stopOffload();
                            }
                        } else {
@@ -874,8 +875,8 @@ final class LocalDisplayAdapter extends DisplayAdapter {
                        // have a sidekick/displayoffload available, tell it now that it can take
                        // control.
                        if (isDisplayOffloadEnabled) {
                            if (DisplayOffloadSession.isSupportedOffloadState(state)
                                    && displayOffloadSession != null) {
                            if (displayOffloadSession != null
                                    && DisplayOffloadSession.isSupportedOffloadState(state)) {
                                displayOffloadSession.startOffload();
                            }
                        } else {