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

Commit db10bbab authored by Hangyu Kuang's avatar Hangyu Kuang
Browse files

Revert "trancoding: lazy-start transcoding service"

This reverts commit 0621358a.

Reason for revert: change to conditional start.

Bug: 187271658
Test: atest MediaTranscodeManagerTest; unit tests
Change-Id: Iba169a3b50e37b72fab4e354480451cf05ab5be5
parent f4dab5f7
Loading
Loading
Loading
Loading
+2 −14
Original line number Diff line number Diff line
@@ -45,21 +45,12 @@ public class MediaServiceManager {
     */
    public static final class ServiceRegisterer {
        private final String mServiceName;
        private final boolean mLazyStart;

        /**
         * @hide
         */
        public ServiceRegisterer(String serviceName, boolean lazyStart) {
            mServiceName = serviceName;
            mLazyStart = lazyStart;
        }

        /**
         * @hide
         */
        public ServiceRegisterer(String serviceName) {
            this(serviceName, false /*lazyStart*/);
            mServiceName = serviceName;
        }

        /**
@@ -70,9 +61,6 @@ public class MediaServiceManager {
         */
        @Nullable
        public IBinder get() {
            if (mLazyStart) {
                return ServiceManager.waitForService(mServiceName);
            }
            return ServiceManager.getService(mServiceName);
        }
    }
@@ -90,7 +78,7 @@ public class MediaServiceManager {
     */
    @NonNull
    public ServiceRegisterer getMediaTranscodingServiceRegisterer() {
        return new ServiceRegisterer(MEDIA_TRANSCODING_SERVICE, true /*lazyStart*/);
        return new ServiceRegisterer(MEDIA_TRANSCODING_SERVICE);
    }

    /**