summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Gampe <agampe@google.com>2018-01-23 17:08:01 +0000
committerandroid-build-merger <android-build-merger@google.com>2018-01-23 17:08:01 +0000
commita57d161c2e3eafeb0062c065f8185d0464f7f988 (patch)
treef7112655a78c2b2a1a40a5eec44d7676ffd5614e
parent1b4ab394786ad42cdd403cfdf146e6b6a8262b2e (diff)
parent9e29df9dd43d0c8e4430b7b27f4990974cab4cbb (diff)
downloadandroid_packages_apps_Gallery2-a57d161c2e3eafeb0062c065f8185d0464f7f988.tar.gz
android_packages_apps_Gallery2-a57d161c2e3eafeb0062c065f8185d0464f7f988.tar.bz2
android_packages_apps_Gallery2-a57d161c2e3eafeb0062c065f8185d0464f7f988.zip
Merge "Gallery2: Fix NaN comparisons" am: 6f8c54d224 am: 9ac972e9bc
am: 9e29df9dd4 Change-Id: I0db897b5532de596616002e0ca1be15cce684915
-rw-r--r--src/com/android/gallery3d/filtershow/filters/FilterVignetteRepresentation.java2
-rw-r--r--src/com/android/gallery3d/filtershow/imageshow/EclipseControl.java6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/com/android/gallery3d/filtershow/filters/FilterVignetteRepresentation.java b/src/com/android/gallery3d/filtershow/filters/FilterVignetteRepresentation.java
index d316adeed..512594f5a 100644
--- a/src/com/android/gallery3d/filtershow/filters/FilterVignetteRepresentation.java
+++ b/src/com/android/gallery3d/filtershow/filters/FilterVignetteRepresentation.java
@@ -151,7 +151,7 @@ public class FilterVignetteRepresentation extends FilterRepresentation implement
}
public boolean isCenterSet() {
- return mCenterX != Float.NaN;
+ return !Float.isNaN(mCenterX);
}
@Override
diff --git a/src/com/android/gallery3d/filtershow/imageshow/EclipseControl.java b/src/com/android/gallery3d/filtershow/imageshow/EclipseControl.java
index b94e52e48..06fc1dce1 100644
--- a/src/com/android/gallery3d/filtershow/imageshow/EclipseControl.java
+++ b/src/com/android/gallery3d/filtershow/imageshow/EclipseControl.java
@@ -189,7 +189,7 @@ public class EclipseControl {
}
public void paintGrayPoint(Canvas canvas, float x, float y) {
- if (x == Float.NaN) {
+ if (Float.isNaN(x)) {
return;
}
@@ -206,7 +206,7 @@ public class EclipseControl {
}
public void paintPoint(Canvas canvas, float x, float y) {
- if (x == Float.NaN) {
+ if (Float.isNaN(x)) {
return;
}
@@ -223,7 +223,7 @@ public class EclipseControl {
}
void paintRadius(Canvas canvas, float cx, float cy, float rx, float ry) {
- if (cx == Float.NaN) {
+ if (Float.isNaN(cx)) {
return;
}
int mSliderColor = 0xFF33B5E5;