Skip to content

Commit

Permalink
* fixed strings
Browse files Browse the repository at this point in the history
* improved explicitConsentForEachService handling
  • Loading branch information
MFlisar committed May 22, 2018
1 parent 86e164d commit 41762fe
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ public void init(Activity activity, View view, IOnFinishView onFinishViewListene
// ------------------

view.findViewById(R.id.btAgree).setOnClickListener(v -> {
if (!isAgeValid(v.getContext(), true) || !isAllConsentGiven(v.getContext())) {
if (!isAgeValid(v.getContext(), true) || !isAllConsentGiven(v.getContext(), true)) {
return;
}
mSelectedConsent = GDPRConsent.PERSONAL_CONSENT;
Expand All @@ -182,7 +182,7 @@ public void init(Activity activity, View view, IOnFinishView onFinishViewListene
});

view.findViewById(R.id.btDisagree).setOnClickListener(v -> {
if (!isAgeValid(v.getContext(), false) || !isAllConsentGiven(v.getContext())) {
if (!isAgeValid(v.getContext(), false) || !isAllConsentGiven(v.getContext(), false)) {
return;
}
if (mSetup.hasPaidVersion()) {
Expand Down Expand Up @@ -253,8 +253,8 @@ private boolean isAgeValid(Context context, boolean agree) {
return true;
}

private boolean isAllConsentGiven(Context context) {
if (mSetup.explicitConsentForEachService()) {
private boolean isAllConsentGiven(Context context, boolean agree) {
if (mSetup.explicitConsentForEachService() && agree) {
int consentsGiven = 0;
for (int i = 0; i < mExplicitlyConfirmedServices.size(); i++) {
if (mExplicitlyConfirmedServices.get(i) == 1) {
Expand Down
4 changes: 2 additions & 2 deletions library/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
<!-- Dialog - MAIN PAGE TEXTS -->
<string name="gdpr_dialog_text_part1">This app uses following services:</string>
<string name="gdpr_dialog_text_part2">Depending on your privacy settings, those services (including partners) may collect and process personal data such as device identifieres, location data and other demographic and interest data about you to provide you a personalized experience.&lt;br/>&lt;br/>%1$s</string>
<string name="gdpr_dialog_text_part2_addon_with_age">By agreeing, you are confirming that you are over the age of 16 and would like this personalized experience.</string>
<string name="gdpr_dialog_text_part2_addon_no_age">By agreeing, you are confirming that you would like this personalized experience.</string>
<string name="gdpr_dialog_text_part2_with_age">By agreeing, you are confirming that you are over the age of 16 and would like this personalized experience.</string>
<string name="gdpr_dialog_text_part2_no_age">By agreeing, you are confirming that you would like this personalized experience.</string>

<!-- Dialog - SUB PAGE TEXTS -->
<string name="gdpr_dialog_text_after_accepted_personal">Great.&lt;br/>&lt;br/>%1$s</string>
Expand Down

0 comments on commit 41762fe

Please sign in to comment.