diff options
author | nebkat <nebkat@teamhacksung.org> | 2012-12-30 15:11:58 +0000 |
---|---|---|
committer | nebkat <nebkat@teamhacksung.org> | 2012-12-30 15:11:58 +0000 |
commit | 8dd822a77c94a57b670faca72227e46338d3feee (patch) | |
tree | 748eb0b91ef62a9ea3b2ad4843318d313086f0fe /src | |
parent | d94ab9e2646b0367c24657db1c40c5d12440f90b (diff) | |
download | packages_apps_trebuchet-8dd822a77c94a57b670faca72227e46338d3feee.zip packages_apps_trebuchet-8dd822a77c94a57b670faca72227e46338d3feee.tar.gz packages_apps_trebuchet-8dd822a77c94a57b670faca72227e46338d3feee.tar.bz2 |
ShortcutInfo: Save title if custom
Change-Id: I803c66e50c2ef3968f6cc12e39a5727d36921920
Diffstat (limited to 'src')
-rw-r--r-- | src/com/cyanogenmod/trebuchet/ShortcutInfo.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/com/cyanogenmod/trebuchet/ShortcutInfo.java b/src/com/cyanogenmod/trebuchet/ShortcutInfo.java index 0a8dbf9..21d11f2 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; |