Non-linear font scaling is meant to improve readability at larger font
scales: larger fonts will scale up more slowly than smaller fonts, so we
don't get ridiculously huge fonts that don't fit on the screen.
The thinking here is that large fonts are already big enough to read,
but we still want to scale them slightly to preserve the visual
hierarchy when compared to smaller fonts.
The FontScaleConverter converts SP dimensions to DP, to be used in
TypedValue.applyDimension() which will affect most TextViews and font
sizes automatically.
For now, all the lookup tables are hardcoded. A follow-up CL will make
them configurable via XML. The hardcoded arrays also default to a linear
curve, as to not break any tests. The non-linear curve will come in a
follow-up CL, to make it easier to roll-back if requested.
Also included is some Javascript to generate the hardcoded arrays, which
can later be manually tweaked and optimized.
Test: unit, CTS, and manual:
1. Run `adb shell settings put system font_scale 2.0`
2. Check different apps to see if they are readable.
Bug: b/237558231
Change-Id: I17d67252bf31f55e57e1f3e8a0f638770e6d2cfd
In this CL stylus preferences will show for every type of input device.
Feature is currently flagged behing SETTINGS_SHOW_STYLUS_PREFERENCES.
Bug: b/251201006
Test: SettingsRoboTests StylusDevicesControllerTest
DD: go/stylus-connected-devices-doc
Change-Id: I73cec8e5cfd0b70be0492841f9d8e07f62a70863
This commit is part of a large scale change to fix errorprone
errors that have been downgraded to warnings in the android
source tree, so that they can be promoted to errors again.
The full list of changes include the following, but not all
will be present in any one individual commit:
BadAnnotationImplementation
BadShiftAmount
BanJNDI
BoxedPrimitiveEquality
ComparableType
ComplexBooleanConstant
CollectionToArraySafeParameter
ConditionalExpressionNumericPromotion
DangerousLiteralNull
DoubleBraceInitialization
DurationFrom
DurationTemporalUnit
EmptyTopLevelDeclaration
EqualsNull
EqualsReference
FormatString
FromTemporalAccessor
GetClassOnAnnotation
GetClassOnClass
HashtableContains
IdentityBinaryExpression
IdentityHashMapBoxing
InstantTemporalUnit
InvalidTimeZoneID
InvalidZoneId
IsInstanceIncompatibleType
JUnitParameterMethodNotFound
LockOnBoxedPrimitive
MathRoundIntLong
MislabeledAndroidString
MisusedDayOfYear
MissingSuperCall
MisusedWeekYear
ModifyingCollectionWithItself
NoCanIgnoreReturnValueOnClasses
NonRuntimeAnnotation
NullableOnContainingClass
NullTernary
OverridesJavaxInjectableMethod
ParcelableCreator
PeriodFrom
PreconditionsInvalidPlaceholder
ProtoBuilderReturnValueIgnored
ProtoFieldNullComparison
RandomModInteger
RectIntersectReturnValueIgnored
ReturnValueIgnored
SelfAssignment
SelfComparison
SelfEquals
SizeGreaterThanOrEqualsZero
StringBuilderInitWithChar
TreeToString
TryFailThrowable
UnnecessaryCheckNotNull
UnusedCollectionModifiedInPlace
XorPower
See https://errorprone.info/bugpatterns for more
information on the checks.
Bug: 253827323
Test: m RUN_ERROR_PRONE=true javac-check
Change-Id: I8446f9076a45ebf7e7ffa06cb0d4ddb1001b6c00
BinaryTransparencyService:
Make use of APEX digest as a binary measurement, which measures
only the changes to the content of the package, excluding the signing
block.
Additionally, this information is surfaced to the output of existing
`get apex_info` and `get module_info` commands.
The format of the output is also modified from previous iteration
to make the overall style and presentation more consistent for the
user.
PackageUtils:
Currently cryptographic digests that are hex encoded and encoded to
string are encoded in uppercase - this is not consistent with how
measurements for other binaries are stored and processed.
Thus, this change defaults the encoding for SHA-256 digest for
large files to be hex encoded and string encoded to lowercase.
Bug: 245941527
Test: manual.
Change-Id: I5b332214b516a71bded8dcc50883430608cde357
A subsequent change will actually move the files to the other git
project.
Bug: 243194720
Test: presubmit
Change-Id: If126bb68f74852528c4da8df79831b49b5129983
The four byte sequence modified UTF-8 is now handled by classes
prefixed with ART, whereas the base classes implements the standard
modified UTF-8 and should be used by new clients in modules.
Bug: 243194720
Test: atest -rerun-until-failure 10 FastDataTest BinaryXmlTest \
FrameworksCoreTests:XmlTest FastDataPerfTest
Change-Id: I08cea54c2a27249e00b7e155af0cf11949486375
This reverts commit 3c7272f18e.
Reason for revert: Software Cursor not launching in Android U
Test: manual
Change-Id: I92032755d1eab0b352108b2f2f9814e8d6c9f4a3
Tweaking the returned result from the boundary condition in
closestIndexOnOrAfter to be conceptually similar to
closestIndexOnOrBefore. This should also make it simpler to use by
callers.
Also exposing the class more broadly by moving it to android.util
Test: atest FrameworksCoreTests:TimeSparseArrayTest
Bug: 195684213
Change-Id: I44a06db8792d590be0eea4de39bc81387f2baac8
It would be nice to be able to get the previous value when
adding a new one without having to do a separate get() call.
Bug: 243987091
Test: atest CtsUtilTestCases:SparseArrayMapTest
Change-Id: I763c08443b9376f5142abd1aa817f1c61990f4be
Move most of the logic of the Settings' volume panel to a SystemUIDialog
to make the dialogs consistent with other system dialog.
Bug: 202262476
Test: manual build and launch the new dialog.
Change-Id: Ic27dcca77072dee2b78827e1eb58c28022b47265