class ActivityStateMachine

Defined at line 50 of file ../../src/sys/activity/activity_state_machine.h

ActivityStateMachine is a state machine which take system and user activity as input and

determine the current activity state of the system as output.

Public Methods

void ReceiveEvent (Event event)

Provide input to the state machine.

Defined at line 23 of file ../../src/sys/activity/activity_state_machine.cc

std::optional<zx::duration> TimeoutFor (fuchsia::ui::activity::State state)

Returns the time in a state after which, if is no input is received, an

Event::TIMEOUT should be delivered to the state machine.

If the return is absent then the state should never receive Event::TIMEOUT.

Defined at line 30 of file ../../src/sys/activity/activity_state_machine.cc

void ActivityStateMachine ()

Defined at line 52 of file ../../src/sys/activity/activity_state_machine.h

void ~ActivityStateMachine ()

Defined at line 53 of file ../../src/sys/activity/activity_state_machine.h

fuchsia::ui::activity::State state ()

Poll the current state of the state machine.

Defined at line 59 of file ../../src/sys/activity/activity_state_machine.h

Event EventForDiscreteActivity (const fuchsia::ui::activity::DiscreteActivity & activity)

Translate |activity| to an appropriate Event.

Defined at line 69 of file ../../src/sys/activity/activity_state_machine.h

Event EventForOngoingActivityStart ()

Returns an Event which should be delivered as an ongoing activity starts.

Defined at line 74 of file ../../src/sys/activity/activity_state_machine.h

Event EventForOngoingActivityEnd ()

Returns an Event which should be delivered as an ongoing activity ends.

Defined at line 76 of file ../../src/sys/activity/activity_state_machine.h