diff --git a/java/com/android/dialer/theme/base/impl/AospThemeImpl.java b/java/com/android/dialer/theme/base/impl/AospThemeImpl.java
index c8f20c7..86e278b 100644
--- a/java/com/android/dialer/theme/base/impl/AospThemeImpl.java
+++ b/java/com/android/dialer/theme/base/impl/AospThemeImpl.java
@@ -32,19 +32,19 @@
 @Singleton
 public class AospThemeImpl implements Theme {
 
-  private int colorIcon = -1;
-  private int colorIconSecondary = -1;
-  private int colorPrimary = -1;
-  private int colorPrimaryDark = -1;
-  private int colorAccent = -1;
-  private int textColorPrimary = -1;
-  private int textColorSecondary = -1;
-  private int textColorPrimaryInverse = -1;
-  private int textColorHint = -1;
-  private int colorBackground = -1;
-  private int colorBackgroundFloating = -1;
-  private int colorTextOnUnthemedDarkBackground = -1;
-  private int colorIconOnUnthemedDarkBackground = -1;
+  private int colorIcon = -2;
+  private int colorIconSecondary = -2;
+  private int colorPrimary = -2;
+  private int colorPrimaryDark = -2;
+  private int colorAccent = -2;
+  private int textColorPrimary = -2;
+  private int textColorSecondary = -2;
+  private int textColorPrimaryInverse = -2;
+  private int textColorHint = -2;
+  private int colorBackground = -2;
+  private int colorBackgroundFloating = -2;
+  private int colorTextOnUnthemedDarkBackground = -2;
+  private int colorIconOnUnthemedDarkBackground = -2;
 
   public AospThemeImpl(Context context) {
 
@@ -70,19 +70,19 @@
                   R.attr.colorTextOnUnthemedDarkBackground,
                   R.attr.colorIconOnUnthemedDarkBackground,
                 });
-    colorPrimary = array.getColor(/* index= */ 0, /* defValue= */ -1);
-    colorPrimaryDark = array.getColor(/* index= */ 1, /* defValue= */ -1);
-    colorAccent = array.getColor(/* index= */ 2, /* defValue= */ -1);
-    textColorPrimary = array.getColor(/* index= */ 3, /* defValue= */ -1);
-    textColorSecondary = array.getColor(/* index= */ 4, /* defValue= */ -1);
-    textColorPrimaryInverse = array.getColor(/* index= */ 5, /* defValue= */ -1);
-    textColorHint = array.getColor(/* index= */ 6, /* defValue= */ -1);
-    colorBackground = array.getColor(/* index= */ 7, /* defValue= */ -1);
-    colorBackgroundFloating = array.getColor(/* index= */ 8, /* defValue= */ -1);
-    colorIcon = array.getColor(/* index= */ 9, /* defValue= */ -1);
-    colorIconSecondary = array.getColor(/* index= */ 10, /* defValue= */ -1);
-    colorTextOnUnthemedDarkBackground = array.getColor(/* index= */ 11, /* defValue= */ -1);
-    colorIconOnUnthemedDarkBackground = array.getColor(/* index= */ 12, /* defValue= */ -1);
+    colorPrimary = array.getColor(/* index= */ 0, /* defValue= */ -2);
+    colorPrimaryDark = array.getColor(/* index= */ 1, /* defValue= */ -2);
+    colorAccent = array.getColor(/* index= */ 2, /* defValue= */ -2);
+    textColorPrimary = array.getColor(/* index= */ 3, /* defValue= */ -2);
+    textColorSecondary = array.getColor(/* index= */ 4, /* defValue= */ -2);
+    textColorPrimaryInverse = array.getColor(/* index= */ 5, /* defValue= */ -2);
+    textColorHint = array.getColor(/* index= */ 6, /* defValue= */ -2);
+    colorBackground = array.getColor(/* index= */ 7, /* defValue= */ -2);
+    colorBackgroundFloating = array.getColor(/* index= */ 8, /* defValue= */ -2);
+    colorIcon = array.getColor(/* index= */ 9, /* defValue= */ -2);
+    colorIconSecondary = array.getColor(/* index= */ 10, /* defValue= */ -2);
+    colorTextOnUnthemedDarkBackground = array.getColor(/* index= */ 11, /* defValue= */ -2);
+    colorIconOnUnthemedDarkBackground = array.getColor(/* index= */ 12, /* defValue= */ -2);
     array.recycle();
   }
 
@@ -121,55 +121,55 @@
 
   @Override
   public @ColorInt int getColorIcon() {
-    Assert.checkArgument(colorIcon != -1);
+    Assert.checkArgument(colorIcon != -2);
     return colorIcon;
   }
 
   @Override
   public @ColorInt int getColorIconSecondary() {
-    Assert.checkArgument(colorIconSecondary != -1);
+    Assert.checkArgument(colorIconSecondary != -2);
     return colorIconSecondary;
   }
 
   @Override
   public @ColorInt int getColorPrimary() {
-    Assert.checkArgument(colorPrimary != -1);
+    Assert.checkArgument(colorPrimary != -2);
     return colorPrimary;
   }
 
   @Override
   public int getColorPrimaryDark() {
-    Assert.checkArgument(colorPrimaryDark != -1);
+    Assert.checkArgument(colorPrimaryDark != -2);
     return colorPrimaryDark;
   }
 
   @Override
   public @ColorInt int getColorAccent() {
-    Assert.checkArgument(colorAccent != -1);
+    Assert.checkArgument(colorAccent != -2);
     return colorAccent;
   }
 
   @Override
   public @ColorInt int getTextColorSecondary() {
-    Assert.checkArgument(textColorSecondary != -1);
+    Assert.checkArgument(textColorSecondary != -2);
     return textColorSecondary;
   }
 
   @Override
   public @ColorInt int getTextColorPrimary() {
-    Assert.checkArgument(textColorPrimary != -1);
+    Assert.checkArgument(textColorPrimary != -2);
     return textColorPrimary;
   }
 
   @Override
   public @ColorInt int getColorTextOnUnthemedDarkBackground() {
-    Assert.checkArgument(colorTextOnUnthemedDarkBackground != -1);
+    Assert.checkArgument(colorTextOnUnthemedDarkBackground != -2);
     return colorTextOnUnthemedDarkBackground;
   }
 
   @Override
   public @ColorInt int getColorIconOnUnthemedDarkBackground() {
-    Assert.checkArgument(colorIconOnUnthemedDarkBackground != -1);
+    Assert.checkArgument(colorIconOnUnthemedDarkBackground != -2);
     return colorIconOnUnthemedDarkBackground;
   }
 }
