Fix indent

This commit is contained in:
pandamicro 2015-06-12 13:01:13 +08:00
parent c3aba0392d
commit 19ef0e0983
1 changed files with 71 additions and 71 deletions

View File

@ -74,10 +74,10 @@ public class Cocos2dxHelper {
private static Activity sActivity = null; private static Activity sActivity = null;
private static Cocos2dxHelperListener sCocos2dxHelperListener; private static Cocos2dxHelperListener sCocos2dxHelperListener;
private static Set<OnActivityResultListener> onActivityResultListeners = new LinkedHashSet<OnActivityResultListener>(); private static Set<OnActivityResultListener> onActivityResultListeners = new LinkedHashSet<OnActivityResultListener>();
//Enhance API modification begin //Enhance API modification begin
private static IGameTuningService mGameServiceBinder = null; private static IGameTuningService mGameServiceBinder = null;
private static final int BOOST_TIME = 7; private static final int BOOST_TIME = 7;
//Enhance API modification end //Enhance API modification end
// =========================================================== // ===========================================================
// Constructors // Constructors
@ -116,26 +116,26 @@ public class Cocos2dxHelper {
sInited = true; sInited = true;
//Enhance API modification begin //Enhance API modification begin
Intent serviceIntent = new Intent(IGameTuningService.class.getName()); Intent serviceIntent = new Intent(IGameTuningService.class.getName());
serviceIntent.setPackage("com.enhance.gameservice"); serviceIntent.setPackage("com.enhance.gameservice");
boolean suc = activity.getApplicationContext().bindService(serviceIntent, connection, Context.BIND_AUTO_CREATE); boolean suc = activity.getApplicationContext().bindService(serviceIntent, connection, Context.BIND_AUTO_CREATE);
//Enhance API modification end //Enhance API modification end
} }
} }
//Enhance API modification begin //Enhance API modification begin
private static ServiceConnection connection = new ServiceConnection() { private static ServiceConnection connection = new ServiceConnection() {
public void onServiceConnected(ComponentName name, IBinder service) { public void onServiceConnected(ComponentName name, IBinder service) {
mGameServiceBinder = IGameTuningService.Stub.asInterface(service); mGameServiceBinder = IGameTuningService.Stub.asInterface(service);
fastLoading(BOOST_TIME); fastLoading(BOOST_TIME);
} }
public void onServiceDisconnected(ComponentName name) { public void onServiceDisconnected(ComponentName name) {
sActivity.getApplicationContext().unbindService(connection); sActivity.getApplicationContext().unbindService(connection);
} }
}; };
//Enhance API modification end //Enhance API modification end
public static Activity getActivity() { public static Activity getActivity() {
return sActivity; return sActivity;
} }
@ -530,64 +530,64 @@ public class Cocos2dxHelper {
} }
//Enhance API modification begin //Enhance API modification begin
public static int setResolutionPercent(int per) { public static int setResolutionPercent(int per) {
try { try {
if (mGameServiceBinder != null) { if (mGameServiceBinder != null) {
return mGameServiceBinder.setPreferredResolution(per); return mGameServiceBinder.setPreferredResolution(per);
} }
return -1; return -1;
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
return -1; return -1;
} }
} }
public static int setFPS(int fps) { public static int setFPS(int fps) {
try { try {
if (mGameServiceBinder != null) { if (mGameServiceBinder != null) {
return mGameServiceBinder.setFramePerSecond(fps); return mGameServiceBinder.setFramePerSecond(fps);
} }
return -1; return -1;
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
return -1; return -1;
} }
} }
public static int fastLoading(int sec) { public static int fastLoading(int sec) {
try { try {
if (mGameServiceBinder != null) { if (mGameServiceBinder != null) {
return mGameServiceBinder.boostUp(sec); return mGameServiceBinder.boostUp(sec);
} }
return -1; return -1;
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
return -1; return -1;
} }
} }
public static int getTemperature() { public static int getTemperature() {
try { try {
if (mGameServiceBinder != null) { if (mGameServiceBinder != null) {
return mGameServiceBinder.getAbstractTemperature(); return mGameServiceBinder.getAbstractTemperature();
} }
return -1; return -1;
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
return -1; return -1;
} }
} }
public static int setLowPowerMode(boolean enable) { public static int setLowPowerMode(boolean enable) {
try { try {
if (mGameServiceBinder != null) { if (mGameServiceBinder != null) {
return mGameServiceBinder.setGamePowerSaving(enable); return mGameServiceBinder.setGamePowerSaving(enable);
} }
return -1; return -1;
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
return -1; return -1;
} }
} }
//Enhance API modification end //Enhance API modification end
} }