summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authornebkat <nebkat@teamhacksung.org>2012-12-30 15:11:58 +0000
committernebkat <nebkat@teamhacksung.org>2012-12-30 15:11:58 +0000
commit8dd822a77c94a57b670faca72227e46338d3feee (patch)
tree748eb0b91ef62a9ea3b2ad4843318d313086f0fe /src
parentd94ab9e2646b0367c24657db1c40c5d12440f90b (diff)
downloadandroid_packages_apps_Trebuchet-8dd822a77c94a57b670faca72227e46338d3feee.tar.gz
android_packages_apps_Trebuchet-8dd822a77c94a57b670faca72227e46338d3feee.tar.bz2
android_packages_apps_Trebuchet-8dd822a77c94a57b670faca72227e46338d3feee.zip
ShortcutInfo: Save title if custom
Change-Id: I803c66e50c2ef3968f6cc12e39a5727d36921920
Diffstat (limited to 'src')
-rw-r--r--src/com/cyanogenmod/trebuchet/ShortcutInfo.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/com/cyanogenmod/trebuchet/ShortcutInfo.java b/src/com/cyanogenmod/trebuchet/ShortcutInfo.java
index 0a8dbf92e..21d11f242 100644
--- a/src/com/cyanogenmod/trebuchet/ShortcutInfo.java
+++ b/src/com/cyanogenmod/trebuchet/ShortcutInfo.java
@@ -36,6 +36,12 @@ class ShortcutInfo extends ItemInfo {
Intent intent;
/**
+ * Indicates whether the title comes from an application's resource (if false)
+ * or from a custom title (if true.)
+ */
+ boolean customTitle;
+
+ /**
* Indicates whether the icon comes from an application's resource (if false)
* or from a custom Bitmap (if true.)
*/
@@ -127,6 +133,7 @@ class ShortcutInfo extends ItemInfo {
public void setTitle(CharSequence title) {
this.title = title;
+ this.customTitle = true;
if (mListener != null) {
mListener.onTitleChanged(title);
}
@@ -140,7 +147,7 @@ class ShortcutInfo extends ItemInfo {
void onAddToDatabase(ContentValues values) {
super.onAddToDatabase(values);
- String titleStr = title != null ? title.toString() : null;
+ String titleStr = title != null && customTitle ? title.toString() : null;
values.put(LauncherSettings.BaseLauncherColumns.TITLE, titleStr);
String uri = intent != null ? intent.toUri(0) : null;