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

Commit a7ecaf0d authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix AMediaDrm_setPropertyByteArray"

parents d48b9c77 c7822ef9
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -346,6 +346,9 @@ Return<Status> DrmPlugin::setPropertyByteArray(
   if (name == kDeviceIdKey) {
      ALOGD("Cannot set immutable property: %s", name.c_str());
      return Status::BAD_VALUE;
   } else if (name == kClientIdKey) {
       mByteArrayProperties[kClientIdKey] = toVector(value);
       return Status::OK;
   }

   // Setting of undefined properties is not supported
+4 −0
Original line number Diff line number Diff line
@@ -40,6 +40,10 @@ static const std::string kDeviceIdKey("deviceId");
static const uint8_t kTestDeviceIdData[] =
        {0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7,
         0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf};

// settable byte array property
static const std::string kClientIdKey("clientId");

// TODO stub out metrics for nw
static const std::string kMetricsKey("metrics");
static const uint8_t kMetricsData[] = { 0 };
+1 −1
Original line number Diff line number Diff line
@@ -698,7 +698,7 @@ media_status_t AMediaDrm_setPropertyByteArray(AMediaDrm *mObj,
    Vector<uint8_t> byteArray;
    byteArray.appendArray(value, valueSize);

    return translateStatus(mObj->mDrm->getPropertyByteArray(String8(propertyName),
    return translateStatus(mObj->mDrm->setPropertyByteArray(String8(propertyName),
                    byteArray));
}