Skip to content

[API] Rearchitect ChangeManager to support CardContentProvider #20907

@david-allison

Description

@david-allison

Our API (CardContentProvider) does not support ChangeManager. It is infeasible to make CardContentProvider compatible with suspend due to Android limitations.

This affects some screens, widgets etc...

Some methods in CardContentProvider do yet not produce an OpChanges, and need to be updated/rewritten.


Proposed solution

  1. Decouple consumers/producers in ChangeManager, primarily for use in the API
    • A non-blocking publish(OpChanges) method can be used
    • Future: batching will be available
    • Current methods continue to block until subscribers are notified.
  2. Update all methods in CardContentProvider to publish, publishing via a method similar to notifySubscribersAllValuesChanged iif an OpChanges is not available
  3. Gradually transition away from notifySubscribersAllValuesChanged
    * This notifies of more changes than necessary

For now, only the API would use the sync method, to ensure no ordering-related issues are introduced.


If you would like to work on the issue, let me know and I'll split (1) into a subtask

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Priority

    Medium

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions