Commit 4a8de896 4a8de896ff5021067c9d2dc1f103e03816bbe560 by 金学艇

注释打印日志的方法和allowbackup风险,解决安全漏洞审查

1 parent 676bd9de
Showing 13 changed files with 84 additions and 90 deletions
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
31 31
32 <application 32 <application
33 android:name="org.cocos2dx.javascript.common.MelodyApplication" 33 android:name="org.cocos2dx.javascript.common.MelodyApplication"
34 android:allowBackup="true" 34 android:allowBackup="false"
35 android:icon="@mipmap/icon" 35 android:icon="@mipmap/icon"
36 android:label="@string/app_name"> 36 android:label="@string/app_name">
37 37
......
...@@ -44,7 +44,6 @@ import android.content.Intent; ...@@ -44,7 +44,6 @@ import android.content.Intent;
44 import android.content.res.Configuration; 44 import android.content.res.Configuration;
45 import android.os.Handler; 45 import android.os.Handler;
46 import android.provider.Settings; 46 import android.provider.Settings;
47 import android.util.Log;
48 import android.view.LayoutInflater; 47 import android.view.LayoutInflater;
49 import android.view.View; 48 import android.view.View;
50 import android.view.WindowManager; 49 import android.view.WindowManager;
...@@ -258,7 +257,7 @@ public class AppActivity extends Cocos2dxActivity { ...@@ -258,7 +257,7 @@ public class AppActivity extends Cocos2dxActivity {
258 257
259 @Override 258 @Override
260 protected void onStart() { 259 protected void onStart() {
261 Log.d("AppActivity", "onStart()...."); 260 // Log.d("AppActivity", "onStart()....");
262 SDKWrapper.getInstance().onStart(); 261 SDKWrapper.getInstance().onStart();
263 super.onStart(); 262 super.onStart();
264 } 263 }
...@@ -273,12 +272,12 @@ public class AppActivity extends Cocos2dxActivity { ...@@ -273,12 +272,12 @@ public class AppActivity extends Cocos2dxActivity {
273 // 当资源加载好了之后要删除之前创建的imageView 272 // 当资源加载好了之后要删除之前创建的imageView
274 // 否则一直会在界面上显示的;-) 273 // 否则一直会在界面上显示的;-)
275 public static void removeLaunchImage() { 274 public static void removeLaunchImage() {
276 Log.i("test loading", "removeLaunchImage"); 275 // Log.i("test loading", "removeLaunchImage");
277 mUIHandler.post(new Runnable() { 276 mUIHandler.post(new Runnable() {
278 @Override 277 @Override
279 public void run() { 278 public void run() {
280 if (img != null) { 279 if (img != null) {
281 Log.i("test loading", "removeLaunchImage222"); 280 // Log.i("test loading", "removeLaunchImage222");
282 img.setVisibility(View.GONE); 281 img.setVisibility(View.GONE);
283 } 282 }
284 } 283 }
...@@ -299,27 +298,27 @@ public class AppActivity extends Cocos2dxActivity { ...@@ -299,27 +298,27 @@ public class AppActivity extends Cocos2dxActivity {
299 298
300 //打出场景日志 Info 299 //打出场景日志 Info
301 public static void logInSceneI(String strLog) { 300 public static void logInSceneI(String strLog) {
302 Log.i("logInSceneI", strLog); 301 // Log.i("logInSceneI", strLog);
303 } 302 }
304 303
305 //打出场景日志 Warn 304 //打出场景日志 Warn
306 public static void logInSceneW(String strLog) { 305 public static void logInSceneW(String strLog) {
307 Log.w("logInSceneW", strLog); 306 // Log.w("logInSceneW", strLog);
308 } 307 }
309 308
310 //打出场景日志 Error 309 //打出场景日志 Error
311 public static void logInSceneE(String strLog) { 310 public static void logInSceneE(String strLog) {
312 Log.e("logInSceneE", strLog); 311 // Log.e("logInSceneE", strLog);
313 } 312 }
314 313
315 private ITopdrawResultListener initListener = new ITopdrawResultListener() { 314 private ITopdrawResultListener initListener = new ITopdrawResultListener() {
316 @Override 315 @Override
317 public void onResult(int result, String msg, Object obj) { 316 public void onResult(int result, String msg, Object obj) {
318 Log.d(TAG, "onResult " + result + " " + msg + " " + obj);//-1020 init topdraw sdk error null 317 // Log.d(TAG, "onResult " + result + " " + msg + " " + obj);//-1020 init topdraw sdk error null
319 if (0 == result) { 318 if (0 == result) {
320 MelodyApplication.sdk = (ITopdrawSDK) obj; 319 MelodyApplication.sdk = (ITopdrawSDK) obj;
321 USER_ID = MelodyApplication.sdk.getOssUserID(); 320 USER_ID = MelodyApplication.sdk.getOssUserID();
322 Log.d(TAG, "USER_ID..." + MelodyApplication.sdk.getOssUserID());//15280011369 321 // Log.d(TAG, "USER_ID..." + MelodyApplication.sdk.getOssUserID());//15280011369
323 322
324 CookieManager.getInstance().setCookie(TOPDRAW_PLATFORM_SERVER, "appId=" + TOPDRAW_APPID); 323 CookieManager.getInstance().setCookie(TOPDRAW_PLATFORM_SERVER, "appId=" + TOPDRAW_APPID);
325 CookieManager.getInstance().setCookie(TOPDRAW_PLATFORM_SERVER, "userId=" + MelodyApplication.sdk.getUserID()); 324 CookieManager.getInstance().setCookie(TOPDRAW_PLATFORM_SERVER, "userId=" + MelodyApplication.sdk.getUserID());
...@@ -338,12 +337,12 @@ public class AppActivity extends Cocos2dxActivity { ...@@ -338,12 +337,12 @@ public class AppActivity extends Cocos2dxActivity {
338 //局方埋点 337 //局方埋点
339 try { 338 try {
340 SDKUtil.isOpenLog = true; 339 SDKUtil.isOpenLog = true;
341 Log.d(TAG, "埋点USER_ID: " + USER_ID); 340 // Log.d(TAG, "埋点USER_ID: " + USER_ID);
342 int sdkResult = SDKUtil.getInstance().ky_initWithAppKey(AppActivity.this, APP_KEY, //埋点SDK初始化 341 int sdkResult = SDKUtil.getInstance().ky_initWithAppKey(AppActivity.this, APP_KEY, //埋点SDK初始化
343 getPackageManager().getPackageInfo(getPackageName(), 0).versionName); 342 getPackageManager().getPackageInfo(getPackageName(), 0).versionName);
344 Log.d(TAG, "sdkResult..." + sdkResult); 343 // Log.d(TAG, "sdkResult..." + sdkResult);
345 baminSDKInited = (sdkResult == 0); 344 baminSDKInited = (sdkResult == 0);
346 Log.d(TAG, "埋点数据:" + baminSDKInited); 345 // Log.d(TAG, "埋点数据:" + baminSDKInited);
347 // Map<String, Object> params = new HashMap<>(); 346 // Map<String, Object> params = new HashMap<>();
348 // params.put("appId", TOPDRAW_APPID); 347 // params.put("appId", TOPDRAW_APPID);
349 // params.put("userId", MelodyApplication.sdk.getUserID()); 348 // params.put("userId", MelodyApplication.sdk.getUserID());
...@@ -396,7 +395,7 @@ public class AppActivity extends Cocos2dxActivity { ...@@ -396,7 +395,7 @@ public class AppActivity extends Cocos2dxActivity {
396 395
397 @Override 396 @Override
398 protected void onPause() { 397 protected void onPause() {
399 Log.d("AppActivity", "onPause()...."); 398 // Log.d("AppActivity", "onPause()....");
400 // mRLSingleColor.setVisibility(View.VISIBLE); //放到启动游戏时显示 399 // mRLSingleColor.setVisibility(View.VISIBLE); //放到启动游戏时显示
401 // setTheme(android.R.style.Theme_NoDisplay); 400 // setTheme(android.R.style.Theme_NoDisplay);
402 super.onPause(); 401 super.onPause();
...@@ -405,14 +404,14 @@ public class AppActivity extends Cocos2dxActivity { ...@@ -405,14 +404,14 @@ public class AppActivity extends Cocos2dxActivity {
405 404
406 @Override 405 @Override
407 protected void onStop() { 406 protected void onStop() {
408 Log.d("AppActivity", "onStop()...."); 407 // Log.d("AppActivity", "onStop()....");
409 super.onStop(); 408 super.onStop();
410 SDKWrapper.getInstance().onStop(); 409 SDKWrapper.getInstance().onStop();
411 } 410 }
412 411
413 @Override 412 @Override
414 protected void onDestroy() { 413 protected void onDestroy() {
415 Log.d("AppActivity", "onDestroy()...."); 414 // Log.d("AppActivity", "onDestroy()....");
416 unregisterReceiver(receiver); 415 unregisterReceiver(receiver);
417 super.onDestroy(); 416 super.onDestroy();
418 SDKWrapper.getInstance().onDestroy(); 417 SDKWrapper.getInstance().onDestroy();
...@@ -420,16 +419,16 @@ public class AppActivity extends Cocos2dxActivity { ...@@ -420,16 +419,16 @@ public class AppActivity extends Cocos2dxActivity {
420 419
421 @Override 420 @Override
422 protected void onResume() { 421 protected void onResume() {
423 Log.d("AppActivity", "onResume()...."); 422 // Log.d("AppActivity", "onResume()....");
424 super.onResume(); 423 super.onResume();
425 SDKWrapper.getInstance().onResume(); 424 SDKWrapper.getInstance().onResume();
426 mRLSingleColor.setVisibility(View.GONE); 425 mRLSingleColor.setVisibility(View.GONE);
427 mOBiLayout.setVisibility(View.GONE); 426 mOBiLayout.setVisibility(View.GONE);
428 relativeLayout.setVisibility(View.GONE); 427 relativeLayout.setVisibility(View.GONE);
429 428
430 //退出游戏发送探针 429 //退出游戏发送探针
431 if (gameStart && mGameName != null) { 430 if (gameStart && mGameName != null) {
432 Log.d(TAG, "onResume->退出游戏| " + mGameName); 431 // Log.d(TAG, "onResume->退出游戏| " + mGameName);
433 HashMap<Object, Object> params = new HashMap<>(); 432 HashMap<Object, Object> params = new HashMap<>();
434 params.put("APP_NAME", APP_NAME); 433 params.put("APP_NAME", APP_NAME);
435 params.put("GAME_ID", ""); //game_id暂时没有值 434 params.put("GAME_ID", ""); //game_id暂时没有值
...@@ -440,7 +439,7 @@ public class AppActivity extends Cocos2dxActivity { ...@@ -440,7 +439,7 @@ public class AppActivity extends Cocos2dxActivity {
440 runOnUiThread(new Runnable() { 439 runOnUiThread(new Runnable() {
441 @Override 440 @Override
442 public void run() { 441 public void run() {
443 Log.d(TAG, "onResume->发送探针"); 442 // Log.d(TAG, "onResume->发送探针");
444 runOnGLThread(new Runnable() { 443 runOnGLThread(new Runnable() {
445 @Override 444 @Override
446 public void run() { 445 public void run() {
...@@ -460,7 +459,7 @@ public class AppActivity extends Cocos2dxActivity { ...@@ -460,7 +459,7 @@ public class AppActivity extends Cocos2dxActivity {
460 * @param gameName 459 * @param gameName
461 */ 460 */
462 public static void onKYSendData(String gameName) { 461 public static void onKYSendData(String gameName) {
463 Log.d(TAG, "onStartGame->启动游戏| " + gameName); 462 // Log.d(TAG, "onStartGame->启动游戏| " + gameName);
464 gameStart = true; 463 gameStart = true;
465 mGameName = gameName; 464 mGameName = gameName;
466 HashMap<Object, Object> params = new HashMap<>(); 465 HashMap<Object, Object> params = new HashMap<>();
...@@ -471,7 +470,7 @@ public class AppActivity extends Cocos2dxActivity { ...@@ -471,7 +470,7 @@ public class AppActivity extends Cocos2dxActivity {
471 } 470 }
472 471
473 public static void onExitApp() { 472 public static void onExitApp() {
474 Log.d(TAG, "onExitApp..."); 473 // Log.d(TAG, "onExitApp...");
475 //未来SDK退出 474 //未来SDK退出
476 NativeLogReporterNewTV nlp = NativeLogReporterNewTV.getInstance(getContext(), null); 475 NativeLogReporterNewTV nlp = NativeLogReporterNewTV.getInstance(getContext(), null);
477 nlp.report(88, "1"); 476 nlp.report(88, "1");
...@@ -488,7 +487,7 @@ public class AppActivity extends Cocos2dxActivity { ...@@ -488,7 +487,7 @@ public class AppActivity extends Cocos2dxActivity {
488 TopdrawSDK.destory(getContext(), null, new ITopdrawResultListener() { 487 TopdrawSDK.destory(getContext(), null, new ITopdrawResultListener() {
489 @Override 488 @Override
490 public void onResult(int i, String s, Object o) { 489 public void onResult(int i, String s, Object o) {
491 Log.d(TAG, "destory " + i + " " + s); 490 // Log.d(TAG, "destory " + i + " " + s);
492 try { 491 try {
493 if (baminSDKInited) { 492 if (baminSDKInited) {
494 SDKUtil.getInstance().ky_quit(); //这里考虑延迟几秒销毁,否则无法触发 493 SDKUtil.getInstance().ky_quit(); //这里考虑延迟几秒销毁,否则无法触发
......
...@@ -133,7 +133,7 @@ public class CommonUtils { ...@@ -133,7 +133,7 @@ public class CommonUtils {
133 133
134 //检查网络 134 //检查网络
135 public static void checkNetwork(final Context context) { 135 public static void checkNetwork(final Context context) {
136 Log.d(TAG, "网络链接:" + CommonUtils.isNetworkAvalible(context)); 136 // Log.d(TAG, "网络链接:" + CommonUtils.isNetworkAvalible(context));
137 if (!CommonUtils.isNetworkAvalible(context)) { 137 if (!CommonUtils.isNetworkAvalible(context)) {
138 TextView msg = new TextView(context); 138 TextView msg = new TextView(context);
139 msg.setText(" 当前未连接网络,请设置网络后登陆!"); 139 msg.setText(" 当前未连接网络,请设置网络后登陆!");
......
...@@ -73,7 +73,7 @@ public class HttpClientUtil { ...@@ -73,7 +73,7 @@ public class HttpClientUtil {
73 baos.write(bytes, 0, readLen); 73 baos.write(bytes, 0, readLen);
74 } 74 }
75 String result = baos.toString(); 75 String result = baos.toString();
76 Log.i(TAG, " result:" + result); 76 // Log.i(TAG, " result:" + result);
77 77
78 message = result; 78 message = result;
79 isSuccess = true; 79 isSuccess = true;
...@@ -156,7 +156,7 @@ public class HttpClientUtil { ...@@ -156,7 +156,7 @@ public class HttpClientUtil {
156 baos.write(bytes, 0, readLen); 156 baos.write(bytes, 0, readLen);
157 } 157 }
158 String backStr = baos.toString(); 158 String backStr = baos.toString();
159 Log.i(TAG, "请求成功 backStr:" + backStr); 159 // Log.i(TAG, "请求成功 backStr:" + backStr);
160 160
161 message = backStr; 161 message = backStr;
162 isSuccess = true; 162 isSuccess = true;
......
...@@ -31,7 +31,7 @@ public class MelodyApplication extends TopdrawApplication { ...@@ -31,7 +31,7 @@ public class MelodyApplication extends TopdrawApplication {
31 * @return true:如果处理了该异常信息;否则返回false. 31 * @return true:如果处理了该异常信息;否则返回false.
32 */ 32 */
33 private boolean handleException(Throwable ex) { 33 private boolean handleException(Throwable ex) {
34 Log.d(TAG, "uncaughtException"); 34 // Log.d(TAG, "uncaughtException");
35 if (ex == null) { 35 if (ex == null) {
36 return false; 36 return false;
37 } 37 }
......
...@@ -56,18 +56,18 @@ public class OBiPluginLoader { ...@@ -56,18 +56,18 @@ public class OBiPluginLoader {
56 if (dirPackage.exists()) { 56 if (dirPackage.exists()) {
57 String path = null; 57 String path = null;
58 File[] files = dirPackage.listFiles(); 58 File[] files = dirPackage.listFiles();
59 Log.d("OBiPluginLoader", "files length..." + files.length); 59 // Log.d("OBiPluginLoader", "files length..." + files.length);
60 if (null != files && files.length > 0) { 60 if (null != files && files.length > 0) {
61 for (int i = 0; i < files.length; i++) { 61 for (int i = 0; i < files.length; i++) {
62 File file = files[i]; 62 File file = files[i];
63 Log.d("OBiPluginLoader", "file name..." + file.getName()); 63 // Log.d("OBiPluginLoader", "file name..." + file.getName());
64 boolean flag = false; 64 boolean flag = false;
65 if (null != file) { 65 if (null != file) {
66 String name = file.getName(); 66 String name = file.getName();
67 flag = Pattern.matches("\\S+\\.apk", name); 67 flag = Pattern.matches("\\S+\\.apk", name);
68 if (flag) { 68 if (flag) {
69 path = file.getAbsolutePath(); 69 path = file.getAbsolutePath();
70 Log.d("OBiPluginLoader", "软件位置:" + path); 70 // Log.d("OBiPluginLoader", "软件位置:" + path);
71 break; 71 break;
72 } 72 }
73 } 73 }
...@@ -105,7 +105,7 @@ public class OBiPluginLoader { ...@@ -105,7 +105,7 @@ public class OBiPluginLoader {
105 } 105 }
106 if (!dirPackage.exists()) { 106 if (!dirPackage.exists()) {
107 dirPackage.mkdir(); 107 dirPackage.mkdir();
108 Log.d("OBiPluginLoader", "创建目录" + dirPackage); 108 // Log.d("OBiPluginLoader", "创建目录" + dirPackage);
109 final File fileTempOK = new File(dirPackage, fileName); 109 final File fileTempOK = new File(dirPackage, fileName);
110 final OnResultListener rl = new OnResultListener() { 110 final OnResultListener rl = new OnResultListener() {
111 @Override 111 @Override
...@@ -130,18 +130,18 @@ public class OBiPluginLoader { ...@@ -130,18 +130,18 @@ public class OBiPluginLoader {
130 } else { 130 } else {
131 String path = null; 131 String path = null;
132 File[] files = dirPackage.listFiles(); 132 File[] files = dirPackage.listFiles();
133 Log.d("OBiPluginLoader", "files length..." + files.length); 133 // Log.d("OBiPluginLoader", "files length..." + files.length);
134 if (null != files && files.length > 0) { 134 if (null != files && files.length > 0) {
135 for (int i = 0; i < files.length; i++) { 135 for (int i = 0; i < files.length; i++) {
136 File file = files[i]; 136 File file = files[i];
137 Log.d("OBiPluginLoader", "file name..." + file.getName()); 137 // Log.d("OBiPluginLoader", "file name..." + file.getName());
138 boolean flag = false; 138 boolean flag = false;
139 if (null != file) { 139 if (null != file) {
140 String name = file.getName(); 140 String name = file.getName();
141 flag = Pattern.matches("\\S+\\.apk", name); 141 flag = Pattern.matches("\\S+\\.apk", name);
142 if (flag) { 142 if (flag) {
143 path = file.getAbsolutePath(); 143 path = file.getAbsolutePath();
144 Log.d("OBiPluginLoader", "软件位置:" + path); 144 // Log.d("OBiPluginLoader", "软件位置:" + path);
145 break; 145 break;
146 } 146 }
147 } 147 }
...@@ -177,7 +177,7 @@ public class OBiPluginLoader { ...@@ -177,7 +177,7 @@ public class OBiPluginLoader {
177 } 177 }
178 178
179 public void downloadApk(String downloadURL, final File file, OnResultListener rlistener, OnProgressListener plistener) { 179 public void downloadApk(String downloadURL, final File file, OnResultListener rlistener, OnProgressListener plistener) {
180 Log.d("OBiPluginLoader", "downloadApk start.."); 180 // Log.d("OBiPluginLoader", "downloadApk start..");
181 downloadURL = this.path; 181 downloadURL = this.path;
182 try { 182 try {
183 if (file.exists() && file.isFile()) { 183 if (file.exists() && file.isFile()) {
...@@ -195,7 +195,7 @@ public class OBiPluginLoader { ...@@ -195,7 +195,7 @@ public class OBiPluginLoader {
195 url = server + downloadURL; 195 url = server + downloadURL;
196 } 196 }
197 URL u = new URL(url); 197 URL u = new URL(url);
198 Log.d("OBiPluginLoader", "downloadAPK url: " + url); 198 // Log.d("OBiPluginLoader", "downloadAPK url: " + url);
199 conn = (HttpURLConnection) u.openConnection(); 199 conn = (HttpURLConnection) u.openConnection();
200 conn.setRequestMethod("GET"); 200 conn.setRequestMethod("GET");
201 conn.setConnectTimeout(5000); 201 conn.setConnectTimeout(5000);
...@@ -204,7 +204,7 @@ public class OBiPluginLoader { ...@@ -204,7 +204,7 @@ public class OBiPluginLoader {
204 conn.connect(); 204 conn.connect();
205 if (200 == conn.getResponseCode()) { 205 if (200 == conn.getResponseCode()) {
206 String cl = conn.getHeaderField("content-length"); 206 String cl = conn.getHeaderField("content-length");
207 Log.d("OBiPluginLoader", "下载文件大小" + cl); 207 // Log.d("OBiPluginLoader", "下载文件大小" + cl);
208 long totalSize = 0; 208 long totalSize = 0;
209 try { 209 try {
210 totalSize = Long.valueOf(cl); 210 totalSize = Long.valueOf(cl);
...@@ -254,7 +254,7 @@ public class OBiPluginLoader { ...@@ -254,7 +254,7 @@ public class OBiPluginLoader {
254 } catch (IOException e) { 254 } catch (IOException e) {
255 e.printStackTrace(); 255 e.printStackTrace();
256 } 256 }
257 Log.d("OBiPluginLoader", "downloadAPK flag: " + flag); 257 // Log.d("OBiPluginLoader", "downloadAPK flag: " + flag);
258 if (null != rlistener) { 258 if (null != rlistener) {
259 if (flag) { 259 if (flag) {
260 rlistener.onResult(0, "download success"); 260 rlistener.onResult(0, "download success");
...@@ -291,7 +291,7 @@ public class OBiPluginLoader { ...@@ -291,7 +291,7 @@ public class OBiPluginLoader {
291 } 291 }
292 292
293 public void closeDownloadApk() { 293 public void closeDownloadApk() {
294 Log.d("OBiPluginLoader", "目录是否存在:" + dirPackage.exists()); 294 // Log.d("OBiPluginLoader", "目录是否存在:" + dirPackage.exists());
295 if (fTemp.exists() && fTemp.isFile()) { 295 if (fTemp.exists() && fTemp.isFile()) {
296 fTemp.delete(); 296 fTemp.delete();
297 } 297 }
......
...@@ -124,7 +124,7 @@ public class PluginLoader { ...@@ -124,7 +124,7 @@ public class PluginLoader {
124 File dirPackage = new File(dirPlugin, packageName); 124 File dirPackage = new File(dirPlugin, packageName);
125 if (!dirPackage.exists()) { 125 if (!dirPackage.exists()) {
126 dirPackage.mkdir(); 126 dirPackage.mkdir();
127 Log.d("PluginLoader", "创建目录" + dirPackage); 127 // Log.d("PluginLoader", "创建目录" + dirPackage);
128 OnResultListener rl = new OnResultListener() { 128 OnResultListener rl = new OnResultListener() {
129 @Override 129 @Override
130 public void onResult(int i, String msg) { 130 public void onResult(int i, String msg) {
...@@ -168,7 +168,7 @@ public class PluginLoader { ...@@ -168,7 +168,7 @@ public class PluginLoader {
168 } 168 }
169 169
170 private void check(final OnResultListener rListener, final OnProgressListener plistener, File filePlugin) { 170 private void check(final OnResultListener rListener, final OnProgressListener plistener, File filePlugin) {
171 Log.d("PluginLoader", "check start.."); 171 // Log.d("PluginLoader", "check start..");
172 boolean needCheckUpdate = false; 172 boolean needCheckUpdate = false;
173 final File[] filePlugins; 173 final File[] filePlugins;
174 if (null != filePlugin) { 174 if (null != filePlugin) {
...@@ -191,7 +191,7 @@ public class PluginLoader { ...@@ -191,7 +191,7 @@ public class PluginLoader {
191 } 191 }
192 192
193 private void checkUpdate(final OnResultListener rListener, final OnProgressListener plistener, File... filePlugins) { 193 private void checkUpdate(final OnResultListener rListener, final OnProgressListener plistener, File... filePlugins) {
194 Log.d("PluginLoader", "checkUpdate start.."); 194 // Log.d("PluginLoader", "checkUpdate start..");
195 int i = 0; 195 int i = 0;
196 while (i < 3) { 196 while (i < 3) {
197 boolean getResponse = false; 197 boolean getResponse = false;
...@@ -216,7 +216,7 @@ public class PluginLoader { ...@@ -216,7 +216,7 @@ public class PluginLoader {
216 baos.write(buffer, 0, len); 216 baos.write(buffer, 0, len);
217 } 217 }
218 result = baos.toString("UTF-8"); 218 result = baos.toString("UTF-8");
219 Log.d("PluginLoader", "result== " + result); 219 // Log.d("PluginLoader", "result== " + result);
220 } 220 }
221 getResponse = true; 221 getResponse = true;
222 } catch (Exception e) { 222 } catch (Exception e) {
...@@ -274,7 +274,7 @@ public class PluginLoader { ...@@ -274,7 +274,7 @@ public class PluginLoader {
274 e.printStackTrace(); 274 e.printStackTrace();
275 } 275 }
276 } 276 }
277 Log.d("PluginLoader", "getInfo==" + getInfo); 277 // Log.d("PluginLoader", "getInfo==" + getInfo);
278 if (getInfo && null != listPlugins) { 278 if (getInfo && null != listPlugins) {
279 for (int j = 0; j < listPlugins.size(); j++) { 279 for (int j = 0; j < listPlugins.size(); j++) {
280 Map<String, String> mapPlugin = listPlugins.get(j); 280 Map<String, String> mapPlugin = listPlugins.get(j);
...@@ -294,7 +294,7 @@ public class PluginLoader { ...@@ -294,7 +294,7 @@ public class PluginLoader {
294 } 294 }
295 } 295 }
296 } 296 }
297 Log.d("PluginLoader", "needCheck== " + needCheck); 297 // Log.d("PluginLoader", "needCheck== " + needCheck);
298 if (needCheck && null != mapPlugin) { 298 if (needCheck && null != mapPlugin) {
299 String packageName = mapPlugin.get("packageName"); 299 String packageName = mapPlugin.get("packageName");
300 String url = mapPlugin.get("url"); 300 String url = mapPlugin.get("url");
...@@ -312,7 +312,7 @@ public class PluginLoader { ...@@ -312,7 +312,7 @@ public class PluginLoader {
312 } 312 }
313 } 313 }
314 boolean needDownload = false; 314 boolean needDownload = false;
315 Log.d("PluginLoader", "fileName==" + fileName); 315 // Log.d("PluginLoader", "fileName==" + fileName);
316 if (null != fileName) { 316 if (null != fileName) {
317 final File file = new File(dirPackageName, fileName); 317 final File file = new File(dirPackageName, fileName);
318 File fileTemp = new File(dirPackageName, fileName + "_temp"); 318 File fileTemp = new File(dirPackageName, fileName + "_temp");
...@@ -345,7 +345,7 @@ public class PluginLoader { ...@@ -345,7 +345,7 @@ public class PluginLoader {
345 if (fileTemp.exists() && fileTemp.isFile()) { 345 if (fileTemp.exists() && fileTemp.isFile()) {
346 fileTemp.delete(); 346 fileTemp.delete();
347 } 347 }
348 Log.d("PluginLoader", "needDownload"); 348 // Log.d("PluginLoader", "needDownload");
349 if (needDownload) { 349 if (needDownload) {
350 OnResultListener rl = new OnResultListener() { 350 OnResultListener rl = new OnResultListener() {
351 @Override 351 @Override
...@@ -396,7 +396,7 @@ public class PluginLoader { ...@@ -396,7 +396,7 @@ public class PluginLoader {
396 } 396 }
397 397
398 public void downloadApk(final String downloadURL, final File file, OnResultListener rlistener, OnProgressListener plistener) { 398 public void downloadApk(final String downloadURL, final File file, OnResultListener rlistener, OnProgressListener plistener) {
399 Log.d("PluginLoader", "downloadApk start.."); 399 // Log.d("PluginLoader", "downloadApk start..");
400 BufferedInputStream bis = null; 400 BufferedInputStream bis = null;
401 FileOutputStream fos = null; 401 FileOutputStream fos = null;
402 try { 402 try {
...@@ -415,7 +415,7 @@ public class PluginLoader { ...@@ -415,7 +415,7 @@ public class PluginLoader {
415 url = server + downloadURL; 415 url = server + downloadURL;
416 } 416 }
417 URL u = new URL(url); 417 URL u = new URL(url);
418 Log.d("PluginLoader", "downloadAPK url: " + url); 418 // Log.d("PluginLoader", "downloadAPK url: " + url);
419 HttpURLConnection conn = (HttpURLConnection) u.openConnection(); 419 HttpURLConnection conn = (HttpURLConnection) u.openConnection();
420 conn.setRequestMethod("GET"); 420 conn.setRequestMethod("GET");
421 conn.setConnectTimeout(5000); 421 conn.setConnectTimeout(5000);
...@@ -466,7 +466,7 @@ public class PluginLoader { ...@@ -466,7 +466,7 @@ public class PluginLoader {
466 fos.write(buffer, 0, len); 466 fos.write(buffer, 0, len);
467 } 467 }
468 boolean flag = f.renameTo(file); 468 boolean flag = f.renameTo(file);
469 Log.d("PluginLoader", "downloadAPK flag: " + flag); 469 // Log.d("PluginLoader", "downloadAPK flag: " + flag);
470 if (null != rlistener) { 470 if (null != rlistener) {
471 if (flag) { 471 if (flag) {
472 rlistener.onResult(0, "download success"); 472 rlistener.onResult(0, "download success");
......
...@@ -7,7 +7,6 @@ import android.content.pm.PackageInfo; ...@@ -7,7 +7,6 @@ import android.content.pm.PackageInfo;
7 import android.content.pm.PackageManager; 7 import android.content.pm.PackageManager;
8 import android.net.Uri; 8 import android.net.Uri;
9 import android.text.TextUtils; 9 import android.text.TextUtils;
10 import android.util.Log;
11 import android.view.View; 10 import android.view.View;
12 import android.widget.ProgressBar; 11 import android.widget.ProgressBar;
13 import android.widget.RelativeLayout; 12 import android.widget.RelativeLayout;
...@@ -48,7 +47,7 @@ public class TopdrawSDKWrapper { ...@@ -48,7 +47,7 @@ public class TopdrawSDKWrapper {
48 } 47 }
49 48
50 public static void init(Context context) { 49 public static void init(Context context) {
51 Log.i(TAG, "init in TopdrawSDKWrapper.java:"); 50 // Log.i(TAG, "init in TopdrawSDKWrapper.java:");
52 try { 51 try {
53 TopdrawSDKWrapper._activity = (AppActivity) context; 52 TopdrawSDKWrapper._activity = (AppActivity) context;
54 } catch (Exception e) { 53 } catch (Exception e) {
...@@ -65,7 +64,7 @@ public class TopdrawSDKWrapper { ...@@ -65,7 +64,7 @@ public class TopdrawSDKWrapper {
65 } 64 }
66 65
67 public static void getPlayUrl(final String strSupercid, final String strCid, final String strJSCallBack) { 66 public static void getPlayUrl(final String strSupercid, final String strCid, final String strJSCallBack) {
68 Log.d(TAG, "getPlayUrl start..." + strJSCallBack); 67 // Log.d(TAG, "getPlayUrl start..." + strJSCallBack);
69 String epgServer = CommonUtils.getServer(_activity) + HTTP_AUTHORIZE; 68 String epgServer = CommonUtils.getServer(_activity) + HTTP_AUTHORIZE;
70 String token = CommonUtils.getToken(_activity); 69 String token = CommonUtils.getToken(_activity);
71 String supercid = strSupercid; //测试用例 电视剧则使用掐头去尾及"-"的mediaCode,电影或单片使用"-1" 70 String supercid = strSupercid; //测试用例 电视剧则使用掐头去尾及"-"的mediaCode,电影或单片使用"-1"
...@@ -89,11 +88,11 @@ public class TopdrawSDKWrapper { ...@@ -89,11 +88,11 @@ public class TopdrawSDKWrapper {
89 e.printStackTrace(); 88 e.printStackTrace();
90 } 89 }
91 90
92 Log.d(TAG, "token | " + CommonUtils.getToken(_activity) + " server| " + CommonUtils.getServer(_activity)); 91 // Log.d(TAG, "token | " + CommonUtils.getToken(_activity) + " server| " + CommonUtils.getServer(_activity));
93 HttpClientUtil.post(epgServer, mapParams.toString(), token, new HttpClientUtil.OnRequestCallBack() { 92 HttpClientUtil.post(epgServer, mapParams.toString(), token, new HttpClientUtil.OnRequestCallBack() {
94 @Override 93 @Override
95 public void onSuccess(String json) { 94 public void onSuccess(String json) {
96 Log.d(TAG, "成功获取播放链接 | " + json); 95 // Log.d(TAG, "成功获取播放链接 | " + json);
97 JSONObject joAuthorizeResult = null; 96 JSONObject joAuthorizeResult = null;
98 try { 97 try {
99 joAuthorizeResult = new JSONObject(json); 98 joAuthorizeResult = new JSONObject(json);
...@@ -103,7 +102,7 @@ public class TopdrawSDKWrapper { ...@@ -103,7 +102,7 @@ public class TopdrawSDKWrapper {
103 JSONObject joUrl = jaUrls.getJSONObject(0); 102 JSONObject joUrl = jaUrls.getJSONObject(0);
104 if (null != joUrl) { 103 if (null != joUrl) {
105 final String strPlayURL = joUrl.getString("playurl"); 104 final String strPlayURL = joUrl.getString("playurl");
106 Log.d(TAG, "获取播放链接:" + strPlayURL); 105 // Log.d(TAG, "获取播放链接:" + strPlayURL);
107 _activity.runOnGLThread( 106 _activity.runOnGLThread(
108 new Runnable() { 107 new Runnable() {
109 @Override 108 @Override
...@@ -125,7 +124,7 @@ public class TopdrawSDKWrapper { ...@@ -125,7 +124,7 @@ public class TopdrawSDKWrapper {
125 124
126 @Override 125 @Override
127 public void onError(String errorMsg) { 126 public void onError(String errorMsg) {
128 Log.d(TAG, "获取播放链接失败| " + errorMsg); 127 // Log.d(TAG, "获取播放链接失败| " + errorMsg);
129 } 128 }
130 }); 129 });
131 } 130 }
...@@ -148,7 +147,7 @@ public class TopdrawSDKWrapper { ...@@ -148,7 +147,7 @@ public class TopdrawSDKWrapper {
148 } 147 }
149 148
150 public static void startGame(String apkName, final String strJSCallBack) { 149 public static void startGame(String apkName, final String strJSCallBack) {
151 Log.d(TAG, "TopdrawSDKWrapper starGame start..." + apkName); 150 // Log.d(TAG, "TopdrawSDKWrapper starGame start..." + apkName);
152 151
153 final View singleColorView = _activity.getSingleColorView(); 152 final View singleColorView = _activity.getSingleColorView();
154 View view = _activity.getProgressBarView(); 153 View view = _activity.getProgressBarView();
...@@ -242,8 +241,8 @@ public class TopdrawSDKWrapper { ...@@ -242,8 +241,8 @@ public class TopdrawSDKWrapper {
242 } 241 }
243 242
244 public static void startOBiGame(String downloadUrl, final String apkName, String claName, final String strJSCallBack) { 243 public static void startOBiGame(String downloadUrl, final String apkName, String claName, final String strJSCallBack) {
245 Log.d(TAG, "TopdrawSDKWrapper starObiGame start..." + apkName + " downloadUrl: " + downloadUrl + " className " + claName); 244 // Log.d(TAG, "TopdrawSDKWrapper starObiGame start..." + apkName + " downloadUrl: " + downloadUrl + " className " + claName);
246 Log.d(TAG, "pluginLoaded..." + pluginLoaded); 245 // Log.d(TAG, "pluginLoaded..." + pluginLoaded);
247 if (pluginLoaded) { 246 if (pluginLoaded) {
248 return; 247 return;
249 } 248 }
...@@ -255,7 +254,7 @@ public class TopdrawSDKWrapper { ...@@ -255,7 +254,7 @@ public class TopdrawSDKWrapper {
255 @Override 254 @Override
256 public void onResult(int i, final String msg) { 255 public void onResult(int i, final String msg) {
257 if (0 == i) { 256 if (0 == i) {
258 Log.d(TAG, "准备成功,准备启动。。。"); 257 // Log.d(TAG, "准备成功,准备启动。。。");
259 pluginLoaded = false; 258 pluginLoaded = false;
260 if (!isApkInstalled(_activity, apkName)) { 259 if (!isApkInstalled(_activity, apkName)) {
261 startInstall(_activity, msg); 260 startInstall(_activity, msg);
...@@ -290,7 +289,7 @@ public class TopdrawSDKWrapper { ...@@ -290,7 +289,7 @@ public class TopdrawSDKWrapper {
290 if (pluginLoaded) //TODO,解决部分下载游戏安装游戏后退出,就进不去的问题 289 if (pluginLoaded) //TODO,解决部分下载游戏安装游戏后退出,就进不去的问题
291 pluginLoaded = false; 290 pluginLoaded = false;
292 final int pg = Double.valueOf(d).intValue(); 291 final int pg = Double.valueOf(d).intValue();
293 Log.d(TAG, "奥比游戏下载进度:" + pg); 292 // Log.d(TAG, "奥比游戏下载进度:" + pg);
294 _activity.runOnUiThread(new Runnable() { 293 _activity.runOnUiThread(new Runnable() {
295 @Override 294 @Override
296 public void run() { 295 public void run() {
...@@ -322,7 +321,7 @@ public class TopdrawSDKWrapper { ...@@ -322,7 +321,7 @@ public class TopdrawSDKWrapper {
322 } 321 }
323 322
324 public static void closeDownloadObiApk() { 323 public static void closeDownloadObiApk() {
325 Log.d(TAG, "取消下载。。。"); 324 // Log.d(TAG, "取消下载。。。");
326 OBiPluginLoader.getInstance().closeDownloadApk(); 325 OBiPluginLoader.getInstance().closeDownloadApk();
327 } 326 }
328 327
...@@ -352,7 +351,7 @@ public class TopdrawSDKWrapper { ...@@ -352,7 +351,7 @@ public class TopdrawSDKWrapper {
352 * @param path 文件的路径 351 * @param path 文件的路径
353 */ 352 */
354 public static void startInstall(Context context, String path) { 353 public static void startInstall(Context context, String path) {
355 Log.d(TAG, "安装的包路径。。。" + path); 354 // Log.d(TAG, "安装的包路径。。。" + path);
356 355
357 //修改安装包权限 356 //修改安装包权限
358 // String cmd="chmod 777 "+path; 357 // String cmd="chmod 777 "+path;
......
...@@ -4,7 +4,6 @@ import android.app.Activity; ...@@ -4,7 +4,6 @@ import android.app.Activity;
4 import android.content.Context; 4 import android.content.Context;
5 import android.os.Handler; 5 import android.os.Handler;
6 import android.os.Message; 6 import android.os.Message;
7 import android.util.Log;
8 import android.widget.FrameLayout; 7 import android.widget.FrameLayout;
9 8
10 import com.knowyou_jni.single.SDKUtil; 9 import com.knowyou_jni.single.SDKUtil;
...@@ -139,7 +138,7 @@ public class CocosMediaPlayer { ...@@ -139,7 +138,7 @@ public class CocosMediaPlayer {
139 } 138 }
140 139
141 public static void jsSetPlayURL(String url) { 140 public static void jsSetPlayURL(String url) {
142 Log.d(TAG, "jsSetPlayURL start..." + url); 141 // Log.d(TAG, "jsSetPlayURL start..." + url);
143 mHandler.obtainMessage(JS_EVENT_CALL_SETPLAYURL, url).sendToTarget(); 142 mHandler.obtainMessage(JS_EVENT_CALL_SETPLAYURL, url).sendToTarget();
144 } 143 }
145 144
...@@ -252,7 +251,7 @@ public class CocosMediaPlayer { ...@@ -252,7 +251,7 @@ public class CocosMediaPlayer {
252 private void seekTo(Object obj) { 251 private void seekTo(Object obj) {
253 int time = (int) obj; 252 int time = (int) obj;
254 if (null != mp && (MP_STATE == MP_STATE_PLAYING || MP_STATE == MP_STATE_PAUSED)) { 253 if (null != mp && (MP_STATE == MP_STATE_PLAYING || MP_STATE == MP_STATE_PAUSED)) {
255 Log.d(TAG, "seekTo....." + time); 254 // Log.d(TAG, "seekTo....." + time);
256 mp.seekTo(time * 1000); 255 mp.seekTo(time * 1000);
257 } 256 }
258 } 257 }
...@@ -309,7 +308,7 @@ public class CocosMediaPlayer { ...@@ -309,7 +308,7 @@ public class CocosMediaPlayer {
309 308
310 private void reset() { 309 private void reset() {
311 if (null != mp && MP_STATE == MP_STATE_STOPPED) { 310 if (null != mp && MP_STATE == MP_STATE_STOPPED) {
312 Log.d(TAG, "reset....."); 311 // Log.d(TAG, "reset.....");
313 mp.reset(); 312 mp.reset();
314 MP_STATE = MP_STATE_IDLE; 313 MP_STATE = MP_STATE_IDLE;
315 } 314 }
...@@ -378,7 +377,7 @@ public class CocosMediaPlayer { ...@@ -378,7 +377,7 @@ public class CocosMediaPlayer {
378 } 377 }
379 378
380 private void onInfo(final Object obj) { 379 private void onInfo(final Object obj) {
381 Log.d(TAG, "onInfo start..." + getParam(obj)); 380 // Log.d(TAG, "onInfo start..." + getParam(obj));
382 runOnGlThread(new Runnable() { 381 runOnGlThread(new Runnable() {
383 @Override 382 @Override
384 public void run() { 383 public void run() {
...@@ -388,7 +387,7 @@ public class CocosMediaPlayer { ...@@ -388,7 +387,7 @@ public class CocosMediaPlayer {
388 } 387 }
389 388
390 private void onPrepared(final Object obj) { 389 private void onPrepared(final Object obj) {
391 Log.d(TAG, "onPrepared..." + getParam(obj)); 390 // Log.d(TAG, "onPrepared..." + getParam(obj));
392 MP_STATE = MP_STATE_PREPARED; 391 MP_STATE = MP_STATE_PREPARED;
393 runOnGlThread(new Runnable() { 392 runOnGlThread(new Runnable() {
394 @Override 393 @Override
...@@ -428,7 +427,7 @@ public class CocosMediaPlayer { ...@@ -428,7 +427,7 @@ public class CocosMediaPlayer {
428 } 427 }
429 428
430 private void onError(final Object obj) { 429 private void onError(final Object obj) {
431 Log.d(TAG, "onError start..." + getParam(obj)); 430 // Log.d(TAG, "onError start..." + getParam(obj));
432 runOnGlThread(new Runnable() { 431 runOnGlThread(new Runnable() {
433 @Override 432 @Override
434 public void run() { 433 public void run() {
......
1 package org.cocos2dx.javascript.component; 1 package org.cocos2dx.javascript.component;
2 2
3 import android.content.Context; 3 import android.content.Context;
4 import android.util.Log;
5 import android.webkit.JavascriptInterface; 4 import android.webkit.JavascriptInterface;
6 5
7 import tv.icntv.logsdk.logSDK; 6 import tv.icntv.logsdk.logSDK;
...@@ -22,7 +21,7 @@ public class NativeLogReporterNewTV { ...@@ -22,7 +21,7 @@ public class NativeLogReporterNewTV {
22 } 21 }
23 22
24 public static NativeLogReporterNewTV getInstance(Context context, logSDK sdk) { 23 public static NativeLogReporterNewTV getInstance(Context context, logSDK sdk) {
25 Log.d(TAG, "初始化LogReporter..." + instance); 24 // Log.d(TAG, "初始化LogReporter..." + instance);
26 if (null == instance) { 25 if (null == instance) {
27 instance = new NativeLogReporterNewTV(context, sdk); 26 instance = new NativeLogReporterNewTV(context, sdk);
28 } 27 }
...@@ -31,7 +30,7 @@ public class NativeLogReporterNewTV { ...@@ -31,7 +30,7 @@ public class NativeLogReporterNewTV {
31 30
32 public static void report(int i, String msg) { 31 public static void report(int i, String msg) {
33 if (null != sdk) { 32 if (null != sdk) {
34 Log.d(TAG, "log report | " + i + " " + msg); 33 // Log.d(TAG, "log report | " + i + " " + msg);
35 sdk.logUpload(i, null != msg ? msg : ""); 34 sdk.logUpload(i, null != msg ? msg : "");
36 } 35 }
37 } 36 }
......
...@@ -5,7 +5,6 @@ import android.content.pm.ApplicationInfo; ...@@ -5,7 +5,6 @@ import android.content.pm.ApplicationInfo;
5 import android.content.pm.PackageInfo; 5 import android.content.pm.PackageInfo;
6 import android.content.pm.PackageManager; 6 import android.content.pm.PackageManager;
7 import android.os.Handler; 7 import android.os.Handler;
8 import android.util.Log;
9 import android.view.WindowManager; 8 import android.view.WindowManager;
10 import android.widget.FrameLayout; 9 import android.widget.FrameLayout;
11 import android.widget.Toast; 10 import android.widget.Toast;
...@@ -68,7 +67,7 @@ public class NewTVSDK { ...@@ -68,7 +67,7 @@ public class NewTVSDK {
68 // String newTVAppSecret = "ec695c7b7371db8dbd84a6d01e4c66a9"; 67 // String newTVAppSecret = "ec695c7b7371db8dbd84a6d01e4c66a9";
69 boolean flag=sdk.sdkInit(loginSDK.TYPE_COMMON, newTVChannelCode, newTVAppkey, newTVAppSecret, context);//初始化是成功的 68 boolean flag=sdk.sdkInit(loginSDK.TYPE_COMMON, newTVChannelCode, newTVAppkey, newTVAppSecret, context);//初始化是成功的
70 String retDeviceLogin = sdk.deviceLogin(); 69 String retDeviceLogin = sdk.deviceLogin();
71 Log.d("NewTVSDK", flag+" init->deviceLogin..." + sdk.toString()); 70 // Log.d("NewTVSDK", flag+" init->deviceLogin..." + sdk.toString());
72 logSDK logsdk; 71 logSDK logsdk;
73 AdSDK adsdk = null; 72 AdSDK adsdk = null;
74 ADFrameLayout adfl = null; 73 ADFrameLayout adfl = null;
...@@ -76,7 +75,7 @@ public class NewTVSDK { ...@@ -76,7 +75,7 @@ public class NewTVSDK {
76 if ("1".equals(retDeviceLogin) || "766".equals(retDeviceLogin) || "777".equals(retDeviceLogin) || "891".equals(retDeviceLogin)) { 75 if ("1".equals(retDeviceLogin) || "766".equals(retDeviceLogin) || "777".equals(retDeviceLogin) || "891".equals(retDeviceLogin)) {
77 StringBuffer sbDeviceID = new StringBuffer(); 76 StringBuffer sbDeviceID = new StringBuffer();
78 int retDeviceID = sdk.getDeviceID(sbDeviceID); 77 int retDeviceID = sdk.getDeviceID(sbDeviceID);
79 Log.d(TAG,"init->deviceID"+sbDeviceID.toString()); 78 // Log.d(TAG,"init->deviceID"+sbDeviceID.toString());
80 if (0 == retDeviceID) { 79 if (0 == retDeviceID) {
81 StringBuffer sbLogServer = new StringBuffer(); 80 StringBuffer sbLogServer = new StringBuffer();
82 int getLogServer = sdk.getServerAddress("USER_LOG", sbLogServer); 81 int getLogServer = sdk.getServerAddress("USER_LOG", sbLogServer);
......
...@@ -41,7 +41,7 @@ public class AndroidMediaPlayer implements IMediaPlayer { ...@@ -41,7 +41,7 @@ public class AndroidMediaPlayer implements IMediaPlayer {
41 41
42 @Override 42 @Override
43 public void setArea(int x, int y, int w, int h) { 43 public void setArea(int x, int y, int w, int h) {
44 Log.d(TAG, "x=" + x + " y=" + y); 44 // Log.d(TAG, "x=" + x + " y=" + y);
45 FrameLayout.LayoutParams flp = new FrameLayout.LayoutParams(w, h); 45 FrameLayout.LayoutParams flp = new FrameLayout.LayoutParams(w, h);
46 flp.leftMargin = x; 46 flp.leftMargin = x;
47 flp.topMargin = y; 47 flp.topMargin = y;
...@@ -50,7 +50,7 @@ public class AndroidMediaPlayer implements IMediaPlayer { ...@@ -50,7 +50,7 @@ public class AndroidMediaPlayer implements IMediaPlayer {
50 50
51 @Override 51 @Override
52 public void setPlayURL(String url) { 52 public void setPlayURL(String url) {
53 Log.d("AndroidMediaPlayer:", url); 53 // Log.d("AndroidMediaPlayer:", url);
54 if (null != mp) { 54 if (null != mp) {
55 try { 55 try {
56 mp.setDataSource(url); 56 mp.setDataSource(url);
...@@ -80,7 +80,7 @@ public class AndroidMediaPlayer implements IMediaPlayer { ...@@ -80,7 +80,7 @@ public class AndroidMediaPlayer implements IMediaPlayer {
80 public void prepareAsync() { 80 public void prepareAsync() {
81 if (null != mp) { 81 if (null != mp) {
82 try { 82 try {
83 Log.d(TAG, "异步准备监听"); 83 // Log.d(TAG, "异步准备监听");
84 mp.prepareAsync(); 84 mp.prepareAsync();
85 } catch (IllegalStateException e) { 85 } catch (IllegalStateException e) {
86 e.printStackTrace(); 86 e.printStackTrace();
...@@ -131,7 +131,7 @@ public class AndroidMediaPlayer implements IMediaPlayer { ...@@ -131,7 +131,7 @@ public class AndroidMediaPlayer implements IMediaPlayer {
131 @Override 131 @Override
132 public void setVolume(float leftVolume, float rightVolume) { 132 public void setVolume(float leftVolume, float rightVolume) {
133 if (null != mp) { 133 if (null != mp) {
134 Log.d("AndroidMediaPlayer", "setVolume" + leftVolume + "--" + rightVolume); 134 // Log.d("AndroidMediaPlayer", "setVolume" + leftVolume + "--" + rightVolume);
135 mp.setVolume(leftVolume, rightVolume); 135 mp.setVolume(leftVolume, rightVolume);
136 } 136 }
137 } 137 }
...@@ -146,7 +146,7 @@ public class AndroidMediaPlayer implements IMediaPlayer { ...@@ -146,7 +146,7 @@ public class AndroidMediaPlayer implements IMediaPlayer {
146 @Override 146 @Override
147 public void reset() { 147 public void reset() {
148 if (null != mp) { 148 if (null != mp) {
149 Log.d("AndroidMediaPlayer", "reset..."); 149 // Log.d("AndroidMediaPlayer", "reset...");
150 mp.reset(); 150 mp.reset();
151 } 151 }
152 } 152 }
...@@ -173,7 +173,7 @@ public class AndroidMediaPlayer implements IMediaPlayer { ...@@ -173,7 +173,7 @@ public class AndroidMediaPlayer implements IMediaPlayer {
173 int currentPosition = 0; 173 int currentPosition = 0;
174 if (null != mp) { 174 if (null != mp) {
175 currentPosition = mp.getCurrentPosition(); 175 currentPosition = mp.getCurrentPosition();
176 Log.d("AndroidMediaPlayer", "getCurrentPosition......." + currentPosition); 176 // Log.d("AndroidMediaPlayer", "getCurrentPosition......." + currentPosition);
177 } 177 }
178 return currentPosition; 178 return currentPosition;
179 } 179 }
...@@ -218,7 +218,7 @@ public class AndroidMediaPlayer implements IMediaPlayer { ...@@ -218,7 +218,7 @@ public class AndroidMediaPlayer implements IMediaPlayer {
218 private MediaPlayer.OnPreparedListener onPreparedListener = new MediaPlayer.OnPreparedListener() { 218 private MediaPlayer.OnPreparedListener onPreparedListener = new MediaPlayer.OnPreparedListener() {
219 @Override 219 @Override
220 public void onPrepared(MediaPlayer player) { 220 public void onPrepared(MediaPlayer player) {
221 Log.d(TAG, "播放器准备完成"); 221 // Log.d(TAG, "播放器准备完成");
222 handler.obtainMessage(CocosMediaPlayer.MP_EVENT_ON_PREPARED).sendToTarget(); 222 handler.obtainMessage(CocosMediaPlayer.MP_EVENT_ON_PREPARED).sendToTarget();
223 } 223 }
224 }; 224 };
......
...@@ -3,7 +3,6 @@ package org.cocos2dx.javascript.component.player; ...@@ -3,7 +3,6 @@ package org.cocos2dx.javascript.component.player;
3 import android.content.Context; 3 import android.content.Context;
4 import android.media.AudioManager; 4 import android.media.AudioManager;
5 import android.os.Handler; 5 import android.os.Handler;
6 import android.util.Log;
7 import android.widget.FrameLayout; 6 import android.widget.FrameLayout;
8 7
9 import org.cocos2dx.javascript.component.CocosMediaPlayer; 8 import org.cocos2dx.javascript.component.CocosMediaPlayer;
...@@ -50,7 +49,7 @@ public class NewTVMediaPlayer implements IMediaPlayer { ...@@ -50,7 +49,7 @@ public class NewTVMediaPlayer implements IMediaPlayer {
50 @Override 49 @Override
51 public void setInfo(String info) { 50 public void setInfo(String info) {
52 try { 51 try {
53 Log.d("NewTVMediaPlayer", "setInfo..." + info); 52 // Log.d("NewTVMediaPlayer", "setInfo..." + info);
54 jsonInfo = new JSONObject(info); 53 jsonInfo = new JSONObject(info);
55 } catch (JSONException e) { 54 } catch (JSONException e) {
56 e.printStackTrace(); 55 e.printStackTrace();
...@@ -59,20 +58,20 @@ public class NewTVMediaPlayer implements IMediaPlayer { ...@@ -59,20 +58,20 @@ public class NewTVMediaPlayer implements IMediaPlayer {
59 58
60 @Override 59 @Override
61 public void prepare() { 60 public void prepare() {
62 Log.d("NewTVMediaPlayer", "prepare..."); 61 // Log.d("NewTVMediaPlayer", "prepare...");
63 handler.obtainMessage(CocosMediaPlayer.MP_EVENT_ON_PREPARED).sendToTarget(); 62 handler.obtainMessage(CocosMediaPlayer.MP_EVENT_ON_PREPARED).sendToTarget();
64 } 63 }
65 64
66 @Override 65 @Override
67 public void prepareAsync() { 66 public void prepareAsync() {
68 Log.d("NewTVMediaPlayer", "prepareAsync..."); 67 // Log.d("NewTVMediaPlayer", "prepareAsync...");
69 handler.obtainMessage(CocosMediaPlayer.MP_EVENT_ON_PREPARED).sendToTarget(); 68 handler.obtainMessage(CocosMediaPlayer.MP_EVENT_ON_PREPARED).sendToTarget();
70 } 69 }
71 70
72 @Override 71 @Override
73 public void start() { 72 public void start() {
74 try { 73 try {
75 Log.d("NewTVMediaPlayer", "start..." + jsonInfo.getString("fileCode")); 74 // Log.d("NewTVMediaPlayer", "start..." + jsonInfo.getString("fileCode"));
76 info.setApp_id(jsonInfo.getString("appId")); 75 info.setApp_id(jsonInfo.getString("appId"));
77 info.setCheckType("program"); 76 info.setCheckType("program");
78 info.setPlayUrl(jsonInfo.getString("playURL")); 77 info.setPlayUrl(jsonInfo.getString("playURL"));
...@@ -127,7 +126,7 @@ public class NewTVMediaPlayer implements IMediaPlayer { ...@@ -127,7 +126,7 @@ public class NewTVMediaPlayer implements IMediaPlayer {
127 @Override 126 @Override
128 public void stop() { 127 public void stop() {
129 if (null != mp) { 128 if (null != mp) {
130 Log.d("NewTVMediaPlayer", "stop..."); 129 // Log.d("NewTVMediaPlayer", "stop...");
131 mp.release(); 130 mp.release();
132 mp.quit(); 131 mp.quit();
133 mp = null; 132 mp = null;
......