Log to Slog - part V
Bug: 150470825
Test: build okay
Change-Id: I9f1160f3b56ee05e2113c28547140ca6c1f8a348
diff --git a/service/src/com/android/car/OccupantAwarenessService.java b/service/src/com/android/car/OccupantAwarenessService.java
index 389fc54..13104b4 100644
--- a/service/src/com/android/car/OccupantAwarenessService.java
+++ b/service/src/com/android/car/OccupantAwarenessService.java
@@ -29,7 +29,7 @@
import android.os.RemoteCallbackList;
import android.os.RemoteException;
import android.os.ServiceManager;
-import android.util.Log;
+import android.util.Slog;
import com.android.internal.annotations.GuardedBy;
import com.android.internal.annotations.VisibleForTesting;
@@ -86,7 +86,7 @@
/** Handle callback death. */
@Override
public void onCallbackDied(IOccupantAwarenessEventCallback listener) {
- Log.i(TAG, "binderDied: " + listener.asBinder());
+ Slog.i(TAG, "binderDied: " + listener.asBinder());
OccupantAwarenessService service = mOasService.get();
if (service != null) {
@@ -153,7 +153,7 @@
.asInterface(ServiceManager.getService(OAS_SERVICE_ID));
if (mOasHal == null) {
- Log.e(TAG, "Failed to find OAS hal_service at: [" + OAS_SERVICE_ID + "]");
+ Slog.e(TAG, "Failed to find OAS hal_service at: [" + OAS_SERVICE_ID + "]");
return;
}
@@ -162,7 +162,7 @@
mOasHal.setCallback(mHalListener);
} catch (RemoteException e) {
mOasHal = null;
- Log.e(TAG, "Failed to set callback: " + e);
+ Slog.e(TAG, "Failed to set callback: " + e);
return;
}
@@ -184,14 +184,14 @@
try {
hal.startDetection();
} catch (RemoteException e) {
- Log.e(TAG, "startDetection() HAL invocation failed: " + e, e);
+ Slog.e(TAG, "startDetection() HAL invocation failed: " + e, e);
synchronized (mLock) {
mOasHal = null;
}
}
} else {
- Log.e(TAG, "No HAL is connected. Cannot request graph start");
+ Slog.e(TAG, "No HAL is connected. Cannot request graph start");
}
}
@@ -209,14 +209,14 @@
try {
hal.stopDetection();
} catch (RemoteException e) {
- Log.e(TAG, "stopDetection() HAL invocation failed: " + e, e);
+ Slog.e(TAG, "stopDetection() HAL invocation failed: " + e, e);
synchronized (mLock) {
mOasHal = null;
}
}
} else {
- Log.e(TAG, "No HAL is connected. Cannot request graph stop");
+ Slog.e(TAG, "No HAL is connected. Cannot request graph stop");
}
}
@@ -249,7 +249,7 @@
return hal.getCapabilityForRole(role);
} catch (RemoteException e) {
- Log.e(TAG, "getCapabilityForRole() HAL invocation failed: " + e, e);
+ Slog.e(TAG, "getCapabilityForRole() HAL invocation failed: " + e, e);
synchronized (mLock) {
mOasHal = null;
@@ -258,7 +258,7 @@
return SystemStatusEvent.DETECTION_TYPE_NONE;
}
} else {
- Log.e(
+ Slog.e(
TAG,
"getCapabilityForRole(): No HAL interface has been provided. Cannot get"
+ " capabilities");
@@ -283,7 +283,7 @@
synchronized (mLock) {
if (mOasHal == null) {
- Log.e(TAG, "Attempting to register a listener, but could not connect to HAL.");
+ Slog.e(TAG, "Attempting to register a listener, but could not connect to HAL.");
return;
}
@@ -329,7 +329,7 @@
listener.onStatusChanged(statusEvent);
} catch (RemoteException e) {
// It's likely the connection snapped. Let binder death handle the situation.
- Log.e(TAG, "onStatusChanged() invocation failed: " + e, e);
+ Slog.e(TAG, "onStatusChanged() invocation failed: " + e, e);
}
}
mListeners.finishBroadcast();
@@ -345,7 +345,7 @@
listener.onDetectionEvent(detection);
} catch (RemoteException e) {
// It's likely the connection snapped. Let binder death handle the situation.
- Log.e(TAG, "onDetectionEvent() invocation failed: " + e, e);
+ Slog.e(TAG, "onDetectionEvent() invocation failed: " + e, e);
}
}
mListeners.finishBroadcast();
@@ -363,7 +363,7 @@
private static void logd(String msg) {
if (DBG) {
- Log.d(TAG, msg);
+ Slog.d(TAG, msg);
}
}