/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()
|
D | ExifModifier.java | 173 Rational v = tag.getRational(i); in writeTagValue()
|
/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/media/java/android/media/ |
D | Utils.java | 22 import android.util.Rational; 149 private static Rational scaleRatio(Rational ratio, int num, int den) { 153 return new Rational( 158 static Range<Rational> scaleRange(Range<Rational> range, int num, int den) { 269 static Range<Rational> parseRationalRange(Object o, Range<Rational> fallback) { 275 Rational.parseRational(s.substring(0, ix)), 276 Rational.parseRational(s.substring(ix + 1))); 278 Rational value = Rational.parseRational(s);
|
D | ExifInterface.java | 414 private static class Rational { class in ExifInterface 418 private Rational(long numerator, long denominator) { in Rational() method in ExifInterface.Rational 508 public static ExifAttribute createURational(Rational[] values, ByteOrder byteOrder) { in createURational() 512 for (Rational value : values) { in createURational() 519 public static ExifAttribute createURational(Rational value, ByteOrder byteOrder) { in createURational() 520 return createURational(new Rational[] {value}, byteOrder); in createURational() 523 public static ExifAttribute createSRational(Rational[] values, ByteOrder byteOrder) { in createSRational() 527 for (Rational value : values) { in createSRational() 534 public static ExifAttribute createSRational(Rational value, ByteOrder byteOrder) { in createSRational() 535 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)); 1210 private Range<Rational> mAspectRatioRange; 1211 private Range<Rational> mBlockAspectRatioRange; 1533 new Rational(widthInBlocks, heightInBlocks)) in supports() 1534 && mAspectRatioRange.contains(new Rational(width, height)); in supports() 1601 public Range<Rational> getAspectRatioRange(boolean blocks) { in getAspectRatioRange() 1733 Range<Rational> ratios = null, blockRatios = null; in parseFromInfo() [all …]
|
/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/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()
|
D | Camera2SwitchPreviewTest.java | 48 import android.util.Rational;
|
/frameworks/base/core/java/android/hardware/camera2/ |
D | CaptureResult.java | 27 import android.util.Rational; 3186 public static final Key<Rational[]> SENSOR_NEUTRAL_COLOR_POINT = 3187 new Key<Rational[]>("android.sensor.neutralColorPoint", Rational[].class); 3734 public static final Key<Rational[]> STATISTICS_PREDICTED_COLOR_TRANSFORM = 3735 new Key<Rational[]>("android.statistics.predictedColorTransform", Rational[].class);
|
D | CameraCharacteristics.java | 25 import android.util.Rational; 469 public static final Key<Rational> CONTROL_AE_COMPENSATION_STEP = 470 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/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); 1558 public Rational getAeCompensationStepChecked() { in getAeCompensationStepChecked() 1559 Key<Rational> key = in getAeCompensationStepChecked() 1561 Rational compensationStep = getValueFromKeyNonNull(key); in getAeCompensationStepChecked() 1587 Rational compensationStep = getAeCompensationStepChecked(); in getAeCompensationRangeChecked()
|
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/scanner/ |
D | BackgroundScanScheduler.java | 27 import android.util.Rational; 488 gcd = Rational.gcd(schedule.buckets[b].period_ms, gcd); in createSchedule()
|