summaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
authorChet Haase <chet@google.com>2015-04-23 13:29:56 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-04-23 13:29:59 +0000
commita20ea2f056d46916f84e2fbb53fa32728be8bcf4 (patch)
tree9c12ec2f13b0304bbfd749da6dc60c174f425865 /graphics
parent19d0f539649af9163f15dcb5bb3d370f9ad1c14e (diff)
parent5b3edbde20b446ecbfebe5d6ad0dcd735473ac75 (diff)
downloadframeworks_base-a20ea2f056d46916f84e2fbb53fa32728be8bcf4.zip
frameworks_base-a20ea2f056d46916f84e2fbb53fa32728be8bcf4.tar.gz
frameworks_base-a20ea2f056d46916f84e2fbb53fa32728be8bcf4.tar.bz2
Merge "Add annotation to Rect.intersect()"
Diffstat (limited to 'graphics')
-rw-r--r--graphics/java/android/graphics/Rect.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/graphics/java/android/graphics/Rect.java b/graphics/java/android/graphics/Rect.java
index a9a8f37..f036b19 100644
--- a/graphics/java/android/graphics/Rect.java
+++ b/graphics/java/android/graphics/Rect.java
@@ -16,6 +16,7 @@
package android.graphics;
+import android.annotation.CheckResult;
import android.os.Parcel;
import android.os.Parcelable;
@@ -389,6 +390,7 @@ public final class Rect implements Parcelable {
* (and this rectangle is then set to that intersection) else
* return false and do not change this rectangle.
*/
+ @CheckResult
public boolean intersect(int left, int top, int right, int bottom) {
if (this.left < right && left < this.right && this.top < bottom && top < this.bottom) {
if (this.left < left) this.left = left;
@@ -411,6 +413,7 @@ public final class Rect implements Parcelable {
* (and this rectangle is then set to that intersection) else
* return false and do not change this rectangle.
*/
+ @CheckResult
public boolean intersect(Rect r) {
return intersect(r.left, r.top, r.right, r.bottom);
}
@@ -427,6 +430,7 @@ public final class Rect implements Parcelable {
* this rectangle to that intersection. If they do not, return
* false and do not change this rectangle.
*/
+ @CheckResult
public boolean setIntersect(Rect a, Rect b) {
if (a.left < b.right && b.left < a.right && a.top < b.bottom && b.top < a.bottom) {
left = Math.max(a.left, b.left);