github mozilla/application-services v0.17.0
0.17.0

latest releases: v143.0, v142.0, v141.0...
6 years ago

0.17.0 (2019-02-19)

Full Changelog

FxA

What's New

  • We are now using Protocol Buffers to pass the Profile data across the FFI boundaries, both on Android and iOS. On Android there should be no breaking changes.
  • Kotlin: Profile is now a Data Class.

Breaking changes

  • iOS: You now have to include the SwiftProtobuf framework in your projects for FxAClient to work (otherwise you'll get a runtime error when fetching the user profile). It is built into Carthage/Build/iOS just like FxAClient.framework.
  • iOS: In order to build FxAClient from source, you need swift-protobuf installed. Simply run brew install swift-protobuf if you have Homebrew.
  • iOS: You need to run carthage bootstrap at the root of the repository at least once before building the FxAClient project: this will build the SwiftProtobuf.framework file needed by the project.
  • iOS: the Profile class now inherits from RustProtobuf. Nothing should change in practice for you.

Places

What's New

  • New methods on PlacesConnection (Breaking changes for classes implementing PlacesAPI):
    • fun deleteVisit(url: String, timestamp: Long): If a visit exists at the specified timestamp for the specified URL, delete it. This change will be synced if it is the last remaining visit (standard caveat for partial visit deletion). (#621)

    • fun deleteVisitsBetween(start: Long, end: Long): Similar to deleteVisitsSince(start), but takes an end date. (#621)

    • fun getVisitInfos(start: Long, end: Long = Long.MAX_VALUE): List<VisitInfo>: Returns a more detailed set of information about the visits that occured. (#619)

      • VisitInfo is a new data class that contains a visit's url, title, timestamp, and type.
    • fun wipeLocal(): Deletes all history entries without recording any sync information. (#611).

      This means that these visits are likely to start slowly trickling back
      in over time, and many of them will come back entirely if a full sync
      is performed (which may not happen for some time, admittedly). The
      intention here is that this is a method that's used if data should be
      discarded when disconnecting sync, assuming that it would be desirable
      for the data to show up again if sync is reconnected.

      For more permanent local deletions, see deleteEverything, also added
      in this version.

    • fun runMaintenance(): Perform automatic maintenance. (#611)

      This should be called at least once per day, however that is a
      recommendation and not a requirement, and nothing dire happens if it is
      not called.

      The maintenance it may perform potentially includes, but is not limited to:

      • Running VACUUM.
      • Requesting that SQLite optimize our indices.
      • Expiring old visits.
      • Deleting or fixing corrupt or invalid rows.
      • Etc.

      However not all of these are currently implemented.

    • fun pruneDestructively(): Aggressively prune history visits. (#611)

      These deletions are not intended to be synced, however due to the way
      history sync works, this can still cause data loss.

      As a result, this should only be called if a low disk space notification
      is received from the OS, and things like the network cache have already
      been cleared.

    • fun deleteEverything(): Delete all history visits. (#647)

      For sync users, this will not cause the visits to disappear from the
      users remote devices, however it will prevent them from ever showing
      up again, even across full syncs, or sync sign-in and sign-out.

      See also wipeLocal, also added in this version, which is less
      permanent with respect to sync data (a full sync is likely to bring
      most of it back).

Breaking Changes

  • The new PlacesConnection methods listed in the "What's New" all need to be implemented (or stubbed) by any class that implements PlacesAPI. (multiple bugs, see "What's New" for specifics).

What's fixed

  • Locally deleted visits deleted using deleteVisitsSince should not be resurrected on future syncs. (#621)
  • Places now properly updates frecency for origins, and generally supports
    origins in a way more in line with how they're implemented on desktop. (#429)

Don't miss a new application-services release

NewReleases is sending notifications on new releases.