1/* 2 * Copyright (C) 2018 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 */ 16syntax = "proto2"; 17 18option java_outer_classname = "BatterySavingCtsCommon"; 19 20package android.os.cts.batterysaving.common; 21 22message Payload { 23 message TestServiceRequest { 24 // Request to clear TestService.LastStartIntent. 25 optional bool clear_last_intent = 1; 26 27 // Request to return the action set in TestService.LastStartIntent. 28 optional bool get_last_intent = 2; 29 30 // Request to start testService. 31 message StartServiceRequest { 32 optional bool foreground = 1; 33 optional string action = 2; 34 } 35 36 optional StartServiceRequest start_service = 3; 37 38 message SetAlarmRequest { 39 optional int32 type = 1; 40 optional int64 trigger_time = 2; 41 optional int64 repeat_interval = 3; 42 optional bool allow_while_idle = 4; 43 optional string intent_action = 5; 44 } 45 optional SetAlarmRequest set_alarm = 4; 46 optional bool stop_service = 5; 47 } 48 49 optional TestServiceRequest test_service_request = 1; 50 51 message TestServiceResponse { 52 optional bool clear_last_intent_ack = 1; 53 optional string get_last_intent_action = 2; 54 optional bool start_service_ack = 3; 55 optional bool set_alarm_ack = 4; 56 optional bool stop_service_ack = 5; 57 } 58 59 optional TestServiceResponse test_service_response = 2; 60} 61