1 /* 2 * Copyright (C) 2021, 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 android.aidl.sdkversion.service; 18 19 import android.aidl.sdkversion.ITestService; 20 import android.aidl.sdkversion.ITestService.TypedObject; 21 import android.os.Binder; 22 import android.os.ServiceManager; 23 import java.util.List; 24 25 public class AidlJavaVersionTestService { 26 static class TestServiceServer extends ITestService.Stub { 27 @Override RepeatBoolean(boolean token)28 public boolean RepeatBoolean(boolean token) { 29 return token; 30 } 31 32 @Override RepeatTypedObject(TypedObject token)33 public TypedObject RepeatTypedObject(TypedObject token) { 34 return token; 35 } 36 37 @Override RepeatTypedList(List<TypedObject> token)38 public List<TypedObject> RepeatTypedList(List<TypedObject> token) { 39 return token; 40 } 41 } 42 main(String[] args)43 public static void main(String[] args) { 44 TestServiceServer myServer = new TestServiceServer(); 45 ServiceManager.addService(ITestService.class.getName(), myServer); 46 Binder.joinThreadPool(); 47 } 48 } 49