summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/android/configuration.h1
-rw-r--r--include/android/keycodes.h2
-rw-r--r--include/android/looper.h2
-rw-r--r--include/android/sensor.h22
-rw-r--r--include/gui/Sensor.h6
-rw-r--r--include/input/Input.h50
-rw-r--r--include/input/InputDevice.h5
-rw-r--r--include/input/KeyLayoutMap.h10
-rw-r--r--include/input/Keyboard.h10
-rw-r--r--include/input/KeycodeLabels.h24
-rw-r--r--include/media/drm/DrmAPI.h17
-rw-r--r--include/media/openmax/OMX_AudioExt.h62
-rw-r--r--include/media/openmax/OMX_IndexExt.h1
-rw-r--r--include/private/gui/LayerState.h7
14 files changed, 203 insertions, 16 deletions
diff --git a/include/android/configuration.h b/include/android/configuration.h
index 6d8784d..97d4c42 100644
--- a/include/android/configuration.h
+++ b/include/android/configuration.h
@@ -83,6 +83,7 @@ enum {
ACONFIGURATION_UI_MODE_TYPE_CAR = 0x03,
ACONFIGURATION_UI_MODE_TYPE_TELEVISION = 0x04,
ACONFIGURATION_UI_MODE_TYPE_APPLIANCE = 0x05,
+ ACONFIGURATION_UI_MODE_TYPE_WATCH = 0x06,
ACONFIGURATION_UI_MODE_NIGHT_ANY = 0x00,
ACONFIGURATION_UI_MODE_NIGHT_NO = 0x1,
diff --git a/include/android/keycodes.h b/include/android/keycodes.h
index 1ca1332..b6a5f4c 100644
--- a/include/android/keycodes.h
+++ b/include/android/keycodes.h
@@ -266,6 +266,8 @@ enum {
AKEYCODE_BRIGHTNESS_DOWN = 220,
AKEYCODE_BRIGHTNESS_UP = 221,
AKEYCODE_MEDIA_AUDIO_TRACK = 222,
+ AKEYCODE_SLEEP = 223,
+ AKEYCODE_WAKEUP = 224,
// NOTE: If you add a new keycode here you must also add it to several other files.
// Refer to frameworks/base/core/java/android/view/KeyEvent.java for the full list.
diff --git a/include/android/looper.h b/include/android/looper.h
index 24e3967..74c0383 100644
--- a/include/android/looper.h
+++ b/include/android/looper.h
@@ -253,4 +253,4 @@ int ALooper_removeFd(ALooper* looper, int fd);
};
#endif
-#endif // ANDROID_NATIVE_WINDOW_H
+#endif // ANDROID_LOOPER_H
diff --git a/include/android/sensor.h b/include/android/sensor.h
index 129ea3e..b71bccb 100644
--- a/include/android/sensor.h
+++ b/include/android/sensor.h
@@ -66,6 +66,7 @@ enum {
* Sensor accuracy measure
*/
enum {
+ ASENSOR_STATUS_NO_CONTACT = -1,
ASENSOR_STATUS_UNRELIABLE = 0,
ASENSOR_STATUS_ACCURACY_LOW = 1,
ASENSOR_STATUS_ACCURACY_MEDIUM = 2,
@@ -130,6 +131,11 @@ typedef struct AUncalibratedEvent {
};
} AUncalibratedEvent;
+typedef struct AHeartRateEvent {
+ float bpm;
+ int8_t status;
+} AHeartRateEvent;
+
/* NOTE: Must match hardware/sensors.h */
typedef struct ASensorEvent {
int32_t version; /* sizeof(struct ASensorEvent) */
@@ -151,6 +157,7 @@ typedef struct ASensorEvent {
AUncalibratedEvent uncalibrated_gyro;
AUncalibratedEvent uncalibrated_magnetic;
AMetaDataEvent meta_data;
+ AHeartRateEvent heart_rate;
};
union {
uint64_t data[8];
@@ -281,6 +288,21 @@ float ASensor_getResolution(ASensor const* sensor);
*/
int ASensor_getMinDelay(ASensor const* sensor);
+/*
+ * Returns the maximum size of batches for this sensor. Batches will often be
+ * smaller, as the hardware fifo might be used for other sensors.
+ */
+int ASensor_getFifoMaxEventCount(ASensor const* sensor);
+
+/*
+ * Returns the hardware batch fifo size reserved to this sensor.
+ */
+int ASensor_getFifoReservedEventCount(ASensor const* sensor);
+
+/*
+ * Returns this sensor's string type.
+ */
+const char* ASensor_getStringType(ASensor const* sensor);
#ifdef __cplusplus
};
diff --git a/include/gui/Sensor.h b/include/gui/Sensor.h
index 0c81426..033b262 100644
--- a/include/gui/Sensor.h
+++ b/include/gui/Sensor.h
@@ -69,6 +69,8 @@ public:
int32_t getVersion() const;
int32_t getFifoReservedEventCount() const;
int32_t getFifoMaxEventCount() const;
+ const String8& getStringType() const;
+ const String8& getRequiredPermission() const;
// LightFlattenable protocol
inline bool isFixedSize() const { return false; }
@@ -89,6 +91,10 @@ private:
int32_t mVersion;
int32_t mFifoReservedEventCount;
int32_t mFifoMaxEventCount;
+ String8 mStringType;
+ String8 mRequiredPermission;
+ static void flattenString8(void*& buffer, size_t& size, const String8& string8);
+ static bool unflattenString8(void const*& buffer, size_t& size, String8& outputString8);
};
// ----------------------------------------------------------------------------
diff --git a/include/input/Input.h b/include/input/Input.h
index f8075e4..df6921a 100644
--- a/include/input/Input.h
+++ b/include/input/Input.h
@@ -22,11 +22,12 @@
*/
#include <android/input.h>
-#include <utils/Vector.h>
+#include <utils/BitSet.h>
#include <utils/KeyedVector.h>
-#include <utils/Timers.h>
#include <utils/RefBase.h>
#include <utils/String8.h>
+#include <utils/Timers.h>
+#include <utils/Vector.h>
#include <stdint.h>
/*
@@ -66,6 +67,34 @@ enum {
AINPUT_SOURCE_SWITCH = 0x80000000,
};
+enum {
+ /**
+ * Constants for LEDs. Hidden from the API since we don't actually expose a way to interact
+ * with LEDs to developers
+ *
+ * NOTE: If you add LEDs here, you must also add them to KeycodeLabels.h
+ */
+
+ ALED_NUM_LOCK = 0x00,
+ ALED_CAPS_LOCK = 0x01,
+ ALED_SCROLL_LOCK = 0x02,
+ ALED_COMPOSE = 0x03,
+ ALED_KANA = 0x04,
+ ALED_SLEEP = 0x05,
+ ALED_SUSPEND = 0x06,
+ ALED_MUTE = 0x07,
+ ALED_MISC = 0x08,
+ ALED_MAIL = 0x09,
+ ALED_CHARGING = 0x0a,
+ ALED_CONTROLLER_1 = 0x10,
+ ALED_CONTROLLER_2 = 0x11,
+ ALED_CONTROLLER_3 = 0x12,
+ ALED_CONTROLLER_4 = 0x13,
+};
+
+/* Maximum number of controller LEDs we support */
+#define MAX_CONTROLLER_LEDS 4
+
/*
* SystemUiVisibility constants from View.
*/
@@ -155,13 +184,9 @@ enum {
/* These flags are set by the input reader policy as it intercepts each event. */
- // Indicates that the screen was off when the event was received and the event
- // should wake the device.
- POLICY_FLAG_WOKE_HERE = 0x10000000,
-
- // Indicates that the screen was dim when the event was received and the event
- // should brighten the device.
- POLICY_FLAG_BRIGHT_HERE = 0x20000000,
+ // Indicates that the device was in an interactive state when the
+ // event was intercepted.
+ POLICY_FLAG_INTERACTIVE = 0x20000000,
// Indicates that the event should be dispatched to applications.
// The input event should still be sent to the InputDispatcher so that it can see all
@@ -183,13 +208,18 @@ struct PointerCoords {
float values[MAX_AXES];
inline void clear() {
- bits = 0;
+ BitSet64::clear(bits);
+ }
+
+ bool isEmpty() const {
+ return BitSet64::isEmpty(bits);
}
float getAxisValue(int32_t axis) const;
status_t setAxisValue(int32_t axis, float value);
void scale(float scale);
+ void applyOffset(float xOffset, float yOffset);
inline float getX() const {
return getAxisValue(AMOTION_EVENT_AXIS_X);
diff --git a/include/input/InputDevice.h b/include/input/InputDevice.h
index 1419b45..adf9fb9 100644
--- a/include/input/InputDevice.h
+++ b/include/input/InputDevice.h
@@ -46,6 +46,11 @@ struct InputDeviceIdentifier {
// Ideally, the way this value is computed should not change between Android releases
// because that would invalidate persistent settings that rely on it.
String8 descriptor;
+
+ // A value added to uniquely identify a device in the absence of a unique id. This
+ // is intended to be a minimum way to distinguish from other active devices and may
+ // reuse values that are not associated with an input anymore.
+ uint16_t nonce;
};
/*
diff --git a/include/input/KeyLayoutMap.h b/include/input/KeyLayoutMap.h
index eec11cf..1e8de71 100644
--- a/include/input/KeyLayoutMap.h
+++ b/include/input/KeyLayoutMap.h
@@ -67,6 +67,8 @@ public:
status_t mapKey(int32_t scanCode, int32_t usageCode,
int32_t* outKeyCode, uint32_t* outFlags) const;
status_t findScanCodesForKey(int32_t keyCode, Vector<int32_t>* outScanCodes) const;
+ status_t findScanCodeForLed(int32_t ledCode, int32_t* outScanCode) const;
+ status_t findUsageCodeForLed(int32_t ledCode, int32_t* outUsageCode) const;
status_t mapAxis(int32_t scanCode, AxisInfo* outAxisInfo) const;
@@ -79,9 +81,16 @@ private:
uint32_t flags;
};
+ struct Led {
+ int32_t ledCode;
+ };
+
+
KeyedVector<int32_t, Key> mKeysByScanCode;
KeyedVector<int32_t, Key> mKeysByUsageCode;
KeyedVector<int32_t, AxisInfo> mAxes;
+ KeyedVector<int32_t, Led> mLedsByScanCode;
+ KeyedVector<int32_t, Led> mLedsByUsageCode;
KeyLayoutMap();
@@ -99,6 +108,7 @@ private:
private:
status_t parseKey();
status_t parseAxis();
+ status_t parseLed();
};
};
diff --git a/include/input/Keyboard.h b/include/input/Keyboard.h
index 846cb0c..25b2f07 100644
--- a/include/input/Keyboard.h
+++ b/include/input/Keyboard.h
@@ -94,18 +94,24 @@ extern int32_t getKeyCodeByLabel(const char* label);
extern uint32_t getKeyFlagByLabel(const char* label);
/**
- * Gets a axis by its short form label, eg. "X".
+ * Gets an axis by its short form label, eg. "X".
* Returns -1 if unknown.
*/
extern int32_t getAxisByLabel(const char* label);
/**
- * Gets a axis label by its id.
+ * Gets an axis label by its id.
* Returns NULL if unknown.
*/
extern const char* getAxisLabel(int32_t axisId);
/**
+ * Gets an LED by its short form label, eg. "CAPS_LOCK".
+ * Returns -1 if unknown.
+ */
+extern int32_t getLedByLabel(const char* label);
+
+/**
* Updates a meta state field when a key is pressed or released.
*/
extern int32_t updateMetaState(int32_t keyCode, bool down, int32_t oldMetaState);
diff --git a/include/input/KeycodeLabels.h b/include/input/KeycodeLabels.h
index c64c5d8..a8d63da 100644
--- a/include/input/KeycodeLabels.h
+++ b/include/input/KeycodeLabels.h
@@ -247,6 +247,8 @@ static const KeycodeLabel KEYCODES[] = {
{ "BRIGHTNESS_DOWN", 220 },
{ "BRIGHTNESS_UP", 221 },
{ "MEDIA_AUDIO_TRACK", 222 },
+ { "SLEEP", 223 },
+ { "WAKEUP", 224 },
// NOTE: If you add a new keycode here you must also add it to several other files.
// Refer to frameworks/base/core/java/android/view/KeyEvent.java for the full list.
@@ -319,4 +321,26 @@ static const KeycodeLabel AXES[] = {
{ NULL, -1 }
};
+static const KeycodeLabel LEDS[] = {
+ { "NUM_LOCK", 0x00 },
+ { "CAPS_LOCK", 0x01 },
+ { "SCROLL_LOCK", 0x02 },
+ { "COMPOSE", 0x03 },
+ { "KANA", 0x04 },
+ { "SLEEP", 0x05 },
+ { "SUSPEND", 0x06 },
+ { "MUTE", 0x07 },
+ { "MISC", 0x08 },
+ { "MAIL", 0x09 },
+ { "CHARGING", 0x0a },
+ { "CONTROLLER_1", 0x10 },
+ { "CONTROLLER_2", 0x11 },
+ { "CONTROLLER_3", 0x12 },
+ { "CONTROLLER_4", 0x13 },
+
+ // NOTE: If you add new LEDs here, you must also add them to Input.h
+
+ { NULL, -1 }
+};
+
#endif // _LIBINPUT_KEYCODE_LABELS_H
diff --git a/include/media/drm/DrmAPI.h b/include/media/drm/DrmAPI.h
index 95bdf77..fc6b49c 100644
--- a/include/media/drm/DrmAPI.h
+++ b/include/media/drm/DrmAPI.h
@@ -178,12 +178,16 @@ namespace android {
// provisioning server.
//
// If successful, the opaque provision request blob is returned to the caller.
- virtual status_t getProvisionRequest(Vector<uint8_t> &request,
+ virtual status_t getProvisionRequest(String8 const &cert_type,
+ String8 const &cert_authority,
+ Vector<uint8_t> &request,
String8 &defaultUrl) = 0;
// After a provision response is received by the app, it is provided to the
// Drm plugin using provideProvisionResponse.
- virtual status_t provideProvisionResponse(Vector<uint8_t> const &response) = 0;
+ virtual status_t provideProvisionResponse(Vector<uint8_t> const &response,
+ Vector<uint8_t> &certificate,
+ Vector<uint8_t> &wrapped_key) = 0;
// A means of enforcing the contractual requirement for a concurrent stream
// limit per subscriber across devices is provided via SecureStop. SecureStop
@@ -290,6 +294,15 @@ namespace android {
bool &match) = 0;
+ // Compute an RSA signature on the provided message using the algorithm
+ // specified by algorithm.
+ virtual status_t signRSA(Vector<uint8_t> const &sessionId,
+ String8 const &algorithm,
+ Vector<uint8_t> const &message,
+ Vector<uint8_t> const &wrapped_key,
+ Vector<uint8_t> &signature) = 0;
+
+
status_t setListener(const sp<DrmPluginListener>& listener) {
Mutex::Autolock lock(mEventLock);
mListener = listener;
diff --git a/include/media/openmax/OMX_AudioExt.h b/include/media/openmax/OMX_AudioExt.h
new file mode 100644
index 0000000..aa6e6d0
--- /dev/null
+++ b/include/media/openmax/OMX_AudioExt.h
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2010 The Khronos Group Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject
+ * to the following conditions:
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+/** OMX_AudioExt.h - OpenMax IL version 1.1.2
+ * The OMX_AudioExt header file contains extensions to the
+ * definitions used by both the application and the component to
+ * access video items.
+ */
+
+#ifndef OMX_AudioExt_h
+#define OMX_AudioExt_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+/* Each OMX header shall include all required header files to allow the
+ * header to compile without errors. The includes below are required
+ * for this header file to compile successfully
+ */
+#include <OMX_Core.h>
+
+typedef enum OMX_AUDIO_CODINGEXTTYPE {
+ OMX_AUDIO_CodingAndroidUnused = OMX_AUDIO_CodingKhronosExtensions + 0x00100000,
+ OMX_AUDIO_CodingAndroidAC3, /**< AC3 encoded data */
+} OMX_AUDIO_CODINGEXTTYPE;
+
+typedef struct OMX_AUDIO_PARAM_ANDROID_AC3TYPE {
+ OMX_U32 nSize; /**< size of the structure in bytes */
+ OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
+ OMX_U32 nPortIndex; /**< port that this structure applies to */
+ OMX_U32 nChannels; /**< Number of channels */
+ OMX_U32 nSampleRate; /**< Sampling rate of the source data. Use 0 for
+ variable or unknown sampling rate. */
+} OMX_AUDIO_PARAM_ANDROID_AC3TYPE;
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* OMX_AudioExt_h */
+/* File EOF */
diff --git a/include/media/openmax/OMX_IndexExt.h b/include/media/openmax/OMX_IndexExt.h
index d22df56..c47a885 100644
--- a/include/media/openmax/OMX_IndexExt.h
+++ b/include/media/openmax/OMX_IndexExt.h
@@ -57,6 +57,7 @@ typedef enum OMX_INDEXEXTTYPE {
/* Audio parameters and configurations */
OMX_IndexExtAudioStartUnused = OMX_IndexKhronosExtensions + 0x00400000,
+ OMX_IndexParamAudioAndroidAc3, /**< reference: OMX_AUDIO_PARAM_ANDROID_AC3TYPE */
/* Image parameters and configurations */
OMX_IndexExtImageStartUnused = OMX_IndexKhronosExtensions + 0x00500000,
diff --git a/include/private/gui/LayerState.h b/include/private/gui/LayerState.h
index bf4bf03..5584fb1 100644
--- a/include/private/gui/LayerState.h
+++ b/include/private/gui/LayerState.h
@@ -30,11 +30,15 @@ namespace android {
class Parcel;
class ISurfaceComposerClient;
+/*
+ * Used to communicate layer information between SurfaceFlinger and its clients.
+ */
struct layer_state_t {
enum {
- eLayerHidden = 0x01,
+ eLayerHidden = 0x01, // SURFACE_HIDDEN in SurfaceControl.java
+ eLayerOpaque = 0x02, // SURFACE_OPAQUE
};
enum {
@@ -47,6 +51,7 @@ struct layer_state_t {
eVisibilityChanged = 0x00000040,
eLayerStackChanged = 0x00000080,
eCropChanged = 0x00000100,
+ eOpacityChanged = 0x00000200,
};
layer_state_t()