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

Skip to content
Commit 0e9c2d44 authored by Jaewan Kim's avatar Jaewan Kim
Browse files

MediaSession2: Fix random NPE in MediaBrowser2Test

MediaSessionService#getSession() may be null until the
MediaSessionService#onCreate(), and its session callback can be called
before that. (e.g. System service can try connecting to the session
in another thread)

Don't use MediaSessionService#getSession() when it's unclear whether
the MediaSessionService#onCreate() is finished.

Bug: 74177171
Test: Run MediaComponents test 10 times
Change-Id: I86ded320d4adc88a610749d23e116c833e207b17
parent 149eb6af
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