You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks
Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027.
This commit is contained in:
@@ -39,7 +39,6 @@ import com.android.vending.billing.IInAppBillingService;
|
||||
import java.lang.ref.WeakReference;
|
||||
|
||||
abstract public class ConsumeTask {
|
||||
|
||||
private Context context;
|
||||
private IInAppBillingService mService;
|
||||
|
||||
@@ -47,7 +46,6 @@ abstract public class ConsumeTask {
|
||||
private String mToken;
|
||||
|
||||
private static class ConsumeAsyncTask extends AsyncTask<String, String, String> {
|
||||
|
||||
private WeakReference<ConsumeTask> mTask;
|
||||
|
||||
ConsumeAsyncTask(ConsumeTask consume) {
|
||||
|
||||
@@ -47,7 +47,6 @@ import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
public class GodotPayment extends GodotPlugin {
|
||||
|
||||
private Integer purchaseCallbackId = 0;
|
||||
private String accessToken;
|
||||
private String purchaseValidationUrlPrefix;
|
||||
|
||||
@@ -37,7 +37,6 @@ import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
abstract public class HandlePurchaseTask {
|
||||
|
||||
private Activity context;
|
||||
|
||||
public HandlePurchaseTask(Activity context) {
|
||||
|
||||
@@ -34,7 +34,6 @@ import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
|
||||
public class PaymentsCache {
|
||||
|
||||
public Context context;
|
||||
|
||||
public PaymentsCache(Context context) {
|
||||
|
||||
@@ -50,7 +50,6 @@ import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
public class PaymentsManager {
|
||||
|
||||
public static final int BILLING_RESPONSE_RESULT_OK = 0;
|
||||
public static final int REQUEST_CODE_FOR_PURCHASE = 0x1001;
|
||||
private static boolean auto_consume = true;
|
||||
@@ -158,7 +157,6 @@ public class PaymentsManager {
|
||||
Bundle bundle = mService.getPurchases(3, activity.getPackageName(), "inapp", continueToken);
|
||||
|
||||
if (bundle.getInt("RESPONSE_CODE") == 0) {
|
||||
|
||||
final ArrayList<String> myPurchases = bundle.getStringArrayList("INAPP_PURCHASE_DATA_LIST");
|
||||
final ArrayList<String> mySignatures = bundle.getStringArrayList("INAPP_DATA_SIGNATURE_LIST");
|
||||
|
||||
@@ -168,7 +166,6 @@ public class PaymentsManager {
|
||||
}
|
||||
|
||||
for (int i = 0; i < myPurchases.size(); i++) {
|
||||
|
||||
try {
|
||||
String receipt = myPurchases.get(i);
|
||||
JSONObject inappPurchaseData = new JSONObject(receipt);
|
||||
@@ -229,11 +226,9 @@ public class PaymentsManager {
|
||||
}
|
||||
|
||||
public void validatePurchase(String purchaseToken, final String sku) {
|
||||
|
||||
new ValidateTask(activity, godotPayment) {
|
||||
@Override
|
||||
protected void success() {
|
||||
|
||||
new ConsumeTask(mService, activity) {
|
||||
@Override
|
||||
protected void success(String ticket) {
|
||||
|
||||
@@ -41,7 +41,6 @@ import android.util.Log;
|
||||
import com.android.vending.billing.IInAppBillingService;
|
||||
|
||||
abstract public class PurchaseTask {
|
||||
|
||||
private Activity context;
|
||||
|
||||
private IInAppBillingService mService;
|
||||
|
||||
@@ -44,12 +44,10 @@ import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
abstract public class ReleaseAllConsumablesTask {
|
||||
|
||||
private Context context;
|
||||
private IInAppBillingService mService;
|
||||
|
||||
private static class ReleaseAllConsumablesAsyncTask extends AsyncTask<String, String, String> {
|
||||
|
||||
private WeakReference<ReleaseAllConsumablesTask> mTask;
|
||||
private String mSku;
|
||||
private String mReceipt;
|
||||
@@ -94,7 +92,6 @@ abstract public class ReleaseAllConsumablesTask {
|
||||
Bundle bundle = mService.getPurchases(3, context.getPackageName(), "inapp", null);
|
||||
|
||||
if (bundle.getInt("RESPONSE_CODE") == 0) {
|
||||
|
||||
final ArrayList<String> myPurchases = bundle.getStringArrayList("INAPP_PURCHASE_DATA_LIST");
|
||||
final ArrayList<String> mySignatures = bundle.getStringArrayList("INAPP_DATA_SIGNATURE_LIST");
|
||||
|
||||
@@ -106,7 +103,6 @@ abstract public class ReleaseAllConsumablesTask {
|
||||
|
||||
//Log.d("godot", "# products to be consumed:" + myPurchases.size());
|
||||
for (int i = 0; i < myPurchases.size(); i++) {
|
||||
|
||||
try {
|
||||
String receipt = myPurchases.get(i);
|
||||
JSONObject inappPurchaseData = new JSONObject(receipt);
|
||||
|
||||
@@ -43,7 +43,6 @@ import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
abstract public class ValidateTask {
|
||||
|
||||
private Activity context;
|
||||
private GodotPayment godotPayments;
|
||||
private ProgressDialog dialog;
|
||||
|
||||
@@ -71,7 +71,6 @@ import org.apache.http.util.EntityUtils;
|
||||
* @author Luis Linietsky <luis.linietsky@gmail.com>
|
||||
*/
|
||||
public class HttpRequester {
|
||||
|
||||
private Context context;
|
||||
private static final int TTL = 600000; // 10 minutos
|
||||
private long cttl = 0;
|
||||
|
||||
@@ -42,7 +42,6 @@ import org.apache.http.message.BasicNameValuePair;
|
||||
* @author Luis Linietsky <luis.linietsky@gmail.com>
|
||||
*/
|
||||
public class RequestParams {
|
||||
|
||||
private HashMap<String, String> params;
|
||||
private String url;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user