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

OS compatibility improvements #1121

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

TacoTheDank
Copy link
Contributor

1st commit

  • Utilize a bunch of compatibility methods that internally use newer API features for newer API versions (and older for old).

2nd commit

  • Utilize Shortcut compatibility methods

3rd commit

  • FLAG_LOW_LATENCY isn't available on L. It was introduced in API 24 and deprecated two versions later (in classic Android fashion). Anyway, I reworked the audio code so that FLAG_LOW_LATENCY is only applied on N through N_MR1, and O and above only uses the new method (previously the new method was being applied alongside the deprecated flag, which was duplicate functionality and didn't make much sense).
  • Utilize LayoutInflater.from
  • Utilize BitmapCompat.getAllocationByteCount (see here and here for details)
  • Fix a getDrawable deprecation

@cgutman
Copy link
Member

cgutman commented Sep 5, 2022

What is the APK size impact of pulling in the AndroidX support libraries?

@TacoTheDank
Copy link
Contributor Author

TacoTheDank commented Sep 8, 2022

For some reason I get an NDK error when trying to build (so I cannot test for myself), but I can say that the increase is likely negligible. With minify enabled, it would probably be around 250-500 KB.

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