}
}
对源码比较熟悉的同学可以很快知道 , AMS.killBackgroundProcesses 这个接口会提供给三方应用去调用 , 其 Binder 的客户端在 ActivityManager.killBackgroundProcesses 这里
ActivityManager.killBackgroundProcesses
/**
- Have the system immediately kill all background processes associated
- with the given package. This is the same as the kernel killing those
- processes to reclaim memory; the system will take care of restarting
- these processes in the future as needed.
- @param packageName The name of the package whose processes are to
- be killed.
*/
@RequiresPermission(Manifest.permission.KILL_BACKGROUND_PROCESSES)
public void killBackgroundProcesses(String packageName) {
try {
getService().killBackgroundProcesses(packageName,
mContext.getUserId());
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
###对 SystemServer 进程进行断点 De