Allow to pass custom bundle in Car Nav Manager
Fix: b/63148533
Test: added API test, verified bundle is received in logging renderer
Change-Id: Ieb230c02a89251520fce058f082bc63cc522aad8
diff --git a/car-cluster-logging-renderer/src/android/car/cluster/loggingrenderer/LoggingClusterRenderingService.java b/car-cluster-logging-renderer/src/android/car/cluster/loggingrenderer/LoggingClusterRenderingService.java
index 527da11..b6ed388 100644
--- a/car-cluster-logging-renderer/src/android/car/cluster/loggingrenderer/LoggingClusterRenderingService.java
+++ b/car-cluster-logging-renderer/src/android/car/cluster/loggingrenderer/LoggingClusterRenderingService.java
@@ -19,7 +19,9 @@
import android.car.cluster.renderer.NavigationRenderer;
import android.car.navigation.CarNavigationInstrumentCluster;
import android.graphics.Bitmap;
+import android.os.Bundle;
import android.util.Log;
+import com.google.android.collect.Lists;
/**
* Dummy implementation of {@link LoggingClusterRenderingService} to log all interaction.
@@ -36,6 +38,7 @@
Log.i(TAG, "getNavigationProperties");
CarNavigationInstrumentCluster config =
CarNavigationInstrumentCluster.createCluster(1000);
+ config.getExtra().putIntegerArrayList("dummy", Lists.newArrayList(1, 2, 3, 4));
Log.i(TAG, "getNavigationProperties, returns: " + config);
return config;
}
@@ -67,6 +70,11 @@
+ ", displayDistanceMillis: " + displayDistanceMillis
+ ", displayDistanceUnit: " + displayDistanceUnit);
}
+
+ @Override
+ public void onEvent(int eventType, Bundle bundle) {
+ Log.i(TAG, "onEvent, eventType: " + eventType + ", bundle: " + bundle);
+ }
};
Log.i(TAG, "createNavigationRenderer, returns: " + navigationRenderer);