Activitymanagerservice, called AMS, is one of the core features of the Android kernel and starts the service when the system starts systemserver.
Android Frame:
The composition of Activity manager is divided into the following sections:
1. Service agent: Implemented by Activitymanagerproxy for interprocess communication with system services provided by the server side
2. Service hub: Activitymanagernative inherits from Binder and implements Iactivitymanager, which provides the mutual transformation function of the service interface and binder interface, and the internal storage service proxy to the image, and provides the Getdefault method to return the service proxy
3.Client: A portion of the service interface is encapsulated by the Activitymanager for Client invocation. Activitymanager internal by calling Activitymanagernative's Getdefault method, you can get a activitymanagerproxy reference to the image, and then through the proxy to the method of invoking the remote service
4.Server: Implemented by Activitymanagerservice, providing Server-side system Services
Frame diagram:
The functions provided by AMS mainly include the following aspects:
1. Management of Android four components (activity service broadcast content provider), including startup, life cycle management, etc.
2. Process Oom adj with level LRU weight management
The AMS main code is located at:
Frameworks\base\core\java\android\app
Frameworks\base\services\java\com\android\server\am
The main directory structure is as follows:
AMS for Android Core Analytics