diff options
Diffstat (limited to 'platform/android')
21 files changed, 130 insertions, 114 deletions
diff --git a/platform/android/audio_driver_jandroid.cpp b/platform/android/audio_driver_jandroid.cpp index 8c57eaaab6..d9e40a5913 100644 --- a/platform/android/audio_driver_jandroid.cpp +++ b/platform/android/audio_driver_jandroid.cpp @@ -71,7 +71,7 @@ Error AudioDriverAndroid::init(){ } */ -// Android_JNI_SetupThread(); + //Android_JNI_SetupThread(); // __android_log_print(ANDROID_LOG_VERBOSE, "SDL", "SDL audio: opening device"); diff --git a/platform/android/audio_driver_opensl.cpp b/platform/android/audio_driver_opensl.cpp index 5e3cfcbbab..7aec2b174e 100644 --- a/platform/android/audio_driver_opensl.cpp +++ b/platform/android/audio_driver_opensl.cpp @@ -108,7 +108,7 @@ void AudioDriverOpenSL::_buffer_callbacks( AudioDriverOpenSL *ad = (AudioDriverOpenSL*)pContext; -// ad->_buffer_callback(queueItf,eventFlags,pBuffer,bufferSize,dataUsed); + //ad->_buffer_callback(queueItf,eventFlags,pBuffer,bufferSize,dataUsed); ad->_buffer_callback(queueItf); } @@ -271,8 +271,8 @@ void AudioDriverOpenSL::start(){ ERR_FAIL_COND( res !=SL_RESULT_SUCCESS ); SLDataLocator_AndroidSimpleBufferQueue loc_bufq = {SL_DATALOCATOR_ANDROIDSIMPLEBUFFERQUEUE, BUFFER_COUNT}; -// bufferQueue.locatorType = SL_DATALOCATOR_BUFFERQUEUE; -// bufferQueue.numBuffers = BUFFER_COUNT; /* Four buffers in our buffer queue */ + //bufferQueue.locatorType = SL_DATALOCATOR_BUFFERQUEUE; + //bufferQueue.numBuffers = BUFFER_COUNT; /* Four buffers in our buffer queue */ /* Setup the format of the content in the buffer queue */ pcm.formatType = SL_DATAFORMAT_PCM; pcm.numChannels = 2; @@ -295,7 +295,7 @@ void AudioDriverOpenSL::start(){ audioSink.pLocator = (void *)&locator_outputmix; audioSink.pFormat = NULL; /* Initialize the context for Buffer queue callbacks */ -// cntxt.pDataBase = (void*)&pcmData; + //cntxt.pDataBase = (void*)&pcmData; //cntxt.pData = cntxt.pDataBase; //cntxt.size = sizeof(pcmData); /* Set arrays required[] and iidArray[] for SEEK interface diff --git a/platform/android/dir_access_jandroid.cpp b/platform/android/dir_access_jandroid.cpp index b6d4f757f9..2528b18248 100644 --- a/platform/android/dir_access_jandroid.cpp +++ b/platform/android/dir_access_jandroid.cpp @@ -257,7 +257,7 @@ void DirAccessJAndroid::setup( jobject p_io) { __android_log_print(ANDROID_LOG_INFO,"godot","*******GOT METHOD _dir_is_dir ok!!"); } -// (*env)->CallVoidMethod(env,obj,aMethodID, myvar); + //(*env)->CallVoidMethod(env,obj,aMethodID, myvar); } diff --git a/platform/android/export/export.cpp b/platform/android/export/export.cpp index e836258e04..204bf684b7 100644 --- a/platform/android/export/export.cpp +++ b/platform/android/export/export.cpp @@ -729,17 +729,17 @@ void EditorExportPlatformAndroid::_fix_manifest(Vector<uint8_t>& p_manifest,bool } -// print_line("String "+itos(i)+": "+string_table[i]); + //print_line("String "+itos(i)+": "+string_table[i]); } for(uint32_t i=string_end;i<(ofs+size);i++) { stable_extra.push_back(p_manifest[i]); } -// printf("stable extra: %i\n",int(stable_extra.size())); + //printf("stable extra: %i\n",int(stable_extra.size())); string_table_ends=ofs+size; -// print_line("STABLE SIZE: "+itos(size)+" ACTUAL: "+itos(string_table_ends)); + //print_line("STABLE SIZE: "+itos(size)+" ACTUAL: "+itos(string_table_ends)); } break; case CHUNK_XML_START_TAG: { @@ -752,7 +752,7 @@ void EditorExportPlatformAndroid::_fix_manifest(Vector<uint8_t>& p_manifest,bool String tname=string_table[name]; -// printf("NSPACE: %i\n",nspace); + //printf("NSPACE: %i\n",nspace); //printf("NAME: %i (%s)\n",name,tname.utf8().get_data()); //printf("CHECK: %x\n",check); uint32_t attrcount=decode_uint32(&p_manifest[iofs+20]); @@ -1523,7 +1523,7 @@ void EditorExportPlatformAndroid::_device_poll_thread(void *ud) { if (dpos==-1) continue; d=d.substr(0,dpos).strip_edges(); - // print_line("found devuce: "+d); + //print_line("found devuce: "+d); ldevices.push_back(d); } @@ -1602,8 +1602,8 @@ void EditorExportPlatformAndroid::_device_poll_thread(void *ud) { } d.name=vendor+" "+device; - // print_line("name: "+d.name); - // print_line("description: "+d.description); + //print_line("name: "+d.name); + //print_line("description: "+d.description); } @@ -1864,10 +1864,12 @@ bool EditorExportPlatformAndroid::can_export(String *r_error) const { if (apk_expansion) { - //if (apk_expansion_salt=="") { - // valid=false; - // err+="Invalid SALT for apk expansion.\n"; - //} + /* + if (apk_expansion_salt=="") { + valid=false; + err+="Invalid SALT for apk expansion.\n"; + } + */ if (apk_expansion_pkey=="") { valid=false; err+="Invalid public key for apk expansion.\n"; diff --git a/platform/android/file_access_jandroid.cpp b/platform/android/file_access_jandroid.cpp index 4755f1d029..a4e9c191e9 100644 --- a/platform/android/file_access_jandroid.cpp +++ b/platform/android/file_access_jandroid.cpp @@ -236,7 +236,7 @@ void FileAccessJAndroid::setup( jobject p_io) { __android_log_print(ANDROID_LOG_INFO,"godot","*******GOT METHOD _file_close ok!!"); } -// (*env)->CallVoidMethod(env,obj,aMethodID, myvar); + //(*env)->CallVoidMethod(env,obj,aMethodID, myvar); } diff --git a/platform/android/globals/global_defaults.cpp b/platform/android/globals/global_defaults.cpp index 52b59b2dc1..bbf9bd5b0b 100644 --- a/platform/android/globals/global_defaults.cpp +++ b/platform/android/globals/global_defaults.cpp @@ -35,7 +35,7 @@ void register_android_global_defaults() { /* GLOBAL_DEF("rasterizer.Android/use_fragment_lighting",false); GLOBAL_DEF("rasterizer.Android/fp16_framebuffer",false); GLOBAL_DEF("display.Android/driver","GLES2"); -// GLOBAL_DEF("rasterizer.Android/trilinear_mipmap_filter",false); + //GLOBAL_DEF("rasterizer.Android/trilinear_mipmap_filter",false); GlobalConfig::get_singleton()->set_custom_property_info("display.Android/driver",PropertyInfo(Variant::STRING,"display.Android/driver",PROPERTY_HINT_ENUM,"GLES2")); */ diff --git a/platform/android/godot_android.cpp b/platform/android/godot_android.cpp index c4d1a85c5f..3c7f7f5854 100644 --- a/platform/android/godot_android.cpp +++ b/platform/android/godot_android.cpp @@ -535,29 +535,33 @@ static int32_t engine_handle_input(struct android_app* app, AInputEvent* event) case AMOTION_EVENT_ACTION_DOWN: { engine->os->process_touch(0,0,touchvec); - //System.out.printf("action down at: %f,%f\n", event.getX(),event.getY()); + //System.out.printf("action down at: %f,%f\n", event.getX(),event.getY()); } break; case AMOTION_EVENT_ACTION_MOVE: { engine->os->process_touch(1,0,touchvec); - //for(int i=0;i<event.getPointerCount();i++) { - // System.out.printf("%d - moved to: %f,%f\n",i, event.getX(i),event.getY(i)); - //} + /* + for(int i=0;i<event.getPointerCount();i++) { + System.out.printf("%d - moved to: %f,%f\n",i, event.getX(i),event.getY(i)); + } + */ } break; case AMOTION_EVENT_ACTION_POINTER_UP: { engine->os->process_touch(4,pidx,touchvec); - //System.out.printf("%d - s.up at: %f,%f\n",pointer_idx, event.getX(pointer_idx),event.getY(pointer_idx)); + //System.out.printf("%d - s.up at: %f,%f\n",pointer_idx, event.getX(pointer_idx),event.getY(pointer_idx)); } break; case AMOTION_EVENT_ACTION_POINTER_DOWN: { engine->os->process_touch(3,pidx,touchvec); - //System.out.printf("%d - s.down at: %f,%f\n",pointer_idx, event.getX(pointer_idx),event.getY(pointer_idx)); + //System.out.printf("%d - s.down at: %f,%f\n",pointer_idx, event.getX(pointer_idx),event.getY(pointer_idx)); } break; case AMOTION_EVENT_ACTION_CANCEL: case AMOTION_EVENT_ACTION_UP: { engine->os->process_touch(2,0,touchvec); - //for(int i=0;i<event.getPointerCount();i++) { - // System.out.printf("%d - up! %f,%f\n",i, event.getX(i),event.getY(i)); - //} + /* + for(int i=0;i<event.getPointerCount();i++) { + System.out.printf("%d - up! %f,%f\n",i, event.getX(i),event.getY(i)); + } + */ } break; } @@ -638,8 +642,8 @@ static void engine_handle_cmd(struct android_app* app, int32_t cmd) { } break; case APP_CMD_INIT_WINDOW: - //The window is being shown, get it ready. - // LOGI("INIT WINDOW"); + //The window is being shown, get it ready. + //LOGI("INIT WINDOW"); if (engine->app->window != NULL) { if (engine->os==NULL) { @@ -647,7 +651,7 @@ static void engine_handle_cmd(struct android_app* app, int32_t cmd) { //do initialization here, when there's OpenGL! hackish but the only way engine->os = new OS_Android(_gfx_init,engine); - // char *args[]={"-test","gui",NULL}; + //char *args[]={"-test","gui",NULL}; __android_log_print(ANDROID_LOG_INFO,"godot","pre asdasd setup..."); #if 0 Error err = Main::setup("apk",2,args); @@ -722,15 +726,15 @@ static void engine_handle_cmd(struct android_app* app, int32_t cmd) { engine->animating=1; engine_draw_frame(engine); } - break; + break; case APP_CMD_TERM_WINDOW: - // The window is being hidden or closed, clean it up. - // LOGI("TERM WINDOW"); - engine_term_display(engine); - break; + // The window is being hidden or closed, clean it up. + //LOGI("TERM WINDOW"); + engine_term_display(engine); + break; case APP_CMD_GAINED_FOCUS: - // When our app gains focus, we start monitoring the accelerometer. - if (engine->accelerometerSensor != NULL) { + // When our app gains focus, we start monitoring the accelerometer. + if (engine->accelerometerSensor != NULL) { ASensorEventQueue_enableSensor(engine->sensorEventQueue, engine->accelerometerSensor); // We'd like to get 60 events per second (in us). @@ -833,7 +837,7 @@ void android_main(struct android_app* state) { // Process this event. if (source != NULL) { - // LOGI("process\n"); + // LOGI("process\n"); source->process(state, source); } else { nullmax--; @@ -883,12 +887,12 @@ void android_main(struct android_app* state) { return; } -// LOGI("end\n"); + // LOGI("end\n"); } -// LOGI("engine animating? %i\n",engine.animating); + // LOGI("engine animating? %i\n",engine.animating); if (engine.animating) { //do os render diff --git a/platform/android/java/src/org/godotengine/godot/Godot.java b/platform/android/java/src/org/godotengine/godot/Godot.java index 94d29a3350..610f707b47 100644 --- a/platform/android/java/src/org/godotengine/godot/Godot.java +++ b/platform/android/java/src/org/godotengine/godot/Godot.java @@ -257,8 +257,8 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC public void onVideoInit(boolean use_gl2) { -// mView = new GodotView(getApplication(),io,use_gl2); -// setContentView(mView); + //mView = new GodotView(getApplication(),io,use_gl2); + //setContentView(mView); layout = new FrameLayout(this); layout.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.FILL_PARENT)); @@ -582,7 +582,7 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC initializeGodot(); - // instanceSingleton( new GodotFacebook(this) ); + //instanceSingleton( new GodotFacebook(this) ); } @@ -804,9 +804,11 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC } break; case MotionEvent.ACTION_MOVE: { GodotLib.touch(1,0,evcount,arr); - //for(int i=0;i<event.getPointerCount();i++) { - // System.out.printf("%d - moved to: %f,%f\n",i, event.getX(i),event.getY(i)); - //} + /* + for(int i=0;i<event.getPointerCount();i++) { + System.out.printf("%d - moved to: %f,%f\n",i, event.getX(i),event.getY(i)); + } + */ } break; case MotionEvent.ACTION_POINTER_UP: { final int indexPointUp = event.getActionIndex(); @@ -822,9 +824,11 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC case MotionEvent.ACTION_CANCEL: case MotionEvent.ACTION_UP: { GodotLib.touch(2,0,evcount,arr); - //for(int i=0;i<event.getPointerCount();i++) { - // System.out.printf("%d - up! %f,%f\n",i, event.getX(i),event.getY(i)); - //} + /* + for(int i=0;i<event.getPointerCount();i++) { + System.out.printf("%d - up! %f,%f\n",i, event.getX(i),event.getY(i)); + } + */ } break; } @@ -866,9 +870,11 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC return mPaymentsManager; } -// public void setPaymentsManager(PaymentsManager mPaymentsManager) { -// this.mPaymentsManager = mPaymentsManager; -// }; + /* + public void setPaymentsManager(PaymentsManager mPaymentsManager) { + this.mPaymentsManager = mPaymentsManager; + } + */ // Audio diff --git a/platform/android/java/src/org/godotengine/godot/GodotDownloaderService.java b/platform/android/java/src/org/godotengine/godot/GodotDownloaderService.java index 878528f7c7..fba082e80d 100644 --- a/platform/android/java/src/org/godotengine/godot/GodotDownloaderService.java +++ b/platform/android/java/src/org/godotengine/godot/GodotDownloaderService.java @@ -57,7 +57,7 @@ public class GodotDownloaderService extends DownloaderService { Log.d("GODOT", "getting public key:" + prefs.getString("store_public_key", null)); return prefs.getString("store_public_key", null); -// return BASE64_PUBLIC_KEY; + //return BASE64_PUBLIC_KEY; } /** diff --git a/platform/android/java/src/org/godotengine/godot/GodotView.java b/platform/android/java/src/org/godotengine/godot/GodotView.java index db67144bcc..4cfe295835 100644 --- a/platform/android/java/src/org/godotengine/godot/GodotView.java +++ b/platform/android/java/src/org/godotengine/godot/GodotView.java @@ -265,7 +265,7 @@ public class GodotView extends GLSurfaceView implements InputDeviceListener { if (keyCode == KeyEvent.KEYCODE_BACK) { GodotLib.quit(); // press 'back' button should not terminate program - // normal handle 'back' event in game logic + //normal handle 'back' event in game logic return true; } diff --git a/platform/android/java/src/org/godotengine/godot/payments/ConsumeTask.java b/platform/android/java/src/org/godotengine/godot/payments/ConsumeTask.java index 13a24994f8..67293df2a8 100644 --- a/platform/android/java/src/org/godotengine/godot/payments/ConsumeTask.java +++ b/platform/android/java/src/org/godotengine/godot/payments/ConsumeTask.java @@ -47,19 +47,19 @@ abstract public class ConsumeTask { public void consume(final String sku){ -// Log.d("XXX", "Consuming product " + sku); + //Log.d("XXX", "Consuming product " + sku); PaymentsCache pc = new PaymentsCache(context); Boolean isBlocked = pc.getConsumableFlag("block", sku); String _token = pc.getConsumableValue("token", sku); -// Log.d("XXX", "token " + _token); + //Log.d("XXX", "token " + _token); if(!isBlocked && _token == null){ -// _token = "inapp:"+context.getPackageName()+":android.test.purchased"; -// Log.d("XXX", "Consuming product " + sku + " with token " + _token); + //_token = "inapp:"+context.getPackageName()+":android.test.purchased"; + //Log.d("XXX", "Consuming product " + sku + " with token " + _token); }else if(!isBlocked){ -// Log.d("XXX", "It is not blocked ¿?"); + //Log.d("XXX", "It is not blocked ¿?"); return; }else if(_token == null){ -// Log.d("XXX", "No token available"); + //Log.d("XXX", "No token available"); this.error("No token for sku:" + sku); return; } @@ -69,9 +69,9 @@ abstract public class ConsumeTask { @Override protected String doInBackground(String... params) { try { -// Log.d("XXX", "Requesting to release item."); + //Log.d("XXX", "Requesting to release item."); int response = mService.consumePurchase(3, context.getPackageName(), token); -// Log.d("XXX", "release response code: " + response); + //Log.d("XXX", "release response code: " + response); if(response == 0 || response == 8){ return null; } diff --git a/platform/android/java/src/org/godotengine/godot/payments/GenericConsumeTask.java b/platform/android/java/src/org/godotengine/godot/payments/GenericConsumeTask.java index 20feaef581..dfa363ed75 100644 --- a/platform/android/java/src/org/godotengine/godot/payments/GenericConsumeTask.java +++ b/platform/android/java/src/org/godotengine/godot/payments/GenericConsumeTask.java @@ -60,9 +60,9 @@ abstract public class GenericConsumeTask extends AsyncTask<String, String, Strin @Override protected String doInBackground(String... params) { try { -// Log.d("godot", "Requesting to consume an item with token ." + token); + //Log.d("godot", "Requesting to consume an item with token ." + token); int response = mService.consumePurchase(3, context.getPackageName(), token); -// Log.d("godot", "consumePurchase response: " + response); + //Log.d("godot", "consumePurchase response: " + response); if(response == 0 || response == 8){ return null; } diff --git a/platform/android/java/src/org/godotengine/godot/payments/HandlePurchaseTask.java b/platform/android/java/src/org/godotengine/godot/payments/HandlePurchaseTask.java index 1aa210265d..3850453a77 100644 --- a/platform/android/java/src/org/godotengine/godot/payments/HandlePurchaseTask.java +++ b/platform/android/java/src/org/godotengine/godot/payments/HandlePurchaseTask.java @@ -56,29 +56,29 @@ abstract public class HandlePurchaseTask { public void handlePurchaseRequest(int resultCode, Intent data){ -// Log.d("XXX", "Handling purchase response"); -// int responseCode = data.getIntExtra("RESPONSE_CODE", 0); + //Log.d("XXX", "Handling purchase response"); + //int responseCode = data.getIntExtra("RESPONSE_CODE", 0); PaymentsCache pc = new PaymentsCache(context); String purchaseData = data.getStringExtra("INAPP_PURCHASE_DATA"); -// Log.d("XXX", "Purchase data:" + purchaseData); + //Log.d("XXX", "Purchase data:" + purchaseData); String dataSignature = data.getStringExtra("INAPP_DATA_SIGNATURE"); //Log.d("XXX", "Purchase signature:" + dataSignature); if (resultCode == Activity.RESULT_OK) { try { -// Log.d("SARLANGA", purchaseData); + //Log.d("SARLANGA", purchaseData); JSONObject jo = new JSONObject(purchaseData); -// String sku = jo.getString("productId"); -// alert("You have bought the " + sku + ". Excellent choice, aventurer!"); -// String orderId = jo.getString("orderId"); -// String packageName = jo.getString("packageName"); + //String sku = jo.getString("productId"); + //alert("You have bought the " + sku + ". Excellent choice, aventurer!"); + //String orderId = jo.getString("orderId"); + //String packageName = jo.getString("packageName"); String productId = jo.getString("productId"); -// Long purchaseTime = jo.getLong("purchaseTime"); -// Integer state = jo.getInt("purchaseState"); + //Long purchaseTime = jo.getLong("purchaseTime"); + //Integer state = jo.getInt("purchaseState"); String developerPayload = jo.getString("developerPayload"); String purchaseToken = jo.getString("purchaseToken"); @@ -86,7 +86,7 @@ abstract public class HandlePurchaseTask { error("Untrusted callback"); return; } -// Log.d("XXX", "Este es el product ID:" + productId); + //Log.d("XXX", "Este es el product ID:" + productId); pc.setConsumableValue("ticket_signautre", productId, dataSignature); pc.setConsumableValue("ticket", productId, purchaseData); pc.setConsumableFlag("block", productId, true); diff --git a/platform/android/java/src/org/godotengine/godot/payments/PaymentsCache.java b/platform/android/java/src/org/godotengine/godot/payments/PaymentsCache.java index 88fd1a0fe4..4678dae1b3 100644 --- a/platform/android/java/src/org/godotengine/godot/payments/PaymentsCache.java +++ b/platform/android/java/src/org/godotengine/godot/payments/PaymentsCache.java @@ -59,14 +59,14 @@ public class PaymentsCache { SharedPreferences sharedPref = context.getSharedPreferences("consumables_" + set, Context.MODE_PRIVATE); SharedPreferences.Editor editor = sharedPref.edit(); editor.putString(sku, value); -// Log.d("XXX", "Setting asset: consumables_" + set + ":" + sku); + //Log.d("XXX", "Setting asset: consumables_" + set + ":" + sku); editor.commit(); } public String getConsumableValue(String set, String sku){ SharedPreferences sharedPref = context.getSharedPreferences( "consumables_" + set, Context.MODE_PRIVATE); -// Log.d("XXX", "Getting asset: consumables_" + set + ":" + sku); + //Log.d("XXX", "Getting asset: consumables_" + set + ":" + sku); return sharedPref.getString(sku, null); } diff --git a/platform/android/java/src/org/godotengine/godot/payments/PurchaseTask.java b/platform/android/java/src/org/godotengine/godot/payments/PurchaseTask.java index d154ef0c78..5ad96b35ee 100644 --- a/platform/android/java/src/org/godotengine/godot/payments/PurchaseTask.java +++ b/platform/android/java/src/org/godotengine/godot/payments/PurchaseTask.java @@ -63,18 +63,20 @@ abstract public class PurchaseTask { Log.d("XXX", "Starting purchase for: " + sku); PaymentsCache pc = new PaymentsCache(context); Boolean isBlocked = pc.getConsumableFlag("block", sku); -// if(isBlocked){ -// Log.d("XXX", "Is awaiting payment confirmation"); -// error("Awaiting payment confirmation"); -// return; -// } + /* + if(isBlocked){ + Log.d("XXX", "Is awaiting payment confirmation"); + error("Awaiting payment confirmation"); + return; + } + */ final String hash = transactionId; Bundle buyIntentBundle; try { buyIntentBundle = mService.getBuyIntent(3, context.getApplicationContext().getPackageName(), sku, "inapp", hash ); } catch (RemoteException e) { -// Log.d("XXX", "Error: " + e.getMessage()); + //Log.d("XXX", "Error: " + e.getMessage()); error(e.getMessage()); return; } @@ -87,7 +89,7 @@ abstract public class PurchaseTask { }else if( rc instanceof Long){ responseCode = (int)((Long)rc).longValue(); } -// Log.d("XXX", "Buy intent response code: " + responseCode); + //Log.d("XXX", "Buy intent response code: " + responseCode); if(responseCode == 1 || responseCode == 3 || responseCode == 4){ canceled(); return; @@ -102,12 +104,12 @@ abstract public class PurchaseTask { pc.setConsumableValue("validation_hash", sku, hash); try { if(context == null){ -// Log.d("XXX", "No context!"); + //Log.d("XXX", "No context!"); } if(pendingIntent == null){ -// Log.d("XXX", "No pending intent"); + //Log.d("XXX", "No pending intent"); } -// Log.d("XXX", "Starting activity for purchase!"); + //Log.d("XXX", "Starting activity for purchase!"); context.startIntentSenderForResult( pendingIntent.getIntentSender(), PaymentsManager.REQUEST_CODE_FOR_PURCHASE, diff --git a/platform/android/java/src/org/godotengine/godot/payments/ReleaseAllConsumablesTask.java b/platform/android/java/src/org/godotengine/godot/payments/ReleaseAllConsumablesTask.java index c74269890d..60a43a9070 100644 --- a/platform/android/java/src/org/godotengine/godot/payments/ReleaseAllConsumablesTask.java +++ b/platform/android/java/src/org/godotengine/godot/payments/ReleaseAllConsumablesTask.java @@ -56,13 +56,13 @@ abstract public class ReleaseAllConsumablesTask { public void consumeItAll(){ try{ -// Log.d("godot", "consumeItall for " + context.getPackageName()); + //Log.d("godot", "consumeItall for " + context.getPackageName()); Bundle bundle = mService.getPurchases(3, context.getPackageName(), "inapp",null); for (String key : bundle.keySet()) { - Object value = bundle.get(key); -// Log.d("godot", String.format("%s %s (%s)", key, -// value.toString(), value.getClass().getName())); + Object value = bundle.get(key); + //Log.d("godot", String.format("%s %s (%s)", key, + //value.toString(), value.getClass().getName())); } @@ -73,13 +73,13 @@ abstract public class ReleaseAllConsumablesTask { if (myPurchases == null || myPurchases.size() == 0){ -// Log.d("godot", "No purchases!"); + //Log.d("godot", "No purchases!"); notRequired(); return; } -// Log.d("godot", "# products to be consumed:" + myPurchases.size()); + //Log.d("godot", "# products to be consumed:" + myPurchases.size()); for (int i=0;i<myPurchases.size();i++) { @@ -89,7 +89,7 @@ abstract public class ReleaseAllConsumablesTask { String sku = inappPurchaseData.getString("productId"); String token = inappPurchaseData.getString("purchaseToken"); String signature = mySignatures.get(i); -// Log.d("godot", "A punto de consumir un item con token:" + token + "\n" + receipt); + //Log.d("godot", "A punto de consumir un item con token:" + token + "\n" + receipt); new GenericConsumeTask(context, mService, sku, receipt,signature, token) { @Override diff --git a/platform/android/java/src/org/godotengine/godot/payments/ValidateTask.java b/platform/android/java/src/org/godotengine/godot/payments/ValidateTask.java index dafab13ad7..f09bcbf9a4 100644 --- a/platform/android/java/src/org/godotengine/godot/payments/ValidateTask.java +++ b/platform/android/java/src/org/godotengine/godot/payments/ValidateTask.java @@ -79,14 +79,14 @@ abstract public class ValidateTask { param.put("ticket", pc.getConsumableValue("ticket", sku)); param.put("purchaseToken", pc.getConsumableValue("token", sku)); param.put("sku", sku); -// Log.d("XXX", "Haciendo request a " + url); -// Log.d("XXX", "ticket: " + pc.getConsumableValue("ticket", sku)); -// Log.d("XXX", "purchaseToken: " + pc.getConsumableValue("token", sku)); -// Log.d("XXX", "sku: " + sku); + //Log.d("XXX", "Haciendo request a " + url); + //Log.d("XXX", "ticket: " + pc.getConsumableValue("ticket", sku)); + //Log.d("XXX", "purchaseToken: " + pc.getConsumableValue("token", sku)); + //Log.d("XXX", "sku: " + sku); param.put("package", context.getApplicationContext().getPackageName()); HttpRequester requester = new HttpRequester(); String jsonResponse = requester.post(param); -// Log.d("XXX", "Validation response:\n"+jsonResponse); + //Log.d("XXX", "Validation response:\n"+jsonResponse); return jsonResponse; } diff --git a/platform/android/java/src/org/godotengine/godot/utils/HttpRequester.java b/platform/android/java/src/org/godotengine/godot/utils/HttpRequester.java index 9dd08a9563..faefbbd2c6 100644 --- a/platform/android/java/src/org/godotengine/godot/utils/HttpRequester.java +++ b/platform/android/java/src/org/godotengine/godot/utils/HttpRequester.java @@ -78,12 +78,12 @@ public class HttpRequester { private long cttl=0; public HttpRequester(){ -// Log.d("XXX", "Creando http request sin contexto"); + //Log.d("XXX", "Creando http request sin contexto"); } public HttpRequester(Context context){ this.context=context; -// Log.d("XXX", "Creando http request con contexto"); + //Log.d("XXX", "Creando http request con contexto"); } public String post(RequestParams params){ @@ -99,7 +99,7 @@ public class HttpRequester { public String get(RequestParams params){ String response = getResponseFromCache(params.getUrl()); if(response == null){ -// Log.d("XXX", "Cache miss!"); + //Log.d("XXX", "Cache miss!"); HttpGet httpget = new HttpGet(params.getUrl()); long timeInit = new Date().getTime(); response = request(httpget); @@ -117,7 +117,7 @@ public class HttpRequester { } private String request(HttpUriRequest request){ -// Log.d("XXX", "Haciendo request a: " + request.getURI() ); + //Log.d("XXX", "Haciendo request a: " + request.getURI() ); Log.d("PPP", "Haciendo request a: " + request.getURI() ); long init = new Date().getTime(); HttpClient httpclient = getNewHttpClient(); @@ -128,10 +128,10 @@ public class HttpRequester { try { HttpResponse response = httpclient.execute(request); Log.d("PPP", "Fin de request (" + (new Date().getTime() - init) + ") a: " + request.getURI() ); -// Log.d("XXX1", "Status:" + response.getStatusLine().toString()); + //Log.d("XXX1", "Status:" + response.getStatusLine().toString()); if(response.getStatusLine().getStatusCode() == 200){ String strResponse = EntityUtils.toString(response.getEntity()); -// Log.d("XXX2", strResponse); + //Log.d("XXX2", strResponse); return strResponse; }else{ Log.d("XXX3", "Response status code:" + response.getStatusLine().getStatusCode() + "\n" + EntityUtils.toString(response.getEntity())); @@ -192,7 +192,7 @@ public class HttpRequester { public void saveResponseIntoCache(String request, String response){ if(context == null){ -// Log.d("XXX", "No context, cache failed!"); + //Log.d("XXX", "No context, cache failed!"); return; } SharedPreferences sharedPref = context.getSharedPreferences("http_get_cache", Context.MODE_PRIVATE); diff --git a/platform/android/java_class_wrapper.cpp b/platform/android/java_class_wrapper.cpp index 296ac0a831..9acda005f1 100644 --- a/platform/android/java_class_wrapper.cpp +++ b/platform/android/java_class_wrapper.cpp @@ -1240,7 +1240,7 @@ Ref<JavaClass> JavaClassWrapper::wrap(const String& p_class) { //args[i] = _jobject_to_variant(env, obj); -// print_line("\targ"+itos(i)+": "+Variant::get_type_name(args[i].get_type())); + //print_line("\targ"+itos(i)+": "+Variant::get_type_name(args[i].get_type())); }; diff --git a/platform/android/java_glue.cpp b/platform/android/java_glue.cpp index a691e60575..dfbb437344 100644 --- a/platform/android/java_glue.cpp +++ b/platform/android/java_glue.cpp @@ -802,7 +802,7 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_initialize(JNIEnv * e env->GetJavaVM(&jvm); _godot_instance=env->NewGlobalRef(activity); -// _godot_instance=activity; + //_godot_instance=activity; __android_log_print(ANDROID_LOG_INFO,"godot","***************** HELLO FROM JNI!!!!!!!!"); @@ -879,7 +879,7 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_initialize(JNIEnv * e if (!rawString) { __android_log_print(ANDROID_LOG_INFO,"godot","cmdline arg %i is null\n",i); } else { - // __android_log_print(ANDROID_LOG_INFO,"godot","cmdline arg %i is: %s\n",i,rawString); + //__android_log_print(ANDROID_LOG_INFO,"godot","cmdline arg %i is: %s\n",i,rawString); if (strcmp(rawString,"-main_pack")==0) use_apk_expansion=true; @@ -1151,8 +1151,10 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_touch(JNIEnv * env, j pointer_events.push_back(jpe); input_mutex->unlock(); - //if (os_android) -// os_android->process_touch(ev,pointer,points); + /* + if (os_android) + os_android->process_touch(ev,pointer,points); + */ } @@ -1753,7 +1755,7 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_calldeferred(JNIEnv * args[i] = _jobject_to_variant(env, obj); env->DeleteLocalRef(obj); -// print_line("\targ"+itos(i)+": "+Variant::get_type_name(args[i].get_type())); + //print_line("\targ"+itos(i)+": "+Variant::get_type_name(args[i].get_type())); }; diff --git a/platform/android/os_android.cpp b/platform/android/os_android.cpp index 3fcb6949ac..562666b679 100644 --- a/platform/android/os_android.cpp +++ b/platform/android/os_android.cpp @@ -399,7 +399,7 @@ void OS_Android::process_event(InputEvent p_event) { void OS_Android::process_touch(int p_what,int p_pointer, const Vector<TouchPos>& p_points) { -// print_line("ev: "+itos(p_what)+" pnt: "+itos(p_pointer)+" pointc: "+itos(p_points.size())); + //print_line("ev: "+itos(p_what)+" pnt: "+itos(p_pointer)+" pointc: "+itos(p_points.size())); switch(p_what) { case 0: { //gesture begin |