Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(YouTube - Check environment): Only use fields available since Android 8 #3655

Merged
merged 1 commit into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,8 @@ abstract class BaseCheckEnvironmentPatch(
"PATCH_ID" to ID.encodedAndHashed,
"PATCH_MANUFACTURER" to MANUFACTURER.encodedAndHashed,
"PATCH_MODEL" to MODEL.encodedAndHashed,
"PATCH_ODM_SKU" to ODM_SKU.encodedAndHashed,
"PATCH_PRODUCT" to PRODUCT.encodedAndHashed,
"PATCH_RADIO" to RADIO.encodedAndHashed,
"PATCH_SKU" to SKU.encodedAndHashed,
"PATCH_SOC_MANUFACTURER" to SOC_MANUFACTURER.encodedAndHashed,
"PATCH_SOC_MODEL" to SOC_MODEL.encodedAndHashed,
"PATCH_TAGS" to TAGS.encodedAndHashed,
"PATCH_TYPE" to TYPE.encodedAndHashed,
"PATCH_USER" to USER.encodedAndHashed,
Expand Down Expand Up @@ -98,8 +94,10 @@ abstract class BaseCheckEnvironmentPatch(
private val String.encodedAndHashed
get() = MutableStringEncodedValue(
ImmutableStringEncodedValue(
Base64.encode(MessageDigest.getInstance("SHA-1")
.digest(this.toByteArray(StandardCharsets.UTF_8))),
Base64.encode(
MessageDigest.getInstance("SHA-1")
.digest(this.toByteArray(StandardCharsets.UTF_8)),
),
),
)

Expand Down
4 changes: 0 additions & 4 deletions stub/src/main/java/android/os/Build.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,8 @@ public class Build {
public static final String ID = null;
public static final String MANUFACTURER = null;
public static final String MODEL = null;
public static final String ODM_SKU = null;
public static final String PRODUCT = null;
public static final String RADIO = null;
public static final String SKU = null;
public static final String SOC_MANUFACTURER = null;
public static final String SOC_MODEL = null;
public static final String TAGS = null;
public static final String TYPE = null;
public static final String USER = null;
Expand Down
Loading