resolve merge conflicts of 046c37c266 to nougat-mr1-cts-dev

Test: I solemnly swear I tested this conflict resolution.
Change-Id: Iaa3d716b87d2155dc5b0965cafeb47c87ba60be5
merged-in: I4f57e03e78fbe21fe4fa0635a68f8e2c88bd43c9
merged-in: I599b6cb03571ad9de65c7f18f924867d7b707034