Merge "Avoid NPE in AM.getMyMemoryState()" into pi-dev