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

[Android] MAC address not available in system info #25244

Merged
merged 1 commit into from
Jun 2, 2024

Conversation

joseluismarti
Copy link
Contributor

Description

Android's new security restriction no longer allow to access MAC address on apps targeting Android 11 and higher.

NetworkInterface.getHardwareAddress() returns null for every interface. This method only returns the address when called by system apps.

Types of change

  • Bug fix (non-breaking change which fixes an issue)
  • Clean up (non-breaking change which removes non-working, unmaintained functionality)
  • Improvement (non-breaking change which improves existing functionality)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that will cause existing functionality to change)
  • Cosmetic change (non-breaking change that doesn't touch code)
  • Student submission (PR was done for educational purposes and will be treated as such)
  • None of the above (please explain below)

Checklist:

  • My code follows the Code Guidelines of this project
  • My change requires a change to the documentation, either Doxygen or wiki
  • I have updated the documentation accordingly
  • I have read the Contributing document
  • I have added tests to cover my change
  • All new and existing tests passed

@joseluismarti joseluismarti changed the title [Android] Do not display MAC address in system info [Android] MAC address not available in system info Jun 1, 2024
@joseluismarti
Copy link
Contributor Author

Better option is to show ‘Not available’ when the returned address is empty.

screen

Copy link
Contributor

@fuzzard fuzzard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this better.

@fuzzard fuzzard added this to the "P" 22.0 Alpha 1 milestone Jun 1, 2024
@fuzzard fuzzard added Type: Improvement non-breaking change which improves existing functionality v22 "P" labels Jun 1, 2024
Copy link
Member

@garbear garbear left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same

@fuzzard fuzzard merged commit 01c90d0 into xbmc:master Jun 2, 2024
2 checks passed
@joseluismarti joseluismarti deleted the mac-info branch June 3, 2024 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Improvement non-breaking change which improves existing functionality v22 "P"
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants