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

Commit 4dded52a authored by Oleg Blinnikov's avatar Oleg Blinnikov
Browse files

Expose getDisplayUserRotation in aidl

Change-Id: Iccd47e0a36e8008f66403dc7395686fd5489f2ad
Bug: 294015706
Test: atest WindowManagerServiceTests
parent cf5fa2a3
Loading
Loading
Loading
Loading
+9 −0
Original line number Original line Diff line number Diff line
@@ -290,6 +290,15 @@ interface IWindowManager
     */
     */
    int getDefaultDisplayRotation();
    int getDefaultDisplayRotation();


    /**
     * Retrieve the display user rotation.
     * @param displayId Id of the display
     * @return Rotation one of {@link android.view.Surface#ROTATION_0},
     *        {@link android.view.Surface#ROTATION_90}, {@link android.view.Surface#ROTATION_180},
     *        {@link android.view.Surface#ROTATION_270} or -1 if display is not found.
     */
    int getDisplayUserRotation(int displayId);

    /**
    /**
     * Watch the rotation of the specified screen.  Returns the current rotation,
     * Watch the rotation of the specified screen.  Returns the current rotation,
     * calls back when it changes.
     * calls back when it changes.
+2 −1
Original line number Original line Diff line number Diff line
@@ -4450,7 +4450,8 @@ public class WindowManagerService extends IWindowManager.Stub
        }
        }
    }
    }


    int getDisplayUserRotation(int displayId) {
    @Override
    public int getDisplayUserRotation(int displayId) {
        synchronized (mGlobalLock) {
        synchronized (mGlobalLock) {
            final DisplayContent display = mRoot.getDisplayContent(displayId);
            final DisplayContent display = mRoot.getDisplayContent(displayId);
            if (display == null) {
            if (display == null) {