diff options
author | Daniel Lehmann <lehmannd@google.com> | 2012-05-14 18:30:53 -0700 |
---|---|---|
committer | Daniel Lehmann <lehmannd@google.com> | 2012-05-14 18:30:53 -0700 |
commit | d02402cb141d5f7838a10a400926e0dfcee2783f (patch) | |
tree | 6cd30ade2b561e71158509114cfd670c5c5e812b /src | |
parent | 0e56cc9fd6814af5813e73ba7a71bf1d51d4208a (diff) | |
download | android_packages_apps_Trebuchet-d02402cb141d5f7838a10a400926e0dfcee2783f.tar.gz android_packages_apps_Trebuchet-d02402cb141d5f7838a10a400926e0dfcee2783f.tar.bz2 android_packages_apps_Trebuchet-d02402cb141d5f7838a10a400926e0dfcee2783f.zip |
Preset type; contact shortcuts are now launched w/o provider invocation
Bug:6434853
Change-Id: I2fb9773713136d11d478936095ebad4a5302a9e1
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/launcher2/LauncherProvider.java | 14 |
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, |