mirror of https://github.com/M66B/FairEmail.git
Fixed warnings
This commit is contained in:
parent
7e2a005893
commit
8fa9664939
|
@ -225,7 +225,7 @@ public class ActivityBilling extends ActivityBase implements PurchasesUpdatedLis
|
||||||
billingClient.querySkuDetailsAsync(builder.build(),
|
billingClient.querySkuDetailsAsync(builder.build(),
|
||||||
new SkuDetailsResponseListener() {
|
new SkuDetailsResponseListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onSkuDetailsResponse(BillingResult r, List<SkuDetails> skuDetailsList) {
|
public void onSkuDetailsResponse(@NonNull BillingResult r, List<SkuDetails> skuDetailsList) {
|
||||||
if (r.getResponseCode() == BillingClient.BillingResponseCode.OK) {
|
if (r.getResponseCode() == BillingClient.BillingResponseCode.OK) {
|
||||||
if (skuDetailsList.size() == 0)
|
if (skuDetailsList.size() == 0)
|
||||||
reportError(null, "Unknown SKU=" + sku);
|
reportError(null, "Unknown SKU=" + sku);
|
||||||
|
@ -258,7 +258,7 @@ public class ActivityBilling extends ActivityBase implements PurchasesUpdatedLis
|
||||||
private void onPurchaseCheck(Intent intent) {
|
private void onPurchaseCheck(Intent intent) {
|
||||||
billingClient.queryPurchaseHistoryAsync(BillingClient.SkuType.INAPP, new PurchaseHistoryResponseListener() {
|
billingClient.queryPurchaseHistoryAsync(BillingClient.SkuType.INAPP, new PurchaseHistoryResponseListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onPurchaseHistoryResponse(BillingResult result, List<PurchaseHistoryRecord> records) {
|
public void onPurchaseHistoryResponse(@NonNull BillingResult result, List<PurchaseHistoryRecord> records) {
|
||||||
if (result.getResponseCode() == BillingClient.BillingResponseCode.OK) {
|
if (result.getResponseCode() == BillingClient.BillingResponseCode.OK) {
|
||||||
for (PurchaseHistoryRecord record : records)
|
for (PurchaseHistoryRecord record : records)
|
||||||
Log.i("IAB history=" + record.toString());
|
Log.i("IAB history=" + record.toString());
|
||||||
|
@ -452,7 +452,7 @@ public class ActivityBilling extends ActivityBase implements PurchasesUpdatedLis
|
||||||
billingClient.querySkuDetailsAsync(builder.build(),
|
billingClient.querySkuDetailsAsync(builder.build(),
|
||||||
new SkuDetailsResponseListener() {
|
new SkuDetailsResponseListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onSkuDetailsResponse(BillingResult result, List<SkuDetails> skuDetailsList) {
|
public void onSkuDetailsResponse(@NonNull BillingResult result, List<SkuDetails> skuDetailsList) {
|
||||||
if (result.getResponseCode() == BillingClient.BillingResponseCode.OK) {
|
if (result.getResponseCode() == BillingClient.BillingResponseCode.OK) {
|
||||||
for (SkuDetails skuDetail : skuDetailsList) {
|
for (SkuDetails skuDetail : skuDetailsList) {
|
||||||
Log.i("IAB SKU detail=" + skuDetail);
|
Log.i("IAB SKU detail=" + skuDetail);
|
||||||
|
@ -472,7 +472,7 @@ public class ActivityBilling extends ActivityBase implements PurchasesUpdatedLis
|
||||||
.build();
|
.build();
|
||||||
billingClient.consumeAsync(params, new ConsumeResponseListener() {
|
billingClient.consumeAsync(params, new ConsumeResponseListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onConsumeResponse(BillingResult result, String purchaseToken) {
|
public void onConsumeResponse(@NonNull BillingResult result, @NonNull String purchaseToken) {
|
||||||
if (result.getResponseCode() != BillingClient.BillingResponseCode.OK)
|
if (result.getResponseCode() != BillingClient.BillingResponseCode.OK)
|
||||||
reportError(result, "IAB consumed SKU=" + purchase.getSku());
|
reportError(result, "IAB consumed SKU=" + purchase.getSku());
|
||||||
}
|
}
|
||||||
|
@ -487,7 +487,7 @@ public class ActivityBilling extends ActivityBase implements PurchasesUpdatedLis
|
||||||
.build();
|
.build();
|
||||||
billingClient.acknowledgePurchase(params, new AcknowledgePurchaseResponseListener() {
|
billingClient.acknowledgePurchase(params, new AcknowledgePurchaseResponseListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onAcknowledgePurchaseResponse(BillingResult result) {
|
public void onAcknowledgePurchaseResponse(@NonNull BillingResult result) {
|
||||||
if (result.getResponseCode() == BillingClient.BillingResponseCode.OK) {
|
if (result.getResponseCode() == BillingClient.BillingResponseCode.OK) {
|
||||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(ActivityBilling.this);
|
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(ActivityBilling.this);
|
||||||
SharedPreferences.Editor editor = prefs.edit();
|
SharedPreferences.Editor editor = prefs.edit();
|
||||||
|
|
Loading…
Reference in New Issue