From 412f0d26fa15b1d5f14f13ff81937b4eb2f05f80 Mon Sep 17 00:00:00 2001 From: Sunny Goyal Date: Thu, 21 Jul 2022 15:43:00 -0700 Subject: [PATCH] Fixing icon label not updated during bulk load The label was being updated to default in Loader cursor which prevented eventual final update of the label Bug: 220645719 Test: Verified on device Change-Id: I2559804eb885663387bd1f5afe9e3337130a9fe3 --- src/com/android/launcher3/model/LoaderCursor.java | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/com/android/launcher3/model/LoaderCursor.java b/src/com/android/launcher3/model/LoaderCursor.java index ae5b66ad88..87e8ebf1bb 100644 --- a/src/com/android/launcher3/model/LoaderCursor.java +++ b/src/com/android/launcher3/model/LoaderCursor.java @@ -291,12 +291,16 @@ public class LoaderCursor extends CursorWrapper { // from the db if (TextUtils.isEmpty(info.title)) { - info.title = getTitle(); - } + if (loadIcon) { + info.title = getTitle(); - // fall back to the class name of the activity - if (info.title == null) { - info.title = componentName.getClassName(); + // fall back to the class name of the activity + if (info.title == null) { + info.title = componentName.getClassName(); + } + } else { + info.title = ""; + } } info.contentDescription = mPM.getUserBadgedLabel(info.title, info.user);