modify Enhance API

modify Enhance API
This commit is contained in:
iris-wy 2015-05-28 10:47:12 +08:00
parent 68ec7c8ca1
commit 0007799794
4 changed files with 9 additions and 9 deletions

View File

@ -93,7 +93,7 @@ int EnhanceAPI::setLowPowerMode(bool enable)
{
JniMethodInfo t;
int ret = -1;
if(JniHelper::getStaticMethodInfo(t, CLASS_NAME, "fastLoading", "(Z)I"))
if(JniHelper::getStaticMethodInfo(t, CLASS_NAME, "setLowPowerMode", "(Z)I"))
{
ret = t.env->CallStaticIntMethod(t.classID, t.methodID, enable);
}

View File

@ -1,6 +1,6 @@
package com.enhance.gameservice;
interface IGameTunningService
interface IGameTuningService
{
int setPreferredResolution(int resolution);
int setFramePerSecond(int fps);

View File

@ -49,7 +49,7 @@ import android.view.Display;
import android.view.WindowManager;
import android.content.ServiceConnection; //Enhance API modification
import com.enhance.gameservice.IGameTunningService; //Enhance API modification
import com.enhance.gameservice.IGameTuningService; //Enhance API modification
public class Cocos2dxHelper {
// ===========================================================
@ -77,7 +77,7 @@ public class Cocos2dxHelper {
private static Cocos2dxHelperListener sCocos2dxHelperListener;
private static Set<OnActivityResultListener> onActivityResultListeners = new LinkedHashSet<OnActivityResultListener>();
//Enhance API modification begin
private static IGameTunningService mGameServiceBinder = null;
private static IGameTuningService mGameServiceBinder = null;
private static final int BOOST_TIME = 7;
//Enhance API modification end
@ -118,7 +118,7 @@ public class Cocos2dxHelper {
sInited = true;
//Enhance API modification begin
activity.getApplicationContext().bindService(new Intent(IGameTunningService.class.getName()), connection, Context.BIND_AUTO_CREATE);
activity.getApplicationContext().bindService(new Intent(IGameTuningService.class.getName()), connection, Context.BIND_AUTO_CREATE);
//Enhance API modification end
}
}
@ -126,7 +126,7 @@ public class Cocos2dxHelper {
//Enhance API modification begin
private static ServiceConnection connection = new ServiceConnection() {
public void onServiceConnected(ComponentName name, IBinder service) {
mGameServiceBinder = IGameTunningService.Stub.asInterface(service);
mGameServiceBinder = IGameTuningService.Stub.asInterface(service);
fastLoading(BOOST_TIME);
}

View File

@ -858,7 +858,7 @@
"cocos/platform/android/java/lint.xml",
"cocos/platform/android/java/proguard-project.txt",
"cocos/platform/android/java/project.properties",
"cocos/platform/android/java/src/com/enhance/gameservice/IGameTunningService.aidl",
"cocos/platform/android/java/src/com/enhance/gameservice/IGameTuningService.aidl",
"cocos/platform/android/java/src/com/chukong/cocosplay/client/CocosPlayClient.java",
"cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxAccelerometer.java",
"cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxActivity.java",
@ -885,8 +885,8 @@
"cocos/platform/android/java/src/org/cocos2dx/lib/GameControllerDelegate.java",
"cocos/platform/android/java/src/org/cocos2dx/lib/GameControllerUtils.java",
"cocos/platform/android/javaactivity-android.cpp",
"cocos/platform/android/CCEnhanceAPI-android.cpp",
"cocos/platform/android/CCEnhanceAPI-android.h",
"cocos/platform/android/CCEnhanceAPI-android.cpp",
"cocos/platform/android/CCEnhanceAPI-android.h",
"cocos/platform/android/jni/CocosPlayClient.cpp",
"cocos/platform/android/jni/CocosPlayClient.h",
"cocos/platform/android/jni/DPIJni.cpp",