• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (C) 2023 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17syntax = "proto2";
18
19package android.os.statsd.tv;
20
21import "frameworks/proto_logging/stats/atom_field_options.proto";
22import "frameworks/proto_logging/stats/atoms.proto";
23
24option java_package = "com.android.os.tv";
25option java_multiple_files = true;
26
27extend Atom {
28  optional TvLowPowerStandbyPolicy tv_low_power_standby_policy = 679 [(module) = "tv_settings"];
29  optional ExternalTvInputEvent external_tv_input_event = 717 [(module) = "framework"];
30}
31
32/**
33 * Logs available LowPowerStandby policies.
34 */
35message TvLowPowerStandbyPolicy {
36   optional string policy_name = 1;
37   repeated int32 exempt_uids = 2 [(is_uid) = true];
38   optional int32 allowed_reasons = 3;
39   repeated string allowed_features = 4;
40   optional bool is_selected = 5;
41}
42
43/**
44 * Logs external TV input events.
45 */
46message ExternalTvInputEvent {
47    enum EventType {
48        UNKNOWN = 0;
49        // a specific input is selected by user/TV App to be displayed on the screen.
50        TUNED = 1;
51        // the currently tuned input is released from the screen by selecting a
52        // new input, TV powering off, going to Home screen, etc.
53        RELEASED = 2;
54        // connection state of the current input is changed,
55        // e.g. connecting/disconnecting the cable.
56        CONNECTION_STATE_CHANGED = 3;
57        // device info is updated for the currently selected HDMI-CEC input.
58        DEVICE_INFO_UPDATED = 4;
59    }
60    enum InputState {
61        // keep in sync with TvInputManager.InputState.
62        CONNECTED = 0;
63        CONNECTED_STANDBY = 1;
64        DISCONNECTED = 2;
65    }
66    enum InputType {
67        // keep in sync with TvinputInfo.Type.
68        TUNER = 0;
69        OTHER = 1000;
70        COMPOSITE = 1001;
71        SVIDEO = 1002;
72        SCART = 1003;
73        COMPONENT = 1004;
74        VGA = 1005;
75        DVI = 1006;
76        HDMI = 1007;
77        DISPLAY_PORT = 1008;
78    }
79    // Type of the event.
80    optional EventType event_type = 1;
81    // Connection state of this input.
82    optional InputState input_state = 2;
83    // type of the input.
84    optional InputType input_type = 3;
85    // Vendor id of the external device for HDMI-CEC input.
86    // For non-CEC input, the value is 0xFFFFFF (16777215 in decimal).
87    optional int32 device_vendor_id = 4;
88    // HDMI port number on TV for HDMI input.
89    // For non-HDMI input, the value is -1.
90    optional int32 hdmi_port = 5;
91    // ID of this TIF (TV Input Framework) session.
92    optional string tif_session_id = 6;
93    // OSD display name of the external device for HDMI-CEC input,
94    // or user-displayed label for other TV inputs.
95    optional string display_name = 7;
96}
97