当前位置: 首页>>代码示例>>Java>>正文


Java DeadObjectException类代码示例

本文整理汇总了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);
        }
    }
}
 
开发者ID:michelelacorte,项目名称:FlickLauncher,代码行数:17,代码来源:LauncherAppWidgetHost.java

示例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();
}
 
开发者ID:ordsen,项目名称:Snach-Android,代码行数:24,代码来源:SnachRemoteHandler.java

示例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
    );
}
 
开发者ID:Polidea,项目名称:RxAndroidBle,代码行数:26,代码来源:QueueOperation.java

示例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;
        }
    }
}
 
开发者ID:gradlman,项目名称:SensorLib,代码行数:22,代码来源:BleEcgSimulatedSensor.java

示例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;
}
 
开发者ID:ChiangC,项目名称:FMTech,代码行数:27,代码来源:zzna.java

示例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);
  }
}
 
开发者ID:ChiangC,项目名称:FMTech,代码行数:19,代码来源:zzmu.java

示例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);
  }
}
 
开发者ID:ChiangC,项目名称:FMTech,代码行数:20,代码来源:zzj.java

示例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;
  }
}
 
开发者ID:ChiangC,项目名称:FMTech,代码行数:19,代码来源:zzj.java

示例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;
  }
}
 
开发者ID:ChiangC,项目名称:FMTech,代码行数:18,代码来源:eib.java

示例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);
  }
}
 
开发者ID:ChiangC,项目名称:FMTech,代码行数:18,代码来源:efs.java

示例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();
    }
}
 
开发者ID:timomer,项目名称:HAPP,代码行数:20,代码来源:InsulinIntegrationApp.java

示例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);
    }
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:12,代码来源:ActivityResponse.java

示例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);
    }
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:12,代码来源:ActivityResponse.java

示例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);
    }
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:12,代码来源:ActivityResponse.java

示例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);
        }
    }
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:34,代码来源:NotificationManagerCompat.java


注:本文中的android.os.DeadObjectException类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。