本文整理汇总了Java中android.os.DeadObjectException类的典型用法代码示例。如果您正苦于以下问题:Java DeadObjectException类的具体用法?Java DeadObjectException怎么用?Java DeadObjectException使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
DeadObjectException类属于android.os包,在下文中一共展示了DeadObjectException类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: startListening
import android.os.DeadObjectException; //导入依赖的package包/类
@Override
public void startListening() {
try {
super.startListening();
} catch (Exception e) {
if (e.getCause() instanceof TransactionTooLargeException ||
e.getCause() instanceof DeadObjectException) {
// We're willing to let this slide. The exception is being caused by the list of
// RemoteViews which is being passed back. The startListening relationship will
// have been established by this point, and we will end up populating the
// widgets upon bind anyway. See issue 14255011 for more context.
} else {
throw new RuntimeException(e);
}
}
}
示例2: stop
import android.os.DeadObjectException; //导入依赖的package包/类
public void stop(){
/**
* Unbinds from the service. Should be called when the client app does not need this class anymore.
*/
Log.i("REMOTE_HANDLER", "stopping client");
if(isBound) {
if (mRemoteService != null) {
try {
mRemoteService.unregisterCallback(mCallback);
} catch (DeadObjectException de){
de.printStackTrace();
} catch (RemoteException e) {
// There is nothing special we need to do if the service
// has crashed.
}
}
context.unbindService(mRemoteServiceConnection);
isBound = false;
}
snachServiceEvent.onServiceDisconnected();
}
示例3: run
import android.os.DeadObjectException; //导入依赖的package包/类
/**
* A function that returns this operation as an Observable.
* When the returned observable is subscribed, this operation will be scheduled
* to be run on the main thread. When appropriate the call to run() will be executed.
* This operation is expected to call releaseRadio() at appropriate point after the run() was called.
*/
@Override
public final Observable<T> run(final QueueReleaseInterface queueReleaseInterface) {
return Observable.create(
new Action1<Emitter<T>>() {
@Override
public void call(Emitter<T> emitter) {
try {
protectedRun(emitter, queueReleaseInterface);
} catch (DeadObjectException deadObjectException) {
emitter.onError(provideException(deadObjectException));
} catch (Throwable throwable) {
emitter.onError(throwable);
}
}
},
Emitter.BackpressureMode.NONE
);
}
示例4: transmitMitBihData
import android.os.DeadObjectException; //导入依赖的package包/类
private void transmitMitBihData() {
try {
// iterates through all values
for (mSimPlotIter = 0; mSimPlotIter < mSimSignal.mValueList.getMaxSize(); mSimPlotIter++) {
// new instance
BleEcgSensor.BleEcgDataFrame data =
new BleEcgSensor.BleEcgDataFrame(this, mSimSignal.mTimeList.get(mSimPlotIter),
mSimSignal.mValueList.get(mSimPlotIter),
(char) mSimSignal.labels.get(mSimSignal.mTimeList.get(mSimPlotIter).intValue()));
sendNewData(data);
Thread.sleep(2, 777777);
}
sendNotification("MSG_SIM_FILE_ENDED");
} catch (Exception e) {
Log.e(TAG, "Error receiving MIT-BIH data!", e);
if (DeadObjectException.class.isInstance(e)) {
Thread.currentThread().interrupt();
mSimSignal = null;
}
}
}
示例5: zzb
import android.os.DeadObjectException; //导入依赖的package包/类
public final <A extends Api.zzb, T extends zzmu.zza<? extends Result, A>> T zzb(T paramT)
{
try
{
this.zzape.zzaoR.zzb(paramT);
Api.zzb localzzb = this.zzape.zzaoR.zza(paramT.zzor());
if ((!localzzb.isConnected()) && (this.zzape.zzaqj.containsKey(paramT.zzor())))
{
paramT.zzE(new Status(17));
return paramT;
}
paramT.zzb(localzzb);
return paramT;
}
catch (DeadObjectException localDeadObjectException)
{
this.zzape.zza(new zznf.zza(this)
{
public final void zzoS()
{
zzna.this.onConnectionSuspended(1);
}
});
}
return paramT;
}
示例6: zzb
import android.os.DeadObjectException; //导入依赖的package包/类
public final void zzb(A paramA)
throws DeadObjectException
{
try
{
zza(paramA);
return;
}
catch (DeadObjectException localDeadObjectException)
{
zzc(localDeadObjectException);
throw localDeadObjectException;
}
catch (RemoteException localRemoteException)
{
zzc(localRemoteException);
}
}
示例7: zza
import android.os.DeadObjectException; //导入依赖的package包/类
public final void zza(zzp paramzzp)
{
ValidateAccountRequest localValidateAccountRequest = new ValidateAccountRequest(paramzzp, (Scope[])this.zzXp.toArray(new Scope[this.zzXp.size()]), this.mContext.getPackageName(), null);
try
{
this.zzatN.zza(new zzd(this, this.zzatW.get()), localValidateAccountRequest);
return;
}
catch (DeadObjectException localDeadObjectException)
{
Log.w("GmsClient", "service died");
zzdg$13462e();
return;
}
catch (RemoteException localRemoteException)
{
Log.w("GmsClient", "Remote exception occurred", localRemoteException);
}
}
示例8: zzqn
import android.os.DeadObjectException; //导入依赖的package包/类
public final T zzqn()
throws DeadObjectException
{
synchronized (this.zzqp)
{
if (this.zzatS == 4) {
throw new DeadObjectException();
}
}
zzqm();
if (this.zzatP != null) {}
for (boolean bool = true;; bool = false)
{
zzx.zza(bool, "Client is connected but service is null");
IInterface localIInterface = this.zzatP;
return localIInterface;
}
}
示例9: l
import android.os.DeadObjectException; //导入依赖的package包/类
public final T l()
{
synchronized (this.c)
{
if (this.n == 4) {
throw new DeadObjectException();
}
}
k();
if (this.f != null) {}
for (boolean bool = true;; bool = false)
{
efj.a(bool, "Client is connected but service is null");
IInterface localIInterface = this.f;
return localIInterface;
}
}
示例10: b
import android.os.DeadObjectException; //导入依赖的package包/类
public final void b(A paramA)
{
try
{
a(paramA);
return;
}
catch (DeadObjectException localDeadObjectException)
{
a(localDeadObjectException);
throw localDeadObjectException;
}
catch (RemoteException localRemoteException)
{
a(localRemoteException);
}
}
示例11: sendTest
import android.os.DeadObjectException; //导入依赖的package包/类
public void sendTest(){
Message msg = Message.obtain();
Bundle bundle = new Bundle();
bundle.putString (Constants.treatmentService.ACTION, Constants.treatmentService.OUTGOING_TEST_MSG);
bundle.putLong (Constants.treatmentService.DATE_REQUESTED, new Date().getTime());
bundle.putString (Constants.treatmentService.PUMP, "");
msg.setData(bundle);
try {
pump_driver_Service.send(msg);
} catch (DeadObjectException d){
Crashlytics.logException(d);
d.printStackTrace();
} catch (RemoteException e) {
Crashlytics.logException(e);
e.printStackTrace();
}
}
示例12: onResult
import android.os.DeadObjectException; //导入依赖的package包/类
public void onResult(Bundle result) {
try {
this.response.onResult(result);
} catch (DeadObjectException e) {
LOG.e(TAG, "[result:" + result + "] on result failed(DeadObjectException)", e);
} catch (RemoteException e2) {
LOG.e(TAG, "[result:" + result + "] on result failed(RemoteException)", e2);
} catch (Throwable e3) {
LOG.e(TAG, "[result:" + result + "] on result failed(Throwable)", e3);
}
}
示例13: onError
import android.os.DeadObjectException; //导入依赖的package包/类
public void onError(int error, String message) {
try {
this.response.onError(error, message);
} catch (DeadObjectException e) {
LOG.e(TAG, "[error:" + error + "][message:" + message + "] on error failed(DeadObjectException)", e);
} catch (RemoteException e2) {
LOG.e(TAG, "[error:" + error + "][message:" + message + "] on error failed(RemoteException)", e2);
} catch (Throwable e3) {
LOG.e(TAG, "[error:" + error + "][message:" + message + "] on error failed(Throwable)", e3);
}
}
示例14: onCancel
import android.os.DeadObjectException; //导入依赖的package包/类
public void onCancel() {
try {
this.response.onCancel();
} catch (DeadObjectException e) {
LOG.e(TAG, "on cancel failed(DeadObjectException)", e);
} catch (RemoteException e2) {
LOG.e(TAG, "on cancel failed(RemoteException)", e2);
} catch (Throwable e3) {
LOG.e(TAG, "on cancel failed(Throwable)", e3);
}
}
示例15: processListenerQueue
import android.os.DeadObjectException; //导入依赖的package包/类
private void processListenerQueue(ListenerRecord record) {
if (Log.isLoggable(NotificationManagerCompat.TAG, 3)) {
Log.d(NotificationManagerCompat.TAG, "Processing component " + record.componentName + ", " + record.taskQueue.size() + " queued tasks");
}
if (!record.taskQueue.isEmpty()) {
if (!ensureServiceBound(record) || record.service == null) {
scheduleListenerRetry(record);
return;
}
while (true) {
Task task = (Task) record.taskQueue.peek();
if (task == null) {
break;
}
try {
if (Log.isLoggable(NotificationManagerCompat.TAG, 3)) {
Log.d(NotificationManagerCompat.TAG, "Sending task " + task);
}
task.send(record.service);
record.taskQueue.remove();
} catch (DeadObjectException e) {
if (Log.isLoggable(NotificationManagerCompat.TAG, 3)) {
Log.d(NotificationManagerCompat.TAG, "Remote service has died: " + record.componentName);
}
} catch (RemoteException e2) {
Log.w(NotificationManagerCompat.TAG, "RemoteException communicating with " + record.componentName, e2);
}
}
if (!record.taskQueue.isEmpty()) {
scheduleListenerRetry(record);
}
}
}