diff options
author | Andy McFadden <fadden@android.com> | 2013-06-21 16:21:05 -0700 |
---|---|---|
committer | Andy McFadden <fadden@android.com> | 2013-06-21 16:21:05 -0700 |
commit | a0175536383d77a5dd1908e73085752b1bf5a803 (patch) | |
tree | b79b679bccdd795bf5071e5f46c913cb234fe109 /opengl | |
parent | e36b93575f14239ff38ea8b71e39e41b0312326b (diff) | |
download | frameworks_base-a0175536383d77a5dd1908e73085752b1bf5a803.zip frameworks_base-a0175536383d77a5dd1908e73085752b1bf5a803.tar.gz frameworks_base-a0175536383d77a5dd1908e73085752b1bf5a803.tar.bz2 |
Fix wrapper equals()
Make it faster and correcter.
Bug 9204146
Change-Id: Ieeb97b72005e831ec6b94fc24ed2c3bc03307c2a
Diffstat (limited to 'opengl')
-rw-r--r-- | opengl/java/android/opengl/EGL14.java | 1 | ||||
-rw-r--r-- | opengl/java/android/opengl/EGLConfig.java | 2 | ||||
-rw-r--r-- | opengl/java/android/opengl/EGLContext.java | 2 | ||||
-rw-r--r-- | opengl/java/android/opengl/EGLDisplay.java | 2 | ||||
-rw-r--r-- | opengl/java/android/opengl/EGLExt.java | 1 | ||||
-rw-r--r-- | opengl/java/android/opengl/EGLSurface.java | 2 |
6 files changed, 4 insertions, 6 deletions
diff --git a/opengl/java/android/opengl/EGL14.java b/opengl/java/android/opengl/EGL14.java index cd53c17..b93557d 100644 --- a/opengl/java/android/opengl/EGL14.java +++ b/opengl/java/android/opengl/EGL14.java @@ -1,5 +1,4 @@ /* -** ** Copyright 2012, The Android Open Source Project ** ** Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/opengl/java/android/opengl/EGLConfig.java b/opengl/java/android/opengl/EGLConfig.java index d457c9f..a7a6bbb 100644 --- a/opengl/java/android/opengl/EGLConfig.java +++ b/opengl/java/android/opengl/EGLConfig.java @@ -29,7 +29,7 @@ public class EGLConfig extends EGLObjectHandle { @Override public boolean equals(Object o) { if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; + if (!(o instanceof EGLConfig)) return false; EGLConfig that = (EGLConfig) o; return getHandle() == that.getHandle(); diff --git a/opengl/java/android/opengl/EGLContext.java b/opengl/java/android/opengl/EGLContext.java index 41b8ef1..c93bd6e 100644 --- a/opengl/java/android/opengl/EGLContext.java +++ b/opengl/java/android/opengl/EGLContext.java @@ -29,7 +29,7 @@ public class EGLContext extends EGLObjectHandle { @Override public boolean equals(Object o) { if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; + if (!(o instanceof EGLContext)) return false; EGLContext that = (EGLContext) o; return getHandle() == that.getHandle(); diff --git a/opengl/java/android/opengl/EGLDisplay.java b/opengl/java/android/opengl/EGLDisplay.java index 17d1a64..5b8043a 100644 --- a/opengl/java/android/opengl/EGLDisplay.java +++ b/opengl/java/android/opengl/EGLDisplay.java @@ -29,7 +29,7 @@ public class EGLDisplay extends EGLObjectHandle { @Override public boolean equals(Object o) { if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; + if (!(o instanceof EGLDisplay)) return false; EGLDisplay that = (EGLDisplay) o; return getHandle() == that.getHandle(); diff --git a/opengl/java/android/opengl/EGLExt.java b/opengl/java/android/opengl/EGLExt.java index 2e0363d..b74b5fb 100644 --- a/opengl/java/android/opengl/EGLExt.java +++ b/opengl/java/android/opengl/EGLExt.java @@ -1,5 +1,4 @@ /* -** ** Copyright 2013, The Android Open Source Project ** ** Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/opengl/java/android/opengl/EGLSurface.java b/opengl/java/android/opengl/EGLSurface.java index 65bec4f..c379dc9 100644 --- a/opengl/java/android/opengl/EGLSurface.java +++ b/opengl/java/android/opengl/EGLSurface.java @@ -29,7 +29,7 @@ public class EGLSurface extends EGLObjectHandle { @Override public boolean equals(Object o) { if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; + if (!(o instanceof EGLSurface)) return false; EGLSurface that = (EGLSurface) o; return getHandle() == that.getHandle(); |