Merge "Revert "trancoding: lazy-start transcoding service"" into sc-dev

This commit is contained in:
Hangyu Kuang
2021-05-21 16:04:20 +00:00
committed by Android (Google) Code Review

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