-
Notifications
You must be signed in to change notification settings - Fork 212
fix ANR issue caused by MediaDRM api #791
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
wenxi-zeng
commented
Feb 17, 2022
- fix ANR issue caused by MediaDRM api
Device device = new Device(); | ||
String identifier = collectDeviceID ? getDeviceId() : traits().anonymousId(); | ||
|
||
// use empty string to indicate device id is not yet ready |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets add a comment that deviceId will be populated async
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some comments, but LGTM
/** | ||
* Workaround for not able to get device id on Android 10 or above using DRM API {@see | ||
* https://stackoverflow.com/questions/58103580/android-10-imei-no-longer-available-on-api-29-looking-for-alternatives} | ||
* {@see https://developer.android.com/training/articles/user-data-ids} | ||
*/ | ||
private static String getUniqueID() { | ||
public static String getUniqueID() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
given that this is not a safe API to use anymore, would it make sense to move it into the GetDeviceIdTask
class?