• R/O
  • HTTP
  • SSH
  • HTTPS

提交

标签
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

packages/apps/Gallery2


Commit MetaInfo

修订版9ac972e9bcaa0409a83d7de59ac364ddde7c0d5f (tree)
时间2018-01-24 01:58:45
作者Andreas Gampe <agampe@goog...>
Commiterandroid-build-merger

Log Message

Merge "Gallery2: Fix NaN comparisons"
am: 6f8c54d224

Change-Id: Iba67789fa694e0978370dbd0ad60c14bb8222be6

更改概述

差异

--- 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
151151 }
152152
153153 public boolean isCenterSet() {
154- return mCenterX != Float.NaN;
154+ return !Float.isNaN(mCenterX);
155155 }
156156
157157 @Override
--- 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 {
189189 }
190190
191191 public void paintGrayPoint(Canvas canvas, float x, float y) {
192- if (x == Float.NaN) {
192+ if (Float.isNaN(x)) {
193193 return;
194194 }
195195
@@ -206,7 +206,7 @@ public class EclipseControl {
206206 }
207207
208208 public void paintPoint(Canvas canvas, float x, float y) {
209- if (x == Float.NaN) {
209+ if (Float.isNaN(x)) {
210210 return;
211211 }
212212
@@ -223,7 +223,7 @@ public class EclipseControl {
223223 }
224224
225225 void paintRadius(Canvas canvas, float cx, float cy, float rx, float ry) {
226- if (cx == Float.NaN) {
226+ if (Float.isNaN(cx)) {
227227 return;
228228 }
229229 int mSliderColor = 0xFF33B5E5;