diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2018-01-23 16:28:58 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2018-01-23 16:28:58 +0000 |
commit | 6f8c54d224d3d74a054966cf2129be08aa0313e6 (patch) | |
tree | 86526cc169529bb75b52b54c5594027fad12e777 | |
parent | 6924e012fde5f8e8b1f1e710de4908bc3fe6757a (diff) | |
parent | 80678e64b3a61bdf5f7fe57c486d12a5309f4a20 (diff) | |
download | android_packages_apps_Gallery2-6f8c54d224d3d74a054966cf2129be08aa0313e6.tar.gz android_packages_apps_Gallery2-6f8c54d224d3d74a054966cf2129be08aa0313e6.tar.bz2 android_packages_apps_Gallery2-6f8c54d224d3d74a054966cf2129be08aa0313e6.zip |
Merge "Gallery2: Fix NaN comparisons"
-rw-r--r-- | src/com/android/gallery3d/filtershow/filters/FilterVignetteRepresentation.java | 2 | ||||
-rw-r--r-- | src/com/android/gallery3d/filtershow/imageshow/EclipseControl.java | 6 |
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; |