work/workmanager/src/main/java/androidx/work/impl/constraints/controllers/NetworkNotRoamingController.java
@Override
    boolean isConstrained(@NonNull NetworkState state) {
        if (Build.VERSION.SDK_INT < 24) {
            Log.d(TAG, "Not-roaming network constraint is not supported before API 24, "
                    + "only checking for connected state.");
            return !state.isConnected();
        }
        return !state.isConnected() || !state.isNotRoaming();
    }
/**
     * Check for not-roaming constraint on API 24+, when JobInfo#NETWORK_TYPE_NOT_ROAMING was added,
     * to be consistent with JobScheduler functionality.
     */
Check for not-roaming constraint on API 24+, when JobInfo#NETWORK_TYPE_NOT_ROAMING was added,
to be consistent with JobScheduler functionality.
Check for not - roaming constraint on API 24 + when JobInfo#NETWORK_TYPE_NOT_ROAMING was added to be consistent with JobScheduler functionality .
@Override
    boolean isConstrained(@NonNull NetworkState state) {
        if (Build.VERSION.SDK_INT < 24) {
            Log.d(TAG, "Not-roaming network constraint is not supported before API 24, "
                    + "only checking for connected state.");
            return !state.isConnected();
        }
        return !state.isConnected() || !state.isNotRoaming();
    }
@ Override boolean isConstrained ( @ NonNull NetworkState state ) { if ( Build . VERSION . SDK_INT < 24 ) { Log . d ( TAG , "Not-roaming network constraint is not supported before API 24, " + "only checking for connected state." ) ; return ! state . isConnected ( ) ; } return ! state . isConnected ( ) || ! state . isNotRoaming ( ) ; }
Check for not-roaming constraint on API 24+, when JobInfo#NETWORK_TYPE_NOT_ROAMING was added,
 to be consistent with JobScheduler functionality.
Check for not - roaming constraint on API 24 + when JobInfo#NETWORK_TYPE_NOT_ROAMING was added to be consistent with JobScheduler functionality .