For devices using OEMLock HAL, OEM unlock allowed bit is maintained by the HAL.
However PersistentDataBlockService will only look at the OEM unlock allowed bit
on the pst partition to make sure FRP data is cleared on a unlockable device.
As a short term fix, make sure the OEM unlock allowed bit on both the HAL and pst
partition is always in sync.
Bug: 67043266
Test: On walleye/taimen, add an account, enable OEM unlock, factory reset
via fastboot, and observe FRP is not enforced.
Change-Id: Id4a0d81d7a424e17c2751e7e65582b51c14bd073
Problem: When the user toggles power button while in VR, they will be
taken to a black VR screen that occludes the keyguard.
VRManager previously used wakefulness and screen off as gates for VR Mode. However,
the keyguard state can be on or off when the device is awake so we need
to listen to the keyguard state as well.
Change:
1) Have ActivityManagerService tell VrManagerService about the keyguard
state the same as it does with wakefulness.
2) Stop applying any pending states when the device comes out of
sleep/screen-off/keyguard to force user into putting-headset-on (DON) UX
in those situations.
Bug: 66696304
Test: Manual - toggle device's power button and see logs of keyguard.
Test with all keyguard types.
Change-Id: I4ae03cb1c8c13acdc8cd11839f178bc8d8f6f515
A special condition, where the new intent is delivered outside
the normal logic flow, was extended to included documents as well.
This can lead to any intent marked with the document launch flag
sending the intent in this block as well as the normal flow.
This changelist restricts the number of times the intent can be
sent to once during each activity start.
Change-Id: If1e62527d260cbe5ff170680695b03d9de532c09
Fixes: 67367621
Test: open Photos link in gmail twice
Test: cts/hostsidetests/services/activityandwindowmanager/util/run-test CtsAppTestCases android.app.cts.NewDocumentTest
Log audio focus request and abandon commands.
Limit the size of the audio focus stack to prevent malicious
applications trying to run the process out of memory.
Test: use media apps and speech reco, check dumpsys audio
Bug: 67055749
Change-Id: I529529fe40f33a8f67c64c3c61ba22d9530fb4d9
- On AIO VR devices (where live VR services are required to render
anything), reconnect to the VrListenerService and VR compositor service
indefinitely and never leave VR + persistent mode.
- On smartphone VR devices, do not reconnect if the VrListenerService
dies for any reason, instead immediately leave VR + persistent mode. If
the VR compositor dies, reconnect a limited number of times. The
expectation is that the VrListenerService process will detect the
compositor crashes separately (via a shared service binding), and chose
to either attempt to fall back to a previous render path or simply
propagate the crash and leave VR mode entirely.
- Update dumpsys logging to include lifecycle events from the
VrListenerService and VR compositor service.
Bug: 66967700
Test: Manual test with VrCore APK by logging when the VR services are
connected and killing each VrCore process from ADB shell.
e.g.:
- Repeatedly kill the VrCore main process.
- Repeatedly kill the VrCore compositor process.
- Repeatedly kill both processes.
Change-Id: I8952b872b39102a601f66bc6624fc0ad92ca0f30
display need to be destroyed once the display is removed.
Then apply this flag to VR virtual display.
Change-Id: Icb5aa1280b6ebac5941afda1cc1b94b258ce44f4
Bug: 67420451
Test: Manually. "adb shell am stack list" does not show contents
from virtual display anymore after it's released.
The problem is that -
1) When the device enters a VR activity directly from screen off, there
is a chance the device is not in low persistence mode and ghosting is
really bad.
2) LocalDisplayAdapter gets to know that the device is in VR mode later
than PowerManagerService due to scheduling of it's runnable.
3) The call to Lights HAL to change the display mode only is made only
when there is a brightness change.
4) This opens up a race condition where the PowerManagerService knows device
is in VR mode and changes the brightness to VR brightness before the
LocalDisplayAdapter knows about the VR mode change.
5) Since there is no more brightness change to be done, the device is
not in low persistence mode creating really bad UX.
Fix is to trigger a brightness change call when there is a Display state
change so that LocalDisplayAdapter sets the low persistence mode
correctly always.
Bug: 67114120
Test:
1) Lock and unlock to VR puts the device in low persistence mode
correctly always.
2) Lock and unlock in normal mode changes brightness correctly.
3) Even with lockscreen, all of the use cases above work correctly.
Change-Id: Ic0e6d92ba145aaa94f86e6d53ab5aa08cbbae10c
Signed-off-by: Karthik Ravi Shankar <karthikrs@google.com>
The class loader context adds the overhead of extracting in-memory and
possibly extra verification which is being frowned upon when the loading
happens on the UI thread. Revert the correct fix of compiling secondary
dex files with their loading context until b/64530081 is done.
Partial revert of commit f1ff36f0f9.
Test: adb shell cmd package compile -m quicken -f --secondary-dex
com.google.android.gms
Bug: 64530081
Bug: 66984396
Change-Id: Ib2815ce67b224883fe95c28d1424103e56342c6e
Currently, Settings is not being updated properly when the current spell
checker service is removed or disabled and there is no other spell
checker service available. The correct behavior is that Secure.Settings
should be updated with empty string to indicate there is no selected
spell checker service.
Bug: 64812014
Fixes: 67412078
Test: Manually as follows:
0. Make sure AOSP keyboard is installed.
1. adb shell settings put --user 0 secure selected_spell_checker com.android.inputmethod.latin/.spellcheck.AndroidSpellCheckerService
2. tapas SampleSpellCheckerService
3. make -j
4. adb install --user 0 -r out/target/product/generic/system/app/SampleSpellCheckerService/SampleSpellCheckerService.apk
5. adb shell pm disable com.android.inputmethod.latin
6. adb shell settings get --user 0 secure selected_spell_checker
-> com.example.android.samplespellcheckerservice/.SampleSpellCheckerService
7. adb uninstall com.example.android.samplespellcheckerservice
8. adb shell settings get --user 0 secure selected_spell_checker
-> empty
9. adb root
10. adb shell settings get --user 0 secure selected_spell_checker
-> empty
11. adb shell pm enable com.android.inputmethod.latin
12. adb shell settings get --user 0 secure selected_spell_checker
Change-Id: I30902a3d94f2ddef33f4a8067799e98322ae3a03
Merged-In: I30902a3d94f2ddef33f4a8067799e98322ae3a03
(manual cherrypick of 83a7330bbe)
When we are setting a new spell checker as the default one in
Secure.Settings, TSMS#findAvailSpellCheckerLocked can pick up
any available spell checker service. This violates the principle
that user should be warned whenever we are setting an untrusted
spell checker service as the default service, since the warning
dialog is never shown.
Bug: 64764051
Fixes: 67410643
Test: Manually as follows:
0. Make sure AOSP keyboard is pre-installed.
1. adb shell settings put --user 0 secure selected_spell_checker com.android.inputmethod.latin/.spellcheck.AndroidSpellCheckerService
2. tapas SampleSpellCheckerService
3. make -j
4. adb install --user 0 -r out/target/product/generic/system/app/SampleSpellCheckerService/SampleSpellCheckerService.apk
5. adb shell pm disable com.android.inputmethod.latin
6. adb shell settings get --user 0 secure selected_spell_checker
-> com.android.inputmethod.latin/.spellcheck.AndroidSpellCheckerService
7. adb reboot
8. adb shell settings get --user 0 secure selected_spell_checker
-> com.android.inputmethod.latin/.spellcheck.AndroidSpellCheckerService
Change-Id: I298ffbcfa5e32f43753f54fbebc40a414a5c0f9e
Merged-In: I298ffbcfa5e32f43753f54fbebc40a414a5c0f9e
(manual cherrypick of 0f0a37ba7d)
- Allow VR system application to have VR manager service bind a
compositor process so that oom scoring for the compositor process can be
adjusted.
Bug: 38390640
Test: Check that the VrCore compositor process is -700 on AIO devices with:
adb shell procrank -o
Change-Id: I7b5bce5eb87bd5ed0fdeadf4ec7bdd2b361ab875
Currently, NPMS informs NMS synchronously at some events and
asynchronously at some others. If these sync and async calls get
interleaved, then NMS will end up in an inconsistent state.
In N-MR1, NPMS was updated to inform NMS asynchronously to avoid some
lock contentions during screen unlock. This shouldn't be a problem any more
since NPMS no longer updates its internal state on ui thread and also
netd calls have been optimized from ~50ms to ~7ms since then.
Bug: 66015813
Test: cts-tradefed run singleCommand cts-dev -m CtsHostsideNetworkTests -t \
com.android.cts.net.HostsideRestrictBackgroundNetworkTests
Change-Id: I24ccb5819430f19014630e7b90cba1f0b993e430
Event logger: add support for logging the text of the event in
the logcat at the same time to avoid having the duplicate the
logcat entry and the logger event. See printLog() method.
AudioPlaybackMonitor: log ducking and incall muting.
Test: play media and notification, verify logs appear in logcat and dumpsys audio
Bug:65363602
Change-Id: I2af0c2bbd2fde428f07761ca45e7950a16843604
1. process package update broadcasts on our background thread rather
than on the main looper thread
2. don't synchronize unnecessarily around access to simple
transport metadata
We mustn't block the main looper thread for anything that might wind
up interlocked with calls to the transport, because those might take
arbitrary amounts of time. We were previously entering such an
implicitly interlocked code path during package-changed broadcast
handling, and in pathological cases were causing the watchdog to
restart the system. This situation is addressed in a couple of ways:
first, by no longer performing package-update work on the main looper
thread at all; and second, by eliminating lock reliance entirely from
data-access paths that don't actually need it.
Bug: 65438129
Bug: 64133971
Test: manual + CTS
Change-Id: I361ad4a0729f319db7339bd341a6d33aa3b64fed
Merged-In: I361ad4a0729f319db7339bd341a6d33aa3b64fed
If an app targets api 26, it needs a notification channel, even for
foreground service notifications.
Change-Id: Id3131d4bb2748e9d23f66dd4f5570842bc50a44f
Fixes: 66905243
Test: manual
The configuration update during layout is currently restricted to
whether the client is hidden. This does not cover all the conditions
where the window can be laid out, such as if it is the starting
window.
This changelist makes sure the same condition is used in both cases.
Change-Id: I64a2f70718b949f3803e8cafcdabd2be5b5885e6
Fixes: 67027059
Test: Repeatedly open Gmail and ensure no jump-cut occurs.
PlayerBase:
Update player volume when the audio attributes are updated in case
we need to unmute
PlaybackActivityMonitor:
Unmute alarm stream if needed when an alarm with flag
FLAG_BYPASS_INTERRUPTION_POLICY starts from an app with
privileged permission MODIFY_PHONE_STATE.
Bug: 63617557
Test: check sound with cell broadcast in total silence
Change-Id: Ifacb1d96a2d8d44047d9f9642d1e672fcf756cda
Added more logs to audio mode changes to track both the requested mode
and the actually selected mode.
Bug: 65513486
Test: Verify logs after various voice and VoIP scenarii
Change-Id: I486f091803ef7776ff325db908e8e462852ea3c1
When launching a 2D activity in VR mode by the VR app, we want to launch
it in the virtual display created by VR. But, this fails since the
virtual display owner is system and the calling UID doesn't have
ACTIVITY_EMBED permission.
We address this by making the virtual display public since it's lifetime
is only VR mode and we want to allow all apps to launch 2D activities
and route them to the vr virtual display.
Bug: 66475142
Test: Launch VrSettingsActivity by clicking on gear and check "adb shell
am stack list" to verify it launched on the virtual display
Change-Id: Idde63ea63c953c6cf3d4ea46989a963a5651ce8a
Signed-off-by: Karthik Ravi Shankar <karthikrs@google.com>
The lock was introduced earlier to prevent race conditions between
setting the visibility and configuration. However, holding the lock
for the entire method leads to an increase in the frame time.
This changelist reduces the scope of the lock to cover the core
logic where this condition applies.
Change-Id: Ia97b3680f730264c10ff5067e4f21180cfb2202e
Fixes: 67010772
Test: go/wm-smoke