mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-20 23:52:40 +08:00
Merge branch 'v1.8' into v1.8-release
This commit is contained in:
Binary file not shown.
@@ -179,7 +179,9 @@ public class Cocos2dxGLSurfaceView extends GLSurfaceView {
|
||||
@Override
|
||||
public void run() {
|
||||
Cocos2dxGLSurfaceView.this.mCocos2dxRenderer.handleOnResume();
|
||||
CAAgent.onResume(Cocos2dxGLSurfaceView.this.getContext());
|
||||
if (CAAgent.isInited()) {
|
||||
CAAgent.onResume(Cocos2dxGLSurfaceView.this.getContext());
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -190,7 +192,9 @@ public class Cocos2dxGLSurfaceView extends GLSurfaceView {
|
||||
@Override
|
||||
public void run() {
|
||||
Cocos2dxGLSurfaceView.this.mCocos2dxRenderer.handleOnPause();
|
||||
CAAgent.onPause(Cocos2dxGLSurfaceView.this.getContext());
|
||||
if (CAAgent.isInited()) {
|
||||
CAAgent.onPause(Cocos2dxGLSurfaceView.this.getContext());
|
||||
}
|
||||
}
|
||||
});
|
||||
this.setRenderMode(RENDERMODE_WHEN_DIRTY);
|
||||
|
||||
@@ -422,7 +422,6 @@ public class Cocos2dxVideoView extends SurfaceView implements MediaPlayerControl
|
||||
mCurrentState = STATE_PLAYBACK_COMPLETED;
|
||||
mTargetState = STATE_PLAYBACK_COMPLETED;
|
||||
|
||||
release(true);
|
||||
if (mOnVideoEventListener != null) {
|
||||
mOnVideoEventListener.onVideoEvent(mViewTag,EVENT_COMPLETED);
|
||||
}
|
||||
|
||||
@@ -36,6 +36,10 @@ if (platform === sys.ANDROID) {
|
||||
}
|
||||
};
|
||||
|
||||
cocosAnalytics.isInited = function() {
|
||||
return jsb.reflection.callStaticMethod(cls_CAAgent, "isInited", "()Z");
|
||||
};
|
||||
|
||||
cocosAnalytics.enableDebug = function(enabled) {
|
||||
jsb.reflection.callStaticMethod(cls_CAAgent,
|
||||
"enableDebug", "(Z)V",
|
||||
@@ -326,6 +330,10 @@ if (platform === sys.ANDROID) {
|
||||
}
|
||||
};
|
||||
|
||||
cocosAnalytics.isInited = function() {
|
||||
return jsb.reflection.callStaticMethod(cls_CAAgent, "isInited");
|
||||
};
|
||||
|
||||
cocosAnalytics.enableDebug = function(enabled) {
|
||||
jsb.reflection.callStaticMethod(cls_CAAgent,
|
||||
"enableDebug:",
|
||||
@@ -594,6 +602,10 @@ if (platform === sys.ANDROID) {
|
||||
console.log("Cocos Analytics module isn't available on this platform!");
|
||||
};
|
||||
|
||||
cocosAnalytics.isInited = function() {
|
||||
return false;
|
||||
};
|
||||
|
||||
cocosAnalytics.enableDebug = function(enabled) {
|
||||
};
|
||||
|
||||
|
||||
+6
-2
@@ -117,7 +117,9 @@ static AppDelegate* s_sharedApplication = nullptr;
|
||||
If your application supports background execution, called instead of applicationWillTerminate: when the user quits.
|
||||
*/
|
||||
cocos2d::Application::getInstance()->applicationDidEnterBackground();
|
||||
[CAAgent onPause];
|
||||
if (CAAgent.isInited) {
|
||||
[CAAgent onPause];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)applicationWillEnterForeground:(UIApplication *)application {
|
||||
@@ -129,7 +131,9 @@ static AppDelegate* s_sharedApplication = nullptr;
|
||||
if (glview == currentView) {
|
||||
cocos2d::Application::getInstance()->applicationWillEnterForeground();
|
||||
}
|
||||
[CAAgent onResume];
|
||||
if (CAAgent.isInited) {
|
||||
[CAAgent onResume];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)applicationWillTerminate:(UIApplication *)application {
|
||||
|
||||
+6
-2
@@ -117,7 +117,9 @@ static AppDelegate* s_sharedApplication = nullptr;
|
||||
If your application supports background execution, called instead of applicationWillTerminate: when the user quits.
|
||||
*/
|
||||
cocos2d::Application::getInstance()->applicationDidEnterBackground();
|
||||
[CAAgent onPause];
|
||||
if (CAAgent.isInited) {
|
||||
[CAAgent onPause];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)applicationWillEnterForeground:(UIApplication *)application {
|
||||
@@ -129,7 +131,9 @@ static AppDelegate* s_sharedApplication = nullptr;
|
||||
if (glview == currentView) {
|
||||
cocos2d::Application::getInstance()->applicationWillEnterForeground();
|
||||
}
|
||||
[CAAgent onResume];
|
||||
if (CAAgent.isInited) {
|
||||
[CAAgent onResume];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)applicationWillTerminate:(UIApplication *)application {
|
||||
|
||||
+6
-2
@@ -117,7 +117,9 @@ static AppDelegate* s_sharedApplication = nullptr;
|
||||
If your application supports background execution, called instead of applicationWillTerminate: when the user quits.
|
||||
*/
|
||||
cocos2d::Application::getInstance()->applicationDidEnterBackground();
|
||||
[CAAgent onPause];
|
||||
if (CAAgent.isInited) {
|
||||
[CAAgent onPause];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)applicationWillEnterForeground:(UIApplication *)application {
|
||||
@@ -129,7 +131,9 @@ static AppDelegate* s_sharedApplication = nullptr;
|
||||
if (glview == currentView) {
|
||||
cocos2d::Application::getInstance()->applicationWillEnterForeground();
|
||||
}
|
||||
[CAAgent onResume];
|
||||
if (CAAgent.isInited) {
|
||||
[CAAgent onResume];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)applicationWillTerminate:(UIApplication *)application {
|
||||
|
||||
Reference in New Issue
Block a user