Revert "mark method visibleMetadataFields as public"

Not actually needed in master, just in REL1_23. Cherry pick made

This reverts commit 9aea26dbd67ff5e3c43c0966f00f9815c0fd16b0.

Change-Id: I3e7079812390bd47226ece09e91395d51c35441e