Avoid using deprecated method and add some missing deps

Change-Id: Ie7e26533019b8b99ea61fb53ed0a424cc0836d1f
Merge "Avoid using deprecated method and add some missing deps"