Refactor: Convert Target A Utilities from Java to Kotlin#14561
Refactor: Convert Target A Utilities from Java to Kotlin#14561Deepak-Kambam wants to merge 2 commits intosignalapp:mainfrom
Conversation
bbf2481 to
d507d44
Compare
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions! |
|
Any issue with the PR? |
|
I'm going to close this, mostly because I don't personally like taking large java -> kotlin conversions from external contributors that I don't know. First, they're not difficult to do ourselves if we want to do them (there's a button in Android Studio that will do 95% of the required work). And second, it's very difficult to review it because what you're trying to ensure is that it behaves identically to how it behaved before, which isn't easy. Put those two together, and kotlin conversion PR's end up being high-risk changes that save us very little time. |
Pull Request Title
Modernize Core Utilities (Target A) to Kotlin
Description
Converted DisplayMetricsUtil, AccessibilityUtil, HtmlUtil, and CalendarDateOnly from Java to Kotlin to improve type safety and reduce boilerplate.
Technical Highlights
Idiomatic Refactor: Migrated static methods to top-level functions and implemented Kotlin property syntax (e.g., layoutParams).
Java Interop: Utilized @file:JvmName to maintain seamless backward compatibility with existing Java call-sites.
Null-Safety: Overhauled type signatures to leverage Kotlin's native non-nullable types, replacing legacy annotations.
Clean Code: Leveraged string templates and scope functions (apply) to minimize logic complexity.
Verification
Build: Successfully compiled via ./gradlew assembleDebug.
Manual: Verified functional parity across Wallpaper aspect ratios, Spoiler animations, Bold text rendering, and Media date grouping.