Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8d9617e2 authored by Chris Manton's avatar Chris Manton Committed by Automerger Merge Worker
Browse files

flatbuffers: Re-log filtering am: c1060c76 am: 7243d97e

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Bluetooth/+/2014598

Change-Id: I967d39ab634a3bfba897d535b99a685c3f1c8ea8
parents 532704a2 7243d97e
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -14,9 +14,11 @@
 * limitations under the License.
 */

#include "dumpsys/filter.h"

#include <memory>

#include "dumpsys/filter.h"
#include "common/init_flags.h"
#include "dumpsys/internal/filter_internal.h"
#include "os/log.h"

@@ -78,7 +80,8 @@ class Filter {
class DeveloperPrivacyFilter : public Filter {
 public:
  DeveloperPrivacyFilter(const dumpsys::ReflectionSchema& reflection_schema) : Filter(reflection_schema) {}
  void FilterInPlace(char* dumpsys_data) override {}
  void FilterInPlace(char* dumpsys_data) override { /* Nothing to do in this mode */
  }
};

class UserPrivacyFilter : public Filter {
@@ -97,7 +100,8 @@ bool UserPrivacyFilter::FilterField(const reflection::Field* field, flatbuffers:
  ASSERT(table != nullptr);
  internal::PrivacyLevel privacy_level = internal::FindFieldPrivacyLevel(*field);

  switch (static_cast<flatbuffers::BaseType>(field->type()->base_type())) {
  const auto type = static_cast<flatbuffers::BaseType>(field->type()->base_type());
  switch (type) {
    case flatbuffers::BASE_TYPE_INT:
      return internal::FilterTypeInteger(*field, table, privacy_level);
      break;
@@ -117,7 +121,7 @@ bool UserPrivacyFilter::FilterField(const reflection::Field* field, flatbuffers:
      return internal::FilterTypeLong(*field, table, privacy_level);
      break;
    default:
      LOG_WARN("%s WARN Unsupported base type\n", __func__);
      LOG_WARN("Unsupported base type:%s", internal::FlatbufferTypeText(type).c_str());
      break;
  }
  return false;