summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
Diffstat (limited to 'platform')
-rw-r--r--platform/android/java/src/com/android/godot/Godot.java12
-rw-r--r--platform/android/java/src/com/android/godot/payments/GenericConsumeTask.java4
-rw-r--r--platform/android/java/src/com/android/godot/payments/HandlePurchaseTask.java10
-rw-r--r--platform/android/java/src/com/android/godot/payments/PaymentsCache.java4
-rw-r--r--platform/android/java/src/com/android/godot/payments/ReleaseAllConsumablesTask.java12
-rw-r--r--platform/android/java_glue.cpp4
6 files changed, 22 insertions, 24 deletions
diff --git a/platform/android/java/src/com/android/godot/Godot.java b/platform/android/java/src/com/android/godot/Godot.java
index 57b0943a85..f6cd57f4f3 100644
--- a/platform/android/java/src/com/android/godot/Godot.java
+++ b/platform/android/java/src/com/android/godot/Godot.java
@@ -349,12 +349,12 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC
io.unique_id = Secure.getString(getContentResolver(), Secure.ANDROID_ID);
GodotLib.io=io;
Log.d("GODOT", "command_line is null? " + ((command_line == null)?"yes":"no"));
- if(command_line != null){
+ /*if(command_line != null){
Log.d("GODOT", "Command Line:");
for(int w=0;w <command_line.length;w++){
Log.d("GODOT"," " + command_line[w]);
}
- }
+ }*/
GodotLib.initialize(this,io.needsReloadHooks(),command_line);
mSensorManager = (SensorManager) getSystemService(Context.SENSOR_SERVICE);
mAccelerometer = mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);
@@ -418,12 +418,10 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC
}
if (new_args.isEmpty()){
- Log.d("GODOT", "new_args is empty");
command_line=null;
}else{
- Log.d("GODOT", "new_args is not empty");
+
command_line = new_args.toArray(new String[new_args.size()]);
- Log.d("GODOT", "command line is null? " + ( (command_line == null) ? "yes":"no"));
}
if (use_apk_expansion && main_pack_md5!=null && main_pack_key!=null) {
//check that environment is ok!
@@ -461,7 +459,7 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC
}
if (!pack_valid) {
- Log.d("GODOT", "Tengo que bajarme el apk");
+ Log.d("GODOT", "Pack Invalid, try re-downloading.");
Intent notifierIntent = new Intent(this, this.getClass());
notifierIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK |
@@ -472,7 +470,7 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC
int startResult;
try {
- Log.d("GODOT", "INICIANDO DOWNLOAD SERVICE");
+ Log.d("GODOT", "INITIALIZING DOWNLOAD");
startResult = DownloaderClientMarshaller.startDownloadServiceIfRequired(
getApplicationContext(),
pendingIntent,
diff --git a/platform/android/java/src/com/android/godot/payments/GenericConsumeTask.java b/platform/android/java/src/com/android/godot/payments/GenericConsumeTask.java
index 88cf28798e..d68f029246 100644
--- a/platform/android/java/src/com/android/godot/payments/GenericConsumeTask.java
+++ b/platform/android/java/src/com/android/godot/payments/GenericConsumeTask.java
@@ -32,9 +32,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/com/android/godot/payments/HandlePurchaseTask.java b/platform/android/java/src/com/android/godot/payments/HandlePurchaseTask.java
index 24eec9f30b..4c31704cc8 100644
--- a/platform/android/java/src/com/android/godot/payments/HandlePurchaseTask.java
+++ b/platform/android/java/src/com/android/godot/payments/HandlePurchaseTask.java
@@ -28,19 +28,19 @@ abstract public class HandlePurchaseTask {
public void handlePurchaseRequest(int resultCode, Intent data){
- Log.d("XXX", "Handling purchase response");
+// 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);
+ //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);
@@ -58,7 +58,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/com/android/godot/payments/PaymentsCache.java b/platform/android/java/src/com/android/godot/payments/PaymentsCache.java
index 7337acc0b8..1de772bf28 100644
--- a/platform/android/java/src/com/android/godot/payments/PaymentsCache.java
+++ b/platform/android/java/src/com/android/godot/payments/PaymentsCache.java
@@ -31,14 +31,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/com/android/godot/payments/ReleaseAllConsumablesTask.java b/platform/android/java/src/com/android/godot/payments/ReleaseAllConsumablesTask.java
index 2f590a4e68..c1a9c5d421 100644
--- a/platform/android/java/src/com/android/godot/payments/ReleaseAllConsumablesTask.java
+++ b/platform/android/java/src/com/android/godot/payments/ReleaseAllConsumablesTask.java
@@ -28,13 +28,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()));
+// Log.d("godot", String.format("%s %s (%s)", key,
+// value.toString(), value.getClass().getName()));
}
@@ -45,13 +45,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++)
{
@@ -61,7 +61,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_glue.cpp b/platform/android/java_glue.cpp
index f948095c62..ae8174c35a 100644
--- a/platform/android/java_glue.cpp
+++ b/platform/android/java_glue.cpp
@@ -1577,14 +1577,14 @@ JNIEXPORT void JNICALL Java_com_android_godot_GodotLib_calldeferred(JNIEnv * env
int count = env->GetArrayLength(params);
Variant args[VARIANT_ARG_MAX];
- print_line("Java->GD call: "+obj->get_type()+"::"+str_method+" argc "+itos(count));
+// print_line("Java->GD call: "+obj->get_type()+"::"+str_method+" argc "+itos(count));
for (int i=0; i<MIN(count,VARIANT_ARG_MAX); i++) {
jobject obj = env->GetObjectArrayElement(params, i);
if (obj)
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()));
};