Fix a potential crash when calling RingtoneManager#hasHapticChannels
In case the cached context or the input context object in RingtoneManager which the context object is created by contextContextByUser that using negative specialized UserHandle.USER_CURRENT as CL[1] that caused calling AudioManager#hasHapticChannelsImpl(context, uri) end up throwing exception when getting the content provider by resolving negtive user id from the input context.getUserId() Fix this issue by using the current userId to create user context to avoid the exception. [1]: I4f45f9b12b1ae583ab153d6d0025ee7a215a9b81 Bug: 441570690 Flag: EXEMPT BUGFIX Test: atest AudioManagerTest Change-Id: Ie768290f7d8c08f61949050587065603e387a87f
Loading
Please register or sign in to comment