am 69a0645e: am d1c1201d: am b61dea20: am da649073: Merge "Fixing regression with black task bar background. (Bug 17584337)" into lmp-dev

* commit '69a0645eb2025c54232c4b65544db581a183c1e7':
  Fixing regression with black task bar background. (Bug 17584337)
diff --git a/core/java/android/app/ActivityManager.java b/core/java/android/app/ActivityManager.java
index 3d14c58..cd6088f 100644
--- a/core/java/android/app/ActivityManager.java
+++ b/core/java/android/app/ActivityManager.java
@@ -579,7 +579,7 @@
         public TaskDescription(TaskDescription td) {
             mLabel = td.mLabel;
             mIcon = td.mIcon;
-            setPrimaryColor(td.mColorPrimary);
+            mColorPrimary = td.mColorPrimary;
             mIconFilename = td.mIconFilename;
         }
 
@@ -600,7 +600,11 @@
          * @hide
          */
         public void setPrimaryColor(int primaryColor) {
-            mColorPrimary = 0xFF000000 | primaryColor;
+            // Ensure that the given color is valid
+            if ((primaryColor != 0) && (Color.alpha(primaryColor) != 255)) {
+                throw new RuntimeException("A TaskDescription's primary color should be opaque");
+            }
+            mColorPrimary = primaryColor;
         }
 
         /**