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

Skip to content
Commit 429f8598 authored by Girish's avatar Girish
Browse files

resourcemanager: refactor death notification

media.resource.manager Binder death notification is refactored
as it:
- uses static/no_destroy map and locks.
- doesn't connect with the resource.manager upon death.

So, the following changes are made with this CL:
- Reconnect with the resource.manager upon death
- Re-register all the resources, so that resource.manager
  will have all the resource information to help with
  codec reclaim.
- Avoid the usage of static/no_destroy map and locks by using
  a context with a weak_ptr (as cookie) to validate
  the object before dereferencing it.
- Replacing the deprecated API AServiceManager_getService
  with AServiceManager_waitForService.

Bug: 284031542
Test: atest android.media.misc.cts.ResourceManagerTest
      atest android.resourcemanager.cts.ResourceManagerHostJUnit4Test
      atest android.mediav2.cts.CodecDecoderSurfaceTest
      atest android.mediav2.cts.CodecDecoderTest
      atest android.mediav2.cts.CodecEncoderSurfaceTest
      atest android.mediav2.cts.CodecEncoderTest
Merged-In: I4332945086640876fc730992986181e883faddc0
Change-Id: I4332945086640876fc730992986181e883faddc0
parent de8eb593
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