Senders can specify an IntentFilter object that should match
against another broadcast intent to be considered in the same
delivery group.
Bug: 249160234
Test: atest services/tests/mockingservicestests/src/com/android/server/am/BroadcastRecordTest.java
Test: atest services/tests/mockingservicestests/src/com/android/server/am/BroadcastQueueModernImplTest.java
Test: atest tests/app/src/android/app/cts/BroadcastOptionsTest.java
Test: atest tests/tests/content/src/android/content/cts/IntentFilterTest.java
Change-Id: I36f1e3ffab8e30371a9968cb23c7b345c3301682
UWB now has a 3p facing API surface via androidx. Unhiding the feature
for 3p apps to use.
Bug: 257326947
Test: Compiles
Change-Id: I7071385c509585349bab169797e3d6e32ab425cd
All foreground services are required to declare a type now, or
it'll get a ForegroundServiceTypeNotAllowedException if the app's
target SDK level is Android U or later.
Upon starting the foreground service, the app is required to
have been granted with the proper permissions which are required
by the foreground service types it's starting with.
Deprecated the type "none" and "dataSync", introduced new types:
"heath", "remoteMessaging", "systemExempted" and "specialUse".
The implementation of the enforcement will be in a follow up CL.
Bug: 246792057
Bug: 254662338
Test: atest CtsAppFgsTestCases
Change-Id: I54e60b443df8134653379a6ff13e00ed14d3f194
This adds an API to determine if the context user is the designated
main user on the device. This user may have access to features which
are limited to a single user on the device.
In Android U, this will be the first user to go through setup.
On regular devices, this will be the system user, but on devices in
No Primary User / Headless System User Mode, it will be a different
user.
The isPrimaryUser System API is confusing because it actually always
returns the system user, even in headless mode. That API is deprecated
in this change.
On devices that are upgrading, if they are non-headless, the system user
will be the main user. If they are headless, the full user with the
earliest creation date will be given the flag.
Bug: 256624031
Test: atest UserManagerTest
Change-Id: Ib36f3b372f9bf33cbb097c4af63eb43515ac835b
According to the comment of FabricatedOverlaysTests#setResourcesValue,
it describes that the param `resourceName` should be in the form
"[package]:type/entry". However, there is no validation for it.
This patch adds the function ensureValidResourceName to validate the
input param resourceName.
Bug: 205919743
Test: atest OverlayDeviceTests
# result is http://ab/I87000010106296791
Change-Id: I3327feafe297b697ae295e7a417cba581c482726
This feature is used to signal that device supports Android
Virtualization Framework.
Bug: 243512044
Test: m
Change-Id: I0738f26bdd1889b4047132369ace1e80e1a42336
It's already a test API and will be needed in Mainline. All other
protection flags are already APIs except this one.
Bug: 182523293
Test: atest PermissionPolicyTest
Change-Id: I3e6573755b9cb7b2c91071a623295301327f419e
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
The method UserHandle.getAppId() strips off the part of the Uid that is related to the current user (which may not be zero for multiuser).
Bug: 236100828
Test: Unit test
Merged-In: Ie27c8570ba2551b6d99d9848a0b2469fe76ac3d1
Change-Id: I0c1c1a198bb49e944c2e71fd9e23fc6f528aab9a
The original proximity feature which returned the distance in meters was
determined to be too privacy-invasive. AttentionManagerService continue
to receive proximity in distance from Attention Service, but
HotwordDetectedResult will map it
to different proximity levels, near and far. These proximity levels will be used in HotwordDetectionConnection. Use a RequiredServiceRule to make sure we only run the test if the device has the attention service
Bug: 253326426
Test: atest CtsVoiceInteractionTestCases
Change-Id: I4d55564c39d48dd1869d747beb37f81170c102f6
ArrayList.contains() is the top function in PackageManager's
boot profile for IntenFilter.matchAction(). Replacing the arrays
with ArraySets makes those completely disappear.
Bug: 237583012
Test: build + boot
Change-Id: I659f802be54c5a3f70fd23688bbff1fb5f44cb51
Adding a user property to dictate the behaviour to redirect
the contact calls to the parent user profile, thereby using
the parent's contacts database to serve its calls
Bug: 253004929
Test: atest UserManagerServiceUserPropertiesTest
Change-Id: Ifc81c067893aceab3afd8bf20fb7d931e3a529f9
- We need to add this action in the platform so that WearOS can also handle it, not only SysUi.
- Add tests for MediaOutputDialogReceiver class.
- Add android:priority=1 to the MediaOutputDialogReceiver so that it's always the default handler for the action.
Bug: 246997969
Test: atest MediaOutputDialogReceiverTest
Change-Id: I25d60eef7d4170b5f0b748b9b61ebf043a7c189c
Using separate locks adds a little bit of overhead to the get method.
Switch to a single lock to minimize the performance cost.
Also add a control flag to disable caching in the future, if so desired.
Bug: 257054989
Test: atest CorePerfTests:AccountManagerPerfTest
Change-Id: I5bbcc54f28cbe3c434995af8b3452debfc68c4ee
PermissionInfo.PROTECTION_FLAG_KNOWN_SIGNER is already @SystemApi, and
we need system API for accessing the actual certs in the modularized
permission subsystem.
The copy constructor missed knownCerts in ag/13504004 and is fixed now.
knownCerts isn't deep copied in the copy constructor because
PackageItemInfo.metaData isn't deep copied either.
Bug: 182523293
Test: atest CtsContentTestCases:PermissionInfoTest
Change-Id: I784764fdf7238f6b10455ff40c693de0823a94cb
Indicates whether and how user restrictions and device policies to be
inherited from parent profile.
Bug: 251401809
Test: atest UserManagerServiceUserPropertiesTest
Test: atest android.multiuser.cts.UserManagerTest
Test: atest com.android.server.pm.UserManagerTest
Change-Id: I899804813fbb2ad6c007600a14ce91cee89e7d88