Fix crash when clicking color options

If there's no label for an option, don't try and set its
content description

Fixes: 132291556
Change-Id: Ib194ab84e6f0cba0d643af070c330178b81f6fe8
diff --git a/src/com/android/customization/widget/OptionSelectorController.java b/src/com/android/customization/widget/OptionSelectorController.java
index 9725995..06b1e0c 100644
--- a/src/com/android/customization/widget/OptionSelectorController.java
+++ b/src/com/android/customization/widget/OptionSelectorController.java
@@ -125,23 +125,26 @@
 
             if (holder instanceof TileViewHolder) {
                 TileViewHolder tileHolder = (TileViewHolder) holder;
-                if (isActivated) {
-                    if (option == mAppliedOption) {
+                if (tileHolder.labelView != null) {
+                    if (isActivated) {
+                        if (option == mAppliedOption) {
+                            CharSequence cd = mContainer.getContext().getString(
+                                    R.string.option_applied_previewed_description,
+                                    option.getTitle());
+                            tileHolder.labelView.setContentDescription(cd);
+                        } else {
+                            CharSequence cd = mContainer.getContext().getString(
+                                    R.string.option_previewed_description, option.getTitle());
+                            tileHolder.labelView.setContentDescription(cd);
+                        }
+                    } else if (option == mAppliedOption) {
                         CharSequence cd = mContainer.getContext().getString(
-                                R.string.option_applied_previewed_description, option.getTitle());
+                                R.string.option_applied_description, option.getTitle());
                         tileHolder.labelView.setContentDescription(cd);
                     } else {
-                        CharSequence cd = mContainer.getContext().getString(
-                                R.string.option_previewed_description, option.getTitle());
-                        tileHolder.labelView.setContentDescription(cd);
+                        // Remove content description
+                        tileHolder.labelView.setContentDescription(null);
                     }
-                } else if (option == mAppliedOption) {
-                    CharSequence cd = mContainer.getContext().getString(
-                            R.string.option_applied_description, option.getTitle());
-                    tileHolder.labelView.setContentDescription(cd);
-                } else {
-                    // Remove content description
-                    tileHolder.labelView.setContentDescription(null);
                 }
             }
         }