Home | History | Annotate | Download | only in common
      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. arg1 is the UID, arg2 is the PID.
     25     public static final int MSG_IDENTIFY_RESPONSE = MSG_IDENTIFY + 100;
     26 
     27     // Bundle key in MSG_IDENTIFY_RESPONSE containing the package name.
     28     public static final String IDENTIFY_PACKAGE = "packageName";
     29 
     30     // No arguments. Starts an external service.
     31     public static final int MSG_CREATE_EXTERNAL_SERVICE = IBinder.FIRST_CALL_TRANSACTION + 2;
     32     // Responds to MSG_CREATE_EXTERNAL_SERVICE. obj is the IBinder on success, null on failure.
     33     public static final int MSG_CREATE_EXTERNAL_SERVICE_RESPONSE =
     34         MSG_CREATE_EXTERNAL_SERVICE + 100;
     35 
     36     private ServiceMessages() {}
     37 }
     38