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

Skip to content
Commit 887be321 authored by Hyundo Moon's avatar Hyundo Moon
Browse files

Prevent the session count from being compromised

Some ways are found to reduce the session count multiple times by
destroying only one session:

1) Call MediaSession#release() multiple times.
2) Call MediaSession#release() and make the process crash

This CL fixes this problem by checking whether the session is already
destroyed in the MediaSessionService.

Also, another hole was found that calling MediaSession2#close()
decrements the session count, although the count does not increase
when creating the MediaSession2. This can be badly used for creating
MediaSession above limit. This CL also fixes this problem.

Bug: 143672815
Test: atest MediaSessionTest
Change-Id: I65225acc98d4bb0ce5cbb7e692675dd05ead635c
parent 2e000710
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