Add RingtoneManager.hasHapticChannels(Context, Uri).

Currently, RingtoneManager.hasHapticChannels(Uri) will use the context
from AudioService to resolve the given Uri. However, that may not always
work. In that case, add another API to ask apps to provide Context to
resolve given Uri can help the API returning correct result.

Test: atest RingtoneManagerTest
Bug: 196195517
Change-Id: I484e157e0d03e5eeabdd68908b11db534ad3c3ab
2 files changed