Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remote config crash when retrieving integer value #20868

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@
import org.wordpress.android.util.analytics.service.InstallationReferrerServiceStarter;
import org.wordpress.android.util.config.OpenWebLinksWithJetpackFlowFeatureConfig;
import org.wordpress.android.util.config.QRCodeAuthFlowFeatureConfig;
import org.wordpress.android.util.config.RemoteConfigWrapper;
import org.wordpress.android.util.extensions.CompatExtensionsKt;
import org.wordpress.android.util.extensions.ViewExtensionsKt;
import org.wordpress.android.viewmodel.main.WPMainActivityViewModel;
Expand Down Expand Up @@ -309,6 +310,8 @@ public class WPMainActivity extends LocaleAwareActivity implements

@Inject SnackbarSequencer mSnackbarSequencer;

@Inject RemoteConfigWrapper mRemoteConfigWrapper;

/*
* fragments implement this if their contents can be scrolled, called when user
* requests to scroll to the top
Expand Down Expand Up @@ -527,6 +530,9 @@ && getIntent().getExtras().getBoolean(ARG_CONTINUE_JETPACK_CONNECT, false)) {
if (savedInstanceState != null) {
mIsChangingConfiguration = savedInstanceState.getBoolean(ARG_IS_CHANGING_CONFIGURATION, false);
}

Log.d("RemoteConfigTest", "getPhaseFourOverlayFrequencyConfig value = "
+ mRemoteConfigWrapper.getPhaseFourOverlayFrequencyConfig());
}

private void initBackPressHandler() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ class RemoteConfigWrapper @Inject constructor(
private val performanceMonitoringSampleRateConfig: PerformanceMonitoringSampleRateConfig,
private val inAppUpdateBlockingVersionConfig: InAppUpdateBlockingVersionConfig,
private val inAppUpdateFlexibleIntervalConfig: InAppUpdateFlexibleIntervalConfig,
private val phaseFourOverlayFrequencyConfig: PhaseFourOverlayFrequencyConfig,
) {
fun getOpenWebLinksWithJetpackFlowFrequency() = openWebLinksWithJetpackFlowFrequencyConfig.getValue<Long>()
fun getPerformanceMonitoringSampleRate() = performanceMonitoringSampleRateConfig.getValue<Double>()
fun getCodeableGetFreeEstimateUrl() = codeableGetFreeEstimateUrlConfig.getValue<String>()
fun getInAppUpdateBlockingVersion() = inAppUpdateBlockingVersionConfig.getValue<Int>()
fun getInAppUpdateFlexibleIntervalInDays() = inAppUpdateFlexibleIntervalConfig.getValue<Int>()
fun getPhaseFourOverlayFrequencyConfig() = phaseFourOverlayFrequencyConfig.getValue<Int>()
}
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ ext {
automatticTracksVersion = '5.0.0'
gutenbergMobileVersion = 'v1.119.0-alpha2'
wordPressAztecVersion = 'v2.1.3'
wordPressFluxCVersion = '2.79.0'
wordPressFluxCVersion = '3017-0a696ccc0424a1a90ee4b3cdd87cd13ce564796f'
wordPressLoginVersion = '1.15.0'
wordPressPersistentEditTextVersion = '1.0.2'
wordPressUtilsVersion = '3.14.0'
Expand Down
Loading