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

Commit 73e2e111 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 12508860 from c17f5671 to 25Q1-release

Change-Id: I16dc1d1059cc0ec5d7859a3d7391eb7820091219
parents 3163d6dc c17f5671
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -83,6 +83,7 @@ enum class SessionTag : int32_t {
  HWUI = 2,
  GAME = 3,
  APP = 4,
  SYSUI = 5,
};

/**
+2 −1
Original line number Diff line number Diff line
@@ -30,6 +30,7 @@ static constexpr int kWidth = 100;
static constexpr int kHeight = 100;
static constexpr int kMaxLockedBuffers = 3;
static constexpr int kFormat = HAL_PIXEL_FORMAT_RGBA_8888;
static constexpr int kUsage = GRALLOC_USAGE_SW_READ_RARELY;
static constexpr int kFrameSleepUs = 30 * 1000;

class BufferItemConsumerTest : public ::testing::Test {
@@ -56,7 +57,7 @@ class BufferItemConsumerTest : public ::testing::Test {
    };

    void SetUp() override {
        mBIC = new BufferItemConsumer(kFormat, kMaxLockedBuffers, true);
        mBIC = new BufferItemConsumer(kUsage, kMaxLockedBuffers, true);
        String8 name("BufferItemConsumer_Under_Test");
        mBIC->setName(name);
        mBFL = new BufferFreedListener(this);
+1 −0
Original line number Diff line number Diff line
@@ -69,6 +69,7 @@ cc_library {

    static_libs: [
        "libsensor_flags_c_lib",
        "android.permission.flags-aconfig-cc",
    ],

    export_include_dirs: ["include"],
+4 −1
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@
#include <binder/AppOpsManager.h>
#include <binder/IPermissionController.h>
#include <binder/IServiceManager.h>
#include <android_permission_flags.h>

/*
 * The permission to use for activity recognition sensors (like step counter).
@@ -121,7 +122,9 @@ Sensor::Sensor(struct sensor_t const& hwSensor, const uuid_t& uuid, int halVersi
        break;
    case SENSOR_TYPE_HEART_RATE: {
        mStringType = SENSOR_STRING_TYPE_HEART_RATE;
        mRequiredPermission = SENSOR_PERMISSION_BODY_SENSORS;
        mRequiredPermission =
          android::permission::flags::replace_body_sensor_permission_enabled() ?
            SENSOR_PERMISSION_READ_HEART_RATE : SENSOR_PERMISSION_BODY_SENSORS;
        AppOpsManager appOps;
        mRequiredAppOp = appOps.permissionToOpCode(String16(mRequiredPermission));
        mFlags |= SENSOR_FLAG_ON_CHANGE_MODE;
+2 −2
Original line number Diff line number Diff line
@@ -1169,7 +1169,7 @@ inline Json::Value ArrayToJsonValue(uint32_t count, const T* values) {
  return array;
}

template <typename T, unsigned int N>
template <typename T, size_t N>
inline Json::Value ToJsonValue(const T (&value)[N]) {
  return ArrayToJsonValue(N, value);
}
@@ -1293,7 +1293,7 @@ inline bool AsArray(Json::Value* json_value, uint32_t count, T* values) {
  return true;
}

template <typename T, unsigned int N>
template <typename T, size_t N>
inline bool AsValue(Json::Value* json_value, T (*value)[N]) {
  return AsArray(json_value, N, *value);
}