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
onMeasure was being called 246 times in 26 ms, and having all those traces was not helping much and causing a few millis of latency.
Bug: 258930580
Test: Recorded a perfetto trace and inspected it manually
Change-Id: I672b785a57fe6c6d78b6a89e68fa57735c225bc7
Allows WM Shell to indicate the start/end of drag resizing, which
core can use as a signal to reuse a single (larger) surface size
for the entire drag resize operation to avoid continuous buffer
allocations after each size change.
Bug: 249808500
Test: drag resize a freeform window, verify WindowLayout requests
a fullscreen sized surface; atest TaskPositionerTest
Change-Id: I27e2b44270d7ea4f701fa8037f93b20dc691284b
Implement SafeZipPathValidatorCallback which throws ZipException if the
zip entry name contains ".." or starts with "/". The callback is then
set in RuntimeInit.
This feature will be enabled for apps with targetSDK >= U.
Bug: 252994429
Bug: 242716250
Test: atest FrameworksCoreTests:com.android.internal.os.SafeZipPathValidatorCallbackTest
Change-Id: Idef0f78a9da86d7606681a8fbc3f61b1be99adaf
We received many bugs the ContentCaptureService entered zombie
state but we don't know the reason why the process died. The issue
timing didn't be captured in bugreport.
Currently, the AbstractRemoteService will enter an odd state if the
service cannot be reconnected. This state does not allow the requests
be sent until the service be reconnected again on an unknown timing.
In some cases, it is expected the service will not be reconnected.
e.g. app stop from settings. We should fix the problem in the
AbstractRemoteService but before doing this, we try to add debugging
signal in bugreport to help us understand if the existing issues come
from this odd state for reasonable reasons.
The change was merged in master so skip automerge. The minor change
here will have a seperate change in master.
Bug: 248218072
Bug: 250859760
Test: disable app and dumpsys content_capture
Change-Id: Ia33462006a3925754001562b0d80540b9b0bc45d
Merged-in: Ia33462006a3925754001562b0d80540b9b0bc45d
(cherry picked from commit d060ed5697)
By the original design, we register the activity event in the
ActivityManagerService. After getting the activity event, we will
query current visible activities and report them to Assistant.
Assistant will start to get direct actions of those visible
activities. But sometimes they can not get the direct actions
due to the stage of activity lifecycle before onStart().
We change the logic to make sure that the stage of visible
activity that we reported to the Assistant is after onStart().
Bug: 235296082
Test: atest VoiceInteractionSessionVisibleActivityTest
Test: atest android.app.activity.ActivityThreadClientTest
Test: atest android.view.DisplayTest
Test: atest android.window.ConfigurationHelperTest
Test: atest android.window.SizeConfigurationBucketsTest
Change-Id: Ie439ff3706dab35e875c1eb995a67fa73aec4d76
(cherry picked from commit 29bb3a3428)
Merged-In: Ie439ff3706dab35e875c1eb995a67fa73aec4d76
Combining broadcasts WIDGET_ENABLED and WIDGET_UPDATE into
WIDGET_ENABLE_AND_UPDATE to reduce response time at boot time
Test: Manually verified that some app widgets would function properly
Fix: 221890505
Change-Id: I6aff0f00464ec8628d2258d0d84dcd3c82258d57
(cherry picked from commit 1ae08fe75e)
Merged-In: I6aff0f00464ec8628d2258d0d84dcd3c82258d57
ResolverActivity#onPostListReady is called asynchronously on the main
thread and it is possible for it to be executed after activity’s
onDestroy call.
A check for activity’s status is added to the method.
Test: atest FrameworksCoreTests:ChooserActivityTest
Fix: 254787909
Change-Id: I96d98a03d86881845868a67e33ea8ee7c9dc6631
AudioService and SeekBarVolumizer now read a flag instead of a config
boolean, when trying to determine if notification stream is separate
from ring.
Remove the now unused config & symbol for ring/notif stream alias
Bug: b/38477228
Test: atest AudioServiceTest#testRingNotifAlias
Change-Id: I1ee08c78984d3841711f88fcec360c936da00090
There is existing PKCS#7 signature used in the kernel for verifying
fs-verity digest. The purpose of this change is to pave the way to
migrate the existing signature check to userspace (and longer term,
migrate away from PKCS#7).
To mitigate the complexity of PKCS#7, only the configuration we're
currently using is supported.
Bug: 253668864
Test: atest FrameworksCoreTests:com.android.internal.security.VerityUtilsTest
Test: Manually added some code to use the API with correct and incorrect
signatures. Saw the API behave expectedly.
Change-Id: I80bbbd88881303c0b9a261b1fe59e9682e43bcad
Merged-In: I80bbbd88881303c0b9a261b1fe59e9682e43bcad
Root hash is only part of the fs-verity digest covers. Rename to avoid
confusion.
Bug: N/A
Test: m
Change-Id: I12c2a4ac57fb8772483473f951e97474ebd894c9
Merged-In: I12c2a4ac57fb8772483473f951e97474ebd894c9
Enable ChooserActivity test that involves clicking on a shortcut.
A test can specify a new test override,
ChooserActivityOverrideData#directShareTargets lambda, that would return
a pair of a shortcut type and a collection of shortcuts, that would be
treated by the test activity as an output of the shotcut loading logic.
Bug: 215699869
Test: atest FrameworksCoreTests:ChooserActivityTest
Change-Id: I55da648585bd26374ede30dd5b45ed4af81d688e
A new function is created to notify the service of inheritance
information of the widget provider.
Test: N/A
Bug: 221890505
Change-Id: I5f43f8d6ecd66b54869bef58898b1d3809b43d9e
(cherry picked from commit 0b51675e56)
Merged-In: I5f43f8d6ecd66b54869bef58898b1d3809b43d9e