Permalink
Browse files

Merge pull request #11 from HangingWithFriends/GLES2_cleanup

GLES2 cleanup.
  • Loading branch information...
2 parents 62ad950 + 04e3b4a commit 01ebb3694859ea45b6769f60aa7b092df84a6d36 Nicolas Gramlich committed Sep 7, 2012
Showing with 64 additions and 62 deletions.
  1. +3 −3 src/org/andengine/audio/sound/SoundFactory.java
  2. +5 −5 src/org/andengine/engine/Engine.java
  3. +4 −4 src/org/andengine/engine/camera/Camera.java
  4. +9 −9 src/org/andengine/engine/camera/hud/controls/DigitalOnScreenControl.java
  5. +1 −1 src/org/andengine/entity/particle/ParticleSystem.java
  6. +1 −0 src/org/andengine/entity/scene/menu/item/decorator/BaseMenuItemDecorator.java
  7. +1 −0 src/org/andengine/entity/shape/RectangularShape.java
  8. +2 −2 src/org/andengine/input/touch/controller/MultiTouchController.java
  9. +3 −3 src/org/andengine/input/touch/detector/PinchZoomDetector.java
  10. +1 −1 src/org/andengine/opengl/font/BitmapFont.java
  11. +1 −2 src/org/andengine/opengl/texture/atlas/TextureAtlas.java
  12. +2 −2 ...andengine/opengl/texture/atlas/bitmap/source/decorator/BaseBitmapTextureAtlasSourceDecorator.java
  13. +2 −0 src/org/andengine/opengl/texture/atlas/buildable/IBuildableTextureAtlas.java
  14. +11 −11 src/org/andengine/opengl/view/ConfigChooser.java
  15. +2 −2 src/org/andengine/util/FileUtils.java
  16. +1 −1 src/org/andengine/util/StreamUtils.java
  17. +1 −1 src/org/andengine/util/adt/list/ShiftList.java
  18. +1 −1 src/org/andengine/util/adt/queue/ShiftQueue.java
  19. +2 −2 src/org/andengine/util/algorithm/hull/JarvisMarch.java
  20. +0 −1 src/org/andengine/util/algorithm/path/astar/AStarPathFinder.java
  21. +1 −1 src/org/andengine/util/debug/Debug.java
  22. +0 −2 src/org/andengine/util/level/LevelLoader.java
  23. +1 −1 src/org/andengine/util/math/MathUtils.java
  24. +2 −0 src/org/andengine/util/modifier/BaseDoubleValueSpanModifier.java
  25. +2 −2 src/org/andengine/util/modifier/BaseModifier.java
  26. +1 −1 src/org/andengine/util/modifier/LoopModifier.java
  27. +1 −1 src/org/andengine/util/modifier/ParallelModifier.java
  28. +1 −1 src/org/andengine/util/modifier/SequenceModifier.java
  29. +2 −2 src/org/andengine/util/texturepack/TexturePackParser.java
@@ -60,7 +60,7 @@ public static void onCreate() {
// Methods
// ===========================================================
- public static Sound createSoundFromPath(final SoundManager pSoundManager, final String pPath) throws IOException {
+ public static Sound createSoundFromPath(final SoundManager pSoundManager, final String pPath) {
synchronized(pSoundManager) {
final int soundID = pSoundManager.getSoundPool().load(pPath, 1);
final Sound sound = new Sound(pSoundManager, soundID);
@@ -87,7 +87,7 @@ public static Sound createSoundFromResource(final SoundManager pSoundManager, fi
}
}
- public static Sound createSoundFromFile(final SoundManager pSoundManager, final File pFile) throws IOException {
+ public static Sound createSoundFromFile(final SoundManager pSoundManager, final File pFile) {
return SoundFactory.createSoundFromPath(pSoundManager, pFile.getAbsolutePath());
}
@@ -100,7 +100,7 @@ public static Sound createSoundFromAssetFileDescriptor(final SoundManager pSound
}
}
- public static Sound createSoundFromFileDescriptor(final SoundManager pSoundManager, final FileDescriptor pFileDescriptor, final long pOffset, final long pLength) throws IOException {
+ public static Sound createSoundFromFileDescriptor(final SoundManager pSoundManager, final FileDescriptor pFileDescriptor, final long pOffset, final long pLength) {
synchronized(pSoundManager) {
final int soundID = pSoundManager.getSoundPool().load(pFileDescriptor, pOffset, pLength, 1);
final Sound sound = new Sound(pSoundManager, soundID);
@@ -685,7 +685,7 @@ public boolean enableAccelerationSensor(final Context pContext, final IAccelerat
*/
public boolean enableAccelerationSensor(final Context pContext, final IAccelerationListener pAccelerationListener, final AccelerationSensorOptions pAccelerationSensorOptions) {
final SensorManager sensorManager = (SensorManager) pContext.getSystemService(Context.SENSOR_SERVICE);
- if(this.isSensorSupported(sensorManager, Sensor.TYPE_ACCELEROMETER)) {
+ if(Engine.isSensorSupported(sensorManager, Sensor.TYPE_ACCELEROMETER)) {
this.mAccelerationListener = pAccelerationListener;
if(this.mAccelerationData == null) {
@@ -708,7 +708,7 @@ public boolean enableAccelerationSensor(final Context pContext, final IAccelerat
*/
public boolean disableAccelerationSensor(final Context pContext) {
final SensorManager sensorManager = (SensorManager) pContext.getSystemService(Context.SENSOR_SERVICE);
- if(this.isSensorSupported(sensorManager, Sensor.TYPE_ACCELEROMETER)) {
+ if(Engine.isSensorSupported(sensorManager, Sensor.TYPE_ACCELEROMETER)) {
this.unregisterSelfAsSensorListener(sensorManager, Sensor.TYPE_ACCELEROMETER);
return true;
} else {
@@ -728,7 +728,7 @@ public boolean enableOrientationSensor(final Context pContext, final IOrientatio
*/
public boolean enableOrientationSensor(final Context pContext, final IOrientationListener pOrientationListener, final OrientationSensorOptions pOrientationSensorOptions) {
final SensorManager sensorManager = (SensorManager) pContext.getSystemService(Context.SENSOR_SERVICE);
- if(this.isSensorSupported(sensorManager, Sensor.TYPE_ACCELEROMETER) && this.isSensorSupported(sensorManager, Sensor.TYPE_MAGNETIC_FIELD)) {
+ if(Engine.isSensorSupported(sensorManager, Sensor.TYPE_ACCELEROMETER) && Engine.isSensorSupported(sensorManager, Sensor.TYPE_MAGNETIC_FIELD)) {
this.mOrientationListener = pOrientationListener;
if(this.mOrientationData == null) {
@@ -752,7 +752,7 @@ public boolean enableOrientationSensor(final Context pContext, final IOrientatio
*/
public boolean disableOrientationSensor(final Context pContext) {
final SensorManager sensorManager = (SensorManager) pContext.getSystemService(Context.SENSOR_SERVICE);
- if(this.isSensorSupported(sensorManager, Sensor.TYPE_ACCELEROMETER) && this.isSensorSupported(sensorManager, Sensor.TYPE_MAGNETIC_FIELD)) {
+ if(Engine.isSensorSupported(sensorManager, Sensor.TYPE_ACCELEROMETER) && Engine.isSensorSupported(sensorManager, Sensor.TYPE_MAGNETIC_FIELD)) {
this.unregisterSelfAsSensorListener(sensorManager, Sensor.TYPE_ACCELEROMETER);
this.unregisterSelfAsSensorListener(sensorManager, Sensor.TYPE_MAGNETIC_FIELD);
return true;
@@ -761,7 +761,7 @@ public boolean disableOrientationSensor(final Context pContext) {
}
}
- private boolean isSensorSupported(final SensorManager pSensorManager, final int pType) {
+ private static boolean isSensorSupported(final SensorManager pSensorManager, final int pType) {
return pSensorManager.getSensorList(pType).size() > 0;
}
@@ -293,7 +293,7 @@ public void onApplySceneMatrix(final GLState pGLState) {
final float rotation = this.mRotation;
if(rotation != 0) {
- this.applyRotation(pGLState, this.getCenterX(), this.getCenterY(), rotation);
+ Camera.applyRotation(pGLState, this.getCenterX(), this.getCenterY(), rotation);
}
}
@@ -305,7 +305,7 @@ public void onApplySceneBackgroundMatrix(final GLState pGLState) {
final float rotation = this.mRotation;
if(rotation != 0) {
- this.applyRotation(pGLState, widthRaw * 0.5f, heightRaw * 0.5f, rotation);
+ Camera.applyRotation(pGLState, widthRaw * 0.5f, heightRaw * 0.5f, rotation);
}
}
@@ -316,11 +316,11 @@ public void onApplyCameraSceneMatrix(final GLState pGLState) {
final float cameraSceneRotation = this.mCameraSceneRotation;
if(cameraSceneRotation != 0) {
- this.applyRotation(pGLState, widthRaw * 0.5f, heightRaw * 0.5f, cameraSceneRotation);
+ Camera.applyRotation(pGLState, widthRaw * 0.5f, heightRaw * 0.5f, cameraSceneRotation);
}
}
- private void applyRotation(final GLState pGLState, final float pRotationCenterX, final float pRotationCenterY, final float pAngle) {
+ private static void applyRotation(final GLState pGLState, final float pRotationCenterX, final float pRotationCenterY, final float pAngle) {
pGLState.translateProjectionGLMatrixf(pRotationCenterX, pRotationCenterY, 0);
pGLState.rotateProjectionGLMatrixf(pAngle, 0, 0, 1);
pGLState.translateProjectionGLMatrixf(-pRotationCenterX, -pRotationCenterY, 0);
@@ -68,21 +68,21 @@ protected void onUpdateControlKnob(final float pRelativeX, final float pRelative
if(this.mAllowDiagonal) {
final float angle = MathUtils.radToDeg(MathUtils.atan2(pRelativeY, pRelativeX)) + 180;
- if(this.testDiagonalAngle(0, angle) || this.testDiagonalAngle(360, angle)) {
+ if(DigitalOnScreenControl.testDiagonalAngle(0, angle) || DigitalOnScreenControl.testDiagonalAngle(360, angle)) {
super.onUpdateControlKnob(-EXTENT_SIDE, 0);
- } else if(this.testDiagonalAngle(45, angle)) {
+ } else if(DigitalOnScreenControl.testDiagonalAngle(45, angle)) {
super.onUpdateControlKnob(-EXTENT_DIAGONAL, -EXTENT_DIAGONAL);
- } else if(this.testDiagonalAngle(90, angle)) {
+ } else if(DigitalOnScreenControl.testDiagonalAngle(90, angle)) {
super.onUpdateControlKnob(0, -EXTENT_SIDE);
- } else if(this.testDiagonalAngle(135, angle)) {
+ } else if(DigitalOnScreenControl.testDiagonalAngle(135, angle)) {
super.onUpdateControlKnob(EXTENT_DIAGONAL, -EXTENT_DIAGONAL);
- } else if(this.testDiagonalAngle(180, angle)) {
+ } else if(DigitalOnScreenControl.testDiagonalAngle(180, angle)) {
super.onUpdateControlKnob(EXTENT_SIDE, 0);
- } else if(this.testDiagonalAngle(225, angle)) {
+ } else if(DigitalOnScreenControl.testDiagonalAngle(225, angle)) {
super.onUpdateControlKnob(EXTENT_DIAGONAL, EXTENT_DIAGONAL);
- } else if(this.testDiagonalAngle(270, angle)) {
+ } else if(DigitalOnScreenControl.testDiagonalAngle(270, angle)) {
super.onUpdateControlKnob(0, EXTENT_SIDE);
- } else if(this.testDiagonalAngle(315, angle)) {
+ } else if(DigitalOnScreenControl.testDiagonalAngle(315, angle)) {
super.onUpdateControlKnob(-EXTENT_DIAGONAL, EXTENT_DIAGONAL);
} else {
super.onUpdateControlKnob(0, 0);
@@ -108,7 +108,7 @@ protected void onUpdateControlKnob(final float pRelativeX, final float pRelative
}
}
- private boolean testDiagonalAngle(final float pTestAngle, final float pActualAngle) {
+ private static boolean testDiagonalAngle(final float pTestAngle, final float pActualAngle) {
return pActualAngle > pTestAngle - ANGLE_DELTA && pActualAngle < pTestAngle + ANGLE_DELTA;
}
@@ -64,7 +64,7 @@ public ParticleSystem(final float pX, final float pY, final IEntityFactory<T> pE
this.mEntityFactory = pEntityFactory;
this.mParticleEmitter = pParticleEmitter;
- this.mParticles = (Particle<T>[])new Particle[pParticlesMaximum];
+ this.mParticles = new Particle[pParticlesMaximum];
this.mRateMinimum = pRateMinimum;
this.mRateMaximum = pRateMaximum;
this.mParticlesMaximum = pParticlesMaximum;
@@ -624,6 +624,7 @@ public IEntity queryFirst(final IEntityMatcher pEntityMatcher) {
return this.mMenuItem.queryForSubclass(pEntityMatcher);
}
+ @Override
public <L extends List<S>, S extends IEntity> L queryForSubclass(final IEntityMatcher pEntityMatcher, final L pResult) throws ClassCastException {
return this.mMenuItem.queryForSubclass(pEntityMatcher, pResult);
}
@@ -110,6 +110,7 @@ public boolean contains(final float pX, final float pY) {
return this.convertLocalToSceneCoordinates(this.mWidth * 0.5f, this.mHeight * 0.5f);
}
+ @Override
public float[] getSceneCenterCoordinates(final float[] pReuse) {
return this.convertLocalToSceneCoordinates(this.mWidth * 0.5f, this.mHeight * 0.5f, pReuse);
}
@@ -67,12 +67,12 @@ private void onHandleTouchMove(final MotionEvent pMotionEvent) {
}
private void onHandleTouchAction(final int pAction, final MotionEvent pMotionEvent) {
- final int pointerIndex = this.getPointerIndex(pMotionEvent);
+ final int pointerIndex = MultiTouchController.getPointerIndex(pMotionEvent);
final int pointerID = pMotionEvent.getPointerId(pointerIndex);
this.fireTouchEvent(pMotionEvent.getX(pointerIndex), pMotionEvent.getY(pointerIndex), pAction, pointerID, pMotionEvent);
}
- private int getPointerIndex(final MotionEvent pMotionEvent) {
+ private static int getPointerIndex(final MotionEvent pMotionEvent) {
return (pMotionEvent.getAction() & MotionEvent.ACTION_POINTER_INDEX_MASK) >> MotionEvent.ACTION_POINTER_INDEX_SHIFT;
}
@@ -72,7 +72,7 @@ public boolean onManagedTouchEvent(final TouchEvent pSceneTouchEvent) {
switch(action) {
case MotionEvent.ACTION_POINTER_DOWN:
- if(!this.mPinchZooming && this.hasTwoOrMorePointers(motionEvent)) {
+ if(!this.mPinchZooming && PinchZoomDetector.hasTwoOrMorePointers(motionEvent)) {
this.mInitialDistance = PinchZoomDetector.calculatePointerDistance(motionEvent);
this.mCurrentDistance = this.mInitialDistance;
if(this.mInitialDistance > PinchZoomDetector.TRIGGER_PINCHZOOM_MINIMUM_DISTANCE_DEFAULT) {
@@ -91,7 +91,7 @@ public boolean onManagedTouchEvent(final TouchEvent pSceneTouchEvent) {
break;
case MotionEvent.ACTION_MOVE:
if(this.mPinchZooming) {
- if (this.hasTwoOrMorePointers(motionEvent)) {
+ if (PinchZoomDetector.hasTwoOrMorePointers(motionEvent)) {
this.mCurrentDistance = PinchZoomDetector.calculatePointerDistance(motionEvent);
if(this.mCurrentDistance > PinchZoomDetector.TRIGGER_PINCHZOOM_MINIMUM_DISTANCE_DEFAULT) {
this.mPinchZoomDetectorListener.onPinchZoom(this, pSceneTouchEvent, this.getZoomFactor());
@@ -121,7 +121,7 @@ private static float calculatePointerDistance(final MotionEvent pMotionEvent) {
return MathUtils.distance(pMotionEvent.getX(0), pMotionEvent.getY(0), pMotionEvent.getX(1), pMotionEvent.getY(1));
}
- private boolean hasTwoOrMorePointers(final MotionEvent pMotionEvent) {
+ private static boolean hasTwoOrMorePointers(final MotionEvent pMotionEvent) {
return pMotionEvent.getPointerCount() >= 2;
}
@@ -411,7 +411,7 @@ private void parseCharacters(final int pCharacterCount, final BufferedReader pBu
final float u2 = (x + width) / textureWidth;
final float v2 = (y + height) / textureHeight;
- this.mCharacterToLetterMap.put(id, new Letter((char)id, x, y, width, height, xOffset, yOffset, xAdvance, u, v, u2, v2));
+ this.mCharacterToLetterMap.put(id, new Letter(id, x, y, width, height, xOffset, yOffset, xAdvance, u, v, u2, v2));
}
}
@@ -84,11 +84,10 @@ public boolean hasTextureAtlasStateListener() {
/**
* @see {@link ITextureAtlas#setTextureStateListener(ITextureAtlasStateListener)}
*/
- @SuppressWarnings("unchecked")
@Deprecated
@Override
public void setTextureStateListener(final ITextureStateListener pTextureStateListener) {
- super.setTextureStateListener((ITextureAtlasStateListener<T>)pTextureStateListener);
+ super.setTextureStateListener(pTextureStateListener);
}
@Override
@@ -86,7 +86,7 @@ public int getTextureHeight() {
@Override
public Bitmap onLoadBitmap(final Config pBitmapConfig) {
- final Bitmap bitmap = this.ensureLoadedBitmapIsMutable(this.mBitmapTextureAtlasSource.onLoadBitmap(pBitmapConfig));
+ final Bitmap bitmap = BaseBitmapTextureAtlasSourceDecorator.ensureLoadedBitmapIsMutable(this.mBitmapTextureAtlasSource.onLoadBitmap(pBitmapConfig));
final Canvas canvas = new Canvas(bitmap);
try {
@@ -101,7 +101,7 @@ public Bitmap onLoadBitmap(final Config pBitmapConfig) {
// Methods
// ===========================================================
- private Bitmap ensureLoadedBitmapIsMutable(final Bitmap pBitmap) {
+ private static Bitmap ensureLoadedBitmapIsMutable(final Bitmap pBitmap) {
if(pBitmap.isMutable()) {
return pBitmap;
} else {
@@ -26,13 +26,15 @@
* Most likely this is not the method you'd want to be using, as the {@link ITextureAtlasSource} won't get built through this {@link BuildableTextureAtlas}.
* @deprecated Use {@link BuildableTextureAtlas#addTextureAtlasSource(ITextureAtlasSource)} instead.
*/
+ @Override
@Deprecated
public void addTextureAtlasSource(final S pTextureAtlasSource, final int pTextureX, final int pTextureY);
/**
* Most likely this is not the method you'd want to be using, as the {@link ITextureAtlasSource} won't get built through this {@link BuildableTextureAtlas}.
* @deprecated Use {@link BuildableTextureAtlas#addTextureAtlasSource(ITextureAtlasSource)} instead.
*/
+ @Override
@Deprecated
public void addTextureAtlasSource(final S pTextureAtlasSource, final int pTextureX, final int pTextureY, final int pTextureAtlasSourcePadding);
@@ -163,20 +163,20 @@ private EGLConfig chooseConfig(final EGL10 pEGL, final EGLDisplay pEGLDisplay, f
int eglConfigCount;
if(this.mMultiSamplingRequested) {
- eglConfigCount = this.getEGLConfigCount(pEGL, pEGLDisplay, ConfigChooser.EGLCONFIG_ATTRIBUTES_MULTISAMPLE);
+ eglConfigCount = ConfigChooser.getEGLConfigCount(pEGL, pEGLDisplay, ConfigChooser.EGLCONFIG_ATTRIBUTES_MULTISAMPLE);
if(eglConfigCount > 0) {
this.mMultiSampling = true;
return this.findEGLConfig(pEGL, pEGLDisplay, ConfigChooser.EGLCONFIG_ATTRIBUTES_MULTISAMPLE, eglConfigCount, pConfigChooserMatcher);
}
- eglConfigCount = this.getEGLConfigCount(pEGL, pEGLDisplay, ConfigChooser.EGLCONFIG_ATTRIBUTES_COVERAGEMULTISAMPLE_NVIDIA);
+ eglConfigCount = ConfigChooser.getEGLConfigCount(pEGL, pEGLDisplay, ConfigChooser.EGLCONFIG_ATTRIBUTES_COVERAGEMULTISAMPLE_NVIDIA);
if(eglConfigCount > 0) {
this.mCoverageMultiSampling = true;
return this.findEGLConfig(pEGL, pEGLDisplay, ConfigChooser.EGLCONFIG_ATTRIBUTES_COVERAGEMULTISAMPLE_NVIDIA, eglConfigCount, pConfigChooserMatcher);
}
}
- eglConfigCount = this.getEGLConfigCount(pEGL, pEGLDisplay, ConfigChooser.EGLCONFIG_ATTRIBUTES_FALLBACK);
+ eglConfigCount = ConfigChooser.getEGLConfigCount(pEGL, pEGLDisplay, ConfigChooser.EGLCONFIG_ATTRIBUTES_FALLBACK);
if(eglConfigCount > 0) {
return this.findEGLConfig(pEGL, pEGLDisplay, ConfigChooser.EGLCONFIG_ATTRIBUTES_FALLBACK, eglConfigCount, pConfigChooserMatcher);
} else {
@@ -188,7 +188,7 @@ private EGLConfig chooseConfig(final EGL10 pEGL, final EGLDisplay pEGLDisplay, f
// Methods
// ===========================================================
- private int getEGLConfigCount(final EGL10 pEGL, final EGLDisplay pEGLDisplay, final int[] pEGLConfigAttributes) {
+ private static int getEGLConfigCount(final EGL10 pEGL, final EGLDisplay pEGLDisplay, final int[] pEGLConfigAttributes) {
if(pEGL.eglChooseConfig(pEGLDisplay, pEGLConfigAttributes, null, 0, ConfigChooser.BUFFER) == false) {
throw new IllegalArgumentException("EGLCONFIG_FALLBACK failed!");
}
@@ -208,12 +208,12 @@ private EGLConfig findEGLConfig(final EGL10 pEGL, final EGLDisplay pEGLDisplay,
for(int i = 0; i < pEGLConfigs.length; ++i) {
final EGLConfig config = pEGLConfigs[i];
if(config != null) {
- final int redSize = this.getConfigAttrib(pEGL, pEGLDisplay, config, EGL10.EGL_RED_SIZE, 0);
- final int greenSize = this.getConfigAttrib(pEGL, pEGLDisplay, config, EGL10.EGL_GREEN_SIZE, 0);
- final int blueSize = this.getConfigAttrib(pEGL, pEGLDisplay, config, EGL10.EGL_BLUE_SIZE, 0);
- final int alphaSize = this.getConfigAttrib(pEGL, pEGLDisplay, config, EGL10.EGL_ALPHA_SIZE, 0);
- final int depthSize = this.getConfigAttrib(pEGL, pEGLDisplay, config, EGL10.EGL_DEPTH_SIZE, 0);
- final int stencilSize = this.getConfigAttrib(pEGL, pEGLDisplay, config, EGL10.EGL_STENCIL_SIZE, 0);
+ final int redSize = ConfigChooser.getConfigAttrib(pEGL, pEGLDisplay, config, EGL10.EGL_RED_SIZE, 0);
+ final int greenSize = ConfigChooser.getConfigAttrib(pEGL, pEGLDisplay, config, EGL10.EGL_GREEN_SIZE, 0);
+ final int blueSize = ConfigChooser.getConfigAttrib(pEGL, pEGLDisplay, config, EGL10.EGL_BLUE_SIZE, 0);
+ final int alphaSize = ConfigChooser.getConfigAttrib(pEGL, pEGLDisplay, config, EGL10.EGL_ALPHA_SIZE, 0);
+ final int depthSize = ConfigChooser.getConfigAttrib(pEGL, pEGLDisplay, config, EGL10.EGL_DEPTH_SIZE, 0);
+ final int stencilSize = ConfigChooser.getConfigAttrib(pEGL, pEGLDisplay, config, EGL10.EGL_STENCIL_SIZE, 0);
if(pConfigChooserMatcher.matches(redSize, greenSize, blueSize, alphaSize, depthSize, stencilSize)) {
this.mRedSize = redSize;
@@ -229,7 +229,7 @@ private EGLConfig findEGLConfig(final EGL10 pEGL, final EGLDisplay pEGLDisplay,
throw new IllegalArgumentException("No EGLConfig found!");
}
- private int getConfigAttrib(final EGL10 pEGL, final EGLDisplay pEGLDisplay, final EGLConfig pEGLConfig, final int pAttribute, final int pDefaultValue) {
+ private static int getConfigAttrib(final EGL10 pEGL, final EGLDisplay pEGLDisplay, final EGLConfig pEGLConfig, final int pAttribute, final int pDefaultValue) {
if(pEGL.eglGetConfigAttrib(pEGLDisplay, pEGLConfig, pAttribute, ConfigChooser.BUFFER)) {
return ConfigChooser.BUFFER[0];
} else {
@@ -135,12 +135,12 @@ public static InputStream openOnExternalStorage(final Context pContext, final St
return new FileInputStream(absoluteFilePath);
}
- public static String[] getDirectoryListOnExternalStorage(final Context pContext, final String pFilePath) throws FileNotFoundException {
+ public static String[] getDirectoryListOnExternalStorage(final Context pContext, final String pFilePath) {
final String absoluteFilePath = FileUtils.getAbsolutePathOnExternalStorage(pContext, pFilePath);
return new File(absoluteFilePath).list();
}
- public static String[] getDirectoryListOnExternalStorage(final Context pContext, final String pFilePath, final FilenameFilter pFilenameFilter) throws FileNotFoundException {
+ public static String[] getDirectoryListOnExternalStorage(final Context pContext, final String pFilePath, final FilenameFilter pFilenameFilter) {
final String absoluteFilePath = FileUtils.getAbsolutePathOnExternalStorage(pContext, pFilePath);
return new File(absoluteFilePath).list(pFilenameFilter);
}
@@ -150,7 +150,7 @@ public static final void copy(final InputStream pInputStream, final OutputStream
}
} else {
final byte[] buf = new byte[StreamUtils.IO_BUFFER_SIZE];
- final int bufferReadLimit = Math.min((int)pByteLimit, StreamUtils.IO_BUFFER_SIZE);
+ final int bufferReadLimit = Math.min(pByteLimit, StreamUtils.IO_BUFFER_SIZE);
long pBytesLeftToRead = pByteLimit;
int read;
Oops, something went wrong.

0 comments on commit 01ebb36

Please sign in to comment.