-
Notifications
You must be signed in to change notification settings - Fork 368
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
Clean up Android Support Library references, drop dependency on androidx.legacy, & Android 4.4 and older code #2147
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The last reference to the legacy library was WakefulBroadcastReceiver, however it was simply an exist check and the code is no longer using the class.
Rename our AndroidSupportLibraryStatus to JetpackLibraryStatus to reflect the new name of the Android library under their AndroidX namespace.
All versions of Jetpack / Android contain the JobIntentService class.
Jetpack will always include the new constructor
Switched to using Jetpack's implementation. The original purpose of the this class was not require Android Support Library 23, but we are long past needing to support that. Null signature is more strict with Jetpack, so some of the code needed a small refactor. There is one last function, getColor, which didn't belong there that will be cleaned up in a follow up commit.
Removed the last function, getColor, so we can fully remove this class. Switched to Jetpack which handles the Android version checks for us.
jkasten2
force-pushed
the
clean-up-android-support-library-references
branch
from
July 15, 2024 22:16
d35ecde
to
6f7fa97
Compare
Remove no longer needed Android version checks for IAM and Notification code. The SDK only support Android 5 (API Level 21) and higher since OneSignal 5.0.0.
We no longer support Android 4.4 and older since OneSignal 5.0.0 so we can clean up this older alarm and service code.
jkasten2
force-pushed
the
clean-up-android-support-library-references
branch
from
July 15, 2024 23:00
6f7fa97
to
284558c
Compare
jkasten2
changed the title
Clean up Android Support Library references
Clean up Android Support Library references & Android 4.4 and older code
Jul 16, 2024
jinliu9508
reviewed
Jul 16, 2024
OneSignalSDK/onesignal/core/src/main/java/com/onesignal/core/activities/PermissionsActivity.kt
Show resolved
Hide resolved
jinliu9508
approved these changes
Jul 16, 2024
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.
LGTM! Thanks for the effort to clean up the codes that we no longer use.
jkasten2
changed the title
Clean up Android Support Library references & Android 4.4 and older code
Clean up Android Support Library references, drop dependency on androidx.legacy, & Android 4.4 and older code
Jul 18, 2024
Merged
This was referenced Aug 15, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
One Line Summary
Clean up Android Support Library references,
androidx.legacy:legacy-support-v4
dependency, and code for Android 4.4 and older.Details
androidx.legacy
namespace since 5.0.0, however not all reference nor the depency itself was removed.Motivation
androidx.legacy
means build compatibility when using older versions of AGP (pre 7.0.0) when targeting Android API Level 34.Scope
Code changes with any references to the Android Support Library or Android 4.4 or older.
Testing
Manual testing
Tested on an Android 5.0 and Android 14 emulators. Ensuring notifications and IAMs display and background job runs.
Affected code checklist
Checklist
Overview
Testing
Final pass
This change is