Stop using deprecated method.

Change-Id: Ibb09e1a1699a02ab0a8fdb79f1f33286ec48c472
Merge "Stop using deprecated method."