Deprecate NavigationState APIs, rm androidx.car-cluster refs
All car-cluster refs are removed for the migration to
navigation_state protobufs ag/8302304
Fix: 130255007
Bug: 135627876
Test: make -j
Change-Id: I9a3acff9250ae76452d09827283f4f4bb161827d
Merged-In: I9a3acff9250ae76452d09827283f4f4bb161827d
diff --git a/car-lib/api/system-current.txt b/car-lib/api/system-current.txt
index 89493cb..3f7cd6c 100644
--- a/car-lib/api/system-current.txt
+++ b/car-lib/api/system-current.txt
@@ -214,7 +214,8 @@
public abstract class InstrumentClusterRenderingService extends android.app.Service {
ctor public InstrumentClusterRenderingService();
- method @Nullable public android.graphics.Bitmap getBitmap(android.net.Uri);
+ method @Deprecated @Nullable public android.graphics.Bitmap getBitmap(android.net.Uri);
+ method @Nullable public android.graphics.Bitmap getBitmap(android.net.Uri, int, int);
method @MainThread @Nullable public abstract android.car.cluster.renderer.NavigationRenderer getNavigationRenderer();
method @CallSuper public android.os.IBinder onBind(android.content.Intent);
method @MainThread public void onKeyEvent(@NonNull android.view.KeyEvent);
@@ -226,7 +227,6 @@
@UiThread public abstract class NavigationRenderer {
ctor public NavigationRenderer();
method public abstract android.car.navigation.CarNavigationInstrumentCluster getNavigationProperties();
- method @Deprecated public void onEvent(int, android.os.Bundle);
method public void onNavigationStateChanged(@Nullable android.os.Bundle);
}
diff --git a/car-lib/api/system-removed.txt b/car-lib/api/system-removed.txt
index d802177..b8614e7 100644
--- a/car-lib/api/system-removed.txt
+++ b/car-lib/api/system-removed.txt
@@ -1 +1,9 @@
// Signature format: 2.0
+package android.car.cluster.renderer {
+
+ @UiThread public abstract class NavigationRenderer {
+ method public void onEvent(int, android.os.Bundle);
+ }
+
+}
+
diff --git a/car-lib/src/android/car/cluster/renderer/InstrumentClusterRenderingService.java b/car-lib/src/android/car/cluster/renderer/InstrumentClusterRenderingService.java
index 3e463d1..ede4b6a 100644
--- a/car-lib/src/android/car/cluster/renderer/InstrumentClusterRenderingService.java
+++ b/car-lib/src/android/car/cluster/renderer/InstrumentClusterRenderingService.java
@@ -94,13 +94,6 @@
private static final String TAG = CarLibLog.TAG_CLUSTER;
- /**
- * This constant is kept here for backwards compatibility only.
- * @deprecated TODO (b/130255007): Remove this along {@link NavigationRenderer#onEvent(int,
- * Bundle)}
- */
- @Deprecated
- private static final int NAVIGATION_STATE_EVENT_ID = 1;
private static final String BITMAP_QUERY_WIDTH = "w";
private static final String BITMAP_QUERY_HEIGHT = "h";
private static final String BITMAP_QUERY_OFFLANESALPHA = "offLanesAlpha";
@@ -430,9 +423,8 @@
}
/**
- * @deprecated Use {@link #setClusterActivityLaunchOptions(ActivityOptions)} instead.
- *
* @hide
+ * @deprecated Use {@link #setClusterActivityLaunchOptions(ActivityOptions)} instead.
*/
@Deprecated
public void setClusterActivityLaunchOptions(String category, ActivityOptions activityOptions) {
@@ -453,9 +445,8 @@
}
/**
- * @deprecated Use {@link #setClusterActivityState(ClusterActivityState)} instead.
- *
* @hide
+ * @deprecated Use {@link #setClusterActivityState(ClusterActivityState)} instead.
*/
@Deprecated
public void setClusterActivityState(String category, Bundle state) {
@@ -535,8 +526,6 @@
assertContextOwnership();
mUiHandler.post(() -> {
if (mNavigationRenderer != null) {
- // Invoking deprecated method to maintain backwards compatibility
- mNavigationRenderer.onEvent(NAVIGATION_STATE_EVENT_ID, bundle);
mNavigationRenderer.onNavigationStateChanged(bundle);
}
});
@@ -596,8 +585,11 @@
* This is a costly operation. Returned bitmaps should be cached and fetching should be done on
* a secondary thread.
*
- * Will be deprecated. Replaced by {@link #getBitmap(Uri, int, int)}.
+ * @throws IllegalArgumentException if {@code uri} does not have width and height query params.
+ *
+ * @deprecated Replaced by {@link #getBitmap(Uri, int, int)}.
*/
+ @Deprecated
@Nullable
public Bitmap getBitmap(Uri uri) {
try {
@@ -650,7 +642,7 @@
/**
* See {@link #getBitmap(Uri, int, int, float)}
*
- * @hide
+ * @throws IllegalArgumentException if {@code width} or {@code height} is not greater than 0.
*/
@Nullable
public Bitmap getBitmap(Uri uri, int width, int height) {
diff --git a/car-lib/src/android/car/cluster/renderer/NavigationRenderer.java b/car-lib/src/android/car/cluster/renderer/NavigationRenderer.java
index 429dada..95e1d48 100644
--- a/car-lib/src/android/car/cluster/renderer/NavigationRenderer.java
+++ b/car-lib/src/android/car/cluster/renderer/NavigationRenderer.java
@@ -37,9 +37,8 @@
/**
* Called when a navigation state change is received.
*
- * @deprecated use {@link #onNavigationStateChanged(Bundle)} instead.
+ * @removed Replaced by {@link #onNavigationStateChanged(Bundle)}
*/
- @Deprecated
public void onEvent(int eventType, Bundle bundle) {}
/**
diff --git a/tests/EmbeddedKitchenSinkApp/Android.mk b/tests/EmbeddedKitchenSinkApp/Android.mk
index f00a14b..6b766ab 100644
--- a/tests/EmbeddedKitchenSinkApp/Android.mk
+++ b/tests/EmbeddedKitchenSinkApp/Android.mk
@@ -42,7 +42,7 @@
LOCAL_STATIC_ANDROID_LIBRARIES += \
car-service-lib-for-test \
- androidx.car_car-cluster
+ androidx.car_car
LOCAL_STATIC_JAVA_LIBRARIES += \
android.hidl.base-V1.0-java \
@@ -50,7 +50,6 @@
vehicle-hal-support-lib \
com.android.car.keventreader-client \
guava \
- kitchensink-gson \
android.car.cluster.navigation
LOCAL_JAVA_LIBRARIES += android.car
@@ -61,9 +60,6 @@
include $(CLEAR_VARS)
-LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES := \
- kitchensink-gson:libs/gson-2.1.jar
-
include $(BUILD_MULTI_PREBUILT)
include $(CLEAR_VARS)
diff --git a/tests/EmbeddedKitchenSinkApp/libs/gson-2.1-sources.jar b/tests/EmbeddedKitchenSinkApp/libs/gson-2.1-sources.jar
deleted file mode 100644
index 09396a0..0000000
--- a/tests/EmbeddedKitchenSinkApp/libs/gson-2.1-sources.jar
+++ /dev/null
Binary files differ
diff --git a/tests/EmbeddedKitchenSinkApp/libs/gson-2.1.jar b/tests/EmbeddedKitchenSinkApp/libs/gson-2.1.jar
deleted file mode 100644
index 83c5c99..0000000
--- a/tests/EmbeddedKitchenSinkApp/libs/gson-2.1.jar
+++ /dev/null
Binary files differ
diff --git a/tests/MultiDisplayTest/Android.mk b/tests/MultiDisplayTest/Android.mk
index 779c646..dcee7b4 100644
--- a/tests/MultiDisplayTest/Android.mk
+++ b/tests/MultiDisplayTest/Android.mk
@@ -33,7 +33,7 @@
LOCAL_STATIC_ANDROID_LIBRARIES += \
androidx.lifecycle_lifecycle-livedata \
androidx.lifecycle_lifecycle-viewmodel \
- androidx.car_car-cluster
+ androidx.car_car
include $(BUILD_PACKAGE)