1、frameworks/base/services/core/java/com/android/server/am/ActivityManagerServiceEx.java
public ActivityManagerServiceEx() {
super();
mIsInHome = true;
addProtectArea("包名", new ProtectArea(0, 0, ActivityManager.PROCESS_STATUS_RUNNING));
}
public void addProtectArea(final String processName, final ProtectArea area) {
if(processName == null || area == null) {
return;
}
Slog.d(TAG, "addProtectArea, processName: " + processName + " ProtectArea: " + area);
mHandler.post(new Runnable() {
@Override
public void run() {
synchronized (ActivityManagerServiceEx.this) {
preProtectAreaList.put(processName, area);
updateOomAdjLocked();
}
}
});
}