Loading data/etc/android.hardware.type.automotive.xml +6 −0 Original line number Diff line number Diff line Loading @@ -18,5 +18,11 @@ <permissions> <feature name="android.hardware.type.automotive" /> <unavailable-feature name="android.hardware.type.embedded" /> <unavailable-feature name="android.hardware.type.pc" /> <unavailable-feature name="android.hardware.type.television" /> <unavailable-feature name="android.hardware.type.watch" /> <unavailable-feature name="android.software.leanback" /> <unavailable-feature name="android.software.leanback_only" /> <unavailable-feature name="android.software.picture_in_picture"/> </permissions> include/android/sensor.h +1 −1 Original line number Diff line number Diff line Loading @@ -349,7 +349,7 @@ enum { AREPORTING_MODE_CONTINUOUS = 0, /** reporting on change */ AREPORTING_MODE_ON_CHANGE = 1, /** on shot reporting */ /** one shot reporting */ AREPORTING_MODE_ONE_SHOT = 2, /** special trigger reporting */ AREPORTING_MODE_SPECIAL_TRIGGER = 3 Loading include/input/DisplayTopologyGraph.h +17 −1 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ #pragma once #include <android-base/result.h> #include <ftl/enum.h> #include <ui/LogicalDisplayId.h> Loading Loading @@ -58,8 +59,23 @@ struct DisplayTopologyGraph { std::unordered_map<ui::LogicalDisplayId, std::vector<DisplayTopologyAdjacentDisplay>> graph; std::unordered_map<ui::LogicalDisplayId, int> displaysDensity; bool isValid() const; DisplayTopologyGraph() = default; std::string dump() const; // Builds the topology graph from components. // Returns error if a valid graph cannot be built from the supplied components. static base::Result<const DisplayTopologyGraph> create( ui::LogicalDisplayId primaryDisplay, std::unordered_map<ui::LogicalDisplayId, std::vector<DisplayTopologyAdjacentDisplay>>&& adjacencyGraph, std::unordered_map<ui::LogicalDisplayId, int>&& displaysDensityMap); private: DisplayTopologyGraph( ui::LogicalDisplayId primaryDisplay, std::unordered_map<ui::LogicalDisplayId, std::vector<DisplayTopologyAdjacentDisplay>>&& adjacencyGraph, std::unordered_map<ui::LogicalDisplayId, int>&& displaysDensityMap); }; } // namespace android libs/binder/Android.bp +24 −0 Original line number Diff line number Diff line Loading @@ -447,6 +447,29 @@ cc_library_shared { ], } soong_config_module_type { name: "release_libbinder_binder_observer_config", module_type: "cc_defaults", config_namespace: "libbinder", bool_variables: ["release_libbinder_binder_observer"], properties: [ "cflags", ], } release_libbinder_binder_observer_config { name: "release_libbinder_enable_binder_observer_flag", soong_config_variables: { release_libbinder_binder_observer: { cflags: ["-DLIBBINDER_BINDER_OBSERVER"], conditions_default: { cflags: ["-DNO_LIBBINDER_BINDER_OBSERVER"], }, }, }, } soong_config_module_type { name: "libbinder_remove_cache_static_list_config", module_type: "cc_defaults", Loading Loading @@ -519,6 +542,7 @@ cc_defaults { "libbinder_client_cache_flag", "libbinder_addservice_cache_flag", "libbinder_remove_cache_static_list_flag", "release_libbinder_enable_binder_observer_flag", ], srcs: [ "BufferedTextOutput.cpp", Loading libs/binder/BufferedTextOutput.cpp +11 −2 Original line number Diff line number Diff line Loading @@ -48,9 +48,18 @@ struct BufferedTextOutput::BufferState : public RefBase } status_t append(const char* txt, size_t len) { if (len > SIZE_MAX - bufferPos) return NO_MEMORY; // overflow if (len > SIZE_MAX - bufferPos) { ALOGE("%s: expanding buffer length by %zu exceeds max size (bufferPos: %zu)\n", __FUNCTION__, len, bufferPos); return NO_MEMORY; // overflow } if ((len+bufferPos) > bufferSize) { if ((len + bufferPos) > SIZE_MAX / 3) return NO_MEMORY; // overflow if ((len + bufferPos) > SIZE_MAX / 3) { ALOGE("%s: cannot realloc to increase buffer size. Total length: %zu (len: %zu, " "bufferPos: %zu)", __FUNCTION__, len + bufferPos, len, bufferPos); return NO_MEMORY; // overflow } size_t newSize = ((len+bufferPos)*3)/2; void* b = realloc(buffer, newSize); if (!b) return NO_MEMORY; Loading Loading
data/etc/android.hardware.type.automotive.xml +6 −0 Original line number Diff line number Diff line Loading @@ -18,5 +18,11 @@ <permissions> <feature name="android.hardware.type.automotive" /> <unavailable-feature name="android.hardware.type.embedded" /> <unavailable-feature name="android.hardware.type.pc" /> <unavailable-feature name="android.hardware.type.television" /> <unavailable-feature name="android.hardware.type.watch" /> <unavailable-feature name="android.software.leanback" /> <unavailable-feature name="android.software.leanback_only" /> <unavailable-feature name="android.software.picture_in_picture"/> </permissions>
include/android/sensor.h +1 −1 Original line number Diff line number Diff line Loading @@ -349,7 +349,7 @@ enum { AREPORTING_MODE_CONTINUOUS = 0, /** reporting on change */ AREPORTING_MODE_ON_CHANGE = 1, /** on shot reporting */ /** one shot reporting */ AREPORTING_MODE_ONE_SHOT = 2, /** special trigger reporting */ AREPORTING_MODE_SPECIAL_TRIGGER = 3 Loading
include/input/DisplayTopologyGraph.h +17 −1 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ #pragma once #include <android-base/result.h> #include <ftl/enum.h> #include <ui/LogicalDisplayId.h> Loading Loading @@ -58,8 +59,23 @@ struct DisplayTopologyGraph { std::unordered_map<ui::LogicalDisplayId, std::vector<DisplayTopologyAdjacentDisplay>> graph; std::unordered_map<ui::LogicalDisplayId, int> displaysDensity; bool isValid() const; DisplayTopologyGraph() = default; std::string dump() const; // Builds the topology graph from components. // Returns error if a valid graph cannot be built from the supplied components. static base::Result<const DisplayTopologyGraph> create( ui::LogicalDisplayId primaryDisplay, std::unordered_map<ui::LogicalDisplayId, std::vector<DisplayTopologyAdjacentDisplay>>&& adjacencyGraph, std::unordered_map<ui::LogicalDisplayId, int>&& displaysDensityMap); private: DisplayTopologyGraph( ui::LogicalDisplayId primaryDisplay, std::unordered_map<ui::LogicalDisplayId, std::vector<DisplayTopologyAdjacentDisplay>>&& adjacencyGraph, std::unordered_map<ui::LogicalDisplayId, int>&& displaysDensityMap); }; } // namespace android
libs/binder/Android.bp +24 −0 Original line number Diff line number Diff line Loading @@ -447,6 +447,29 @@ cc_library_shared { ], } soong_config_module_type { name: "release_libbinder_binder_observer_config", module_type: "cc_defaults", config_namespace: "libbinder", bool_variables: ["release_libbinder_binder_observer"], properties: [ "cflags", ], } release_libbinder_binder_observer_config { name: "release_libbinder_enable_binder_observer_flag", soong_config_variables: { release_libbinder_binder_observer: { cflags: ["-DLIBBINDER_BINDER_OBSERVER"], conditions_default: { cflags: ["-DNO_LIBBINDER_BINDER_OBSERVER"], }, }, }, } soong_config_module_type { name: "libbinder_remove_cache_static_list_config", module_type: "cc_defaults", Loading Loading @@ -519,6 +542,7 @@ cc_defaults { "libbinder_client_cache_flag", "libbinder_addservice_cache_flag", "libbinder_remove_cache_static_list_flag", "release_libbinder_enable_binder_observer_flag", ], srcs: [ "BufferedTextOutput.cpp", Loading
libs/binder/BufferedTextOutput.cpp +11 −2 Original line number Diff line number Diff line Loading @@ -48,9 +48,18 @@ struct BufferedTextOutput::BufferState : public RefBase } status_t append(const char* txt, size_t len) { if (len > SIZE_MAX - bufferPos) return NO_MEMORY; // overflow if (len > SIZE_MAX - bufferPos) { ALOGE("%s: expanding buffer length by %zu exceeds max size (bufferPos: %zu)\n", __FUNCTION__, len, bufferPos); return NO_MEMORY; // overflow } if ((len+bufferPos) > bufferSize) { if ((len + bufferPos) > SIZE_MAX / 3) return NO_MEMORY; // overflow if ((len + bufferPos) > SIZE_MAX / 3) { ALOGE("%s: cannot realloc to increase buffer size. Total length: %zu (len: %zu, " "bufferPos: %zu)", __FUNCTION__, len + bufferPos, len, bufferPos); return NO_MEMORY; // overflow } size_t newSize = ((len+bufferPos)*3)/2; void* b = realloc(buffer, newSize); if (!b) return NO_MEMORY; Loading