Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix ANR issue caused by MediaDRM api #791

Merged
merged 9 commits into from
Feb 17, 2022
Merged

Conversation

wenxi-zeng
Copy link
Contributor

  • 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
Copy link
Contributor

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

Copy link
Contributor

@prayansh prayansh left a 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() {
Copy link
Contributor

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?

@wenxi-zeng wenxi-zeng merged commit f8dc014 into master Feb 17, 2022
@wenxi-zeng wenxi-zeng deleted the wenxi/fix-drm-anr-issue branch February 17, 2022 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants