From 70174da77a07dfa477dd3ff33077965edc09ff03 Mon Sep 17 00:00:00 2001 From: yy1717 <fctom1215@outlook.com> Date: 星期四, 23 七月 2020 10:15:06 +0800 Subject: [PATCH] Merge branch 'master' of https://gitee.com/endian11/DriveJudge --- lib/src/main/java/com/anyun/exam/lib/SvrManager.java | 14 ++++++++------ 1 files changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/src/main/java/com/anyun/exam/lib/SvrManager.java b/lib/src/main/java/com/anyun/exam/lib/SvrManager.java index 1583bb4..042fe64 100644 --- a/lib/src/main/java/com/anyun/exam/lib/SvrManager.java +++ b/lib/src/main/java/com/anyun/exam/lib/SvrManager.java @@ -7,7 +7,6 @@ import android.os.IBinder; import android.os.RemoteException; import android.text.TextUtils; -import android.util.Log; import java.util.LinkedList; @@ -49,9 +48,9 @@ private IBinder.DeathRecipient mDeathRecipient = new IBinder.DeathRecipient() { @Override public void binderDied() { - Log.e(TAG,"IBinder.DeathRecipient binderDied"); - if (remoteInterface != null){ - Log.e(TAG,"IBinder.DeathRecipient binderDied remoteInterface != null ,return"); + MyLog.e(TAG,"IBinder.DeathRecipient binderDied"); + if (remoteInterface == null){ + MyLog.e(TAG,"IBinder.DeathRecipient binderDied remoteInterface == null ,return"); return; } remoteInterface.asBinder().unlinkToDeath(mDeathRecipient,0); @@ -98,7 +97,7 @@ try { //璁剧疆姝讳骸浠g悊 service.linkToDeath(mDeathRecipient,0); - + MyLog.i("缁戝畾鏈嶅姟onServiceConnected"); remoteInterface.registListener(RemoteCallback); } catch (RemoteException e) { e.printStackTrace(); @@ -107,7 +106,7 @@ @Override public void onServiceDisconnected(ComponentName name) { - + MyLog.i("缁戝畾鏈嶅姟澶辫触onServiceDisconnected"); } @@ -122,14 +121,17 @@ public void unBindRemoteService(Context mContext){ if (remoteInterface!=null && remoteInterface.asBinder().isBinderAlive()){ try { + MyLog.i("鎽ф瘉SDK锛岄渶瑕佽В缁戣繙绋嬪洖璋�"); remoteInterface.unRegistListener(RemoteCallback); } catch (RemoteException e) { e.printStackTrace(); } } + MyLog.i("鎽ф瘉SDK锛岄渶瑕佽В缁戣繙绋嬫湇鍔�"); mContext.unbindService(conn); if (intent!=null){ + MyLog.i("鎽ф瘉SDK锛岄渶瑕佸仠姝㈣繙绋嬫湇鍔�"); mContext.stopService(intent); } } -- Gitblit v1.8.0