Fixed default angle to be Orientation.LEFT_RIGHT

Fixed issue where in Android Q if no angle measurement
was specified the default gradient orientation of TOP_BOTTOM
was applied instead of the previous behavior of LEFT_RIGHT

Bug: 139822941
Test: Added CTS test to verify GradientDrawableTest
Change-Id: Ia8c53455740a29e1d123c90616066e16ddb4a241
(cherry picked from commit bd00e4c6c0)
This commit is contained in:
Nader Jawad
2019-08-22 11:24:51 -07:00
parent db1bad4ab9
commit d31d096720

View File

@@ -207,7 +207,7 @@ public class GradientDrawable extends Drawable {
}
public GradientDrawable() {
this(new GradientState(Orientation.TOP_BOTTOM, null), null);
this(new GradientState(Orientation.LEFT_RIGHT, null), null);
}
/**