Merge "Remove usage of deprecated and hidden APIs" into main