protected boolean distributeKey(@NonNull final byte[] newKey) throws IllegalArgumentException {
        if (valid(newKey)) {
            if (phase == 0 || phase == 1) {
                phase = 1;
                timestamp = System.currentTimeMillis();
                return super.distributeKey(newKey);
            } else {
                throw new IllegalArgumentException("A NetworkKey can only be updated once during a Key Refresh Procedure.");
            }
        }
        return false;
    }
Updates the currently used {@link #key} with the newKey  and sets the currently used key as the {@link #oldKey}

@param newKey New NetworkKey value
@return true if successful or false otherwise
@throws IllegalArgumentException if a NetworkKey distribution is attempted twice with different key
                                 values during a single Key refresh procedure
mesh/src/main/java/no/nordicsemi/android/mesh/NetworkKey.java