Revert "trancoding: lazy-start transcoding service"

This reverts commit 0621358a52.

Reason for revert: change to conditional start.

Bug: 187271658
Test: atest MediaTranscodeManagerTest; unit tests
Change-Id: Iba169a3b50e37b72fab4e354480451cf05ab5be5
This commit is contained in:
Hangyu Kuang
2021-05-13 20:17:34 +00:00
parent f4dab5f769
commit db10bbab08

View File

@@ -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);
}
/**