启动进程代码
实现功能:
记录是谁启动了活动以及是否启动了活动。
代码API-28
ActivityStarter.java:
私有呼叫包(iapplicationthreadcaller,int callingUid,String callingPackage,Intent intent, string resolving ivoiceinteractionsessionvoicesession,ivoiceinteractorvoiceinteractorvoiceinteractor,IBinder resultTo,String resultWho,insult int请求代码配置文件器info配置文件器info、WaitResult outResult、配置全局配置、安全功能选项选项, booleanignoretargetssions任务记录in task,String reason, booleanallowpendingremoteanimationregistrylookup (..msupervisor.getactivitymetricsllicsllup属性的值callling page -启动器. info启动的Activity信息注意事项:如果确定成功启动了res值0-99,则数据不在记录范围return res中; 如果a APP启动且B B返回a,则回调拦截:
ActiveServices.java
私有蓝牙服务启动锁定(服务记录器, booleanallowcancel (.mam.mhandler.removecallbancel ). mam.mhandler.mhovecallllban mam.posttor r.nextrestarttime=system clock.uptime millis () r.restartDelay; sog.w(tag,' schedulingrestartofcrashedservice ' r.short name ' in ' r.restart delay ' ms ); 事件日志. write event (事件日志tags.am _ schedule _ service _ restart,r.userId,r.shortName,r.restartDelay ) //添加代码侦听参数: r.namer.package namer.shortnamereturncanceled; }这两个数据组合起来可以拦截APP,但Launcher部分的不在这个位置,需要再看一遍。