/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 | 31 public final class Rational extends Number implements Comparable<Rational> { class 42 public static final Rational NaN = new Rational(0, 0); 50 public static final Rational POSITIVE_INFINITY = new Rational(1, 0); 58 public static final Rational NEGATIVE_INFINITY = new Rational(-1, 0); 66 public static final Rational ZERO = new Rational(0, 1); 105 public Rational(int numerator, int denominator) { in Rational() method in Rational 244 return obj instanceof Rational && equals((Rational) obj); in equals() 247 private boolean equals(Rational other) { in equals() 470 public int compareTo(Rational another) { in compareTo() 580 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 | 24 import android.util.Rational; 41 private Rational mAspectRatio; 58 public Builder setAspectRatio(Rational aspectRatio) { in setAspectRatio() 123 private Rational mAspectRatio; 146 mAspectRatio = new Rational(in.readInt(), in.readInt()); in PictureInPictureParams() 158 PictureInPictureParams(Rational aspectRatio, List<RemoteAction> actions, in PictureInPictureParams() 194 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); 263 Rational hScale; 266 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/java/android/media/ |
D | Utils.java | 34 import android.util.Rational; 175 private static Rational scaleRatio(Rational ratio, int num, int den) { 179 return new Rational( 184 static Range<Rational> scaleRange(Range<Rational> range, int num, int den) { 296 static Range<Rational> parseRationalRange(Object o, Range<Rational> fallback) { 305 Rational.parseRational(s.substring(0, ix)), 306 Rational.parseRational(s.substring(ix + 1))); 308 Rational value = Rational.parseRational(s);
|
D | ExifInterface.java | 677 private static class Rational { class in ExifInterface 681 private Rational(long numerator, long denominator) { in Rational() method in ExifInterface.Rational 779 public static ExifAttribute createURational(Rational[] values, ByteOrder byteOrder) { in createURational() 783 for (Rational value : values) { in createURational() 790 public static ExifAttribute createURational(Rational value, ByteOrder byteOrder) { in createURational() 791 return createURational(new Rational[] {value}, byteOrder); in createURational() 794 public static ExifAttribute createSRational(Rational[] values, ByteOrder byteOrder) { in createSRational() 798 for (Rational value : values) { in createSRational() 805 public static ExifAttribute createSRational(Rational value, ByteOrder byteOrder) { in createSRational() 806 return createSRational(new Rational[] {value}, byteOrder); in createSRational() [all …]
|
D | MediaCodecInfo.java | 32 import android.util.Rational; 194 private static final Range<Rational> POSITIVE_RATIONALS = 195 Range.create(new Rational(1, Integer.MAX_VALUE), 196 new Rational(Integer.MAX_VALUE, 1)); 1378 private Range<Rational> mAspectRatioRange; 1379 private Range<Rational> mBlockAspectRatioRange; 2045 new Rational(widthInBlocks, heightInBlocks)) in supports() 2046 && mAspectRatioRange.contains(new Rational(width, height)); in supports() 2113 public Range<Rational> getAspectRatioRange(boolean blocks) { in getAspectRatioRange() 2302 Range<Rational> ratios = null, blockRatios = null; [all …]
|
/frameworks/base/tests/FlickerTests/test-apps/flickerapp/src/com/android/server/wm/flicker/testapp/ |
D | PipActivity.java | 23 import android.util.Rational; 39 .setAspectRatio(new Rational(1, 1)) in onCreate()
|
/frameworks/base/tests/FlickerTests/src/com/android/server/wm/flicker/ |
D | DebugTest.java | 21 import android.util.Rational; 118 new Rational(1, 3), new Rational(2, 3)) in resizeSplitScreen()
|
D | ResizeSplitScreenTest.java | 27 import android.util.Rational; 68 new Rational(1, 3), new Rational(2, 3)) in runTransition()
|
D | CommonTransitions.java | 37 import android.util.Rational; 222 UiDevice device, int beginRotation, Rational startRatio, Rational stopRatio) { in resizeSplitScreen()
|
/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/stress/ |
D | Camera2StillCaptureTest.java | 42 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/marshal/ |
D | MarshalHelpers.java | 22 import android.util.Rational; 132 } else if (klass == Rational.class) { in isPrimitiveClass()
|
/frameworks/base/core/java/android/hardware/camera2/ |
D | CaptureResult.java | 28 import android.util.Rational; 3821 public static final Key<Rational[]> SENSOR_NEUTRAL_COLOR_POINT = 3822 new Key<Rational[]>("android.sensor.neutralColorPoint", Rational[].class); 4464 public static final Key<Rational[]> STATISTICS_PREDICTED_COLOR_TRANSFORM = 4465 new Key<Rational[]>("android.statistics.predictedColorTransform", Rational[].class);
|
/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()
|