am da649073: Merge "Fixing regression with black task bar background. (Bug 17584337)" into lmp-dev
* commit 'da649073bd927fa69d02982745cc1d61e9a4f8b3': Fixing regression with black task bar background. (Bug 17584337)
This commit is contained in:
@@ -579,7 +579,7 @@ public class ActivityManager {
|
||||
public TaskDescription(TaskDescription td) {
|
||||
mLabel = td.mLabel;
|
||||
mIcon = td.mIcon;
|
||||
setPrimaryColor(td.mColorPrimary);
|
||||
mColorPrimary = td.mColorPrimary;
|
||||
mIconFilename = td.mIconFilename;
|
||||
}
|
||||
|
||||
@@ -600,7 +600,11 @@ public class ActivityManager {
|
||||
* @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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user