To facilitate it, previous effective value is stored in
DevicePolicyData, with "true" default value to avoid
storing it. When the system boots, if the current flag
value is different from the stored one, suspension is
updated.
An upgrade step sets the stored state to "false" once,
so that devices upgrading from pre-U get their work
apps suspended if in quiet mode.
Bug: 265683382
Test: Manual, via device_config
Test: atest PolicyVersionUpgraderTest
Change-Id: I711ace4cc2f8da6ce4f85aa0f0cde740dba2ba02
Don't rely on GC to release the surfacecontrol. If we stress
the API like in the case of tests, we may end up not freeing
resources in time and crash the system.
Test: test magnifier
Bug: 279622227
Change-Id: Id70c9387bce0d0e92d40cccdeaab232b9c61d7e8
Bug: 258901849
Test: Manual: adb shell settings put secure face_unlock_re_enroll 1, then unlock through keyguard, the notification should occur in 5 seconds of unlocking
Test: atest BiometricNotificationServiceTest
Test: atest BiometricNotificationDialogFactoryTest
Change-Id: Iff606eb464132493b582e8e34a72c1f23472d088
New test for asserting that TraceUtils does not throw an
IllegalArgumentException when passed a long section name. Also,
demonstrate how the public API android.os.Trace.beginSection will throw
an exception if the section name is more than 127 characters long
Also, move TraceUtils to a directory that matches its declared package
name.
Test: atest TraceUtilsTest
Bug: 280850299
Bug: 279715262
Bug: 267482189
Bug: 279784509
Change-Id: I827eb710742d4fabedd4fbb37af64e9ecee118d0
It's not possible to connect to APN's content provider before
boot completed, so skip the cleanup step in this case.
Bug: 277903236
Test: manual
Change-Id: I7d2304a13e1a4e3ac81ad675ced600c9c3801576
In Android U when the profile is paused, all its packages are suspended.
In this case getSuspendingPackage will return PLATFORM_PACKAGE_NAME, so
by that alone it is impossible to tell whether it is admin or not.
This CL changes the code so that quiet mode check takes precedence over
suspension check, so that the right dialog is shown for paused profile
apps.
This likely changes the behaviour in rare cases when the package is
suspended by admin as well, but this doesn't seem important.
Bug: 277715473
Test: manual with TestDPC and Calendar
Change-Id: I5e2edc28c324c0e7d95963c0b55a4b99e0af1833
Remove the demotion flags from a user-initiated job if the app
successfully enqueues a new JobWorkItem. If an app successfully enqueues
a JobWorkItem to a UI job, then the app is in a state to successfully
schedule a UI job. Presumably, the user has asked for this additional
bit of work, so it makes sense to remove the demotion flags. For now,
we only do this for UI jobs since they have strict scheduling
requirements. It's harder to assume other jobs were scheduled due to
user interaction/request.
This mimics the behavior when a UI job is rescheduled (without adding a
JobWorkItem). Internal flags aren't copied over when a job is
rescheduled.
Bug: 281838527
Test: atest FrameworksMockingServicesTests:JobStatusTest
Change-Id: I591afc7c0ac23fa0bda646fd12053be58ff5d4ee
This is done by adopting adjust-only absolute volume behavior when the
connected amplifier is able to send <Report Audio Status>. Adjust-only
absolute volume behavior supports volume tracking and automatically
displays volume UI when the volume level is updated in AudioService.
In HdmiControlService, adoption of this behavior is implemented as a
special case in the logic for adopting absolute volume behavior:
- Absolute volume behavior is currently adopted when a TV panel or
playback device is able to track AND set the percentage volume level
of the System Audio device.
- Adjust-only absolute volume behavior will be adopted when a TV panel
can track, but not set, the volume level of the System Audio device.
The only behavioral difference in HdmiControlService when using
adjust-only AVB, compared to regular AVB, is that it does not send <Set
Audio Volume Level> to the System Audio device.
Bug: 240663266
Test: atest TvToAudioSystemAvbTest PlaybackDeviceToTvAvbTest PlaybackDeviceToAudioSystemAvbTest
Change-Id: I05465cd0eab2f3c3464bf41c1194cdc3be7af4bf
Makes HdmiControlService's test constructor take a wrapper for
AudioManager, allowing it to be to be faked in unit tests in a similar
way to AudioDeviceVolumeManager.
Adds the FakeAudioFramework class, which exposes a fake for both
AudioManager and AudioDeviceVolumeManager. FakeAudioFramework stores
the shared internal state for both managers, simulating AudioService.
Renames the existing wrapper and wrapper interface for
AudioDeviceVolumeManager to make it more consistent with
PowerManagerInternal. For example, instead of ThingWrapper and
FakeThingWrapper implementing ThingWrapperInterface, we have
DefaultThingWrapper and FakeThingWrapper implementing ThingWrapper.
Bug: 217923086
Test: atest com.android.server.hdmi
Change-Id: Ia9d5f7aa382223d523771b8d0382d40d622aa292
Also, switch from the deprecated permission to the updated permission
for the ConnectionService.
Bug: 281832191
Test: n/a
Change-Id: I64e8bf2adba7218f940cbe0f0fb0fe48d4163efe