Skip to content

libpebble3: Compose-free public API (PebbleBitmap), extract Contacts, relocate fakes#231

Open
SalvatoreT wants to merge 1 commit into
coredevices:masterfrom
SalvatoreT:kmp-sdk/03-pebblebitmap-api
Open

libpebble3: Compose-free public API (PebbleBitmap), extract Contacts, relocate fakes#231
SalvatoreT wants to merge 1 commit into
coredevices:masterfrom
SalvatoreT:kmp-sdk/03-pebblebitmap-api

Conversation

@SalvatoreT
Copy link
Copy Markdown

Decouple the published API surface from Compose so external consumers don't need AndroidX/Compose, and tidy the surface for standalone consumption:

  • Introduce image/PebbleBitmap.kt: a pure-Kotlin ARGB8888 bitmap. Replace ImageBitmap with PebbleBitmap in every published bitmap-returning API (Screenshot.takeScreenshot, NotificationApps.getAppIcon, Contacts.getContactImage) and all of their implementations. Add util conversion helpers (PebbleBitmap.toImageBitmap / Bitmap.toPebbleBitmap); app-side call sites convert at the point of rendering. Drop the @stable Compose annotations from the interfaces.
  • Extract the Contacts interface out of LibPebble.kt into its own contacts/Contacts.kt.
  • Move FakeLibPebble from connection/ to a dedicated fake/ package and split the fake ConnectedPebbleDevice out into connection/FakeConnectedDevice.kt.

… relocate fakes

Decouple the published API surface from Compose so external consumers don't need
AndroidX/Compose, and tidy the surface for standalone consumption:

- Introduce image/PebbleBitmap.kt: a pure-Kotlin ARGB8888 bitmap. Replace
  ImageBitmap with PebbleBitmap in every published bitmap-returning API
  (Screenshot.takeScreenshot, NotificationApps.getAppIcon, Contacts.getContactImage)
  and all of their implementations. Add util conversion helpers
  (PebbleBitmap.toImageBitmap / Bitmap.toPebbleBitmap); app-side call sites convert
  at the point of rendering. Drop the @stable Compose annotations from the interfaces.
- Extract the Contacts interface out of LibPebble.kt into its own contacts/Contacts.kt.
- Move FakeLibPebble from connection/ to a dedicated fake/ package and split the fake
  ConnectedPebbleDevice out into connection/FakeConnectedDevice.kt.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: 7694c2603501
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.

1 participant