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
Context service name for accessing AudioDeviceVolume manager.
Address API comments on VolumeInfo and AudioDeviceVolumeManager.
Add support in VolumeInfo to know whether it carries an explicit
mute/unmute information (vs just default value of isMuted()).
Bug: 244326361
Test: atest android.media.audio.cts.AudioDeviceVolumeManagerTest
Test: atest android.media.audio.cts.VolumeInfoTest
Change-Id: Id718fbd7e0d5795ac480d9188faad4a70fba9808
- orSelf: signifies that this method checks if the calling process OR
the current process has the permission
- anyOf: signifies that if this method checks multiple permissions,
the check passes if ANY ONE of the permissions is granted
- value (default parameter): a hard coded list of permissions that this method checks.
This parameter is useful for static analysis, where the implementation
of some @PermissionMethod may not be visible across library
boundaries. A good example of this is
NetworkStack#checkNetworkStackPermission, which is a source in
framework-minus-apex, but is used from services.core.unboosted. Since
it passes straight into a helper which checks the actual permissions,
it's not possible for lint running on services.core.unboosted to see
which permissions are checked.
Bug: 247537842
Test: TH
Change-Id: Ia5d92149763766576602f5d84a86c67f6fb7e96d
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
WearableSensing framework APIs are intended to be used to interact and
manage the WearableSensingService. The WearableSensingService provides
an isolated service environment for an application to provide a remote
data stream to and run sensing workloads on the data stream. Clients
that want to use this API must hold the permission
MANAGE_WEARABLE_SENSING_SERVICE. The permission protection level is signature|privledged.
API overview: go/wearable-sensing-api
Design doc: go/trusted-glasses
A follow up CL will implement the integration between
WearableSensingService and AmbientContextManager. A subsequent follow up
will also add unit and cts testing.
Bug: 244181656, 249135378
Test: Builds.
Ignore-AOSP-First: to prevent new feature leak.
CTS-Coverage-Bug: 259453662
Change-Id: I0c5e3c5aa01dda9d3289733abd22abfcccc15f96
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