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

Commit 52a2b511 authored by Prabir Pradhan's avatar Prabir Pradhan Committed by Android (Google) Code Review
Browse files

Merge changes I9ea5a635,I3b6e0f30,Ie35baae9,I15ad5082

* changes:
  Move USI version configuration from config.xml to DisplayDeviceConfig
  InputManager: Fix compiler warnings and issues in documentation
  Provide Context to InputManager and deprecate getInstance
  Add InputManager as a member in ViewRootImpl
parents 0345d61b df8ae818
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -510,11 +510,12 @@ public final class SystemServiceRegistry {
                return new BinaryTransparencyManager(ctx, service);
            }});

        // InputManager stores its own static instance for historical purposes.
        registerService(Context.INPUT_SERVICE, InputManager.class,
                new StaticServiceFetcher<InputManager>() {
                new ServiceFetcher<InputManager>() {
            @Override
            public InputManager createService() {
                return InputManager.getInstance();
            public InputManager getService(ContextImpl ctx) {
                return InputManager.getInstance(ctx);
            }});

        registerService(Context.DISPLAY_SERVICE, DisplayManager.class,
+9 −0
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ import android.annotation.Nullable;
import android.companion.virtual.IVirtualDevice;
import android.graphics.Point;
import android.hardware.SensorManager;
import android.hardware.input.HostUsiVersion;
import android.os.Handler;
import android.os.PowerManager;
import android.util.IntArray;
@@ -402,6 +403,14 @@ public abstract class DisplayManagerInternal {
     */
    public abstract SurfaceControl.DisplayPrimaries getDisplayNativePrimaries(int displayId);

    /**
     * Get the version of the Universal Stylus Initiative (USI) Protocol supported by the display.
     * @param displayId The id of the display.
     * @return The USI version, or null if not supported
     */
    @Nullable
    public abstract HostUsiVersion getHostUsiVersion(int displayId);

    /**
     * Describes the requested power state of the display.
     *
+3 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package android.hardware.input;

import android.graphics.Rect;
import android.hardware.input.HostUsiVersion;
import android.hardware.input.InputDeviceIdentifier;
import android.hardware.input.KeyboardLayout;
import android.hardware.input.IInputDevicesChangedListener;
@@ -233,4 +234,6 @@ interface IInputManager {
    @JavaPassthrough(annotation="@android.annotation.RequiresPermission(value = "
            + "android.Manifest.permission.MONITOR_KEYBOARD_BACKLIGHT)")
    void unregisterKeyboardBacklightListener(IKeyboardBacklightListener listener);

    HostUsiVersion getHostUsiVersionFromDisplayConfig(int displayId);
}
+108 −102

File changed.

Preview size limit exceeded, changes collapsed.

+8 −8

File changed.

Preview size limit exceeded, changes collapsed.

Loading