Add memtrackproxy system server service
Serve memtrackproxy service from system server. This service enforces access control on requests for memory usage stats to the memtrack HAL based on the call context's PID and UID. Bug: 177664629 Test: memtrackproxy_test Change-Id: I10829ffcf4e5b2813d4c622268b0b59da6f171b6 Merged-In: I10829ffcf4e5b2813d4c622268b0b59da6f171b6
This commit is contained in:
@@ -391,6 +391,11 @@ public final class SystemServer {
|
||||
*/
|
||||
private static native void startSensorService();
|
||||
|
||||
/**
|
||||
* Start the memtrack proxy service.
|
||||
*/
|
||||
private static native void startMemtrackProxyService();
|
||||
|
||||
/**
|
||||
* Start all HIDL services that are run inside the system server. This may take some time.
|
||||
*/
|
||||
@@ -829,6 +834,12 @@ public final class SystemServer {
|
||||
mSystemServiceManager.startService(UriGrantsManagerService.Lifecycle.class);
|
||||
t.traceEnd();
|
||||
|
||||
// Start MemtrackProxyService before ActivityManager, so that early calls
|
||||
// to Memtrack::getMemory() don't fail.
|
||||
t.traceBegin("MemtrackProxyService");
|
||||
startMemtrackProxyService();
|
||||
t.traceEnd();
|
||||
|
||||
// Activity manager runs the show.
|
||||
t.traceBegin("StartActivityManager");
|
||||
// TODO: Might need to move after migration to WM.
|
||||
|
||||
Reference in New Issue
Block a user