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:
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user