[Replicant] [PATCH 1/4] Revert "IconCache: Simplify application of custom titles from STK"

belgin belginstirbu at hotmail.com
Mon Nov 23 23:46:38 UTC 2020


This reverts commit abc57d4d5d7f408b26859de2eda60d39cc474c3d.
---
 src/com/android/launcher3/IconCache.java | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/src/com/android/launcher3/IconCache.java b/src/com/android/launcher3/IconCache.java
index b30ff2d6e..59239be90 100644
--- a/src/com/android/launcher3/IconCache.java
+++ b/src/com/android/launcher3/IconCache.java
@@ -597,7 +597,12 @@ public class IconCache {
                             if (DEBUG) Log.d(TAG, "using package default icon for " +
                                     componentName.toShortString());
                             entry.icon = packageEntry.icon;
-                            entry.title = packageEntry.title;
+                            if (isCustomTitle) {
+                                entry.title = ((LauncherApplication) mContext)
+                                    .getStkAppName();
+                            } else {
+                                entry.title = packageEntry.title;
+                            }
                             entry.contentDescription = packageEntry.contentDescription;
                         }
                     }
@@ -610,16 +615,15 @@ public class IconCache {
             }
 
             if (TextUtils.isEmpty(entry.title) && info != null) {
-                entry.title = info.getLabel();
+                if (isCustomTitle) {
+                    entry.title = ((LauncherApplication) mContext)
+                        .getStkAppName();
+                } else {
+                    entry.title = info.getLabel();
+                }
                 entry.contentDescription = mUserManager.getBadgedLabelForUser(entry.title, user);
             }
         }
-
-        if (isCustomTitle) {
-            entry.title = ((LauncherApplication) mContext)
-                .getStkAppName();
-        }
-
         return entry;
     }
 
-- 
2.11.0



More information about the Replicant mailing list