aboutsummaryrefslogtreecommitdiff
path: root/car-lib
diff options
context:
space:
mode:
Diffstat (limited to 'car-lib')
-rw-r--r--car-lib/src/android/car/hardware/CarDiagnosticManager.java66
-rw-r--r--car-lib/src/android/car/hardware/ICarDiagnostic.aidl22
2 files changed, 87 insertions, 1 deletions
diff --git a/car-lib/src/android/car/hardware/CarDiagnosticManager.java b/car-lib/src/android/car/hardware/CarDiagnosticManager.java
index 851dd878d3..0444c14389 100644
--- a/car-lib/src/android/car/hardware/CarDiagnosticManager.java
+++ b/car-lib/src/android/car/hardware/CarDiagnosticManager.java
@@ -271,6 +271,72 @@ public final class CarDiagnosticManager implements CarManagerBase {
return false;
}
+ /**
+ * Returns true if this vehicle supports sending live frame information.
+ * @return
+ * @throws CarNotConnectedException
+ */
+ public boolean isLiveFrameSupported() throws CarNotConnectedException {
+ try {
+ return mService.isLiveFrameSupported();
+ } catch (IllegalStateException e) {
+ CarApiUtil.checkCarNotConnectedExceptionFromCarService(e);
+ } catch (RemoteException e) {
+ throw new CarNotConnectedException();
+ }
+ return false;
+ }
+
+ /**
+ * Returns true if this vehicle supports sending freeze frame information.
+ * @return
+ * @throws CarNotConnectedException
+ */
+ public boolean isFreezeFrameSupported() throws CarNotConnectedException {
+ try {
+ return mService.isFreezeFrameSupported();
+ } catch (IllegalStateException e) {
+ CarApiUtil.checkCarNotConnectedExceptionFromCarService(e);
+ } catch (RemoteException e) {
+ throw new CarNotConnectedException();
+ }
+ return false;
+ }
+
+ /**
+ * Returns true if this vehicle supports retrieving freeze frame timestamps.
+ * This is only meaningful if freeze frame data is also supported.
+ * @return
+ * @throws CarNotConnectedException
+ */
+ public boolean isFreezeFrameTimestampSupported() throws CarNotConnectedException {
+ try {
+ return mService.isFreezeFrameTimestampSupported();
+ } catch (IllegalStateException e) {
+ CarApiUtil.checkCarNotConnectedExceptionFromCarService(e);
+ } catch (RemoteException e) {
+ throw new CarNotConnectedException();
+ }
+ return false;
+ }
+
+ /**
+ * Returns true if this vehicle supports clearing freeze frame timestamps.
+ * This is only meaningful if freeze frame data is also supported.
+ * @return
+ * @throws CarNotConnectedException
+ */
+ public boolean isFreezeFrameClearSupported() throws CarNotConnectedException {
+ try {
+ return mService.isFreezeFrameClearSupported();
+ } catch (IllegalStateException e) {
+ CarApiUtil.checkCarNotConnectedExceptionFromCarService(e);
+ } catch (RemoteException e) {
+ throw new CarNotConnectedException();
+ }
+ return false;
+ }
+
private static class CarDiagnosticEventListenerToService
extends ICarDiagnosticEventListener.Stub {
private final WeakReference<CarDiagnosticManager> mManager;
diff --git a/car-lib/src/android/car/hardware/ICarDiagnostic.aidl b/car-lib/src/android/car/hardware/ICarDiagnostic.aidl
index 098d2d4fcb..3afffc528b 100644
--- a/car-lib/src/android/car/hardware/ICarDiagnostic.aidl
+++ b/car-lib/src/android/car/hardware/ICarDiagnostic.aidl
@@ -52,4 +52,24 @@ interface ICarDiagnostic {
*/
void unregisterDiagnosticListener(int frameType,
in ICarDiagnosticEventListener callback) = 6;
-} \ No newline at end of file
+
+ /**
+ * Returns whether the underlying HAL supports live frames.
+ */
+ boolean isLiveFrameSupported() = 7;
+
+ /**
+ * Returns whether the underlying HAL supports freeze frames.
+ */
+ boolean isFreezeFrameSupported() = 8;
+
+ /**
+ * Returns whether the underlying HAL supports retrieving freeze frame timestamps.
+ */
+ boolean isFreezeFrameTimestampSupported() = 9;
+
+ /**
+ * Returns whether the underlying HAL supports clearing freeze frames.
+ */
+ boolean isFreezeFrameClearSupported() = 10;
+}