Loading cmds/installd/InstalldNativeService.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -342,7 +342,8 @@ static int restorecon_app_data_lazy(const std::string& path, const std::string& // If the initial top-level restorecon above changed the label, then go // back and restorecon everything recursively if (strcmp(before, after)) { // TODO(b/190567190, b/188141923) Remove recursive fixup of com.google.android.gsf. if (strcmp(before, after) || (path.find("com.google.android.gsf") != std::string::npos)) { if (existing) { LOG(DEBUG) << "Detected label change from " << before << " to " << after << " at " << path << "; running recursive restorecon"; Loading include/input/InputDevice.h +2 −6 Original line number Diff line number Diff line Loading @@ -257,13 +257,9 @@ public: return mMotionRanges; } const InputDeviceSensorInfo* getSensorInfo(InputDeviceSensorType type); std::vector<InputDeviceSensorInfo> getSensors(); const std::vector<InputDeviceSensorType> getSensorTypes(); const std::vector<int32_t> getLightIds(); const InputDeviceLightInfo* getLightInfo(int32_t id); std::vector<InputDeviceLightInfo> getLights(); private: int32_t mId; Loading libs/binder/tests/Android.bp +4 −0 Original line number Diff line number Diff line Loading @@ -156,6 +156,10 @@ cc_test { ], test_suites: ["general-tests"], require_root: true, // Prevent the unit test target from running on sc-dev as it's not ready. test_options: { unit_test: false, }, } cc_benchmark { Loading libs/input/InputDevice.cpp +10 −24 Original line number Diff line number Diff line Loading @@ -247,36 +247,22 @@ void InputDeviceInfo::addLightInfo(const InputDeviceLightInfo& info) { mLights.insert_or_assign(info.id, info); } const std::vector<InputDeviceSensorType> InputDeviceInfo::getSensorTypes() { std::vector<InputDeviceSensorType> types; std::vector<InputDeviceSensorInfo> InputDeviceInfo::getSensors() { std::vector<InputDeviceSensorInfo> infos; infos.reserve(mSensors.size()); for (const auto& [type, info] : mSensors) { types.push_back(type); infos.push_back(info); } return types; return infos; } const InputDeviceSensorInfo* InputDeviceInfo::getSensorInfo(InputDeviceSensorType type) { auto it = mSensors.find(type); if (it == mSensors.end()) { return nullptr; } return &it->second; } const std::vector<int32_t> InputDeviceInfo::getLightIds() { std::vector<int32_t> ids; std::vector<InputDeviceLightInfo> InputDeviceInfo::getLights() { std::vector<InputDeviceLightInfo> infos; infos.reserve(mLights.size()); for (const auto& [id, info] : mLights) { ids.push_back(id); } return ids; } const InputDeviceLightInfo* InputDeviceInfo::getLightInfo(int32_t id) { auto it = mLights.find(id); if (it == mLights.end()) { return nullptr; infos.push_back(info); } return &it->second; return infos; } } // namespace android services/inputflinger/include/InputReaderBase.h +2 −2 Original line number Diff line number Diff line Loading @@ -113,9 +113,9 @@ public: /* Get battery status of a particular input device. */ virtual std::optional<int32_t> getBatteryStatus(int32_t deviceId) = 0; virtual std::vector<int32_t> getLightIds(int32_t deviceId) = 0; virtual std::vector<InputDeviceLightInfo> getLights(int32_t deviceId) = 0; virtual const InputDeviceLightInfo* getLightInfo(int32_t deviceId, int32_t lightId) = 0; virtual std::vector<InputDeviceSensorInfo> getSensors(int32_t deviceId) = 0; /* Return true if the device can send input events to the specified display. */ virtual bool canDispatchToDisplay(int32_t deviceId, int32_t displayId) = 0; Loading Loading
cmds/installd/InstalldNativeService.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -342,7 +342,8 @@ static int restorecon_app_data_lazy(const std::string& path, const std::string& // If the initial top-level restorecon above changed the label, then go // back and restorecon everything recursively if (strcmp(before, after)) { // TODO(b/190567190, b/188141923) Remove recursive fixup of com.google.android.gsf. if (strcmp(before, after) || (path.find("com.google.android.gsf") != std::string::npos)) { if (existing) { LOG(DEBUG) << "Detected label change from " << before << " to " << after << " at " << path << "; running recursive restorecon"; Loading
include/input/InputDevice.h +2 −6 Original line number Diff line number Diff line Loading @@ -257,13 +257,9 @@ public: return mMotionRanges; } const InputDeviceSensorInfo* getSensorInfo(InputDeviceSensorType type); std::vector<InputDeviceSensorInfo> getSensors(); const std::vector<InputDeviceSensorType> getSensorTypes(); const std::vector<int32_t> getLightIds(); const InputDeviceLightInfo* getLightInfo(int32_t id); std::vector<InputDeviceLightInfo> getLights(); private: int32_t mId; Loading
libs/binder/tests/Android.bp +4 −0 Original line number Diff line number Diff line Loading @@ -156,6 +156,10 @@ cc_test { ], test_suites: ["general-tests"], require_root: true, // Prevent the unit test target from running on sc-dev as it's not ready. test_options: { unit_test: false, }, } cc_benchmark { Loading
libs/input/InputDevice.cpp +10 −24 Original line number Diff line number Diff line Loading @@ -247,36 +247,22 @@ void InputDeviceInfo::addLightInfo(const InputDeviceLightInfo& info) { mLights.insert_or_assign(info.id, info); } const std::vector<InputDeviceSensorType> InputDeviceInfo::getSensorTypes() { std::vector<InputDeviceSensorType> types; std::vector<InputDeviceSensorInfo> InputDeviceInfo::getSensors() { std::vector<InputDeviceSensorInfo> infos; infos.reserve(mSensors.size()); for (const auto& [type, info] : mSensors) { types.push_back(type); infos.push_back(info); } return types; return infos; } const InputDeviceSensorInfo* InputDeviceInfo::getSensorInfo(InputDeviceSensorType type) { auto it = mSensors.find(type); if (it == mSensors.end()) { return nullptr; } return &it->second; } const std::vector<int32_t> InputDeviceInfo::getLightIds() { std::vector<int32_t> ids; std::vector<InputDeviceLightInfo> InputDeviceInfo::getLights() { std::vector<InputDeviceLightInfo> infos; infos.reserve(mLights.size()); for (const auto& [id, info] : mLights) { ids.push_back(id); } return ids; } const InputDeviceLightInfo* InputDeviceInfo::getLightInfo(int32_t id) { auto it = mLights.find(id); if (it == mLights.end()) { return nullptr; infos.push_back(info); } return &it->second; return infos; } } // namespace android
services/inputflinger/include/InputReaderBase.h +2 −2 Original line number Diff line number Diff line Loading @@ -113,9 +113,9 @@ public: /* Get battery status of a particular input device. */ virtual std::optional<int32_t> getBatteryStatus(int32_t deviceId) = 0; virtual std::vector<int32_t> getLightIds(int32_t deviceId) = 0; virtual std::vector<InputDeviceLightInfo> getLights(int32_t deviceId) = 0; virtual const InputDeviceLightInfo* getLightInfo(int32_t deviceId, int32_t lightId) = 0; virtual std::vector<InputDeviceSensorInfo> getSensors(int32_t deviceId) = 0; /* Return true if the device can send input events to the specified display. */ virtual bool canDispatchToDisplay(int32_t deviceId, int32_t displayId) = 0; Loading