The local ports for platform connect and attach were always random, this allows the user to configure them.
This is useful for debugging a truly remote android (when the android in question is connected to a remote server).
There is a lengthier discussion on github - https://github.com/llvm/llvm-project/issues/58114
remove {} for single line if statements per LLVM coding guidelines