Block app purchases on anonymous accounts

This commit is contained in:
Rahul Kumar Patel
2021-03-15 11:41:24 +05:30
parent 110114331f
commit 48c5651250
2 changed files with 7 additions and 2 deletions

View File

@@ -560,8 +560,12 @@ class AppDetailsActivity : BaseDetailsActivity() {
}
btn.addOnClickListener {
btn.setText(R.string.download_metadata)
startDownload()
if (authData.isAnonymous && !app.isFree) {
toast(R.string.toast_purchase_blocked)
} else {
btn.setText(R.string.download_metadata)
startDownload()
}
}
}
}

View File

@@ -355,4 +355,5 @@
<string name="toast_developer_setting_failed">"Failed to open developer settings, make sure it is enabled from device settings."</string>
<string name="toast_permission_granted">"Permission granted"</string>
<string name="toast_spoof_applied">"Device spoof applied successfully."</string>
<string name="toast_purchase_blocked">"App purchases not available on Anonymous accounts."</string>
</resources>