Home
last modified time | relevance | path

Searched refs:rotation (Results 1 – 25 of 222) sorted by relevance

123456789

/frameworks/base/services/core/java/com/android/server/wm/utils/
DDisplayRotationUtil.java39 private static int getRotationToBoundsOffset(int rotation) { in getRotationToBoundsOffset() argument
40 switch (rotation) { in getRotationToBoundsOffset()
56 static int getBoundIndexFromRotation(int i, int rotation) { in getBoundIndexFromRotation() argument
57 return Math.floorMod(i + getRotationToBoundsOffset(rotation), in getBoundIndexFromRotation()
73 Rect[] bounds, int rotation, int initialDisplayWidth, int initialDisplayHeight) { in getRotatedBounds() argument
78 if (rotation == ROTATION_0) { in getRotatedBounds()
81 transformPhysicalToLogicalCoordinates(rotation, initialDisplayWidth, initialDisplayHeight, in getRotatedBounds()
92 newBounds[getBoundIndexFromRotation(i, rotation)] = rect; in getRotatedBounds()
DCoordinateTransforms.java44 public static void transformPhysicalToLogicalCoordinates(@Rotation int rotation, in transformPhysicalToLogicalCoordinates() argument
46 switch (rotation) { in transformPhysicalToLogicalCoordinates()
63 throw new IllegalArgumentException("Unknown rotation: " + rotation); in transformPhysicalToLogicalCoordinates()
74 public static void transformLogicalToPhysicalCoordinates(@Rotation int rotation, in transformLogicalToPhysicalCoordinates() argument
76 switch (rotation) { in transformLogicalToPhysicalCoordinates()
93 throw new IllegalArgumentException("Unknown rotation: " + rotation); in transformLogicalToPhysicalCoordinates()
108 final boolean flipped = info.rotation == ROTATION_90 || info.rotation == ROTATION_270; in transformToRotation()
DRotationCache.java48 public R getOrCompute(T t, int rotation) { in getOrCompute() argument
53 final int idx = mCache.indexOfKey(rotation); in getOrCompute()
57 final R result = mComputation.compute(t, rotation); in getOrCompute()
58 mCache.put(rotation, result); in getOrCompute()
68 R compute(T t, int rotation); in compute() argument
/frameworks/native/libs/ui/include/ui/
DRotation.h31 constexpr auto toRotation(std::underlying_type_t<Rotation> rotation) { in toRotation() argument
32 return static_cast<Rotation>(rotation); in toRotation()
35 constexpr auto toRotationInt(Rotation rotation) { in toRotationInt() argument
36 return static_cast<std::underlying_type_t<Rotation>>(rotation); in toRotationInt()
44 constexpr const char* toCString(Rotation rotation) { in toCString() argument
45 switch (rotation) { in toCString()
/frameworks/native/libs/ui/include_vndk/ui/
DRotation.h31 constexpr auto toRotation(std::underlying_type_t<Rotation> rotation) { in toRotation() argument
32 return static_cast<Rotation>(rotation); in toRotation()
35 constexpr auto toRotationInt(Rotation rotation) { in toRotationInt() argument
36 return static_cast<std::underlying_type_t<Rotation>>(rotation); in toRotationInt()
44 constexpr const char* toCString(Rotation rotation) { in toCString() argument
45 switch (rotation) { in toCString()
/frameworks/base/services/core/java/com/android/server/wm/
DDisplayRotation.java259 final int rotation = mContext.getResources().getInteger(resID); in readRotation() local
260 switch (rotation) { in readRotation()
341 void applyCurrentRotation(@Surface.Rotation int rotation) { in applyCurrentRotation() argument
343 mOrientationListener.setCurrentRotation(rotation); in applyCurrentRotation()
348 void setRotation(@Surface.Rotation int rotation) { in setRotation() argument
349 mRotation = rotation; in setRotation()
450 final int rotation = rotationForOrientation(lastOrientation, oldRotation); in updateRotationUnchecked() local
454 Surface.rotationToString(rotation), rotation, in updateRotationUnchecked()
462 Surface.rotationToString(rotation), rotation); in updateRotationUnchecked()
464 if (oldRotation == rotation) { in updateRotationUnchecked()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/assist/ui/
DDisplayUtils.java52 int rotation = d.getRotation(); in getWidth() local
53 if (rotation == Surface.ROTATION_0 || rotation == Surface.ROTATION_180) { in getWidth()
72 int rotation = d.getRotation(); in getHeight() local
73 if (rotation == Surface.ROTATION_0 || rotation == Surface.ROTATION_180) { in getHeight()
/frameworks/base/tests/Camera2Tests/SmartCamera/SimpleCamera/src/androidx/media/filterfw/decoder/
DVideoTrackDecoder.java43 public void grabFrame(FrameImage2D outputVideoFrame, int rotation) { in grabFrame() argument
51 copyFrameDataTo(outputVideoFrame, rotation); in grabFrame()
87 protected static boolean needSwapDimension(int rotation) { in needSwapDimension() argument
88 switch(rotation) { in needSwapDimension()
106 protected abstract void copyFrameDataTo(FrameImage2D outputVideoFrame, int rotation); in copyFrameDataTo() argument
DGpuVideoTrackDecoder.java146 protected void copyFrameDataTo(FrameImage2D outputVideoFrame, int rotation) { in copyFrameDataTo() argument
156 if (rotation != 0) { in copyFrameDataTo()
157 float[] targetCoords = getRotationCoords(rotation); in copyFrameDataTo()
159 if (needSwapDimension(rotation)) { in copyFrameDataTo()
203 private static float[] getRotationCoords(int rotation) { in getRotationCoords() argument
204 switch(rotation) { in getRotationCoords()
DCpuVideoTrackDecoder.java102 protected void copyFrameDataTo(FrameImage2D outputVideoFrame, int rotation) { in copyFrameDataTo() argument
106 if (needSwapDimension(rotation)) { in copyFrameDataTo()
117 if (rotation == MediaDecoder.ROTATE_NONE) { in copyFrameDataTo()
125 copyRotate(mUnrotatedBytes, outBytes, rotation); in copyFrameDataTo()
137 private void copyRotate(ByteBuffer input, ByteBuffer output, int rotation) { in copyRotate() argument
141 switch (rotation) { in copyRotate()
163 throw new IllegalArgumentException("Unsupported rotation " + rotation + "!"); in copyRotate()
/frameworks/av/camera/ndk/ndk_vendor/impl/
Dutils.h103 mOutputConfiguration.rotation = OutputConfiguration::Rotation::R0; in OutputConfigurationWrapper()
117 return self.rotation == other.rotation && self.windowGroupId == other.windowGroupId &&
140 if (self.rotation != other.rotation) {
141 return static_cast<uint32_t>(self.rotation) < static_cast<uint32_t>(other.rotation);
167 HRotation convertToHidl(int rotation);
/frameworks/base/services/tests/wmtests/src/com/android/server/wm/
DDisplayPolicyInsetsTests.java144 mDisplayPolicy.getStableInsetsLw(di.rotation, di.logicalWidth, di.logicalHeight, in getStableInsetsLw()
151 mDisplayPolicy.getNonDecorInsetsLw(di.rotation, di.logicalWidth, di.logicalHeight, in getNonDecorInsetsLw()
158 di.rotation, 0 /* ui */, di.displayCutout); in getNonDecorDisplayWidth()
163 di.rotation, 0 /* ui */, di.displayCutout); in getNonDecorDisplayHeight()
168 di.rotation, 0 /* ui */, di.displayCutout); in getConfigDisplayWidth()
173 di.rotation, 0 /* ui */, di.displayCutout); in getConfigDisplayHeight()
176 private static DisplayInfo displayInfoForRotation(int rotation, boolean withDisplayCutout) { in displayInfoForRotation() argument
177 return displayInfoAndCutoutForRotation(rotation, withDisplayCutout, false).first; in displayInfoForRotation()
DDisplayPolicyTestsBase.java114 static Pair<DisplayInfo, WmDisplayCutout> displayInfoAndCutoutForRotation(int rotation, in displayInfoAndCutoutForRotation() argument
119 final boolean flippedDimensions = rotation == ROTATION_90 || rotation == ROTATION_270; in displayInfoAndCutoutForRotation()
122 info.rotation = rotation; in displayInfoAndCutoutForRotation()
125 displayCutoutForRotation(rotation, isLongEdgeCutout), info.logicalWidth, in displayInfoAndCutoutForRotation()
134 private static DisplayCutout displayCutoutForRotation(int rotation, boolean isLongEdgeCutout) { in displayCutoutForRotation() argument
143 transformPhysicalToLogicalCoordinates(rotation, DISPLAY_WIDTH, DISPLAY_HEIGHT, m); in displayCutoutForRotation()
147 switch (rotation) { in displayCutoutForRotation()
DDisplayRotationTests.java307 final int rotation = mTarget.rotationForOrientation( in testReturnsSideways_UserRotationLocked_IncompatibleAppRequest() local
310 + Surface.rotationToString(rotation), in testReturnsSideways_UserRotationLocked_IncompatibleAppRequest()
311 rotation == Surface.ROTATION_90 || rotation == Surface.ROTATION_270); in testReturnsSideways_UserRotationLocked_IncompatibleAppRequest()
454 private SensorEvent createSensorEvent(int rotation) throws Exception { in createSensorEvent() argument
460 event.values[0] = rotation; in createSensorEvent()
527 final int rotation = mTarget.rotationForOrientation(SCREEN_ORIENTATION_LANDSCAPE, in testReturnsCompatibleRotation_SensorEnabled_RotationThawed() local
530 + Surface.rotationToString(rotation), in testReturnsCompatibleRotation_SensorEnabled_RotationThawed()
531 rotation == Surface.ROTATION_90 || rotation == Surface.ROTATION_270); in testReturnsCompatibleRotation_SensorEnabled_RotationThawed()
620 final int rotation = mTarget.rotationForOrientation( in testReturnsUserRotation_FixedToUserRotation_IgnoreIncompatibleAppRequest() local
622 assertEquals(Surface.ROTATION_180, rotation); in testReturnsUserRotation_FixedToUserRotation_IgnoreIncompatibleAppRequest()
[all …]
/frameworks/base/services/core/java/com/android/server/policy/
DWindowOrientationListener.java216 public void setCurrentRotation(int rotation) { in setCurrentRotation() argument
218 mCurrentRotation = rotation; in setCurrentRotation()
260 public abstract void onProposedRotationChanged(int rotation); in onProposedRotationChanged() argument
854 private boolean isTiltAngleAcceptableLocked(int rotation, int tiltAngle) { in isTiltAngleAcceptableLocked() argument
855 return tiltAngle >= mTiltToleranceConfig[rotation][0] in isTiltAngleAcceptableLocked()
856 && tiltAngle <= mTiltToleranceConfig[rotation][1]; in isTiltAngleAcceptableLocked()
865 private boolean isOrientationAngleAcceptableLocked(int rotation, int orientationAngle) { in isOrientationAngleAcceptableLocked() argument
875 if (rotation == currentRotation in isOrientationAngleAcceptableLocked()
876 || rotation == (currentRotation + 1) % 4) { in isOrientationAngleAcceptableLocked()
877 int lowerBound = rotation * 90 - 45 in isOrientationAngleAcceptableLocked()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/globalactions/
DGlobalActionsColumnLayout.java55 int rotation = getCurrentRotation(); in shouldReverseListItems() local
56 if (rotation == ROTATION_NONE) { in shouldReverseListItems()
60 return rotation == ROTATION_LANDSCAPE; in shouldReverseListItems()
62 return rotation == ROTATION_SEASCAPE; in shouldReverseListItems()
142 int rotation = getCurrentRotation(); in shouldSnapToPowerButton() local
143 if (rotation == ROTATION_NONE) { in shouldSnapToPowerButton()
/frameworks/base/packages/SystemUI/src/com/android/systemui/wm/
DDisplayLayout.java135 mRotation = info.rotation; in init()
200 public int rotation() { in rotation() method in DisplayLayout
355 DisplayCutout cutout, int rotation, int displayWidth, int displayHeight) { in calculateDisplayCutoutForRotation() argument
360 RotationUtils.rotateInsets(cutout.getWaterfallInsets(), rotation); in calculateDisplayCutoutForRotation()
361 if (rotation == ROTATION_0) { in calculateDisplayCutoutForRotation()
364 final boolean rotated = (rotation == ROTATION_90 || rotation == ROTATION_270); in calculateDisplayCutoutForRotation()
371 rotateBounds(rect, displayBounds, rotation); in calculateDisplayCutoutForRotation()
373 newBounds[getBoundIndexFromRotation(i, rotation)] = rect; in calculateDisplayCutoutForRotation()
381 private static int getBoundIndexFromRotation(int index, int rotation) { in getBoundIndexFromRotation() argument
382 return (index - rotation) < 0 in getBoundIndexFromRotation()
[all …]
/frameworks/base/packages/WallpaperCropper/src/com/android/photos/views/
DTiledImageView.java66 public int rotation; field in TiledImageView.ImageRendererWrapper
161 mRenderer.rotation = source != null ? source.getRotation() : 0; in setTileSource()
250 final int rotation = mRenderer.source.getRotation(); in positionFromMatrix() local
251 final boolean swap = !(rotation % 180 == 0); in positionFromMatrix()
264 if (rotation == 90 || rotation == 180) { in positionFromMatrix()
269 if (rotation == 180 || rotation == 270) { in positionFromMatrix()
289 mRenderer.image.setModel(mRenderer.source, mRenderer.rotation); in onSurfaceCreated()
304 mRenderer.image.setModel(mRenderer.source, mRenderer.rotation); in onDrawFrame()
/frameworks/base/core/java/com/android/internal/view/
DRotationPolicy.java113 final int rotation = areAllRotationsAllowed(context) ? CURRENT_ROTATION : NATURAL_ROTATION; in setRotationLock() local
114 setRotationLockAtAngle(context, enabled, rotation); in setRotationLock()
121 final int rotation) { in setRotationLockAtAngle() argument
126 setRotationLock(enabled, rotation); in setRotationLockAtAngle()
146 private static void setRotationLock(final boolean enabled, final int rotation) { in setRotationLock() argument
153 wm.freezeRotation(rotation); in setRotationLock()
/frameworks/av/camera/camera2/
DOutputConfiguration.cpp89 int rotation = 0; in readFromParcel() local
93 if ((err = parcel->readInt32(&rotation)) != OK) { in readFromParcel()
148 mRotation = rotation; in readFromParcel()
169 OutputConfiguration::OutputConfiguration(sp<IGraphicBufferProducer>& gbp, int rotation, in OutputConfiguration() argument
173 mRotation = rotation; in OutputConfiguration()
182 int rotation, const String16& physicalCameraId, int surfaceSetID, int surfaceType, in OutputConfiguration() argument
184 : mGbps(gbps), mRotation(rotation), mSurfaceSetID(surfaceSetID), mSurfaceType(surfaceType), in OutputConfiguration()
/frameworks/base/libs/WindowManager/Jetpack/src/androidx/window/sidecar/
DSidecarHelper.java43 int rotation = displayInfo.rotation; in rotateRectToDisplayRotation() local
45 boolean isSideRotation = rotation == ROTATION_90 || rotation == ROTATION_270; in rotateRectToDisplayRotation()
51 rotateBounds(inOutRect, displayWidth, displayHeight, rotation); in rotateRectToDisplayRotation()
/frameworks/base/media/mca/filterfw/java/android/filterfw/geometry/
DRectangle.java45 public static Rectangle fromRotatedRect(Point center, Point size, float rotation) { in fromRotatedRect() argument
50 return new Rectangle(p0.rotatedAround(center, rotation), in fromRotatedRect()
51 p1.rotatedAround(center, rotation), in fromRotatedRect()
52 p2.rotatedAround(center, rotation), in fromRotatedRect()
53 p3.rotatedAround(center, rotation)); in fromRotatedRect()
/frameworks/base/packages/SystemUI/shared/src/com/android/systemui/shared/system/
DRotationWatcher.java33 public void onRotationChanged(int rotation) {
34 RotationWatcher.this.onRotationChanged(rotation);
45 protected abstract void onRotationChanged(int rotation); in onRotationChanged() argument
/frameworks/base/packages/SystemUI/src/com/android/systemui/recents/
DScreenPinningRequest.java157 public FrameLayout.LayoutParams getRequestLayoutParams(int rotation) { in getRequestLayoutParams() argument
161 rotation == ROTATION_SEASCAPE ? (Gravity.CENTER_VERTICAL | Gravity.LEFT) : in getRequestLayoutParams()
162 rotation == ROTATION_LANDSCAPE ? (Gravity.CENTER_VERTICAL | Gravity.RIGHT) in getRequestLayoutParams()
189 int rotation = RotationUtils.getRotation(mContext); in onAttachedToWindow() local
191 inflateView(rotation); in onAttachedToWindow()
196 if (rotation == ROTATION_SEASCAPE) { in onAttachedToWindow()
198 } else if (rotation == ROTATION_LANDSCAPE) { in onAttachedToWindow()
231 private void inflateView(int rotation) { in inflateView() argument
236 rotation == ROTATION_SEASCAPE ? R.layout.screen_pinning_request_sea_phone : in inflateView()
237 rotation == ROTATION_LANDSCAPE ? R.layout.screen_pinning_request_land_phone in inflateView()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/
DRotationButtonController.java91 public void onRotationChanged(final int rotation) throws RemoteException {
98 if (shouldOverrideUserLockPrefs(rotation)) {
99 setRotationLockedAtAngle(rotation);
105 mRotWatcherListener.accept(rotation);
260 void onRotationProposal(int rotation, int windowRotation, boolean isValid) { in onRotationProposal() argument
274 if (rotation == windowRotation) { in onRotationProposal()
281 mLastRotationSuggestion = rotation; // Remember rotation for click in onRotationProposal()
282 final boolean rotationCCW = isRotationAnimationCCW(windowRotation, rotation); in onRotationProposal()
364 private boolean shouldOverrideUserLockPrefs(final int rotation) { in shouldOverrideUserLockPrefs() argument
371 return rotation == NATURAL_ROTATION; in shouldOverrideUserLockPrefs()

123456789