西东运行中内存监控

系统启动
systemserver.java
启动DeviceStorageMonitorService.java
mSystemServiceManager.startService(DeviceStorageMonitorService.class);
onStart()--->mHandler.obtainMessage(MSG_CHECK).sendToTarget()-->
check()--///读取内存剩余,做出判断,是否内存不足,从而给出提示notification
mHandler.sendMessageDelayed(mHandler.obtainMessage(MSG_CHECK),
                    DEFAULT_CHECK_INTERVAL);
private static final long DEFAULT_CHECK_INTERVAL = DateUtils.MINUTE_IN_MILLIS;
每分钟更新一次

你可能感兴趣的:(Storage,Storage)