media: Fix FirstApiLevel check in provisioning [chromium/src : main]

0 views
Skip to first unread message

Vikram Pasupathy (Gerrit)

unread,
Nov 12, 2025, 3:53:42 PM (14 hours ago) Nov 12
to Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, asvitkine...@chromium.org, eme-r...@chromium.org, feature-me...@chromium.org
Attention needed from Xiaohan Wang

Vikram Pasupathy voted Commit-Queue+1

Commit-Queue+1
Open in Gerrit

Related details

Attention is currently required from:
  • Xiaohan Wang
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ic2e3dd82316809ef433ed07448794090c55a5054
Gerrit-Change-Number: 7146728
Gerrit-PatchSet: 5
Gerrit-Owner: Vikram Pasupathy <vpasu...@chromium.org>
Gerrit-Reviewer: Vikram Pasupathy <vpasu...@chromium.org>
Gerrit-Reviewer: Xiaohan Wang <xhw...@chromium.org>
Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
Gerrit-Attention: Xiaohan Wang <xhw...@chromium.org>
Gerrit-Comment-Date: Wed, 12 Nov 2025 20:53:32 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Xiaohan Wang (Gerrit)

unread,
Nov 12, 2025, 8:59:07 PM (9 hours ago) Nov 12
to Vikram Pasupathy, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, asvitkine...@chromium.org, eme-r...@chromium.org, feature-me...@chromium.org
Attention needed from Vikram Pasupathy

Xiaohan Wang added 2 comments

File media/base/android/media_drm_bridge.cc
Line 328, Patchset 5 (Latest): base::UmaHistogramSparse("Media.EME.MediaDrm.FirstApiLevel", first_api_level);
Xiaohan Wang . unresolved

This should be integers with a defined range? Maybe it's not "sparse"?

Line 384, Patchset 5 (Latest): // released before "ro.product.first_api_level" was introduced.
Xiaohan Wang . unresolved

In this case, is it possible that the SKD version is less than O? I don't know when the first_api_level was introduced...

Open in Gerrit

Related details

Attention is currently required from:
  • Vikram Pasupathy
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Ic2e3dd82316809ef433ed07448794090c55a5054
    Gerrit-Change-Number: 7146728
    Gerrit-PatchSet: 5
    Gerrit-Owner: Vikram Pasupathy <vpasu...@chromium.org>
    Gerrit-Reviewer: Vikram Pasupathy <vpasu...@chromium.org>
    Gerrit-Reviewer: Xiaohan Wang <xhw...@chromium.org>
    Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
    Gerrit-Attention: Vikram Pasupathy <vpasu...@chromium.org>
    Gerrit-Comment-Date: Thu, 13 Nov 2025 01:58:59 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Vikram Pasupathy (Gerrit)

    unread,
    Nov 12, 2025, 9:16:19 PM (8 hours ago) Nov 12
    to Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, asvitkine...@chromium.org, eme-r...@chromium.org, feature-me...@chromium.org
    Attention needed from Xiaohan Wang

    Vikram Pasupathy added 2 comments

    File media/base/android/media_drm_bridge.cc
    Line 328, Patchset 5 (Latest): base::UmaHistogramSparse("Media.EME.MediaDrm.FirstApiLevel", first_api_level);
    Xiaohan Wang . unresolved

    This should be integers with a defined range? Maybe it's not "sparse"?

    Vikram Pasupathy
    Line 384, Patchset 5 (Latest): // released before "ro.product.first_api_level" was introduced.
    Xiaohan Wang . unresolved

    In this case, is it possible that the SKD version is less than O? I don't know when the first_api_level was introduced...

    Vikram Pasupathy

    I also took a look at that, this document http://shortn/_gsiTlfzxII says it was introduced in between MR and N.

    I sanity checked it by googling "ro.product.first_api_level" Nougat and saw some dumped builds where this was in fact set to Nougats value, which is pre O.

    I looked at the lifetime support for a couple of devices, and it looks like most of them ended support at Pie, which is actually being deprecated currently, but the Pixel is supported til Quince, which Chromium actively supports.

    So thats why this UMA will be useful to see how many of these old clients still use this flow, and if we can remove this or not.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Xiaohan Wang
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Ic2e3dd82316809ef433ed07448794090c55a5054
    Gerrit-Change-Number: 7146728
    Gerrit-PatchSet: 5
    Gerrit-Owner: Vikram Pasupathy <vpasu...@chromium.org>
    Gerrit-Reviewer: Vikram Pasupathy <vpasu...@chromium.org>
    Gerrit-Reviewer: Xiaohan Wang <xhw...@chromium.org>
    Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
    Gerrit-Attention: Xiaohan Wang <xhw...@chromium.org>
    Gerrit-Comment-Date: Thu, 13 Nov 2025 02:16:10 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Xiaohan Wang <xhw...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Xiaohan Wang (Gerrit)

    unread,
    Nov 12, 2025, 11:44:59 PM (6 hours ago) Nov 12
    to Vikram Pasupathy, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, asvitkine...@chromium.org, eme-r...@chromium.org, feature-me...@chromium.org
    Attention needed from Vikram Pasupathy

    Xiaohan Wang voted and added 3 comments

    Votes added by Xiaohan Wang

    Code-Review+1

    3 comments

    File media/base/android/media_drm_bridge.cc
    Line 328, Patchset 5 (Latest): base::UmaHistogramSparse("Media.EME.MediaDrm.FirstApiLevel", first_api_level);
    Xiaohan Wang . unresolved

    This should be integers with a defined range? Maybe it's not "sparse"?

    Vikram Pasupathy

    AW team does the same here for their ApiLevel:

    https://source.chromium.org/chromium/chromium/src/+/main:android_webview/glue/java/src/com/android/webview/chromium/WebViewChromiumAwInit.java;l=690-691

    So I just copied that, which I think makes sense.

    Xiaohan Wang

    Thanks for the example. I don't know what's the recommendataion is here.

    Please keep this unresolved so the metrics reviewer can take a look.

    Line 380, Patchset 5 (Latest): } else if (first_api_level == 0) {
    Xiaohan Wang . unresolved

    nit: No need to use else as we return early.

    ```
    if (first_api_level >= base::android::android_info::SDK_VERSION_OREO) {
    return true;
    }
    if (first_api_level == 0) {
    return ...
    }

    return false;
    ```

    Line 384, Patchset 5 (Latest): // released before "ro.product.first_api_level" was introduced.
    Xiaohan Wang . unresolved

    In this case, is it possible that the SKD version is less than O? I don't know when the first_api_level was introduced...

    Vikram Pasupathy

    I also took a look at that, this document http://shortn/_gsiTlfzxII says it was introduced in between MR and N.

    I sanity checked it by googling "ro.product.first_api_level" Nougat and saw some dumped builds where this was in fact set to Nougats value, which is pre O.

    I looked at the lifetime support for a couple of devices, and it looks like most of them ended support at Pie, which is actually being deprecated currently, but the Pixel is supported til Quince, which Chromium actively supports.

    So thats why this UMA will be useful to see how many of these old clients still use this flow, and if we can remove this or not.

    Xiaohan Wang

    Looks good to me. Please double check with Android owners.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Vikram Pasupathy
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Owners
      • requirement satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      • requirement satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: Ic2e3dd82316809ef433ed07448794090c55a5054
      Gerrit-Change-Number: 7146728
      Gerrit-PatchSet: 5
      Gerrit-Owner: Vikram Pasupathy <vpasu...@chromium.org>
      Gerrit-Reviewer: Vikram Pasupathy <vpasu...@chromium.org>
      Gerrit-Reviewer: Xiaohan Wang <xhw...@chromium.org>
      Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
      Gerrit-Attention: Vikram Pasupathy <vpasu...@chromium.org>
      Gerrit-Comment-Date: Thu, 13 Nov 2025 04:44:46 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      Comment-In-Reply-To: Xiaohan Wang <xhw...@chromium.org>
      Comment-In-Reply-To: Vikram Pasupathy <vpasu...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy
      Reply all
      Reply to author
      Forward
      0 new messages