Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c2291997 authored by Ming-Shin Lu's avatar Ming-Shin Lu
Browse files

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
parent bdd2d660
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment