This allows apps to retrieve an instance of VirtualMachineManager via
Context.getSystemService() API.
Bug: 249093790
Test: builds
Test: atest --test-mapping packages/modules/Virtualization:avf-presubmit
Change-Id: I488c275343753f2a3af6270cbad2ab02f33f203f
Merged-In: I488c275343753f2a3af6270cbad2ab02f33f203f
(cherry picked from commit 167b913ad4)
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
Defines a new PermissionEnforcer class used to check permission as part
of the @EnforcePermission AIDL annotation. It is registered as a system
service to avoid the cost of creating a new object for each new client.
Bug: 234083358
Test: TH
Change-Id: I2bd23f62a0d207ddac6bbe69666ced96e77ba16f
Merged-In: I2bd23f62a0d207ddac6bbe69666ced96e77ba16f
Previously, binder txns were only traced for txns from sysui/launcher
to system_server.
ag/Iffc4bb534d239c07d2e4d43ab43a9ed76abe7496 enabled binder txn tracking
more broadly
Removed the special case for sysui/launcher and cleaned up the code
Test: Manual
Bug: 161393989
Change-Id: I9d46d2362ca0ca33bc2477d68092f7ba5fe9c8ac
Merged-In: I9d46d2362ca0ca33bc2477d68092f7ba5fe9c8ac
This API will get the advertised memory size from the bootloader parameter
passed to the kernel. The advertised memory size might be different from
the MemTotal value in /proc/meminfo. This could be due the original design
manufacturer (ODM) reserved part of the memory for the Trusted Execution
Environment.
Test: Run test caes
Bug: 231718727
Change-Id: I06494cb9013048d73a83f2180a9241c2259d46eb
This change both prevents any rules from being unable to be written to disk and also avoids risk of running out of memory while handling all the zen rules.
Bug: 242703460
Bug: 242703505
Bug: 242703780
Bug: 242704043
Bug: 243794204
Test: cts AutomaticZenRuleTest; atest android.app.AutomaticZenRuleTest; manually confirmed each exploit example either saves the rule successfully with a truncated string (in the case of name & conditionId) or may fail to save the rule at all (if the owner/configactivity is invalid). Additionally ran the memory-exhausting PoC without device crashes.
Change-Id: I110172a43f28528dd274b3b346eb29c3796ff2c6
Merged-In: I110172a43f28528dd274b3b346eb29c3796ff2c6
(cherry picked from commit de172ba0d4)
(cherry picked from commit d4b5212eb6)
Merged-In: I110172a43f28528dd274b3b346eb29c3796ff2c6
The ArrayEquals, ArrayHashCode, ArrayToString, and
ArraysAsListPrimitiveArray errorprone findings were
demoted from errors to warnings. Fix existing
occurrences of them so they can be made errors again.
Bug: 242630963
Test: RUN_ERROR_PRONE=true m javac-check
Change-Id: Ia6f216cc36ad0a5758f39fd9b34962cd4adf9d8e
This API is not used: marked as @hide with a commented out @SystemApi;
the AIDL server is not implemented in AOSP nor internally. There is one
extra client from the SEPolicy: wpantund; but there is no build rule for
this binary, and no reference for it in AOSP. This API appears be an
artifact from the initial import of Android Things back in 2017.
I confirmed with the previous owners that there is no intention to use
this API in the future (see bug).
This changes reduces the size of framework.jar by 77kb on
bramble-userdebug.
Bug: 235018188
Test: TH
Change-Id: Id66f5ed23ed26c7185f36454f168e34997be3f8f
Merged-In: Id66f5ed23ed26c7185f36454f168e34997be3f8f
(cherry picked from commit 7640656825)
The implementation of shared-element transitions takes the
ActivityOptions from the calling activity and sends them to
another activity. This means that any sensitive information
passed into ActivityManager via ActivityOptions can make its
way to an unrelated app. Recently a RemoteTransition object
was added which includes some sensitive information.
This CL strips the sensitive information from the activity
options before sending it to anonther app.
Bug: 237290578
Test: atest ActivityManagerTest#testActivityManager_stripTransitionFromActivityOptions
Change-Id: Ifa08fc195698f02bf70ca386178c67f6ba4a14ea
(cherry picked from commit 0d03e6f1fc)
Merged-In: Ifa08fc195698f02bf70ca386178c67f6ba4a14ea
- Add new api in ActivityOptions for a caller to be able to specify
launch TaskDisplayArea in ActivityOptions.
- Add option to specify launch TaskDisplayArea featureId in
ActivityManagerShellCommand.
Bug: 234349363
Test: atest TaskLaunchParamsModifierTests
Change-Id: I092787ede5245d15774e01054c408533fe632b57
The delay was introduced to suppress JIT activity during startup.
However, ART no longer uses the expicit process state signal as an input
to informing JIT activity, so the delay can be removed.
By forwarding the process state immediately, ART can make more informed
decisions about activity based on process state, e.g., suppressing
madvise calls for less important (non-foreground) processes.
Bug: 235390330
Test: m + presubmit + boot tests
Change-Id: Ia95a76f86cf4c38bf89e56f954dbf59e0083ec50
Merged-In: Ia95a76f86cf4c38bf89e56f954dbf59e0083ec50
update to reflect the new usage of the extra in forcing platform side
provisioning.
Bug: 236597525
Test: n/a
Change-Id: Ie98e9aaa790d1c0bd4b2d5e2b85a81bd8e3c92e3
When the enableOnBackInvokedCallback is set to false (or not set),
registering an OnBackInvokedCallback should be a no-op to avoid
overriding the default compat callback.
Test: Manual testing registering a callback on an app with the flag
disabled and doing a back gesture. Currently we don't have test
executing a back gesture so automated tests are not possible
Bug: 235206960
Change-Id: I54d843f11130a78ed5a68cbe4722e601a2086ee1
Merged-In: I54d843f11130a78ed5a68cbe4722e601a2086ee1
(cherry picked from commit aa48dc3c2d)
The delay was introduced to suppress JIT activity during startup.
However, ART no longer uses the expicit process state signal as an input
to informing JIT activity, so the delay can be removed.
By forwarding the process state immediately, ART can make more informed
decisions about activity based on process state, e.g., suppressing
madvise calls for less important (non-foreground) processes.
Bug: 235390330
Test: m + presubmit + boot tests
Change-Id: Ia95a76f86cf4c38bf89e56f954dbf59e0083ec50
Create ActivityClientRecord early in preExecute may cause
NullPointerException. If two LaunchActivityItem using the same token
and the 1st postExecute() comes after 2nd preExecute(), the
corresponding launching activity will be removed and cause 2nd
execute() get NullPointerException.
Since the only use case to get ActivityClientRecord in preExecute() is
just to use it to store the pending override config. We can directly
store the latest pending override config from preExecute() in
ActivityThread instead of creating ActivityClientRecord.
Bug: 201668069
Test: atest TransactionExecutorTests
atest ActivityThreadTest
Merged-In: If350e942254e54c9ec90bc63a6e50eb67d038183
Change-Id: If350e942254e54c9ec90bc63a6e50eb67d038183