summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDaniel Lehmann <lehmannd@google.com>2012-05-15 15:58:55 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-05-15 15:58:55 -0700
commita8859a0a6b9787b156ef8ae7eba5c9fe1a5cd453 (patch)
tree6f14709d3ee1320421593993dfce44de02414972 /src
parentf26493f5a14449bd9f9630b81f0fec802b4fd943 (diff)
parentd02402cb141d5f7838a10a400926e0dfcee2783f (diff)
downloadandroid_packages_apps_Trebuchet-a8859a0a6b9787b156ef8ae7eba5c9fe1a5cd453.tar.gz
android_packages_apps_Trebuchet-a8859a0a6b9787b156ef8ae7eba5c9fe1a5cd453.tar.bz2
android_packages_apps_Trebuchet-a8859a0a6b9787b156ef8ae7eba5c9fe1a5cd453.zip
Merge "Preset type; contact shortcuts are now launched w/o provider invocation" into jb-dev
Diffstat (limited to 'src')
-rw-r--r--src/com/android/launcher2/LauncherProvider.java14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/com/android/launcher2/LauncherProvider.java b/src/com/android/launcher2/LauncherProvider.java
index 4cf87d2b4..67b558da4 100644
--- a/src/com/android/launcher2/LauncherProvider.java
+++ b/src/com/android/launcher2/LauncherProvider.java
@@ -66,7 +66,7 @@ public class LauncherProvider extends ContentProvider {
private static final String DATABASE_NAME = "launcher.db";
- private static final int DATABASE_VERSION = 11;
+ private static final int DATABASE_VERSION = 12;
static final String AUTHORITY = "com.android.launcher2.settings";
@@ -477,14 +477,15 @@ public class LauncherProvider extends ContentProvider {
version = 9;
}
- // We bumped the version twice during JB, once to update the launch flags, and once to
- // update the override for the default launch animation.
- if (version < 11) {
+ // We bumped the version three time during JB, once to update the launch flags, once to
+ // update the override for the default launch animation and once to set the mimetype
+ // to improve startup performance
+ if (version < 12) {
// Contact shortcuts need a different set of flags to be launched now
// The updateContactsShortcuts change is idempotent, so we can keep using it like
// back in the Donut days
updateContactsShortcuts(db);
- version = 11;
+ version = 12;
}
if (version != DATABASE_VERSION) {
@@ -540,6 +541,9 @@ public class LauncherProvider extends ContentProvider {
newIntent.putExtra(
Launcher.INTENT_EXTRA_IGNORE_LAUNCH_ANIMATION, true);
newIntent.setData(uri);
+ // Determine the type and also put that in the shortcut
+ // (that can speed up launch a bit)
+ newIntent.setDataAndType(uri, newIntent.resolveType(mContext));
final ContentValues values = new ContentValues();
values.put(LauncherSettings.Favorites.INTENT,