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

Skip to content
Commit 0157327b authored by Christopher Tate's avatar Christopher Tate Committed by Chris Tate
Browse files

Access process fields only when valid

In some cases we can tear down ServiceRecord bookkeeping before its
hosting ProcessRecord has been established.  Make sure that we don't
attempt to reference ProcessRecord information unless we've already
established that it's available.  In this case, the service can't be in
the FGS state until the app's code has begun running and has called
startForeground(), so checking `isForeground` provides the guarantee.

Fixes: 197070543
Test: atest CtsAppTestCases:android.app.cts.ServiceTest
Change-Id: I429c31c7ea87625b380a1ed70b6a1d9afa45bdb3
parent d06ba1aa
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