public ApplicationKey distributeAppKey(@NonNull final ApplicationKey applicationKey, @NonNull final byte[] newAppKey) throws IllegalArgumentException {
        if (validateKey(newAppKey)) {
            if (isAppKeyExists(newAppKey)) {
                throw new IllegalArgumentException("App key value is already in use.");
            }

            final int keyIndex = applicationKey.getKeyIndex();
            final ApplicationKey appKey = getAppKey(keyIndex);
            if (appKey.equals(applicationKey)) {
                if (appKey.distributeKey(newAppKey)) {
                    updateNodeKeyStatus(appKey);
                    if (updateMeshKey(appKey)) {
                        return appKey;
                    }
                }
            }
        }
        return null;
    }
Distributes/updates the provisioner node's the application key and returns the updated Application Key.

<p>
This will only work if the NetworkKey bound to this ApplicationKey is in Phase 1 of the Key Refresh Procedure. Therefore the NetworkKey
must be updated first before updating it's bound application key. Call {@link #distributeNetKey(NetworkKey, byte[])} to initiate the
Key Refresh Procedure to update a Network Key that's in use by the provisioner or the nodes, if it has not been started already.
To update a key that's not in use call {@link #updateAppKey(ApplicationKey, String)}
<p>
Once the provisioner nodes' AppKey is updated user must distribute the updated AppKey to the nodes. This can be done by sending
{@link ConfigAppKeyUpdate} message with the new key.
</p>

@param applicationKey Network key
@param newAppKey      16-byte key
@throws IllegalArgumentException the key value is already in use.
mesh/src/main/java/no/nordicsemi/android/mesh/BaseMeshNetwork.java