feat:删除测试代码,删除不必要的log

fix:完善销毁逻辑
This commit is contained in:
max
2024-07-09 15:42:05 +08:00
parent 6df95cf11f
commit 86b498c00e
3 changed files with 5 additions and 20 deletions

View File

@@ -324,9 +324,7 @@ public class App extends BaseApp {
BasicConfig.INSTANCE.setVoiceDir(Constants.VOICE_DIR);
BasicConfig.INSTANCE.setCacheDir(Constants.CACHE_DIR);
BasicConfig.INSTANCE.setImageDir(Constants.IMAGE_CACHE_DIR);
// TODO 临时调整
com.example.lib_utils.log.LogUtil.INSTANCE.setConsolePrinterEnabled(true);
// com.example.lib_utils.log.LogUtil.INSTANCE.setConsolePrinterEnabled(BuildConfig.DEBUG);
com.example.lib_utils.log.LogUtil.INSTANCE.setConsolePrinterEnabled(BuildConfig.DEBUG);
}
/**

View File

@@ -84,12 +84,11 @@ class SettingActivity : BaseViewBindingActivity<ActivitySettingBinding>(), View.
binding.tvLanugage.setOnClickListener(this)
binding.rlyPayPwd.setOnClickListener(this)
// TODO 临时调整
// if (BuildConfig.DEBUG) {
if (BuildConfig.DEBUG) {
binding.titleBar.setOnTitleClickListener {
debug()
}
// }
}
}
@SuppressLint("CheckResult")

View File

@@ -140,20 +140,7 @@ class GPaymentClient(val activity: Activity) : IPaymentClient, IBillingService2.
}
private fun handlePurchases(isCurrentPaying: Boolean, purchases: IPurchase) {
logD("handlePurchases state:${purchases.getPurchaseState()}")
logD("handlePurchases orderId:${purchases.getOrderId()}")
logD("handlePurchases token:${purchases.getPurchaseToken()}")
logD("handlePurchases data:${purchases.getData()}")
logD(
"handlePurchases obfuscatedAccountId:${
purchases.getAccountIdentifiers()?.getObfuscatedAccountId()
}"
)
logD(
"handlePurchases obfuscatedProfileId:${
purchases.getAccountIdentifiers()?.getObfuscatedProfileId()
}"
)
logD("handlePurchases isCurrentPaying:${isCurrentPaying} state:${purchases.getPurchaseState()}")
val identifiers = purchases.getAccountIdentifiers()
if (purchases.isPurchasedState() && identifiers != null) {
logD("handlePurchases() verifyOrder")
@@ -264,6 +251,7 @@ class GPaymentClient(val activity: Activity) : IPaymentClient, IBillingService2.
override fun onCleared() {
logD("onCleared()")
_billingService?.destroy()
paymentIntent = null
compositeDisposable?.dispose()
compositeDisposable = null