summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Chen Xu <fionaxu@google.com> 2019-01-29 17:04:30 -0800
committer android-build-merger <android-build-merger@google.com> 2019-01-29 17:04:30 -0800
commit60a12e311818019d01f49b10bab90d7f348d658f (patch)
tree506398686b7aef4d118be75be71d26955ed0e7de
parentb7c7d8915523e8018783f94af7a39fc401be16a4 (diff)
parent7c3084c3491685e37fed7f7ba7ac580446941e52 (diff)
Merge "Add IntRange and FloatRange annotations" am: 94a9377222 am: 74798a771a
am: 7c3084c349 Change-Id: Ic838b99e169e2fd144e51199e41560efdf663fea
-rw-r--r--api/current.txt4
-rw-r--r--telecomm/java/android/telecom/VideoProfile.java7
2 files changed, 7 insertions, 4 deletions
diff --git a/api/current.txt b/api/current.txt
index 74af09882c95..10d1697e36ee 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -43917,8 +43917,8 @@ package android.telecom {
}
public static final class VideoProfile.CameraCapabilities implements android.os.Parcelable {
- ctor public VideoProfile.CameraCapabilities(int, int);
- ctor public VideoProfile.CameraCapabilities(int, int, boolean, float);
+ ctor public VideoProfile.CameraCapabilities(@IntRange(from=0) int, @IntRange(from=0) int);
+ ctor public VideoProfile.CameraCapabilities(@IntRange(from=0) int, @IntRange(from=0) int, boolean, @FloatRange(from=1.0f) float);
method public int describeContents();
method public int getHeight();
method public float getMaxZoom();
diff --git a/telecomm/java/android/telecom/VideoProfile.java b/telecomm/java/android/telecom/VideoProfile.java
index 7b2306128b7b..157f12c9f105 100644
--- a/telecomm/java/android/telecom/VideoProfile.java
+++ b/telecomm/java/android/telecom/VideoProfile.java
@@ -16,7 +16,9 @@
package android.telecom;
+import android.annotation.FloatRange;
import android.annotation.IntDef;
+import android.annotation.IntRange;
import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
@@ -364,7 +366,7 @@ public class VideoProfile implements Parcelable {
* @param width The width of the camera video (in pixels).
* @param height The height of the camera video (in pixels).
*/
- public CameraCapabilities(int width, int height) {
+ public CameraCapabilities(@IntRange(from = 0) int width, @IntRange(from = 0) int height) {
this(width, height, false, 1.0f);
}
@@ -376,7 +378,8 @@ public class VideoProfile implements Parcelable {
* @param zoomSupported True when camera supports zoom.
* @param maxZoom Maximum zoom supported by camera.
*/
- public CameraCapabilities(int width, int height, boolean zoomSupported, float maxZoom) {
+ public CameraCapabilities(@IntRange(from = 0) int width, @IntRange(from = 0) int height,
+ boolean zoomSupported, @FloatRange(from = 1.0f) float maxZoom) {
mWidth = width;
mHeight = height;
mZoomSupported = zoomSupported;