Merge "Fix accessibility window position information."
This commit is contained in:
@@ -234,16 +234,7 @@ final class AccessibilityController {
|
||||
|
||||
private static void populateTransformationMatrixLocked(WindowState windowState,
|
||||
Matrix outMatrix) {
|
||||
sTempFloats[Matrix.MSCALE_X] = windowState.mWinAnimator.mDsDx;
|
||||
sTempFloats[Matrix.MSKEW_Y] = windowState.mWinAnimator.mDtDx;
|
||||
sTempFloats[Matrix.MSKEW_X] = windowState.mWinAnimator.mDtDy;
|
||||
sTempFloats[Matrix.MSCALE_Y] = windowState.mWinAnimator.mDsDy;
|
||||
sTempFloats[Matrix.MTRANS_X] = windowState.mShownPosition.x;
|
||||
sTempFloats[Matrix.MTRANS_Y] = windowState.mShownPosition.y;
|
||||
sTempFloats[Matrix.MPERSP_0] = 0;
|
||||
sTempFloats[Matrix.MPERSP_1] = 0;
|
||||
sTempFloats[Matrix.MPERSP_2] = 1;
|
||||
outMatrix.setValues(sTempFloats);
|
||||
windowState.getTransformationMatrix(sTempFloats, outMatrix);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -4314,6 +4314,25 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
|
||||
mWinAnimator.onAnimationFinished();
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the current transformation matrix of the window, relative to the display.
|
||||
*
|
||||
* @param float9 A temporary array of 9 floats.
|
||||
* @param outMatrix Matrix to fill in the transformation.
|
||||
*/
|
||||
void getTransformationMatrix(float[] float9, Matrix outMatrix) {
|
||||
float9[Matrix.MSCALE_X] = mWinAnimator.mDsDx;
|
||||
float9[Matrix.MSKEW_Y] = mWinAnimator.mDtDx;
|
||||
float9[Matrix.MSKEW_X] = mWinAnimator.mDtDy;
|
||||
float9[Matrix.MSCALE_Y] = mWinAnimator.mDsDy;
|
||||
float9[Matrix.MTRANS_X] = mSurfacePosition.x + mShownPosition.x;
|
||||
float9[Matrix.MTRANS_Y] = mSurfacePosition.y + mShownPosition.y;
|
||||
float9[Matrix.MPERSP_0] = 0;
|
||||
float9[Matrix.MPERSP_1] = 0;
|
||||
float9[Matrix.MPERSP_2] = 1;
|
||||
outMatrix.setValues(float9);
|
||||
}
|
||||
|
||||
// TODO: Hack to work around the number of states AppWindowToken needs to access without having
|
||||
// access to its windows children. Need to investigate re-writing
|
||||
// {@link AppWindowToken#updateReportedVisibilityLocked} so this can be removed.
|
||||
|
||||
Reference in New Issue
Block a user