summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authord34d <clark@cyngn.com>2015-06-18 22:08:41 (GMT)
committerStephen Bird <sbird@cyngn.com>2015-07-24 00:25:09 (GMT)
commitbb1982eaad9e677cc5abe0464e515d9cba77fb89 (patch)
treeeca5909e9358562225e906a446494dc51b79c188
parent1cecd2226228422df31ebaf90c2c21172d965b50 (diff)
downloadandroid_packages_apps_Trebuchet-bb1982eaad9e677cc5abe0464e515d9cba77fb89.zip
android_packages_apps_Trebuchet-bb1982eaad9e677cc5abe0464e515d9cba77fb89.tar.gz
android_packages_apps_Trebuchet-bb1982eaad9e677cc5abe0464e515d9cba77fb89.tar.bz2
Don't load title from intent if title loaded from DB
Title for shortcuts, when creating workspaces, are loaded from the intent rather than the title stored in the DB. The title from the DB is loaded in the ShortcutInfo so we will use that unless it is null, in which case we'll fallback to loading the title from the intent. Change-Id: I436c11062dbc8ff3d7e1cd9f9564321ad0476933 (cherry picked from commit e963932853caa238ba7bc6928e5243075e41fc75) (cherry picked from commit 34dbd4ad06b87fafec5b2bd2745eb283018d1bcf)
-rw-r--r--src/com/android/launcher3/LauncherModel.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/com/android/launcher3/LauncherModel.java b/src/com/android/launcher3/LauncherModel.java
index 7d0b59a..4b3eac6 100644
--- a/src/com/android/launcher3/LauncherModel.java
+++ b/src/com/android/launcher3/LauncherModel.java
@@ -2260,9 +2260,11 @@ public class LauncherModel extends BroadcastReceiver
iconPackageIndex, iconResourceIndex, iconIndex,
titleIndex);
- CharSequence title = getShortcutTitle(manager, intent);
- if (title != null) {
- info.title = title;
+ if (info.title == null) {
+ CharSequence title = getShortcutTitle(manager, intent);
+ if (title != null) {
+ info.title = title;
+ }
}
// App shortcuts that used to be automatically added to Launcher