Commit Graph

23406 Commits

Author SHA1 Message Date
Nikita Ioffe
ea76ae6fee Register managers provided by the com.android.virt APEX
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)
2022-11-25 16:02:52 +00:00
Jing Ji
02cec105d3 Merge "Update OWNERs for the android.app.*ForegroundService*" 2022-11-23 21:43:05 +00:00
Almaz Mingaleev
06b9abf013 Merge "Clean-up after TZUvA feature removal." 2022-11-23 10:16:21 +00:00
Jing Ji
eb1f3aed23 Update OWNERs for the android.app.*ForegroundService*
Change-Id: Ic07b70c79e6ab3d8f96178c92eebae3408b9ef74
Test: m
2022-11-23 06:13:58 +00:00
Almaz Mingaleev
69a5f7df1a Clean-up after TZUvA feature removal.
Bug: 148144561
Bug: 198740173
Test: atest FrameworksServicesTest
Test: m
Change-Id: I207cb367209a18df318573c95cd18cd9e3a49c18
2022-11-15 15:19:28 +00:00
Cole Faust
7da659bb6c Fix errorprone warnings that should be errors
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
2022-11-14 17:57:30 -08:00
Jeff Sharkey
709357213d Merge "Expand UiAutomation OWNERS to include IUiAutomation AIDL." 2022-11-10 15:46:10 +00:00
Bill Yi
3760f9b7db Merge "Merge TP1A.221105.002 to aosp-master - DO NOT MERGE" 2022-11-09 22:54:28 +00:00
Daniel Norman
686c971ece Expand UiAutomation OWNERS to include IUiAutomation AIDL.
Change-Id: I4cb112a47309d66be2c578740861004b505fda29
2022-11-09 22:13:03 +00:00
Xiang Wang
4ca2015e9f Merge "Add owners to GameMode* files" 2022-11-09 19:18:55 +00:00
Bill Yi
0de01a9871 Merge TP1A.221105.002 to aosp-master - DO NOT MERGE
Merged-In: I7caa2e966bae2ec146ca77b36d2a467d746e2531
Merged-In: I361e8838571ab7b3f19778833b820f0b1b584d94
Merged-In: I361e8838571ab7b3f19778833b820f0b1b584d94

Change-Id: Ic9224a1948b26c8703a272aa3b26337e0586f3e3
2022-11-09 06:33:42 +00:00
Xiang Wang
1f24e88039 Add owners to GameMode* files
Bug: b/243448953
Test: n/a
Change-Id: I8f5dd5e01a16afea8d0d9c8133dd096287469fc8
2022-11-08 18:09:47 -08:00
Jing Ji
78e6de07b0 Add OWNERs for the android.app.ForegroundService*
Test: m
Change-Id: If7acf753b3bd9cbe2a6f07518e4a88ef552c379d
2022-11-07 14:16:05 -08:00
Thiébaud Weksteen
ec0d763059 Add PermissionEnforcer class
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
2022-10-27 12:12:11 +11:00
Zimuzo Ezeozue
e75a6f8696 Merge changes from topic "aidl_trace"
* changes:
  Clean up binder txn tracking special case
  Enable binder txn tracing more broadly
2022-10-19 17:08:05 +00:00
Jonathan Scott
e662698795 DO NOT MERGE: Update owners files for AE.
Test: N/A OWNERS change
Bug: 253514184
Change-Id: Ib8402921dbcdffdeb62fa79becaa6454838ba447
2022-10-17 15:32:18 +00:00
Zim
ab23aee04d Clean up binder txn tracking special case
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
2022-10-14 19:30:37 +01:00
Xin Li
4b1dc6dbf6 Merge TP1A.221005.003
Merged-In: I6ffbb7510e6854f18bc427d1ae1e782918c799dc
Change-Id: I32d05cdabc6579f00bb4af0657b38539ec81a588
2022-10-03 13:38:22 -07:00
Daniel Norman
de7d3fb6cb Merge changes from topic "danielnorman-a11y-owners"
* changes:
  Extends UiAutomation OWNERS to wildcard for UiAutomationConnection.
  Adds more OWNERS to a11y FW dirs.
2022-09-29 18:47:33 +00:00
Daniel Norman
b24895fac3 Extends UiAutomation OWNERS to wildcard for UiAutomationConnection.
Bug: n/a
Test: n/a
Change-Id: I70800f6e2d5e38ba09cb315fb86171dd87f7fc83
2022-09-28 15:29:09 -07:00
Juan Yescas
7afbbec42f Add new field in MemoryInfo to get advertised memory size.
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
2022-09-27 15:11:52 +00:00
Shen Lin
f6ca5e5fbf Remove duplicated white space in ContextImpl when throw AndroidRuntimeException
Change-Id: Ica74e4a6754256efeec07ddbdb37536004a25867
Test: atest CtsActivityManagerDeviceTestCases:StartActivityTests
Bug: 247465690
2022-09-19 09:03:03 +00:00
Yuri Lin
e533796b45 Trim any long string inputs that come in to AutomaticZenRule
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
2022-09-14 17:52:38 +00:00
Han Wang
b18b1084b3 Fix error log message for rename(2) workaround
Change-Id: I36e8bf415a767078e9c5e8fa0c93d608711d8882
2022-09-13 13:45:13 +00:00
Cole Faust
a1eb8cf128 Merge "Fix array-related errorprone warnings" 2022-08-30 18:03:01 +00:00
Treehugger Robot
3d8681e31d Merge "Exclude large tests from presubmit." 2022-08-29 20:52:36 +00:00
Cole Faust
584140c83a Fix array-related errorprone warnings
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
2022-08-25 10:57:12 -07:00
Thiébaud Weksteen
231574ce34 Remove lowpan internal API
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)
2022-08-23 12:49:59 +10:00
Evan Rosky
e5dd8be748 Strip transition information from activityoptions when sent to app
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
2022-08-19 18:43:19 +00:00
Lucas Henneman
adbe824324 Exclude large tests from presubmit.
Bug: 222555677
Test: N/A
Merged-In: Ib19a2096a97367b37b3a22033ec2001693f23bff
Change-Id: I9ea72fd69a4771231b2342c50423cb1461d9ea09
2022-08-05 18:19:24 +00:00
Bill Yi
16c119018a Merge SQ3A.220705.003 to aosp-master - DO NOT MERGE
Merged-In: I7cffe34a393991c4ef98740f7c3a052c0b6344fb
Merged-In: Ie0b7151fabd09f58d58745a3f9e2e0252e04411a
Change-Id: Id75747f4a2519f9fa1c7850f99f0298a39dbc79e
2022-07-08 07:18:02 -07:00
Treehugger Robot
d5f11c7387 Merge "Add more owners to appprediction and smartspace services" am: b015109200
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2142732

Change-Id: I5e6dd1e6909610c4cc9d8d6481700ed44d9d4bd7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-30 23:30:46 +00:00
Treehugger Robot
b015109200 Merge "Add more owners to appprediction and smartspace services" 2022-06-30 23:11:56 +00:00
Hyunyoung Song
fa1b102045 Add more owners to appprediction and smartspace services
Test: not needed as modifying OWNERS file

Change-Id: Id4d57d2067828bee102ee5d5335b15790e454e9f
2022-06-30 22:05:47 +00:00
Chris Li
159473f75a Merge "Add API to set launch TDA featureId in options" am: 362e1c6eb4
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2110706

Change-Id: I57cca54b5e4a0eced45c255d776f9c484215fd3f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-30 10:15:08 +00:00
Nicu Corj
e83e2a20c6 Add API to set launch TDA featureId in options
- 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
2022-06-29 10:11:14 +03:00
Jared Duke
f0f1fb99fe Immediately notify VM of TOP process state
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
2022-06-21 15:41:46 -07:00
Vadim Caen
b38e19fdc3 Merge "Prevent callback registration when back flag is disabled" into tm-dev am: 1c6de844ce
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18794217

Change-Id: I8054556537104bb80d940272b367ed9b8ffa520c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-20 21:02:34 +00:00
Elis Elliott
bd04837ecb Merge "Update the docs for the provisioning extra AllowOffline." into tm-dev am: 2dc5f6e9f5
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18909940

Change-Id: Iff5171f233650802dc84140501bd076a4f115f2d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-20 20:58:55 +00:00
Vadim Caen
1c6de844ce Merge "Prevent callback registration when back flag is disabled" into tm-dev 2022-06-20 18:53:00 +00:00
Elis Elliott
2dc5f6e9f5 Merge "Update the docs for the provisioning extra AllowOffline." into tm-dev 2022-06-20 17:10:01 +00:00
Elis Elliott
d38bf5adac Update the docs for the provisioning extra AllowOffline.
update to reflect the new usage of the extra in forcing platform side
provisioning.

Bug: 236597525

Test: n/a
Change-Id: Ie98e9aaa790d1c0bd4b2d5e2b85a81bd8e3c92e3
2022-06-20 12:34:11 +00:00
Vadim Caen
a2e45f1ed1 Prevent callback registration when back flag is disabled
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)
2022-06-20 11:40:18 +02:00
Treehugger Robot
be95f2a8da Merge "Immediately notify VM of TOP process state" am: f80f2e450d am: fb5a1ede51
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2124252

Change-Id: I1a79b86501d7efae4c45adf83e9e5089f0f8f2d3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-17 19:56:30 +00:00
TreeHugger Robot
1ef250b44c Merge "Set adminExtras as an empty persistable bundle if left null in builder." into tm-dev am: 95ac43c8bd
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18799650

Change-Id: I31fe2bdeef6ae9fd7df77a3f5eba7ac390bb44e6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-17 19:30:17 +00:00
TreeHugger Robot
95ac43c8bd Merge "Set adminExtras as an empty persistable bundle if left null in builder." into tm-dev 2022-06-17 10:49:38 +00:00
Treehugger Robot
f80f2e450d Merge "Immediately notify VM of TOP process state" 2022-06-17 05:46:05 +00:00
Xin Li
195b02b570 Merge "Merge Android 12 QPR 3" 2022-06-16 18:51:54 +00:00
Jared Duke
95a0e9ab7d Immediately notify VM of TOP process state
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
2022-06-16 09:02:47 -07:00
Chilun
3be8e11bdc Store pending override config instead of creating ActivityClientRecord
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
2022-06-15 13:01:33 -07:00