Send invalidation messages for loading textures and geometry.

Previously we only sent the invalidation messages for loaded textures and
geometry. Now we send invalidation messages for both loading and loaded
textures and geometry.

This allows clients that have asynchronous loaders to cancel loading of
queued textures and geometry.

Change-Id: I5b92b732e09076d48248a0ee3fdc02efc279d644
diff --git a/carousel/java/com/android/ex/carousel/carousel.rs b/carousel/java/com/android/ex/carousel/carousel.rs
index e7d3550..dfb6af2 100644
--- a/carousel/java/com/android/ex/carousel/carousel.rs
+++ b/carousel/java/com/android/ex/carousel/carousel.rs
@@ -688,7 +688,7 @@
             }
         } else {
             // ask the host to remove the texture
-            if (cards[i].textureState == STATE_LOADED) {
+            if (cards[i].textureState != STATE_INVALID) {
                 data[0] = i;
                 bool enqueued = rsSendToClient(CMD_INVALIDATE_TEXTURE, data, sizeof(data));
                 if (enqueued) {
@@ -698,7 +698,7 @@
                 }
             }
             // ask the host to remove the geometry
-            if (cards[i].geometryState == STATE_LOADED) {
+            if (cards[i].geometryState != STATE_INVALID) {
                 data[0] = i;
                 bool enqueued = rsSendToClient(CMD_INVALIDATE_GEOMETRY, data, sizeof(data));
                 if (enqueued) {