diff --git a/cocos/cocos2d.h b/cocos/cocos2d.h index 0c0beee7b3..3e7f67e44f 100644 --- a/cocos/cocos2d.h +++ b/cocos/cocos2d.h @@ -199,7 +199,7 @@ THE SOFTWARE. #include "platform/android/CCGL-android.h" #include "platform/android/CCStdC-android.h" //Enhance modification begin - #include "platform/android/CCEnhanceAPI-android.h" + #include "platform/android/CCEnhanceAPI-android.h" //Enhance modification end #endif // CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID diff --git a/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxHelper.java b/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxHelper.java index 1f0757dc76..da96a2fcc9 100644 --- a/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxHelper.java +++ b/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxHelper.java @@ -57,7 +57,7 @@ public class Cocos2dxHelper { // =========================================================== private static final String PREFS_NAME = "Cocos2dxPrefsFile"; private static final int RUNNABLES_PER_FRAME = 5; - + // =========================================================== // Fields // =========================================================== @@ -451,72 +451,62 @@ public class Cocos2dxHelper { } //Enhance API modification begin - public static int setResolutionPercent(int per) - { - try{ - if(mGameServiceBinder != null) - { - return mGameServiceBinder.setPreferredResolution(per); - } - return -1; - }catch (Exception e) { - e.printStackTrace(); + public static int setResolutionPercent(int per) { + try { + if (mGameServiceBinder != null) { + return mGameServiceBinder.setPreferredResolution(per); + } + return -1; + } catch (Exception e) { + e.printStackTrace(); return -1; } - } + } - public static int setFPS(int fps) - { - try{ - if(mGameServiceBinder != null) - { - return mGameServiceBinder.setFramePerSecond(fps); - } - return -1; - }catch (Exception e) { - e.printStackTrace(); + public static int setFPS(int fps) { + try { + if (mGameServiceBinder != null) { + return mGameServiceBinder.setFramePerSecond(fps); + } + return -1; + } catch (Exception e) { + e.printStackTrace(); return -1; } - } - - public static int fastLoading(int sec) - { - try{ - if(mGameServiceBinder != null) - { - return mGameServiceBinder.boostUp(sec); - } - return -1; - }catch (Exception e) { - e.printStackTrace(); + } + + public static int fastLoading(int sec) { + try { + if (mGameServiceBinder != null) { + return mGameServiceBinder.boostUp(sec); + } + return -1; + } catch (Exception e) { + e.printStackTrace(); return -1; } - } - - public static int getTemperature() - { - try{ - if(mGameServiceBinder != null) - { - return mGameServiceBinder.getAbstractTemperature(); - } - return -1; - }catch (Exception e) { - e.printStackTrace(); + } + + public static int getTemperature() { + try { + if (mGameServiceBinder != null) { + return mGameServiceBinder.getAbstractTemperature(); + } + return -1; + } catch (Exception e) { + e.printStackTrace(); return -1; } - } - - public static int setLowPowerMode(boolean enable) - { - try{ - if(mGameServiceBinder != null) - { - return mGameServiceBinder.setGamePowerSaving(enable); - } - return -1; - }catch (Exception e) { - e.printStackTrace(); + } + + public static int setLowPowerMode(boolean enable) { + try { + if (mGameServiceBinder != null) { + return mGameServiceBinder.setGamePowerSaving(enable); + } + return -1; + } catch (Exception e) { + e.printStackTrace(); return -1; } }