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

Commit ab36e390 authored by Kris Alder's avatar Kris Alder Committed by Android (Google) Code Review
Browse files

Merge "libaudioclient : Update log in VALUE_OR_FATAL" into sc-dev

parents 0e1f5ce4 d4a77284
Loading
Loading
Loading
Loading
+0 −9
Original line number Diff line number Diff line
@@ -35,15 +35,6 @@
#include <media/MediaMetricsItem.h>
#include <media/TypeConverter.h>

#define VALUE_OR_FATAL(result)                   \
    ({                                           \
       auto _tmp = (result);                     \
       LOG_ALWAYS_FATAL_IF(!_tmp.ok(),           \
                           "Failed result (%d)", \
                           _tmp.error());        \
       std::move(_tmp.value());                  \
     })

#define WAIT_PERIOD_MS          10

namespace android {
+0 −9
Original line number Diff line number Diff line
@@ -38,15 +38,6 @@
#include <media/MediaMetricsItem.h>
#include <media/TypeConverter.h>

#define VALUE_OR_FATAL(result)                   \
    ({                                           \
       auto _tmp = (result);                     \
       LOG_ALWAYS_FATAL_IF(!_tmp.ok(),           \
                           "Failed result (%d)", \
                           _tmp.error());        \
       std::move(_tmp.value());                  \
     })

#define WAIT_PERIOD_MS                  10
#define WAIT_STREAM_END_TIMEOUT_SEC     120
static const int kMaxLoopCountNotifications = 32;
+9 −0
Original line number Diff line number Diff line
@@ -48,6 +48,15 @@ using ConversionResult = base::expected<T, status_t>;
       std::move(_tmp.value());             \
     })

#define VALUE_OR_FATAL(result)                                        \
    ({                                                                \
       auto _tmp = (result);                                          \
       LOG_ALWAYS_FATAL_IF(!_tmp.ok(),                                \
                           "Function: %s Line: %d Failed result (%d)",\
                           __FUNCTION__, __LINE__, _tmp.error());     \
       std::move(_tmp.value());                                       \
     })

/**
 * A generic template to safely cast between integral types, respecting limits of the destination
 * type.
+0 −9
Original line number Diff line number Diff line
@@ -85,15 +85,6 @@

#include "TypedLogger.h"

#define VALUE_OR_FATAL(result)                   \
    ({                                           \
       auto _tmp = (result);                     \
       LOG_ALWAYS_FATAL_IF(!_tmp.ok(),           \
                           "Failed result (%d)", \
                           _tmp.error());        \
       std::move(_tmp.value());                  \
     })

// ----------------------------------------------------------------------------

// Note: the following macro is used for extremely verbose logging message.  In