Always print device model and version

Print the log before checking for --list-* options so that it is
printed in all cases.
This commit is contained in:
Romain Vimont 2023-10-31 19:13:17 +01:00
parent 9bfc749803
commit 5580803406
1 changed files with 2 additions and 2 deletions

View File

@ -87,8 +87,6 @@ public final class Server {
}
private static void scrcpy(Options options) throws IOException, ConfigurationException {
Ln.i("Device: [" + Build.MANUFACTURER + "] " + Build.BRAND + " " + Build.MODEL + " (Android " + Build.VERSION.RELEASE + ")");
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.S && options.getVideoSource() == VideoSource.CAMERA) {
Ln.e("Camera mirroring is not supported before Android 12");
throw new ConfigurationException("Camera mirroring is not supported");
@ -208,6 +206,8 @@ public final class Server {
Ln.initLogLevel(options.getLogLevel());
Ln.i("Device: [" + Build.MANUFACTURER + "] " + Build.BRAND + " " + Build.MODEL + " (Android " + Build.VERSION.RELEASE + ")");
if (options.getList()) {
if (options.getCleanup()) {
CleanUp.unlinkSelf();