Merge "avoid data overflow in low memory device" am: 376f04e047
am: a7d6d7bcc3

Change-Id: I97e74f033c12741098b55e9703b5cb8dabcd69df