/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/ |
D | RationalTest.java | 20 import android.util.Rational; 31 import static android.util.Rational.*; 43 private static final Rational UNIT = new Rational(1, 1); 50 assertEquals(1, Rational.gcd(1, 2)); in testGcd() 51 assertEquals(1, Rational.gcd(2, 3)); in testGcd() 52 assertEquals(78, Rational.gcd(5*78, 7*78)); in testGcd() 53 assertEquals(1, Rational.gcd(-1, 2)); in testGcd() 54 assertEquals(1, Rational.gcd(-2, 3)); in testGcd() 61 Rational r = new Rational(1, 2); in testConstructor() 66 r = new Rational(-1, 2); in testConstructor() [all …]
|
D | RangeTest.java | 21 import android.util.Rational; 104 Range<Rational> negativeOneTenthPositiveOneTenth = in testEquals() 105 new Range<Rational>(new Rational(-1, 10), new Rational(1, 10)); in testEquals() 106 Range<Rational> negativeOneTenthPositiveOneTenth2 = in testEquals() 107 Range.create(new Rational(-1, 10), new Rational(1, 10)); in testEquals() 130 Range<Rational> negativeOneTenthPositiveOneTenth = in testInRange() 131 new Range<Rational>(new Rational(-1, 10), new Rational(1, 10)); in testInRange() 132 assertInRange(negativeOneTenthPositiveOneTenth, new Rational(-1, 10)); in testInRange() 133 assertInRange(negativeOneTenthPositiveOneTenth, new Rational(1, 10)); in testInRange() 134 assertInRange(negativeOneTenthPositiveOneTenth, Rational.ZERO); in testInRange() [all …]
|
D | CameraMetadataTest.java | 23 import android.util.Rational; 444 checkKeyGetAndSet("android.sensor.baseGainFactor", Rational.class, new Rational(1, 2)); in testReadWritePrimitive() 489 checkKeyGetAndSet("android.sensor.calibrationTransform1", Rational[].class, in testReadWritePrimitiveArray() 490 new Rational[] { in testReadWritePrimitiveArray() 491 new Rational(1, 2), new Rational(3, 4), new Rational(5, 6), in testReadWritePrimitiveArray() 492 new Rational(7, 8), new Rational(9, 10), new Rational(10, 11), in testReadWritePrimitiveArray() 493 new Rational(12, 13), new Rational(14, 15), new Rational(15, 16) in testReadWritePrimitiveArray() 766 new ColorSpaceTransform(new Rational[] { in testReadWriteColorSpaceTransform() 767 new Rational(1, 2), new Rational(3, 4), new Rational(5, 6), in testReadWriteColorSpaceTransform() 768 new Rational(7, 8), new Rational(8, 9), new Rational(10, 11), in testReadWriteColorSpaceTransform() [all …]
|
/frameworks/base/core/java/android/util/ |
D | Rational.java | 29 public final class Rational extends Number implements Comparable<Rational> { class 40 public static final Rational NaN = new Rational(0, 0); 48 public static final Rational POSITIVE_INFINITY = new Rational(1, 0); 56 public static final Rational NEGATIVE_INFINITY = new Rational(-1, 0); 64 public static final Rational ZERO = new Rational(0, 1); 101 public Rational(int numerator, int denominator) { in Rational() method in Rational 240 return obj instanceof Rational && equals((Rational) obj); in equals() 243 private boolean equals(Rational other) { in equals() 466 public int compareTo(Rational another) { in compareTo() 576 public static Rational parseRational(String string) in parseRational() [all …]
|
/frameworks/base/packages/WallpaperCropper/src/com/android/gallery3d/exif/ |
D | Rational.java | 23 public class Rational { class 34 public Rational(long nominator, long denominator) { in Rational() method in Rational 42 public Rational(Rational r) { in Rational() method in Rational 77 if (obj instanceof Rational) { in equals() 78 Rational data = (Rational) obj; in equals()
|
D | ExifTag.java | 363 public boolean setValue(Rational[] value) { in setValue() 394 public boolean setValue(Rational value) { in setValue() 395 return setValue(new Rational[] { in setValue() 468 } else if (obj instanceof Rational) { in setValue() 469 return setValue((Rational) obj); in setValue() 470 } else if (obj instanceof Rational[]) { in setValue() 471 return setValue((Rational[]) obj); in setValue() 605 public Rational[] getValueAsRationals() { in getValueAsRationals() 606 if (mValue instanceof Rational[]) { in getValueAsRationals() 607 return (Rational[]) mValue; in getValueAsRationals() [all …]
|
D | ExifParser.java | 699 Rational value[] = new Rational[tag.getComponentCount()]; in readFullTagValue() 723 Rational value[] = new Rational[tag.getComponentCount()]; in readFullTagValue() 853 protected Rational readUnsignedRational() throws IOException { in readUnsignedRational() 856 return new Rational(nomi, denomi); in readUnsignedRational() 869 protected Rational readRational() throws IOException { in readRational() 872 return new Rational(nomi, denomi); in readRational()
|
D | ExifInterface.java | 1302 public Rational getTagRationalValue(int tagId, int ifdId) { in getTagRationalValue() 1303 Rational[] l = getTagRationalValues(tagId, ifdId); in getTagRationalValue() 1307 return new Rational(l[0]); in getTagRationalValue() 1313 public Rational getTagRationalValue(int tagId) { in getTagRationalValue() 1378 public Rational[] getTagRationalValues(int tagId, int ifdId) { in getTagRationalValues() 1389 public Rational[] getTagRationalValues(int tagId) { in getTagRationalValues() 1909 public static double convertLatOrLongToDouble(Rational[] coordinate, String reference) { in convertLatOrLongToDouble() 1933 Rational[] latitude = getTagRationalValues(TAG_GPS_LATITUDE); in getLatLongAsDoubles() 1935 Rational[] longitude = getTagRationalValues(TAG_GPS_LONGITUDE); in getLatLongAsDoubles() 2018 t = buildTag(TAG_GPS_TIME_STAMP, new Rational[] { in addGpsDateTimeStampTag() [all …]
|
D | OrderedDataOutputStream.java | 51 public OrderedDataOutputStream writeRational(Rational rational) throws IOException { in writeRational()
|
/frameworks/base/core/java/android/hardware/camera2/params/ |
D | ColorSpaceTransform.java | 23 import android.util.Rational; 71 public ColorSpaceTransform(Rational[] elements) { in ColorSpaceTransform() 135 public Rational getElement(int column, int row) { in getElement() 145 return new Rational(numerator, denominator); in getElement() 162 public void copyElements(Rational[] destination, int offset) { in copyElements() 173 destination[i + offset] = new Rational(numerator, denominator); in copyElements() 233 Rational r = new Rational(numerator, denominator); in equals() 234 Rational rOther = new Rational(numeratorOther, denominatorOther); in equals()
|
/frameworks/base/core/java/android/hardware/camera2/utils/ |
D | ParamsUtils.java | 23 import android.util.Rational; 121 public static Rational createRational(float value) { in createRational() 123 return Rational.NaN; in createRational() 125 return Rational.POSITIVE_INFINITY; in createRational() 127 return Rational.NEGATIVE_INFINITY; in createRational() 129 return Rational.ZERO; in createRational() 157 return new Rational(num, den); in createRational()
|
/frameworks/base/core/java/android/app/ |
D | PictureInPictureParams.java | 23 import android.util.Rational; 40 private Rational mAspectRatio; 57 public Builder setAspectRatio(Rational aspectRatio) { in setAspectRatio() 122 private Rational mAspectRatio; 145 mAspectRatio = new Rational(in.readInt(), in.readInt()); in PictureInPictureParams() 157 PictureInPictureParams(Rational aspectRatio, List<RemoteAction> actions, in PictureInPictureParams() 192 public Rational getAspectRatioRational() { in getAspectRatioRational()
|
D | PictureInPictureArgs.java | 23 import android.util.Rational; 38 private Rational mAspectRatio; 55 public Builder setAspectRatio(Rational aspectRatio) { in setAspectRatio() 113 private Rational mAspectRatio; 154 mAspectRatio = new Rational(in.readInt(), in.readInt()); in PictureInPictureArgs() 165 private PictureInPictureArgs(Rational aspectRatio, List<RemoteAction> actions, in PictureInPictureArgs() 178 mAspectRatio = new Rational((int) (aspectRatio * 1000000000), 1000000000); in setAspectRatio() 234 public Rational getAspectRatioRational() { in getAspectRatioRational()
|
/frameworks/native/opengl/tests/hwc/ |
D | hwcCommit.cpp | 202 class Rational { class 204 Rational(void) : _n(0), _d(1) {} in Rational() function in Rational 205 Rational(uint32_t n, uint32_t d) : _n(n), _d(d) {} in Rational() function in Rational 210 bool operator==(const Rational& other) const; 211 bool operator!=(const Rational& other) const { return !(*this == other); } in operator !=() 212 bool operator<(const Rational& other) const; 213 bool operator>(const Rational& other) const { in operator >() 217 Rational& lower, Rational& upper); 261 Rational hScale; 264 Rational vScale; [all …]
|
/frameworks/base/media/java/android/media/ |
D | Utils.java | 29 import android.util.Rational; 158 private static Rational scaleRatio(Rational ratio, int num, int den) { 162 return new Rational( 167 static Range<Rational> scaleRange(Range<Rational> range, int num, int den) { 278 static Range<Rational> parseRationalRange(Object o, Range<Rational> fallback) { 284 Rational.parseRational(s.substring(0, ix)), 285 Rational.parseRational(s.substring(ix + 1))); 287 Rational value = Rational.parseRational(s);
|
D | ExifInterface.java | 555 private static class Rational { class in ExifInterface 559 private Rational(long numerator, long denominator) { in Rational() method in ExifInterface.Rational 649 public static ExifAttribute createURational(Rational[] values, ByteOrder byteOrder) { in createURational() 653 for (Rational value : values) { in createURational() 660 public static ExifAttribute createURational(Rational value, ByteOrder byteOrder) { in createURational() 661 return createURational(new Rational[] {value}, byteOrder); in createURational() 664 public static ExifAttribute createSRational(Rational[] values, ByteOrder byteOrder) { in createSRational() 668 for (Rational value : values) { in createSRational() 675 public static ExifAttribute createSRational(Rational value, ByteOrder byteOrder) { in createSRational() 676 return createSRational(new Rational[] {value}, byteOrder); in createSRational() [all …]
|
D | MediaCodecInfo.java | 24 import android.util.Rational; 123 private static final Range<Rational> POSITIVE_RATIONALS = 124 Range.create(new Rational(1, Integer.MAX_VALUE), 125 new Rational(Integer.MAX_VALUE, 1)); 1222 private Range<Rational> mAspectRatioRange; 1223 private Range<Rational> mBlockAspectRatioRange; 1545 new Rational(widthInBlocks, heightInBlocks)) in supports() 1546 && mAspectRatioRange.contains(new Rational(width, height)); in supports() 1613 public Range<Rational> getAspectRatioRange(boolean blocks) { in getAspectRatioRange() 1745 Range<Rational> ratios = null, blockRatios = null; in parseFromInfo() [all …]
|
/frameworks/base/core/java/android/hardware/camera2/marshal/impl/ |
D | MarshalQueryablePrimitive.java | 22 import android.util.Rational; 87 } else if (value instanceof Rational) { in marshal() 89 marshalPrimitive((Rational) value, buffer); in marshal() 120 private void marshalPrimitive(Rational value, ByteBuffer buffer) { in marshalPrimitive() 140 return new Rational(numerator, denominator); in unmarshalObject() 177 } else if (klass == Rational.class) { in isTypeMappingSupported()
|
/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/stress/ |
D | Camera2StillCaptureTest.java | 39 import android.util.Rational; 483 Rational[] empty = new Rational[] { Rational.ZERO, Rational.ZERO, Rational.ZERO}; in verifyRawCaptureResult() 484 Rational[] neutralColorPoint = mCollector.expectKeyValueNotNull("NeutralColorPoint", in verifyRawCaptureResult() 492 Rational.ZERO); in verifyRawCaptureResult()
|
/frameworks/base/core/java/android/hardware/camera2/ |
D | CaptureResult.java | 27 import android.util.Rational; 3239 public static final Key<Rational[]> SENSOR_NEUTRAL_COLOR_POINT = 3240 new Key<Rational[]>("android.sensor.neutralColorPoint", Rational[].class); 3787 public static final Key<Rational[]> STATISTICS_PREDICTED_COLOR_TRANSFORM = 3788 new Key<Rational[]>("android.statistics.predictedColorTransform", Rational[].class);
|
D | CameraCharacteristics.java | 25 import android.util.Rational; 488 public static final Key<Rational> CONTROL_AE_COMPENSATION_STEP = 489 new Key<Rational>("android.control.aeCompensationStep", Rational.class);
|
/frameworks/base/core/java/android/hardware/camera2/marshal/ |
D | MarshalHelpers.java | 22 import android.util.Rational; 132 } else if (klass == Rational.class) { in isPrimitiveClass()
|
/frameworks/support/exifinterface/src/android/support/media/ |
D | ExifInterface.java | 2899 private static class Rational { class in ExifInterface 2903 private Rational(double value) { in Rational() method in ExifInterface.Rational 2907 private Rational(long numerator, long denominator) { in Rational() method in ExifInterface.Rational 2997 public static ExifAttribute createURational(Rational[] values, ByteOrder byteOrder) { in createURational() 3001 for (Rational value : values) { in createURational() 3008 public static ExifAttribute createURational(Rational value, ByteOrder byteOrder) { in createURational() 3009 return createURational(new Rational[] {value}, byteOrder); in createURational() 3012 public static ExifAttribute createSRational(Rational[] values, ByteOrder byteOrder) { in createSRational() 3016 for (Rational value : values) { in createSRational() 3023 public static ExifAttribute createSRational(Rational value, ByteOrder byteOrder) { in createSRational() [all …]
|
/frameworks/ex/camera2/portability/src/com/android/ex/camera2/portability/ |
D | AndroidCamera2Capabilities.java | 28 import android.util.Rational; 78 Rational ecStep = p.get(CONTROL_AE_COMPENSATION_STEP); in AndroidCamera2Capabilities()
|
/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/helpers/ |
D | StaticMetadata.java | 31 import android.util.Rational; 70 private static final Rational CONTROL_AE_COMPENSATION_STEP_DEFAULT = new Rational(1, 2); 1587 public Rational getAeCompensationStepChecked() { in getAeCompensationStepChecked() 1588 Key<Rational> key = in getAeCompensationStepChecked() 1590 Rational compensationStep = getValueFromKeyNonNull(key); in getAeCompensationStepChecked() 1616 Rational compensationStep = getAeCompensationStepChecked(); in getAeCompensationRangeChecked()
|