Code example for ActivityManager

Methods: getProcessMemoryInfo

0
	 */ 
	private void getMemorySize(AppInfo appInfo)
	{ 
		int[] pids = new int[1];
		pids[0] = appInfo.getPID();
		MemoryInfo[] memoryInfos = this.activityManager.getProcessMemoryInfo(pids);
		 
		if (memoryInfos.length == 1)
		{ 
			MemoryInfo memoryInfo = memoryInfos[0];
			 
			appInfo.setPrivateDirtyMemory(memoryInfo.getTotalPrivateDirty());
			appInfo.setPssMemory(memoryInfo.getTotalPss());
			appInfo.setSharedDirtyMemory(memoryInfo.getTotalSharedDirty());
		}		 
	} 
	 
	/** 
	 * 获得应用数量 
	 * @return 
	 */