1// A timeline with entries representing content that should be displayed within 2// given time intervals. 3syntax = "proto3"; 4 5package androidx.wear.tiles.testing.proto; 6 7import "layout.proto"; 8 9option java_package = "androidx.wear.tiles.testing.proto"; 10option java_outer_classname = "TimelineProto"; 11 12// A time interval, typically used to describe the validity period of a 13// TimelineEntry 14message TimeInterval { 15 // Starting point of the time interval, in milliseconds since the Unix epoch. 16 int64 start_millis = 1; 17 18 // End point of the time interval, in milliseconds since the Unix epoch. 19 int64 end_millis = 2; 20} 21 22// One piece of renderable content along with the time that it is valid for. 23message TimelineEntry { 24 // The validity period for this timeline entry. 25 TimeInterval validity = 1; 26 27 // The contents of this timeline entry. 28 Layout layout = 2; 29} 30 31// A collection of TimelineEntry items. 32// 33// TimelineEntry items can be used to update a layout on-screen at known times, 34// without having to explicitly update a layout. This allows for cases where, 35// say, a calendar can be used to show the next event, and automatically switch 36// to showing the next event when one has passed. 37// 38// The active TimelineEntry is switched, at most, once a minute. In the case 39// where the validity periods of TimelineEntry items overlap, the item with the 40// *shortest* validity period will be shown. This allows a layout provider to 41// show a "default" layout, and override it at set points without having to 42// explicitly insert the default layout between the "override" layout. 43message Timeline { 44 // The entries in a timeline. 45 repeated TimelineEntry timeline_entries = 1; 46} 47