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

Commit 5341b953 authored by Danae Savvidi's avatar Danae Savvidi
Browse files

Change return value of notifyDisplayEventAsync function

Change the return value of notifyDisplayEventAsync function in display manager service such that it returns true if the client was notified and false otherwise.

Bug: 434188749
Bug: 431149632
Flag: NONE since not modifying anything related to a flag
Test: atest DisplayServiceTests
Change-Id: I944f9254b7d98352f178ec87871c57af2a5b9360
parent f3a349d9
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -4501,9 +4501,9 @@ public final class DisplayManagerService extends SystemService {
        }

        /**
         * @return {@code false} if RemoteException happens; otherwise {@code true} for
         * success.  This returns true even if the event was deferred because the remote client is
         * cached or frozen.
         * @return {@code true} if the notification was processed (sent, queued).
         * Returns {@code false} if the notification was not sent e.g. because client is
         * not registered for this event.
         */
        public boolean notifyDisplayEventAsync(int displayId, @DisplayEvent int event) {
            if (!shouldSendDisplayEvent(event)) {
@@ -4519,7 +4519,7 @@ public final class DisplayManagerService extends SystemService {
                                    + ",uid" + mUid);
                }
                // The client is not interested in this event, so do nothing.
                return true;
                return false;
            }

            synchronized (mCallback) {
@@ -4539,7 +4539,7 @@ public final class DisplayManagerService extends SystemService {

            if (!shouldReceiveRefreshRateWithChangeUpdate(event)) {
                // The client is not visible to the user and is not a system service, so do nothing.
                return true;
                return false;
            }

            try {