packages/apps/Gallery2
修订版 | 9ac972e9bcaa0409a83d7de59ac364ddde7c0d5f (tree) |
---|---|
时间 | 2018-01-24 01:58:45 |
作者 | Andreas Gampe <agampe@goog...> |
Commiter | android-build-merger |
Merge "Gallery2: Fix NaN comparisons"
am: 6f8c54d224
Change-Id: Iba67789fa694e0978370dbd0ad60c14bb8222be6
@@ -151,7 +151,7 @@ public class FilterVignetteRepresentation extends FilterRepresentation implement | ||
151 | 151 | } |
152 | 152 | |
153 | 153 | public boolean isCenterSet() { |
154 | - return mCenterX != Float.NaN; | |
154 | + return !Float.isNaN(mCenterX); | |
155 | 155 | } |
156 | 156 | |
157 | 157 | @Override |
@@ -189,7 +189,7 @@ public class EclipseControl { | ||
189 | 189 | } |
190 | 190 | |
191 | 191 | public void paintGrayPoint(Canvas canvas, float x, float y) { |
192 | - if (x == Float.NaN) { | |
192 | + if (Float.isNaN(x)) { | |
193 | 193 | return; |
194 | 194 | } |
195 | 195 |
@@ -206,7 +206,7 @@ public class EclipseControl { | ||
206 | 206 | } |
207 | 207 | |
208 | 208 | public void paintPoint(Canvas canvas, float x, float y) { |
209 | - if (x == Float.NaN) { | |
209 | + if (Float.isNaN(x)) { | |
210 | 210 | return; |
211 | 211 | } |
212 | 212 |
@@ -223,7 +223,7 @@ public class EclipseControl { | ||
223 | 223 | } |
224 | 224 | |
225 | 225 | void paintRadius(Canvas canvas, float cx, float cy, float rx, float ry) { |
226 | - if (cx == Float.NaN) { | |
226 | + if (Float.isNaN(cx)) { | |
227 | 227 | return; |
228 | 228 | } |
229 | 229 | int mSliderColor = 0xFF33B5E5; |