Loading include/android/choreographer.h +4 −0 Original line number Diff line number Diff line Loading @@ -127,6 +127,10 @@ void AChoreographer_postFrameCallbackDelayed64(AChoreographer* choreographer, * to listen directly to DisplayManager.DisplayListener#onDisplayChanged events * instead. * * As of API level 31, this api is guaranteed to have a consistent view with DisplayManager; * Display#getRefreshRate is guaranteed to not return a stale refresh rate when invoked from this * callback. * * Available since API level 30. */ void AChoreographer_registerRefreshRateCallback(AChoreographer* choreographer, Loading include/android/input.h +1 −1 Original line number Diff line number Diff line Loading @@ -859,7 +859,7 @@ enum { /** HDMI */ AINPUT_SOURCE_HDMI = 0x02000000 | AINPUT_SOURCE_CLASS_BUTTON, /** sensor */ AINPUT_SOURCE_SENSOR = 0x04000000 | AINPUT_SOURCE_UNKNOWN, AINPUT_SOURCE_SENSOR = 0x04000000 | AINPUT_SOURCE_CLASS_NONE, /** rotary encoder */ AINPUT_SOURCE_ROTARY_ENCODER = 0x00400000 | AINPUT_SOURCE_CLASS_NONE, Loading include/input/InputDevice.h +28 −0 Original line number Diff line number Diff line Loading @@ -100,6 +100,13 @@ enum class InputDeviceSensorReportingMode : int32_t { SPECIAL_TRIGGER = 3, }; enum class InputDeviceLightType : int32_t { SINGLE = 0, PLAYER_ID = 1, RGB = 2, MULTI_COLOR = 3, }; struct InputDeviceSensorInfo { explicit InputDeviceSensorInfo(std::string name, std::string vendor, int32_t version, InputDeviceSensorType type, InputDeviceSensorAccuracy accuracy, Loading Loading @@ -156,6 +163,20 @@ struct InputDeviceSensorInfo { int32_t id; }; struct InputDeviceLightInfo { explicit InputDeviceLightInfo(std::string name, int32_t id, InputDeviceLightType type, int32_t ordinal) : name(name), id(id), type(type), ordinal(ordinal) {} // Name string of the light. std::string name; // Light id int32_t id; // Type of the light. InputDeviceLightType type; // Ordinal of the light int32_t ordinal; }; /* * Describes the characteristics and capabilities of an input device. */ Loading Loading @@ -198,6 +219,7 @@ public: float min, float max, float flat, float fuzz, float resolution); void addMotionRange(const MotionRange& range); void addSensorInfo(const InputDeviceSensorInfo& info); void addLightInfo(const InputDeviceLightInfo& info); inline void setKeyboardType(int32_t keyboardType) { mKeyboardType = keyboardType; } inline int32_t getKeyboardType() const { return mKeyboardType; } Loading Loading @@ -230,6 +252,10 @@ public: const std::vector<InputDeviceSensorType> getSensorTypes(); const std::vector<int32_t> getLightIds(); const InputDeviceLightInfo* getLightInfo(int32_t id); private: int32_t mId; int32_t mGeneration; Loading @@ -248,6 +274,8 @@ private: std::vector<MotionRange> mMotionRanges; std::unordered_map<InputDeviceSensorType, InputDeviceSensorInfo> mSensors; /* Map from light ID to light info */ std::unordered_map<int32_t, InputDeviceLightInfo> mLights; }; /* Types of input device configuration files. */ Loading libs/gui/ISurfaceComposer.cpp +0 −70 Original line number Diff line number Diff line Loading @@ -411,24 +411,6 @@ public: return static_cast<status_t>(reply.readInt32()); } status_t getAutoLowLatencyModeSupport(const sp<IBinder>& display, bool* outSupport) const override { Parcel data, reply; data.writeInterfaceToken(ISurfaceComposer::getInterfaceDescriptor()); status_t result = data.writeStrongBinder(display); if (result != NO_ERROR) { ALOGE("getAutoLowLatencyModeSupport failed to writeStrongBinder: %d", result); return result; } result = remote()->transact(BnSurfaceComposer::GET_AUTO_LOW_LATENCY_MODE_SUPPORT, data, &reply); if (result != NO_ERROR) { ALOGE("getAutoLowLatencyModeSupport failed to transact: %d", result); return result; } return reply.readBool(outSupport); } void setAutoLowLatencyMode(const sp<IBinder>& display, bool on) override { Parcel data, reply; status_t result = data.writeInterfaceToken(ISurfaceComposer::getInterfaceDescriptor()); Loading @@ -454,23 +436,6 @@ public: } } status_t getGameContentTypeSupport(const sp<IBinder>& display, bool* outSupport) const override { Parcel data, reply; data.writeInterfaceToken(ISurfaceComposer::getInterfaceDescriptor()); status_t result = data.writeStrongBinder(display); if (result != NO_ERROR) { ALOGE("getGameContentTypeSupport failed to writeStrongBinder: %d", result); return result; } result = remote()->transact(BnSurfaceComposer::GET_GAME_CONTENT_TYPE_SUPPORT, data, &reply); if (result != NO_ERROR) { ALOGE("getGameContentTypeSupport failed to transact: %d", result); return result; } return reply.readBool(outSupport); } void setGameContentType(const sp<IBinder>& display, bool on) override { Parcel data, reply; status_t result = data.writeInterfaceToken(ISurfaceComposer::getInterfaceDescriptor()); Loading Loading @@ -1423,23 +1388,6 @@ status_t BnSurfaceComposer::onTransact( result = reply->writeInt32(result); return result; } case GET_AUTO_LOW_LATENCY_MODE_SUPPORT: { CHECK_INTERFACE(ISurfaceComposer, data, reply); sp<IBinder> display = nullptr; status_t result = data.readStrongBinder(&display); if (result != NO_ERROR) { ALOGE("getAutoLowLatencyModeSupport failed to readStrongBinder: %d", result); return result; } bool supported = false; result = getAutoLowLatencyModeSupport(display, &supported); if (result == NO_ERROR) { result = reply->writeBool(supported); } return result; } case SET_AUTO_LOW_LATENCY_MODE: { CHECK_INTERFACE(ISurfaceComposer, data, reply); sp<IBinder> display = nullptr; Loading @@ -1457,23 +1405,6 @@ status_t BnSurfaceComposer::onTransact( setAutoLowLatencyMode(display, setAllm); return result; } case GET_GAME_CONTENT_TYPE_SUPPORT: { CHECK_INTERFACE(ISurfaceComposer, data, reply); sp<IBinder> display = nullptr; status_t result = data.readStrongBinder(&display); if (result != NO_ERROR) { ALOGE("getGameContentTypeSupport failed to readStrongBinder: %d", result); return result; } bool supported = false; result = getGameContentTypeSupport(display, &supported); if (result == NO_ERROR) { result = reply->writeBool(supported); } return result; } case SET_GAME_CONTENT_TYPE: { CHECK_INTERFACE(ISurfaceComposer, data, reply); sp<IBinder> display = nullptr; Loading @@ -1491,7 +1422,6 @@ status_t BnSurfaceComposer::onTransact( setGameContentType(display, setGameContentTypeOn); return result; } case CLEAR_ANIMATION_FRAME_STATS: { CHECK_INTERFACE(ISurfaceComposer, data, reply); status_t result = clearAnimationFrameStats(); Loading libs/gui/SurfaceComposerClient.cpp +0 −12 Original line number Diff line number Diff line Loading @@ -1904,22 +1904,10 @@ status_t SurfaceComposerClient::setActiveColorMode(const sp<IBinder>& display, return ComposerService::getComposerService()->setActiveColorMode(display, colorMode); } bool SurfaceComposerClient::getAutoLowLatencyModeSupport(const sp<IBinder>& display) { bool supported = false; ComposerService::getComposerService()->getAutoLowLatencyModeSupport(display, &supported); return supported; } void SurfaceComposerClient::setAutoLowLatencyMode(const sp<IBinder>& display, bool on) { ComposerService::getComposerService()->setAutoLowLatencyMode(display, on); } bool SurfaceComposerClient::getGameContentTypeSupport(const sp<IBinder>& display) { bool supported = false; ComposerService::getComposerService()->getGameContentTypeSupport(display, &supported); return supported; } void SurfaceComposerClient::setGameContentType(const sp<IBinder>& display, bool on) { ComposerService::getComposerService()->setGameContentType(display, on); } Loading Loading
include/android/choreographer.h +4 −0 Original line number Diff line number Diff line Loading @@ -127,6 +127,10 @@ void AChoreographer_postFrameCallbackDelayed64(AChoreographer* choreographer, * to listen directly to DisplayManager.DisplayListener#onDisplayChanged events * instead. * * As of API level 31, this api is guaranteed to have a consistent view with DisplayManager; * Display#getRefreshRate is guaranteed to not return a stale refresh rate when invoked from this * callback. * * Available since API level 30. */ void AChoreographer_registerRefreshRateCallback(AChoreographer* choreographer, Loading
include/android/input.h +1 −1 Original line number Diff line number Diff line Loading @@ -859,7 +859,7 @@ enum { /** HDMI */ AINPUT_SOURCE_HDMI = 0x02000000 | AINPUT_SOURCE_CLASS_BUTTON, /** sensor */ AINPUT_SOURCE_SENSOR = 0x04000000 | AINPUT_SOURCE_UNKNOWN, AINPUT_SOURCE_SENSOR = 0x04000000 | AINPUT_SOURCE_CLASS_NONE, /** rotary encoder */ AINPUT_SOURCE_ROTARY_ENCODER = 0x00400000 | AINPUT_SOURCE_CLASS_NONE, Loading
include/input/InputDevice.h +28 −0 Original line number Diff line number Diff line Loading @@ -100,6 +100,13 @@ enum class InputDeviceSensorReportingMode : int32_t { SPECIAL_TRIGGER = 3, }; enum class InputDeviceLightType : int32_t { SINGLE = 0, PLAYER_ID = 1, RGB = 2, MULTI_COLOR = 3, }; struct InputDeviceSensorInfo { explicit InputDeviceSensorInfo(std::string name, std::string vendor, int32_t version, InputDeviceSensorType type, InputDeviceSensorAccuracy accuracy, Loading Loading @@ -156,6 +163,20 @@ struct InputDeviceSensorInfo { int32_t id; }; struct InputDeviceLightInfo { explicit InputDeviceLightInfo(std::string name, int32_t id, InputDeviceLightType type, int32_t ordinal) : name(name), id(id), type(type), ordinal(ordinal) {} // Name string of the light. std::string name; // Light id int32_t id; // Type of the light. InputDeviceLightType type; // Ordinal of the light int32_t ordinal; }; /* * Describes the characteristics and capabilities of an input device. */ Loading Loading @@ -198,6 +219,7 @@ public: float min, float max, float flat, float fuzz, float resolution); void addMotionRange(const MotionRange& range); void addSensorInfo(const InputDeviceSensorInfo& info); void addLightInfo(const InputDeviceLightInfo& info); inline void setKeyboardType(int32_t keyboardType) { mKeyboardType = keyboardType; } inline int32_t getKeyboardType() const { return mKeyboardType; } Loading Loading @@ -230,6 +252,10 @@ public: const std::vector<InputDeviceSensorType> getSensorTypes(); const std::vector<int32_t> getLightIds(); const InputDeviceLightInfo* getLightInfo(int32_t id); private: int32_t mId; int32_t mGeneration; Loading @@ -248,6 +274,8 @@ private: std::vector<MotionRange> mMotionRanges; std::unordered_map<InputDeviceSensorType, InputDeviceSensorInfo> mSensors; /* Map from light ID to light info */ std::unordered_map<int32_t, InputDeviceLightInfo> mLights; }; /* Types of input device configuration files. */ Loading
libs/gui/ISurfaceComposer.cpp +0 −70 Original line number Diff line number Diff line Loading @@ -411,24 +411,6 @@ public: return static_cast<status_t>(reply.readInt32()); } status_t getAutoLowLatencyModeSupport(const sp<IBinder>& display, bool* outSupport) const override { Parcel data, reply; data.writeInterfaceToken(ISurfaceComposer::getInterfaceDescriptor()); status_t result = data.writeStrongBinder(display); if (result != NO_ERROR) { ALOGE("getAutoLowLatencyModeSupport failed to writeStrongBinder: %d", result); return result; } result = remote()->transact(BnSurfaceComposer::GET_AUTO_LOW_LATENCY_MODE_SUPPORT, data, &reply); if (result != NO_ERROR) { ALOGE("getAutoLowLatencyModeSupport failed to transact: %d", result); return result; } return reply.readBool(outSupport); } void setAutoLowLatencyMode(const sp<IBinder>& display, bool on) override { Parcel data, reply; status_t result = data.writeInterfaceToken(ISurfaceComposer::getInterfaceDescriptor()); Loading @@ -454,23 +436,6 @@ public: } } status_t getGameContentTypeSupport(const sp<IBinder>& display, bool* outSupport) const override { Parcel data, reply; data.writeInterfaceToken(ISurfaceComposer::getInterfaceDescriptor()); status_t result = data.writeStrongBinder(display); if (result != NO_ERROR) { ALOGE("getGameContentTypeSupport failed to writeStrongBinder: %d", result); return result; } result = remote()->transact(BnSurfaceComposer::GET_GAME_CONTENT_TYPE_SUPPORT, data, &reply); if (result != NO_ERROR) { ALOGE("getGameContentTypeSupport failed to transact: %d", result); return result; } return reply.readBool(outSupport); } void setGameContentType(const sp<IBinder>& display, bool on) override { Parcel data, reply; status_t result = data.writeInterfaceToken(ISurfaceComposer::getInterfaceDescriptor()); Loading Loading @@ -1423,23 +1388,6 @@ status_t BnSurfaceComposer::onTransact( result = reply->writeInt32(result); return result; } case GET_AUTO_LOW_LATENCY_MODE_SUPPORT: { CHECK_INTERFACE(ISurfaceComposer, data, reply); sp<IBinder> display = nullptr; status_t result = data.readStrongBinder(&display); if (result != NO_ERROR) { ALOGE("getAutoLowLatencyModeSupport failed to readStrongBinder: %d", result); return result; } bool supported = false; result = getAutoLowLatencyModeSupport(display, &supported); if (result == NO_ERROR) { result = reply->writeBool(supported); } return result; } case SET_AUTO_LOW_LATENCY_MODE: { CHECK_INTERFACE(ISurfaceComposer, data, reply); sp<IBinder> display = nullptr; Loading @@ -1457,23 +1405,6 @@ status_t BnSurfaceComposer::onTransact( setAutoLowLatencyMode(display, setAllm); return result; } case GET_GAME_CONTENT_TYPE_SUPPORT: { CHECK_INTERFACE(ISurfaceComposer, data, reply); sp<IBinder> display = nullptr; status_t result = data.readStrongBinder(&display); if (result != NO_ERROR) { ALOGE("getGameContentTypeSupport failed to readStrongBinder: %d", result); return result; } bool supported = false; result = getGameContentTypeSupport(display, &supported); if (result == NO_ERROR) { result = reply->writeBool(supported); } return result; } case SET_GAME_CONTENT_TYPE: { CHECK_INTERFACE(ISurfaceComposer, data, reply); sp<IBinder> display = nullptr; Loading @@ -1491,7 +1422,6 @@ status_t BnSurfaceComposer::onTransact( setGameContentType(display, setGameContentTypeOn); return result; } case CLEAR_ANIMATION_FRAME_STATS: { CHECK_INTERFACE(ISurfaceComposer, data, reply); status_t result = clearAnimationFrameStats(); Loading
libs/gui/SurfaceComposerClient.cpp +0 −12 Original line number Diff line number Diff line Loading @@ -1904,22 +1904,10 @@ status_t SurfaceComposerClient::setActiveColorMode(const sp<IBinder>& display, return ComposerService::getComposerService()->setActiveColorMode(display, colorMode); } bool SurfaceComposerClient::getAutoLowLatencyModeSupport(const sp<IBinder>& display) { bool supported = false; ComposerService::getComposerService()->getAutoLowLatencyModeSupport(display, &supported); return supported; } void SurfaceComposerClient::setAutoLowLatencyMode(const sp<IBinder>& display, bool on) { ComposerService::getComposerService()->setAutoLowLatencyMode(display, on); } bool SurfaceComposerClient::getGameContentTypeSupport(const sp<IBinder>& display) { bool supported = false; ComposerService::getComposerService()->getGameContentTypeSupport(display, &supported); return supported; } void SurfaceComposerClient::setGameContentType(const sp<IBinder>& display, bool on) { ComposerService::getComposerService()->setGameContentType(display, on); } Loading