diff --git a/app/src/main/java/com/emanuelef/remote_capture/Utils.java b/app/src/main/java/com/emanuelef/remote_capture/Utils.java index 8f086df4..92118d67 100644 --- a/app/src/main/java/com/emanuelef/remote_capture/Utils.java +++ b/app/src/main/java/com/emanuelef/remote_capture/Utils.java @@ -922,7 +922,7 @@ public class Utils { return BuildType.WORKFLOW; } } catch (PackageManager.NameNotFoundException | NoSuchAlgorithmException e) { - Log.e("Utils", "Could not retrieve package version"); + Log.e("Utils", "Could not determine the build type"); } return BuildType.UNKNOWN; } diff --git a/app/src/main/java/com/emanuelef/remote_capture/activities/CaptureCtrl.java b/app/src/main/java/com/emanuelef/remote_capture/activities/CaptureCtrl.java index 67461116..f07a5bae 100644 --- a/app/src/main/java/com/emanuelef/remote_capture/activities/CaptureCtrl.java +++ b/app/src/main/java/com/emanuelef/remote_capture/activities/CaptureCtrl.java @@ -65,7 +65,11 @@ public class CaptureCtrl extends AppCompatActivity { @Override @SuppressWarnings("deprecation") protected void onCreate(@Nullable Bundle savedInstanceState) { + // Important: calls must occur in the following order: + // requestWindowFeature -> setContentView -> getInsetsController() requestWindowFeature(Window.FEATURE_NO_TITLE); + setContentView(R.layout.ctrl_consent); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) { final WindowInsetsController insetsController = getWindow().getInsetsController(); if (insetsController != null) @@ -115,7 +119,6 @@ public class CaptureCtrl extends AppCompatActivity { } // Show authorization window - setContentView(R.layout.ctrl_consent); findViewById(R.id.allow_btn).setOnClickListener(v -> controlAction(intent, action, true)); findViewById(R.id.deny_btn).setOnClickListener(v -> controlAction(intent, action, false));