Skip to content

Commit

Permalink
Merge pull request #203 from apptentive/branch_5.5.2
Browse files Browse the repository at this point in the history
Release 5.5.2
  • Loading branch information
frankus authored Apr 24, 2020
2 parents 76d0aab + 598aa7b commit 30e5307
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 10 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# 2020-04-24 - v5.5.2

#### Fixes

* Fix potential NPE when presenting a survey without terms and conditions.

# 2020-04-14 - v5.5.1

#### Improvements
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use your app, to talk to them at the right time, and in the right way.

##### [Release Notes](https://learn.apptentive.com/knowledge-base/android-sdk-release-notes/)

##### Binary releases are hosted for Maven [here](http://search.maven.org/#artifactdetails|com.apptentive|apptentive-android|5.5.1|aar)
##### Binary releases are hosted for Maven [here](http://search.maven.org/#artifactdetails|com.apptentive|apptentive-android|5.5.2|aar)

#### Reporting Bugs

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,12 +221,14 @@ protected void execute() {
}

private void updateTermsAndConditions(View v) {
updateTermsAndConditionsBody(v);
updateTermsAndConditionsLink(v);
TermsAndConditions termsAndConditions = ApptentiveInternal.getInstance().getSurveyTermsAndConditions();
if (termsAndConditions != null){
updateTermsAndConditionsBody(v, termsAndConditions);
updateTermsAndConditionsLink(v, termsAndConditions);
}
}

private void updateTermsAndConditionsBody(View v) {
TermsAndConditions termsAndConditions = ApptentiveInternal.getInstance().getSurveyTermsAndConditions();
private void updateTermsAndConditionsBody(View v, TermsAndConditions termsAndConditions) {
final TextView termsAndConditionsBodyTv = v.findViewById(R.id.terms_and_conditions_body);
final String termsAndConditionsBodyText = termsAndConditions.getBodyText();
final boolean isTermsAndConditionsBodyTextValid = !StringUtils.isNullOrBlank(termsAndConditionsBodyText);
Expand All @@ -238,8 +240,7 @@ private void updateTermsAndConditionsBody(View v) {
}
}

private void updateTermsAndConditionsLink(View v) {
TermsAndConditions termsAndConditions = ApptentiveInternal.getInstance().getSurveyTermsAndConditions();
private void updateTermsAndConditionsLink(View v, TermsAndConditions termsAndConditions) {
final TextView termsAndConditionsLinkTv = v.findViewById(R.id.terms_and_conditions_link);
final String termsAndConditionsLinkUrl = termsAndConditions.getLinkURL();
final String termsAndConditionsLinkText = termsAndConditions.getLinkText();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
public class Constants {

public static final int API_VERSION = 9;
private static final String APPTENTIVE_SDK_VERSION = "5.5.1";
private static final String APPTENTIVE_SDK_VERSION = "5.5.2";

public static final int DEFAULT_CONNECT_TIMEOUT_MILLIS = 45000;
public static final int DEFAULT_READ_TIMEOUT_MILLIS = 45000;
Expand Down
6 changes: 4 additions & 2 deletions apptentive/src/main/res/layout/apptentive_survey.xml
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,17 @@
android:gravity="center"
android:layout_marginStart="10dp"
android:layout_marginEnd="10dp"
android:layout_marginBottom="8dp" />
android:layout_marginBottom="8dp"
android:visibility="gone"/>

<TextView
android:id="@+id/terms_and_conditions_link"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:layout_marginStart="10dp"
android:layout_marginEnd="10dp" />
android:layout_marginEnd="10dp"
android:visibility="gone"/>

</LinearLayout>
</LinearLayout>
Expand Down

0 comments on commit 30e5307

Please sign in to comment.