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

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

Merge "Clean up some input interfaces"

parents ac24156e 0c898297
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -62,7 +62,8 @@ public abstract class BatteryState {
     *
     * @return the battery status.
     */
    public abstract @BatteryStatus int getStatus();
    @BatteryStatus
    public abstract int getStatus();

    /**
     * Get remaining battery capacity as float percentage [0.0f, 1.0f] of total capacity
@@ -70,5 +71,6 @@ public abstract class BatteryState {
     *
     * @return the battery capacity.
     */
    public abstract @FloatRange(from = -1.0f, to = 1.0f) float getCapacity();
    @FloatRange(from = -1.0f, to = 1.0f)
    public abstract float getCapacity();
}
+4 −2
Original line number Diff line number Diff line
@@ -1072,7 +1072,8 @@ public final class InputDevice implements Parcelable {
     *
     * @return The lights manager associated with the device, never null.
     */
    public @NonNull LightsManager getLightsManager() {
    @NonNull
    public LightsManager getLightsManager() {
        if (mLightsManager == null) {
            mLightsManager = InputManager.getInstance().getInputDeviceLightsManager(mId);
        }
@@ -1090,7 +1091,8 @@ public final class InputDevice implements Parcelable {
     *
     * @return The sensor manager service associated with the device, never null.
     */
    public @NonNull SensorManager getSensorManager() {
    @NonNull
    public SensorManager getSensorManager() {
        synchronized (mMotionRanges) {
            if (mSensorManager == null) {
                mSensorManager = InputManager.getInstance().getInputDeviceSensorManager(mId);
+1 −4
Original line number Diff line number Diff line
@@ -29,16 +29,13 @@ import android.view.InputEvent;
import android.view.PointerIcon;
import android.view.VerifiedInputEvent;

import com.android.internal.annotations.VisibleForTesting;

import java.util.List;

/**
 * An interface for the native methods of InputManagerService. We use a public interface so that
 * this can be mocked for testing by Mockito.
 */
@VisibleForTesting
public interface NativeInputManagerService {
interface NativeInputManagerService {

    void start();