|  | // Copyright 2019 The Fuchsia Authors. All rights reserved. | 
|  | // Use of this source code is governed by a BSD-style license that can be | 
|  | // found in the LICENSE file. | 
|  | @available(added=7) | 
|  | library fuchsia.ui.activity.control; | 
|  |  | 
|  | using fuchsia.ui.activity; | 
|  |  | 
|  | // TODO(fxbug.dev/38334): Remove this transitional interface. | 
|  | /// The Control protocol can be used to override the activity state of the | 
|  | /// Activity Service (fuchsia.ui.activity). | 
|  | /// | 
|  | /// State provided through this interface takes precedence over state which | 
|  | /// is determined based on activity sent through the Tracker API. | 
|  | /// | 
|  | /// Once a state has been assigned through this protocol, the Activity | 
|  | /// Service will no longer determine state based on input to the | 
|  | /// fuchsia.ui.activity.Tracker protocol, and instead will only report state | 
|  | /// transitions occuring through the Control protocol. | 
|  | @discoverable | 
|  | protocol Control { | 
|  | /// Sets the Activity Service's state to `state`. | 
|  | /// All listeners registered through the Provider protocol will immediately | 
|  | /// be notified of the new state. | 
|  | /// | 
|  | /// Typically, state transitions should occur minutes apart (e.g. | 
|  | /// transition from ACTIVE to IDLE after 15 minutes of inactivity). | 
|  | SetState(struct { | 
|  | state fuchsia.ui.activity.State; | 
|  | }); | 
|  | }; |