{ "methods": { "addSensor(android.hardware.Sensor)": { "isImplementation": false, "modifiers": [ "public" ], "params": [ "sensor" ], "returnType": "void", "exceptions": [], "name": "addSensor(android.hardware.Sensor)", "documentation": "Adds a {@link Sensor} to the {@link SensorManager} " }, "addSensor(int,android.hardware.Sensor)": { "isImplementation": false, "modifiers": [ "public" ], "params": [ "sensorType", "sensor" ], "returnType": "void", "exceptions": [], "name": "addSensor(int,android.hardware.Sensor)", "documentation": "Provide a Sensor for the indicated sensor type.\n\n@param sensorType from Sensor constants\n@param sensor Sensor instance\n@deprecated Use {@link ShadowSensor#newInstance(int)} to construct your {@link Sensor} and add\n to the {@link SensorManager} using {@link #addSensor(Sensor)} instead. This method will be\n removed at some point allowing us to use more of the real {@link SensorManager} code.\n" }, "createDirectChannel(android.os.MemoryFile)": { "isImplementation": true, "modifiers": [ "protected" ], "params": [ "mem" ], "returnType": "java.lang.Object", "exceptions": [], "minSdk": 26, "name": "createDirectChannel(android.os.MemoryFile)" }, "createSensorEvent()": { "isImplementation": false, "modifiers": [ "public" ], "params": [], "returnType": "android.hardware.SensorEvent", "exceptions": [], "name": "createSensorEvent()" }, "createSensorEvent(int)": { "isImplementation": false, "modifiers": [ "public", "static" ], "params": [ "valueArraySize" ], "returnType": "android.hardware.SensorEvent", "exceptions": [], "name": "createSensorEvent(int)", "documentation": "Creates a {@link SensorEvent} with the given value array size, which the caller should set\nbased on the type of {@link Sensor} which is being emulated.\n\n\u003cp\u003eCallers can then specify individual values for the event. For example, for a proximity event\na caller may wish to specify the distance value:\n\n\u003cpre\u003e{@code\nevent.values[0] \u003d distance;\n}\u003c/pre\u003e\n\n\u003cp\u003eSee {@link SensorEvent#values} for more information about values.\n" }, "getDefaultSensor(int)": { "isImplementation": true, "modifiers": [ "protected" ], "params": [ "type" ], "returnType": "android.hardware.Sensor", "exceptions": [], "name": "getDefaultSensor(int)" }, "getDefaultSensor(int,boolean)": { "isImplementation": true, "modifiers": [ "protected" ], "params": [ "type", "wakeUp" ], "returnType": "android.hardware.Sensor", "exceptions": [], "name": "getDefaultSensor(int,boolean)" }, "getListeners()": { "isImplementation": false, "modifiers": [ "public" ], "params": [], "returnType": "java.util.List\u003candroid.hardware.SensorEventListener\u003e", "exceptions": [], "name": "getListeners()", "documentation": "Returns the list of {@link SensorEventListener}s registered on this SensorManager. Note that\nthe list is unmodifiable, any attempt to modify it will throw an exception.\n" }, "hasListener(android.hardware.SensorEventListener)": { "isImplementation": false, "modifiers": [ "public" ], "params": [ "listener" ], "returnType": "boolean", "exceptions": [], "name": "hasListener(android.hardware.SensorEventListener)" }, "registerListener(android.hardware.SensorEventListener,android.hardware.Sensor,int)": { "isImplementation": true, "modifiers": [ "protected" ], "params": [ "listener", "sensor", "rate" ], "returnType": "boolean", "exceptions": [], "name": "registerListener(android.hardware.SensorEventListener,android.hardware.Sensor,int)" }, "registerListener(android.hardware.SensorEventListener,android.hardware.Sensor,int,android.os.Handler)": { "isImplementation": true, "modifiers": [ "protected" ], "params": [ "listener", "sensor", "rate", "handler" ], "returnType": "boolean", "exceptions": [], "name": "registerListener(android.hardware.SensorEventListener,android.hardware.Sensor,int,android.os.Handler)", "documentation": "@param handler is ignored. " }, "sendSensorEventToListeners(android.hardware.SensorEvent)": { "isImplementation": false, "modifiers": [ "public" ], "params": [ "event" ], "returnType": "void", "exceptions": [], "name": "sendSensorEventToListeners(android.hardware.SensorEvent)", "documentation": "Propagates the {@code event} to all registered listeners. " }, "unregisterListener(android.hardware.SensorEventListener)": { "isImplementation": true, "modifiers": [ "protected" ], "params": [ "listener" ], "returnType": "void", "exceptions": [], "name": "unregisterListener(android.hardware.SensorEventListener)" }, "unregisterListener(android.hardware.SensorEventListener,android.hardware.Sensor)": { "isImplementation": true, "modifiers": [ "protected" ], "params": [ "listener", "sensor" ], "returnType": "void", "exceptions": [], "name": "unregisterListener(android.hardware.SensorEventListener,android.hardware.Sensor)" } }, "imports": [ "android.os.Build.VERSION_CODES.O", "com.google.common.base.Preconditions.checkArgument", "android.hardware.Sensor", "android.hardware.SensorDirectChannel", "android.hardware.SensorEvent", "android.hardware.SensorEventListener", "android.hardware.SensorManager", "android.os.Handler", "android.os.MemoryFile", "java.util.ArrayList", "java.util.Collections", "java.util.HashMap", "java.util.List", "java.util.Map", "org.robolectric.annotation.Implementation", "org.robolectric.annotation.Implements", "org.robolectric.annotation.RealObject", "org.robolectric.util.ReflectionHelpers", "org.robolectric.util.ReflectionHelpers.ClassParameter" ], "name": "org.robolectric.shadows.ShadowSensorManager" }