Merge "chore(#Magnification): adjust field scale in metric MagnificationUsageReported" into udc-dev am: a0f7fde7b0

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23421823

Change-Id: Ia1b772ef35d5f56c90aaf7112a33f3d0e2493bc2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Treehugger Robot
2023-05-26 19:57:47 +00:00
committed by Automerger Merge Worker

View File

@@ -258,6 +258,10 @@ public final class AccessibilityStatsLogUtils {
}
private static int convertToLoggingMagnificationScale(float scale) {
return (int) (scale * 100);
// per b/269366674, we make every 10% a bucket for both privacy and readability concern.
// For example
// 1. both 2.30f(230%) and 2.36f(236%) would return 230 as bucket id.
// 2. bucket id 370 means scale range in [370%, 379%]
return ((int) (scale * 10)) * 10;
}
}