feat(Spotify): Remove ads section from browse (#5193)
This commit is contained in:
parent
da20e565cd
commit
92b588c866
2 changed files with 22 additions and 6 deletions
|
|
@ -0,0 +1,6 @@
|
||||||
|
package com.spotify.browsita.v1.resolved;
|
||||||
|
|
||||||
|
public final class Section {
|
||||||
|
public static final int BRAND_ADS_FIELD_NUMBER = 6;
|
||||||
|
public int sectionTypeCase_;
|
||||||
|
}
|
||||||
|
|
@ -93,18 +93,28 @@ internal val abstractProtobufListEnsureIsMutableFingerprint = fingerprint {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
internal val homeSectionFingerprint = fingerprint {
|
private fun structureGetSectionsFingerprint(className: String) = fingerprint {
|
||||||
custom { _, classDef -> classDef.endsWith("homeapi/proto/Section;") }
|
|
||||||
}
|
|
||||||
|
|
||||||
internal val homeStructureGetSectionsFingerprint = fingerprint {
|
|
||||||
custom { method, classDef ->
|
custom { method, classDef ->
|
||||||
classDef.endsWith("homeapi/proto/HomeStructure;") && method.indexOfFirstInstruction {
|
classDef.endsWith(className) && method.indexOfFirstInstruction {
|
||||||
opcode == Opcode.IGET_OBJECT && getReference<FieldReference>()?.name == "sections_"
|
opcode == Opcode.IGET_OBJECT && getReference<FieldReference>()?.name == "sections_"
|
||||||
} >= 0
|
} >= 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal val homeSectionFingerprint = fingerprint {
|
||||||
|
custom { _, classDef -> classDef.endsWith("homeapi/proto/Section;") }
|
||||||
|
}
|
||||||
|
|
||||||
|
internal val homeStructureGetSectionsFingerprint =
|
||||||
|
structureGetSectionsFingerprint("homeapi/proto/HomeStructure;")
|
||||||
|
|
||||||
|
internal val browseSectionFingerprint = fingerprint {
|
||||||
|
custom { _, classDef -> classDef.endsWith("browsita/v1/resolved/Section;") }
|
||||||
|
}
|
||||||
|
|
||||||
|
internal val browseStructureGetSectionsFingerprint =
|
||||||
|
structureGetSectionsFingerprint("browsita/v1/resolved/BrowseStructure;")
|
||||||
|
|
||||||
internal fun reactivexFunctionApplyWithClassInitFingerprint(className: String) = fingerprint {
|
internal fun reactivexFunctionApplyWithClassInitFingerprint(className: String) = fingerprint {
|
||||||
returns("Ljava/lang/Object;")
|
returns("Ljava/lang/Object;")
|
||||||
parameters("Ljava/lang/Object;")
|
parameters("Ljava/lang/Object;")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue