Loading cmds/uiautomator/library/testrunner-src/com/android/uiautomator/core/ShellUiAutomatorBridge.java +1 −1 Original line number Diff line number Diff line Loading @@ -101,7 +101,7 @@ public class ShellUiAutomatorBridge extends UiAutomatorBridge { IWindowManager.Stub.asInterface(ServiceManager.getService(Context.WINDOW_SERVICE)); int ret = -1; try { ret = wm.getRotation(); ret = wm.getDefaultDisplayRotation(); } catch (RemoteException e) { Log.e(LOG_TAG, "Error getting screen rotation", e); throw new RuntimeException(e); Loading core/java/android/app/UiAutomationConnection.java +1 −1 Original line number Diff line number Diff line Loading @@ -367,7 +367,7 @@ public final class UiAutomationConnection extends IUiAutomationConnection.Stub { if (mWindowManager.isRotationFrozen()) { // Calling out with a lock held is fine since if the system // process is gone the client calling in will be killed. mInitialFrozenRotation = mWindowManager.getRotation(); mInitialFrozenRotation = mWindowManager.getDefaultDisplayRotation(); } } catch (RemoteException re) { /* ignore */ Loading core/java/android/view/IWindowManager.aidl +5 −3 Original line number Diff line number Diff line Loading @@ -201,10 +201,12 @@ interface IWindowManager void updateRotation(boolean alwaysSendConfiguration, boolean forceRelayout); /** * Retrieve the current screen orientation, constants as per * {@link android.view.Surface}. * Retrieve the current orientation of the primary screen. * @return Constant as per {@link android.view.Surface.Rotation}. * * @see android.view.Display#DEFAULT_DISPLAY */ int getRotation(); int getDefaultDisplayRotation(); /** * Watch the rotation of the screen. Returns the current rotation, Loading services/core/java/com/android/server/policy/PhoneWindowManager.java +1 −1 Original line number Diff line number Diff line Loading @@ -1806,7 +1806,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { mWakeGestureListener = new MyWakeGestureListener(mContext, mHandler); mOrientationListener = new MyOrientationListener(mContext, mHandler); try { mOrientationListener.setCurrentRotation(windowManager.getRotation()); mOrientationListener.setCurrentRotation(windowManager.getDefaultDisplayRotation()); } catch (RemoteException ex) { } mSettingsObserver = new SettingsObserver(mHandler); mSettingsObserver.observe(); Loading services/core/java/com/android/server/wm/AccessibilityController.java +5 −4 Original line number Diff line number Diff line Loading @@ -156,9 +156,9 @@ final class AccessibilityController { } } public void onRotationChangedLocked(DisplayContent displayContent, int rotation) { public void onRotationChangedLocked(DisplayContent displayContent) { if (mDisplayMagnifier != null) { mDisplayMagnifier.onRotationChangedLocked(displayContent, rotation); mDisplayMagnifier.onRotationChangedLocked(displayContent); } if (mWindowsForAccessibilityObserver != null) { mWindowsForAccessibilityObserver.scheduleComputeChangedWindowsLocked(); Loading Loading @@ -312,9 +312,10 @@ final class AccessibilityController { mWindowManagerService.scheduleAnimationLocked(); } public void onRotationChangedLocked(DisplayContent displayContent, int rotation) { public void onRotationChangedLocked(DisplayContent displayContent) { if (DEBUG_ROTATION) { Slog.i(LOG_TAG, "Rotaton: " + Surface.rotationToString(rotation) final int rotation = displayContent.getRotation(); Slog.i(LOG_TAG, "Rotation: " + Surface.rotationToString(rotation) + " displayId: " + displayContent.getDisplayId()); } mMagnifedViewport.onRotationChangedLocked(); Loading Loading
cmds/uiautomator/library/testrunner-src/com/android/uiautomator/core/ShellUiAutomatorBridge.java +1 −1 Original line number Diff line number Diff line Loading @@ -101,7 +101,7 @@ public class ShellUiAutomatorBridge extends UiAutomatorBridge { IWindowManager.Stub.asInterface(ServiceManager.getService(Context.WINDOW_SERVICE)); int ret = -1; try { ret = wm.getRotation(); ret = wm.getDefaultDisplayRotation(); } catch (RemoteException e) { Log.e(LOG_TAG, "Error getting screen rotation", e); throw new RuntimeException(e); Loading
core/java/android/app/UiAutomationConnection.java +1 −1 Original line number Diff line number Diff line Loading @@ -367,7 +367,7 @@ public final class UiAutomationConnection extends IUiAutomationConnection.Stub { if (mWindowManager.isRotationFrozen()) { // Calling out with a lock held is fine since if the system // process is gone the client calling in will be killed. mInitialFrozenRotation = mWindowManager.getRotation(); mInitialFrozenRotation = mWindowManager.getDefaultDisplayRotation(); } } catch (RemoteException re) { /* ignore */ Loading
core/java/android/view/IWindowManager.aidl +5 −3 Original line number Diff line number Diff line Loading @@ -201,10 +201,12 @@ interface IWindowManager void updateRotation(boolean alwaysSendConfiguration, boolean forceRelayout); /** * Retrieve the current screen orientation, constants as per * {@link android.view.Surface}. * Retrieve the current orientation of the primary screen. * @return Constant as per {@link android.view.Surface.Rotation}. * * @see android.view.Display#DEFAULT_DISPLAY */ int getRotation(); int getDefaultDisplayRotation(); /** * Watch the rotation of the screen. Returns the current rotation, Loading
services/core/java/com/android/server/policy/PhoneWindowManager.java +1 −1 Original line number Diff line number Diff line Loading @@ -1806,7 +1806,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { mWakeGestureListener = new MyWakeGestureListener(mContext, mHandler); mOrientationListener = new MyOrientationListener(mContext, mHandler); try { mOrientationListener.setCurrentRotation(windowManager.getRotation()); mOrientationListener.setCurrentRotation(windowManager.getDefaultDisplayRotation()); } catch (RemoteException ex) { } mSettingsObserver = new SettingsObserver(mHandler); mSettingsObserver.observe(); Loading
services/core/java/com/android/server/wm/AccessibilityController.java +5 −4 Original line number Diff line number Diff line Loading @@ -156,9 +156,9 @@ final class AccessibilityController { } } public void onRotationChangedLocked(DisplayContent displayContent, int rotation) { public void onRotationChangedLocked(DisplayContent displayContent) { if (mDisplayMagnifier != null) { mDisplayMagnifier.onRotationChangedLocked(displayContent, rotation); mDisplayMagnifier.onRotationChangedLocked(displayContent); } if (mWindowsForAccessibilityObserver != null) { mWindowsForAccessibilityObserver.scheduleComputeChangedWindowsLocked(); Loading Loading @@ -312,9 +312,10 @@ final class AccessibilityController { mWindowManagerService.scheduleAnimationLocked(); } public void onRotationChangedLocked(DisplayContent displayContent, int rotation) { public void onRotationChangedLocked(DisplayContent displayContent) { if (DEBUG_ROTATION) { Slog.i(LOG_TAG, "Rotaton: " + Surface.rotationToString(rotation) final int rotation = displayContent.getRotation(); Slog.i(LOG_TAG, "Rotation: " + Surface.rotationToString(rotation) + " displayId: " + displayContent.getDisplayId()); } mMagnifedViewport.onRotationChangedLocked(); Loading