update

Updates the given personal location with the new types.

Important: This is a Public Preview API. It may be changed or removed at any time.

This method ensures the uniqueness of PersonalLocationType.Home and PersonalLocationType.Work types. When a personal location is updated with one of these types, any existing location of the same type will have its type removed to maintain this uniqueness constraint. This behavior is also implemented in the add and create methods.

Return

True if the location was updated, false if the location was not found.

Parameters

location

The personal location to update.

types

The new types for the personal location. Is required to be non-empty, otherwise the method throws an IllegalArgumentException.