class surfaceflinger: Public binderservice ,
Public bnsurfacecomposer,
private ibinder: deathrecipient,
private thread,
private hwcomposer :: eventhandler
Class bnsurfacecomposer: Public bninterface <isurfacecomposer>
Template <typename interface>
Class bninterface: public interface, public bbinder
{
Public:
Virtual sp <iinterface> querylocalinterface (const string16 & _ descriptor );
Virtual const string16 & getinterfacedescriptor () const;
Protected:
Virtual ibinder * onasbinder ();
};
Template <typename service>
Class binderservice
{
Public:
Static status_t publish (bool allowisolated = false ){
Sp <iservicemanager> SM (defaultservicemanager ());
Return Sm-> addservice (string16 (Service: getservicename (), new service (), allowisolated );
}
Static void publishandjointhreadpool (bool allowisolated = false ){
Sp <iservicemanager> SM (defaultservicemanager ());
SM-> addservice (string16 (Service: getservicename (), new service (), allowisolated );
Processstate: Self ()-> startthreadpool ();
Ipcthreadstate: Self ()-> jointhreadpool ();
}
Static void instantiate () {publish ();}
Static status_t Shutdown (){
Return no_error;
}
};
Frameworks/native/libs/binder/ipcthreadstate. cpp
/Alogi ("<transact from PID % d restore PID % d uid % d \ n ",
// Mcallingpid, origpid, origuid );
The message sent from the PID may be obtained during debugging.