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

Migrated Deprecated AsyncTask to Kotlin Coroutines #25

Merged
merged 7 commits into from
Jan 6, 2021
Merged

Migrated Deprecated AsyncTask to Kotlin Coroutines #25

merged 7 commits into from
Jan 6, 2021

Conversation

SanjayDevTech
Copy link
Contributor

@SanjayDevTech SanjayDevTech commented Jan 5, 2021

I have:

  • Done 50% 100% of task of migrating to Coroutines
  • Replaced some classes with their Compat versions (BlendModeColorFilter with BlendModeColorFilterCompat)
  • Fixed Android Studio warnings and typos
  • Upgraded Java compatibility version to 1.8
  • Migrated CommonVersionCheck to Kotlin Object

Fix #9

- Created BitmapCroppingWorkerJob.kt
- Removed BitmapCroppingWorkerTask.java
- Added FragmentActivity parameter to BitmapCroppingWorkerJob.kt for handling coroutine
- Replaced all BitmapCroppingWorkerTask use cases to BitmapCroppingWorkerJob.kt
CommonVersionCheck.kt is refactored as an Object to avoid creating instance every time
Replaced BlendModeColorFilter with their Compat variation on CropImageActivity.kt
@Canato Canato added this to the refactor_into_kotlin milestone Jan 5, 2021
@Canato Canato self-requested a review January 5, 2021 14:52
@SanjayDevTech SanjayDevTech changed the title BitmapCroppingWorkerTask(AsyncTask) to BitmapCroppingWorkerJob (Coroutines) Migrated Deprecated AsyncTask to Kotlin Coroutines Jan 5, 2021
Canato
Canato previously approved these changes Jan 5, 2021
Copy link
Member

@Canato Canato left a comment

Choose a reason for hiding this comment

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

Please be sure to test it on the Builds

Nice work!

@Canato Canato self-requested a review January 5, 2021 17:53
@Canato Canato dismissed their stale review January 5, 2021 17:57

wrong click

@Canato Canato merged commit fd98f87 into CanHub:main Jan 6, 2021
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.

'android.os.AsyncTask' is deprecated
2 participants