Loading core/java/android/hardware/input/input_framework.aconfig +11 −0 Original line number Diff line number Diff line Loading @@ -87,6 +87,17 @@ flag { bug: "358603902" } flag { name: "input_manager_lifecycle_support" namespace: "input" description: "Add support for Lifecycle support in input manager" bug: "362473586" is_fixed_read_only: true metadata { purpose: PURPOSE_BUGFIX } } flag { namespace: "input_native" name: "manage_key_gestures" Loading services/core/java/com/android/server/input/InputManagerService.java +33 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package com.android.server.input; import static android.Manifest.permission.OVERRIDE_SYSTEM_KEY_BEHAVIOR_IN_FOCUSED_WINDOW; import static android.content.PermissionChecker.PERMISSION_GRANTED; import static android.content.PermissionChecker.PID_UNKNOWN; import static android.os.IServiceManager.DUMP_FLAG_PRIORITY_CRITICAL; import static android.provider.DeviceConfig.NAMESPACE_INPUT_NATIVE_BOOT; import static android.view.KeyEvent.KEYCODE_UNKNOWN; import static android.view.WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS; Loading Loading @@ -136,6 +137,7 @@ import com.android.internal.util.DumpUtils; import com.android.internal.util.Preconditions; import com.android.server.DisplayThread; import com.android.server.LocalServices; import com.android.server.SystemService; import com.android.server.Watchdog; import com.android.server.input.InputManagerInternal.LidSwitchCallback; import com.android.server.input.debug.FocusEventDebugView; Loading Loading @@ -3396,6 +3398,37 @@ public class InputManagerService extends IInputManager.Stub } } /** * {@link SystemService} used to publish and manage the lifecycle of {@link InputManagerService} */ public static final class Lifecycle extends SystemService { private final InputManagerService mService; public Lifecycle(@NonNull Context context) { super(context); mService = new InputManagerService(context); } @Override public void onStart() { publishBinderService(Context.INPUT_SERVICE, mService, /* allowIsolated= */ false, DUMP_FLAG_PRIORITY_CRITICAL); } @Override public void onBootPhase(int phase) { // Called on ActivityManager thread. if (phase == SystemService.PHASE_ACTIVITY_MANAGER_READY) { mService.systemRunning(); } } public InputManagerService getService() { return mService; } } private final class LocalService extends InputManagerInternal { @Override public void setDisplayViewports(List<DisplayViewport> viewports) { Loading services/java/com/android/server/SystemServer.java +21 −11 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ import static android.system.OsConstants.O_CLOEXEC; import static android.system.OsConstants.O_RDONLY; import static android.view.Display.DEFAULT_DISPLAY; import static com.android.hardware.input.Flags.inputManagerLifecycleSupport; import static com.android.server.utils.TimingsTraceAndSlog.SYSTEM_SERVER_TIMING_TAG; import static com.android.tradeinmode.flags.Flags.enableTradeInMode; Loading Loading @@ -1654,7 +1655,12 @@ public final class SystemServer implements Dumpable { t.traceEnd(); t.traceBegin("StartInputManagerService"); if (inputManagerLifecycleSupport()) { inputManager = mSystemServiceManager.startService( InputManagerService.Lifecycle.class).getService(); } else { inputManager = new InputManagerService(context); } t.traceEnd(); t.traceBegin("DeviceStateManagerService"); Loading @@ -1675,8 +1681,10 @@ public final class SystemServer implements Dumpable { ServiceManager.addService(Context.WINDOW_SERVICE, wm, /* allowIsolated= */ false, DUMP_FLAG_PRIORITY_CRITICAL | DUMP_FLAG_PRIORITY_HIGH | DUMP_FLAG_PROTO); if (!inputManagerLifecycleSupport()) { ServiceManager.addService(Context.INPUT_SERVICE, inputManager, /* allowIsolated= */ false, DUMP_FLAG_PRIORITY_CRITICAL); } t.traceEnd(); t.traceBegin("SetWindowManagerService"); Loading Loading @@ -3350,6 +3358,7 @@ public final class SystemServer implements Dumpable { reportWtf("Notifying NetworkTimeService running", e); } t.traceEnd(); if (!inputManagerLifecycleSupport()) { t.traceBegin("MakeInputManagerServiceReady"); try { // TODO(BT) Pass parameter to input manager Loading @@ -3360,6 +3369,7 @@ public final class SystemServer implements Dumpable { reportWtf("Notifying InputManagerService running", e); } t.traceEnd(); } t.traceBegin("MakeTelephonyRegistryReady"); try { if (telephonyRegistryF != null) { Loading Loading
core/java/android/hardware/input/input_framework.aconfig +11 −0 Original line number Diff line number Diff line Loading @@ -87,6 +87,17 @@ flag { bug: "358603902" } flag { name: "input_manager_lifecycle_support" namespace: "input" description: "Add support for Lifecycle support in input manager" bug: "362473586" is_fixed_read_only: true metadata { purpose: PURPOSE_BUGFIX } } flag { namespace: "input_native" name: "manage_key_gestures" Loading
services/core/java/com/android/server/input/InputManagerService.java +33 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package com.android.server.input; import static android.Manifest.permission.OVERRIDE_SYSTEM_KEY_BEHAVIOR_IN_FOCUSED_WINDOW; import static android.content.PermissionChecker.PERMISSION_GRANTED; import static android.content.PermissionChecker.PID_UNKNOWN; import static android.os.IServiceManager.DUMP_FLAG_PRIORITY_CRITICAL; import static android.provider.DeviceConfig.NAMESPACE_INPUT_NATIVE_BOOT; import static android.view.KeyEvent.KEYCODE_UNKNOWN; import static android.view.WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS; Loading Loading @@ -136,6 +137,7 @@ import com.android.internal.util.DumpUtils; import com.android.internal.util.Preconditions; import com.android.server.DisplayThread; import com.android.server.LocalServices; import com.android.server.SystemService; import com.android.server.Watchdog; import com.android.server.input.InputManagerInternal.LidSwitchCallback; import com.android.server.input.debug.FocusEventDebugView; Loading Loading @@ -3396,6 +3398,37 @@ public class InputManagerService extends IInputManager.Stub } } /** * {@link SystemService} used to publish and manage the lifecycle of {@link InputManagerService} */ public static final class Lifecycle extends SystemService { private final InputManagerService mService; public Lifecycle(@NonNull Context context) { super(context); mService = new InputManagerService(context); } @Override public void onStart() { publishBinderService(Context.INPUT_SERVICE, mService, /* allowIsolated= */ false, DUMP_FLAG_PRIORITY_CRITICAL); } @Override public void onBootPhase(int phase) { // Called on ActivityManager thread. if (phase == SystemService.PHASE_ACTIVITY_MANAGER_READY) { mService.systemRunning(); } } public InputManagerService getService() { return mService; } } private final class LocalService extends InputManagerInternal { @Override public void setDisplayViewports(List<DisplayViewport> viewports) { Loading
services/java/com/android/server/SystemServer.java +21 −11 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ import static android.system.OsConstants.O_CLOEXEC; import static android.system.OsConstants.O_RDONLY; import static android.view.Display.DEFAULT_DISPLAY; import static com.android.hardware.input.Flags.inputManagerLifecycleSupport; import static com.android.server.utils.TimingsTraceAndSlog.SYSTEM_SERVER_TIMING_TAG; import static com.android.tradeinmode.flags.Flags.enableTradeInMode; Loading Loading @@ -1654,7 +1655,12 @@ public final class SystemServer implements Dumpable { t.traceEnd(); t.traceBegin("StartInputManagerService"); if (inputManagerLifecycleSupport()) { inputManager = mSystemServiceManager.startService( InputManagerService.Lifecycle.class).getService(); } else { inputManager = new InputManagerService(context); } t.traceEnd(); t.traceBegin("DeviceStateManagerService"); Loading @@ -1675,8 +1681,10 @@ public final class SystemServer implements Dumpable { ServiceManager.addService(Context.WINDOW_SERVICE, wm, /* allowIsolated= */ false, DUMP_FLAG_PRIORITY_CRITICAL | DUMP_FLAG_PRIORITY_HIGH | DUMP_FLAG_PROTO); if (!inputManagerLifecycleSupport()) { ServiceManager.addService(Context.INPUT_SERVICE, inputManager, /* allowIsolated= */ false, DUMP_FLAG_PRIORITY_CRITICAL); } t.traceEnd(); t.traceBegin("SetWindowManagerService"); Loading Loading @@ -3350,6 +3358,7 @@ public final class SystemServer implements Dumpable { reportWtf("Notifying NetworkTimeService running", e); } t.traceEnd(); if (!inputManagerLifecycleSupport()) { t.traceBegin("MakeInputManagerServiceReady"); try { // TODO(BT) Pass parameter to input manager Loading @@ -3360,6 +3369,7 @@ public final class SystemServer implements Dumpable { reportWtf("Notifying InputManagerService running", e); } t.traceEnd(); } t.traceBegin("MakeTelephonyRegistryReady"); try { if (telephonyRegistryF != null) { Loading