urbanairship-core/src/main/java/com/urbanairship/remoteconfig/RemoteConfigManager.java
private void apply(@NonNull List<DisableInfo> disableInfos) {
        Set<String> disableModules = new HashSet<>();
        Set<String> enabledModules = new HashSet<>(Modules.ALL_MODULES);

        long remoteDataInterval = 0;

        // Combine the disable modules and remote data interval
        for (DisableInfo info : disableInfos) {
            disableModules.addAll(info.getDisabledModules());
            enabledModules.removeAll(info.getDisabledModules());
            remoteDataInterval = Math.max(remoteDataInterval, info.getRemoteDataRefreshInterval());
        }

        // Disable
        for (String module : disableModules) {
            moduleAdapter.setComponentEnabled(module, false);
        }

        // Enable
        for (String module : enabledModules) {
            moduleAdapter.setComponentEnabled(module, true);
        }

        // Remote data refresh interval
        remoteData.setForegroundRefreshInterval(remoteDataInterval);
    }
/**
     * Disables and enables airship components.
     *
     * @param disableInfos The list of disable infos.
     */
Disables and enables airship components.
@param disableInfos The list of disable infos.
Disables and enables airship components . @param disableInfos The list of disable infos .
private void apply(@NonNull List<DisableInfo> disableInfos) {
        Set<String> disableModules = new HashSet<>();
        Set<String> enabledModules = new HashSet<>(Modules.ALL_MODULES);
        long remoteDataInterval = 0;
        for (DisableInfo info : disableInfos) {
            disableModules.addAll(info.getDisabledModules());
            enabledModules.removeAll(info.getDisabledModules());
            remoteDataInterval = Math.max(remoteDataInterval, info.getRemoteDataRefreshInterval());
        }
        for (String module : disableModules) {
            moduleAdapter.setComponentEnabled(module, false);
        }
        for (String module : enabledModules) {
            moduleAdapter.setComponentEnabled(module, true);
        }
        remoteData.setForegroundRefreshInterval(remoteDataInterval);
    }
private void apply ( @ NonNull List < DisableInfo > disableInfos ) { Set < String > disableModules = new HashSet < > ( ) ; Set < String > enabledModules = new HashSet < > ( Modules . ALL_MODULES ) ; long remoteDataInterval = 0 ; for ( DisableInfo info : disableInfos ) { disableModules . addAll ( info . getDisabledModules ( ) ) ; enabledModules . removeAll ( info . getDisabledModules ( ) ) ; remoteDataInterval = Math . max ( remoteDataInterval , info . getRemoteDataRefreshInterval ( ) ) ; } for ( String module : disableModules ) { moduleAdapter . setComponentEnabled ( module , false ) ; } for ( String module : enabledModules ) { moduleAdapter . setComponentEnabled ( module , true ) ; } remoteData . setForegroundRefreshInterval ( remoteDataInterval ) ; }
Disables and enables airship components.
Disables and enables airship components .
// Combine the disable modules and remote data interval // Disable // Enable // Remote data refresh interval