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

Commit c8dd41c2 authored by Sham Rathod's avatar Sham Rathod
Browse files

MediaCas : replace getService() with waitForDeclaredService()

When MediaCas service is configured to be launched as a lazy service,
getService() fails since it does not launch a service that is not
already running (which is the case with lazy services). Change the call
to waitForDeclaredService() which attempts to launch a service if not already
running.

Test: atest MediaCasTest
Bug: 301834444
Change-Id: I2c50bd8485719da4d77e1862e93129a66c102e83
parent 34e3f2c4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -272,7 +272,7 @@ public final class MediaCas implements AutoCloseable {
                        Log.d(TAG, "Trying to get AIDL service");
                        IMediaCasService serviceAidl =
                                IMediaCasService.Stub.asInterface(
                                        ServiceManager.getService(
                                        ServiceManager.waitForDeclaredService(
                                                IMediaCasService.DESCRIPTOR + "/default"));
                        if (serviceAidl != null) {
                            return serviceAidl;