1 /* 2 * Copyright (C) 2016 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.externalservice.common; 18 19 import android.os.IBinder; 20 21 public class ServiceMessages { 22 // No arguments. Gets the UID and PID of the service. 23 public static final int MSG_IDENTIFY = IBinder.FIRST_CALL_TRANSACTION + 1; 24 // Response to MSG_IDENTIFY. Bundle data contain a single key, noted below. 25 public static final int MSG_IDENTIFY_RESPONSE = MSG_IDENTIFY + 100; 26 27 // Bundle key in MSG_IDENTIFY_RESPONSE containing the RunningServiceInfo object. 28 public static final String IDENTIFY_INFO = "serviceInfo"; 29 30 // Starts an external service. arg1 should be 1 if the process should be started via 31 // an app zygote, and 0 if the service should be started normally. 32 public static final int MSG_CREATE_EXTERNAL_SERVICE = IBinder.FIRST_CALL_TRANSACTION + 2; 33 // Responds to MSG_CREATE_EXTERNAL_SERVICE. obj is the IBinder on success, null on failure. 34 public static final int MSG_CREATE_EXTERNAL_SERVICE_RESPONSE = 35 MSG_CREATE_EXTERNAL_SERVICE + 100; 36 ServiceMessages()37 private ServiceMessages() {} 38 } 39