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,12 +560,16 @@ class AppDetailsActivity : BaseDetailsActivity() {
} }
btn.addOnClickListener { btn.addOnClickListener {
if (authData.isAnonymous && !app.isFree) {
toast(R.string.toast_purchase_blocked)
} else {
btn.setText(R.string.download_metadata) btn.setText(R.string.download_metadata)
startDownload() startDownload()
} }
} }
} }
} }
}
@Synchronized @Synchronized
private fun flip(nextView: Int) { private fun flip(nextView: Int) {

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_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_permission_granted">"Permission granted"</string>
<string name="toast_spoof_applied">"Device spoof applied successfully."</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> </resources>