Skip to content

Refactor: Convert Target A Utilities from Java to Kotlin#14561

Closed
Deepak-Kambam wants to merge 2 commits intosignalapp:mainfrom
Deepak-Kambam:StandardPrefix
Closed

Refactor: Convert Target A Utilities from Java to Kotlin#14561
Deepak-Kambam wants to merge 2 commits intosignalapp:mainfrom
Deepak-Kambam:StandardPrefix

Conversation

@Deepak-Kambam
Copy link
Copy Markdown

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.

@github-actions
Copy link
Copy Markdown

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!

@wertzuz
Copy link
Copy Markdown

wertzuz commented Apr 13, 2026

Any issue with the PR?

@greyson-signal
Copy link
Copy Markdown
Contributor

greyson-signal commented Apr 13, 2026

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants