Merge "ResourceManagerService: Send usage only when monitor service is running" into nyc-dev
diff --git a/services/mediaresourcemanager/ResourceManagerService.cpp b/services/mediaresourcemanager/ResourceManagerService.cpp
index 64534bf..3ed0189 100644
--- a/services/mediaresourcemanager/ResourceManagerService.cpp
+++ b/services/mediaresourcemanager/ResourceManagerService.cpp
@@ -92,7 +92,7 @@
static void notifyResourceGranted(int pid, const Vector<MediaResource> &resources) {
static const char* const kServiceName = "media_resource_monitor";
- sp<IBinder> binder = defaultServiceManager()->getService(String16(kServiceName));
+ sp<IBinder> binder = defaultServiceManager()->checkService(String16(kServiceName));
if (binder != NULL) {
sp<IMediaResourceMonitor> service = interface_cast<IMediaResourceMonitor>(binder);
for (size_t i = 0; i < resources.size(); ++i) {
@@ -170,10 +170,7 @@
}
ResourceManagerService::ResourceManagerService()
- : mProcessInfo(new ProcessInfo()),
- mServiceLog(new ServiceLog()),
- mSupportsMultipleSecureCodecs(true),
- mSupportsSecureWithNonSecureCodec(true) {}
+ : ResourceManagerService(new ProcessInfo()) {}
ResourceManagerService::ResourceManagerService(sp<ProcessInfoInterface> processInfo)
: mProcessInfo(processInfo),