1 /* 2 * Copyright (C) 2006 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.os; 18 import android.os.RemoteException; 19 20 /** 21 * The object you are calling has died, because its hosting process 22 * no longer exists, or there has been a low-level binder error. 23 * 24 * If you get this exception from a system service, the error is 25 * usually nonrecoverable as the framework will restart. If you 26 * receive this error from an app, at a minimum, you should 27 * recover by resetting the connection. For instance, you should 28 * drop the binder, clean up associated state, and reset your 29 * connection to the service which threw this error. In order 30 * to simplify your error recovery paths, you may also want to 31 * "simply" restart your process. However, this may not be an 32 * option if the service you are talking to is unreliable or 33 * crashes frequently. 34 * 35 * If this isn't from a service death and is instead from a 36 * low-level binder error, it will be from: 37 * <ul> 38 * <li> a one-way call queue filling up (too many one-way calls) 39 * <li> from the binder buffer being filled up, so that the transaction 40 * is rejected. 41 * </ul> 42 * 43 * In these cases, more information about the error will be 44 * logged. However, there isn't a good way to differentiate 45 * this information at runtime. So, you should handle the 46 * error, as if the service died. 47 */ 48 @android.ravenwood.annotation.RavenwoodKeepWholeClass 49 public class DeadObjectException extends RemoteException { DeadObjectException()50 public DeadObjectException() { 51 super(); 52 } 53 DeadObjectException(String message)54 public DeadObjectException(String message) { 55 super(message); 56 } 57 } 58