mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2026-04-05 15:36:02 +00:00
Use LiStringifyPortFlags() instead of coding it ourselves
This commit is contained in:
@@ -293,13 +293,11 @@ public class MoonBridge {
|
||||
|
||||
public static native int testClientConnectivity(String testServerHostName, int referencePort, int testFlags);
|
||||
|
||||
public static native int getPortFromPortFlagIndex(int portFlagIndex);
|
||||
|
||||
public static native String getProtocolFromPortFlagIndex(int portFlagIndex);
|
||||
|
||||
public static native int getPortFlagsFromStage(int stage);
|
||||
|
||||
public static native int getPortFlagsFromTerminationErrorCode(int errorCode);
|
||||
|
||||
public static native String stringifyPortFlags(int portFlags, String separator);
|
||||
|
||||
public static native void init();
|
||||
}
|
||||
|
||||
@@ -101,11 +101,7 @@ public class ServerHelper {
|
||||
}
|
||||
else {
|
||||
dialogSummary = parent.getResources().getString(R.string.nettest_text_failure);
|
||||
for (int i = 0; i < 32; i++) {
|
||||
if ((ret & (1 << i)) != 0) {
|
||||
dialogSummary += MoonBridge.getProtocolFromPortFlagIndex(i) + " " + MoonBridge.getPortFromPortFlagIndex(i) + "\n";
|
||||
}
|
||||
}
|
||||
dialogSummary += MoonBridge.stringifyPortFlags(ret, "\n");
|
||||
}
|
||||
|
||||
Dialog.displayDialog(parent,
|
||||
|
||||
Reference in New Issue
Block a user