Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 773ec045 authored by Antony Sargent's avatar Antony Sargent
Browse files

Fix occasional crash in VirtualDeviceManagerService

If a VirtualDevice is closed very soon after an Activity is displayed
on one of its VirtualDisplays, we can get a crash in
VirtualDeviceManagerService because a late call to
notifyRunningAppsChanged just after the close both leaves
mVirtualDevices and mAppsOnVirtualDevices out of sync about whether
the device still exists, and also dispatches the
onAppsOnVirtualDeviceChanged to listeners via the LocalService where
listeners may try and get the device that's already been removed.

This problem happens occasionally when running CTS tests where we are
often tearing down a VirtualDevice at the end of a test just after
starting an Activity and verifying something, but is likely rare in
regular device usage.

Bug: 265825399
Test: atest VirtualDeviceManagerServiceTest
Change-Id: I11f3d85a9ed81a57cebd561bd0ba3c28d75f520b
parent aa8a8dff
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment