summaryrefslogtreecommitdiff
path: root/profilers
diff options
context:
space:
mode:
authorMohammad Saboorian <msab@google.com>2022-06-14 18:47:00 +0100
committerTreeHugger Robot <treehugger-gerrit@google.com>2022-06-21 09:56:02 +0000
commit4896048a901953a15399406bda67b095a5341d8e (patch)
tree7897fa60bbd7ee7888937b182447b5b217a5604f /profilers
parentc43d706d09ab7ab36c2661111b3ab56efd67a813 (diff)
downloadidea-4896048a901953a15399406bda67b095a5341d8e.tar.gz
Ignore manufacturer name if it is already included in the product name
Bug: 235914489 Change-Id: I853d018f367032c6cda09f24285ba245cd2a5f65
Diffstat (limited to 'profilers')
-rw-r--r--profilers/src/com/android/tools/profilers/StudioProfilers.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/profilers/src/com/android/tools/profilers/StudioProfilers.java b/profilers/src/com/android/tools/profilers/StudioProfilers.java
index 0981b5aaa7b..aa1896f9d64 100644
--- a/profilers/src/com/android/tools/profilers/StudioProfilers.java
+++ b/profilers/src/com/android/tools/profilers/StudioProfilers.java
@@ -75,6 +75,7 @@ import java.util.Collection;
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
+import java.util.Locale;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
@@ -992,7 +993,7 @@ public class StudioProfilers extends AspectModel<ProfilerAspect> implements Upda
if (model.endsWith(suffix)) {
model = model.substring(0, model.length() - suffix.length());
}
- if (!StringUtil.isEmpty(manufacturer)) {
+ if (!StringUtil.isEmpty(manufacturer) && !model.toUpperCase(Locale.US).startsWith(manufacturer.toUpperCase(Locale.US))) {
deviceNameBuilder.append(manufacturer);
deviceNameBuilder.append(" ");
}