Skip to content

Commit e727b07

Browse files
Bug 1879888 - truncate android gfx primary descr and record it to a text r=jnicol
Differential Revision: https://phabricator.services.mozilla.com/D203203
1 parent 02b1170 commit e727b07

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

gfx/thebes/gfxPlatform.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1068,6 +1068,15 @@ void gfxPlatform::ReportTelemetry() {
10681068

10691069
nsString adapterDesc;
10701070
gfxInfo->GetAdapterDescription(adapterDesc);
1071+
1072+
// Android description is constructed in a way that makes it possible to exceed
1073+
// the metric's length limit.
1074+
#if defined(ANDROID)
1075+
if (!adapterDesc.IsEmpty()) {
1076+
adapterDesc.Truncate(99);
1077+
}
1078+
#endif
1079+
10711080
mozilla::glean::gfx_adapter_primary::description.Set(
10721081
NS_ConvertUTF16toUTF8(adapterDesc));
10731082

0 commit comments

Comments
 (0)