Skip to content

Commit

Permalink
Merge branch 'develop' into fix/audio-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
adhiamboperes authored Dec 7, 2023
2 parents 2844d8b + d85fe6e commit 32edff3
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,10 @@ class PoliciesFragmentPresenter @Inject constructor(
var policyWebLink = ""

if (policyPage == PolicyPage.PRIVACY_POLICY) {
policyDescription =
resourceHandler.getStringInLocale(R.string.privacy_policy_content)
policyDescription = resourceHandler.getStringInLocale(R.string.privacy_policy_content)
policyWebLink = resourceHandler.getStringInLocale(R.string.privacy_policy_web_link)
} else if (policyPage == PolicyPage.TERMS_OF_SERVICE) {
policyDescription =
resourceHandler.getStringInLocale(R.string.terms_of_service_content)
policyDescription = resourceHandler.getStringInLocale(R.string.terms_of_service_content)
policyWebLink = resourceHandler.getStringInLocale(R.string.terms_of_service_web_link)
}

Expand Down
3 changes: 2 additions & 1 deletion app/src/main/res/layout-sw600dp-land/topic_info_fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
android:orientation="horizontal"
android:baselineAligned="false">

<ScrollView
android:layout_width="0dp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
android:orientation="horizontal"
android:baselineAligned="false">

<LinearLayout
android:id="@+id/story_name_chapter_count_container"
Expand Down
3 changes: 2 additions & 1 deletion app/src/main/res/layout/topic_lessons_story_summary.xml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
android:orientation="horizontal"
android:baselineAligned="false">

<LinearLayout
android:id="@+id/story_name_chapter_count_container"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@ import android.app.Application
import android.content.Context
import android.text.Spannable
import android.text.SpannableStringBuilder
import android.text.Spanned
import android.text.method.LinkMovementMethod
import android.text.style.URLSpan
import android.text.util.Linkify
import android.util.Patterns
import android.view.View
import android.widget.TextView
import androidx.core.text.util.LinkifyCompat
Expand Down Expand Up @@ -128,6 +131,16 @@ class HtmlParser private constructor(
htmlContent, imageGetter, computeCustomTagHandlers(supportsConceptCards, htmlContentTextView)
)

val urlPattern = Patterns.WEB_URL
val matcher = urlPattern.matcher(htmlSpannable)
while (matcher.find()) {
val start = matcher.start()
val end = matcher.end()
val url = htmlSpannable.subSequence(start, end).toString()
val urlSpan = URLSpan(url)
htmlSpannable.setSpan(urlSpan, start, end, Spanned.SPAN_EXCLUSIVE_INCLUSIVE)
}

return ensureNonEmpty(trimSpannable(htmlSpannable as SpannableStringBuilder))
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import javax.inject.Qualifier
@Qualifier annotation class EnableDownloadsSupport

/** Name of the feature flag that controls whether to enable downloads support. */
const val DOWNLOADS_SUPPORT = "downloads_support"
const val DOWNLOADS_SUPPORT = "android_enable_downloads_support"

/** Default value for feature flag corresponding to [EnableDownloadsSupport]. */
const val ENABLE_DOWNLOADS_SUPPORT_DEFAULT_VALUE = false
Expand All @@ -38,7 +38,7 @@ const val ENABLE_LANGUAGE_SELECTION_UI_DEFAULT_VALUE = true
annotation class EnableExtraTopicTabsUi

/** Name of the feature flag that controls whether to enable the extra topics tab UI. */
const val EXTRA_TOPIC_TABS_UI = "extra_topic_tabs_ui"
const val EXTRA_TOPIC_TABS_UI = "android_enable_extra_topic_tabs_ui"

/** Default value for the feature flag corresponding to [EnableExtraTopicTabsUi]. */
const val ENABLE_EXTRA_TOPIC_TABS_UI_DEFAULT_VALUE = false
Expand All @@ -54,7 +54,7 @@ annotation class EnableLearnerStudyAnalytics
* Name of the feature flag that controls the visibility of [ProfileAndDeviceIdActivity]
* and working of learner study related analytics logging.
*/
const val LEARNER_STUDY_ANALYTICS = "learner_study_analytics"
const val LEARNER_STUDY_ANALYTICS = "android_enable_learner_study_analytics"

/**
* Default value of the feature flag that controls the visibility of [ProfileAndDeviceIdActivity]
Expand All @@ -72,7 +72,7 @@ const val LEARNER_STUDY_ANALYTICS_DEFAULT_VALUE = false
@Qualifier annotation class EnableFastLanguageSwitchingInLesson

/** The feature flag name corresponding to [EnableFastLanguageSwitchingInLesson]. */
const val FAST_LANGUAGE_SWITCHING_IN_LESSON = "fast_language_switching_in_lesson"
const val FAST_LANGUAGE_SWITCHING_IN_LESSON = "android_enable_fast_language_switching_in_lesson"

/**
* The default enabled state for the feature corresponding to [EnableFastLanguageSwitchingInLesson].
Expand All @@ -88,7 +88,7 @@ const val FAST_LANGUAGE_SWITCHING_IN_LESSON_DEFAULT_VALUE = false
@Qualifier annotation class EnableLoggingLearnerStudyIds

/** The feature flag name corresponding to [EnableLoggingLearnerStudyIds]. */
const val LOGGING_LEARNER_STUDY_IDS = "logging_learner_study_ids"
const val LOGGING_LEARNER_STUDY_IDS = "android_enable_logging_learner_study_ids"

/** The default enabled state for the feature corresponding to [EnableLoggingLearnerStudyIds]. */
const val LOGGING_LEARNER_STUDY_IDS_DEFAULT_VALUE = false
Expand All @@ -98,7 +98,7 @@ const val LOGGING_LEARNER_STUDY_IDS_DEFAULT_VALUE = false
annotation class EnableEditAccountsOptionsUi

/** Name of the feature flag that controls whether to enable the edit account options UI. */
const val EDIT_ACCOUNTS_OPTIONS_UI = "edit_accounts_options_ui"
const val EDIT_ACCOUNTS_OPTIONS_UI = "android_enable_edit_accounts_options_ui"

/** Default value for the feature flag corresponding to [EnableEditAccountsOptionsUi]. */
const val ENABLE_EDIT_ACCOUNTS_OPTIONS_UI_DEFAULT_VALUE = false
Expand All @@ -108,7 +108,7 @@ const val ENABLE_EDIT_ACCOUNTS_OPTIONS_UI_DEFAULT_VALUE = false
annotation class EnablePerformanceMetricsCollection

/** Name of the feature flag that controls whether to record performance metrics. */
const val ENABLE_PERFORMANCE_METRICS_COLLECTION = "enable_performance_metrics_collection"
const val ENABLE_PERFORMANCE_METRICS_COLLECTION = "android_enable_performance_metrics_collection"

/** Default value for whether to record performance metrics. */
const val ENABLE_PERFORMANCE_METRICS_COLLECTION_DEFAULT_VALUE = false
Expand All @@ -118,7 +118,7 @@ const val ENABLE_PERFORMANCE_METRICS_COLLECTION_DEFAULT_VALUE = false
annotation class EnableSpotlightUi

/** Name of the feature flag that controls whether to enable the spotlight UI. */
const val SPOTLIGHT_UI = "spotlight_ui"
const val SPOTLIGHT_UI = "android_enable_spotlight_ui"

/** Default value for the feature flag corresponding to [EnableSpotlightUi]. */
const val ENABLE_SPOTLIGHT_UI_DEFAULT_VALUE = false
Expand All @@ -134,7 +134,8 @@ annotation class EnableInteractionConfigChangeStateRetention
* Name of the feature flag that controls whether input interaction state is correctly retained
* across configuration changes.
*/
const val INTERACTION_CONFIG_CHANGE_STATE_RETENTION = "interaction_config_change_state_retention"
const val INTERACTION_CONFIG_CHANGE_STATE_RETENTION =
"android_enable_interaction_config_change_state_retention"

/**
* Default value for feature flag corresponding to [EnableInteractionConfigChangeStateRetention].
Expand All @@ -149,7 +150,7 @@ const val ENABLE_INTERACTION_CONFIG_CHANGE_STATE_RETENTION_DEFAULT_VALUE = false
annotation class EnableAppAndOsDeprecation

/** Name of the feature flag that controls whether to enable app and os deprecation. */
const val APP_AND_OS_DEPRECATION = "app_and_os_deprecation"
const val APP_AND_OS_DEPRECATION = "android_enable_app_and_os_deprecation"

/**
* Default value for the feature flag corresponding to [EnableAppAndOsDeprecation].
Expand Down

0 comments on commit 32edff3

Please sign in to comment.