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