Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildServiceMap ¶
func BuildServiceMap( frameworksBasePath string, ) (map[string]ServiceMapEntry, error)
BuildServiceMap reads Context.java and SystemServiceRegistry.java from the given frameworks-base path and returns a map from service name to ServiceMapEntry. The returned map is keyed by service name (e.g. "power", "account").
func ExtractContextConstants ¶
ExtractContextConstants parses a Java source string and returns a map of constant name to service name value for all fields matching the pattern: public static final String XXX_SERVICE = "value".
func ExtractStringConstants ¶
ExtractStringConstants parses a Java source string and returns a map of constant name to string value for all public static final String fields.
Types ¶
type Registration ¶
type Registration struct {
ContextConstant string // e.g. "ACCOUNT_SERVICE"
AIDLInterface string // e.g. "IAccountManager"
}
Registration represents a service registration extracted from SystemServiceRegistry.java.
func ExtractRegistrations ¶
func ExtractRegistrations(src string) []Registration
ExtractRegistrations parses a Java source string (typically SystemServiceRegistry.java) and returns the service registrations that use AIDL binder interfaces. Only registerService calls containing a Stub.asInterface invocation are included.
type ServiceMapEntry ¶
type ServiceMapEntry struct {
ServiceName string `json:"service_name"` // e.g. "activity"
ConstantName string `json:"constant_name"` // e.g. "ACTIVITY_SERVICE"
AIDLInterface string `json:"aidl_interface"` // e.g. "IActivityManager" (simple name)
AIDLDescriptor string `json:"aidl_descriptor"` // e.g. "android.app.IActivityManager" (fully qualified)
}
ServiceMapEntry represents a fully resolved service mapping from service name to its AIDL interface descriptor.