1 /* 2 * Copyright (C) 2019 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 17 package com.android.experimentalcar; 18 19 import static com.android.car.internal.ExcludeFromCodeCoverageGeneratedReport.DUMP_INFO; 20 21 import android.car.experimental.ITestDemoExperimental; 22 import android.util.proto.ProtoOutputStream; 23 24 import com.android.car.CarServiceBase; 25 import com.android.car.internal.ExcludeFromCodeCoverageGeneratedReport; 26 import com.android.car.internal.util.IndentingPrintWriter; 27 28 /** 29 * Demo service for testing experimental feature. 30 */ 31 public final class TestDemoExperimentalFeatureService extends ITestDemoExperimental.Stub 32 implements CarServiceBase { 33 34 @Override init()35 public void init() { 36 // Nothing to do 37 } 38 39 @Override release()40 public void release() { 41 // Nothing to do 42 } 43 44 @Override dump(IndentingPrintWriter writer)45 public void dump(IndentingPrintWriter writer) { 46 writer.println("*TestExperimentalFeatureService*"); 47 } 48 49 @Override 50 @ExcludeFromCodeCoverageGeneratedReport(reason = DUMP_INFO) dumpProto(ProtoOutputStream proto)51 public void dumpProto(ProtoOutputStream proto) {} 52 53 @Override ping(String msg)54 public String ping(String msg) { 55 return msg; 56 } 57 } 58