Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dedd7245 authored by Yifei Zhang's avatar Yifei Zhang
Browse files

wmshell: let shell init asynchronously

- Reduces DependencyInjection time by ~400ms on Wear (~30%)
  by allowing parallelism of downstream initialization when
  ShellInit is blocked by IPC

Test: build/boot
Bug: 308819157
Change-Id: I00538048c531f3189030aa081e3171c51a500a95
parent eada59ef
Loading
Loading
Loading
Loading
+1 −5
Original line number Original line Diff line number Diff line
@@ -293,11 +293,7 @@ public class ShellController {
    private class ShellInterfaceImpl implements ShellInterface {
    private class ShellInterfaceImpl implements ShellInterface {
        @Override
        @Override
        public void onInit() {
        public void onInit() {
            try {
            mMainExecutor.execute(ShellController.this::handleInit);
                mMainExecutor.executeBlocking(() -> ShellController.this.handleInit());
            } catch (InterruptedException e) {
                throw new RuntimeException("Failed to initialize the Shell in 2s", e);
            }
        }
        }


        @Override
        @Override