diff options
author | Winson Chung <winsonc@google.com> | 2011-05-23 11:53:29 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-05-23 11:53:29 -0700 |
commit | 7381674f3d68d08a70699de2af030cb45d8a4457 (patch) | |
tree | 9d7f9760162457527f0d581abcf4d42abb4c4900 /src | |
parent | c0079e96971d5301b1c22e3dd1a65ef35a11a3cd (diff) | |
parent | 59d0bb0d1e3af45449b070d3233f9e9a4f0fd6ed (diff) | |
download | android_packages_apps_Trebuchet-7381674f3d68d08a70699de2af030cb45d8a4457.tar.gz android_packages_apps_Trebuchet-7381674f3d68d08a70699de2af030cb45d8a4457.tar.bz2 android_packages_apps_Trebuchet-7381674f3d68d08a70699de2af030cb45d8a4457.zip |
Merge "Fixing clipped landscape layout and crash when tapping to add widgets."
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/launcher2/AppsCustomizePagedView.java | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/src/com/android/launcher2/AppsCustomizePagedView.java b/src/com/android/launcher2/AppsCustomizePagedView.java index 87be63efa..fabd9e40b 100644 --- a/src/com/android/launcher2/AppsCustomizePagedView.java +++ b/src/com/android/launcher2/AppsCustomizePagedView.java @@ -293,20 +293,22 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen } }); } else if (v instanceof PagedViewWidget) { - final ResolveInfo info = (ResolveInfo) v.getTag(); - if (mWallpapers.contains(info)) { - // Start the wallpaper picker - animateClickFeedback(v, new Runnable() { - @Override - public void run() { - // add the shortcut - Intent createWallpapersIntent = new Intent(Intent.ACTION_SET_WALLPAPER); - ComponentName name = new ComponentName(info.activityInfo.packageName, - info.activityInfo.name); - createWallpapersIntent.setComponent(name); - mLauncher.processWallpaper(createWallpapersIntent); - } - }); + if (v.getTag() instanceof ResolveInfo) { + final ResolveInfo info = (ResolveInfo) v.getTag(); + if (mWallpapers.contains(info)) { + // Start the wallpaper picker + animateClickFeedback(v, new Runnable() { + @Override + public void run() { + // add the shortcut + Intent createWallpapersIntent = new Intent(Intent.ACTION_SET_WALLPAPER); + ComponentName name = new ComponentName(info.activityInfo.packageName, + info.activityInfo.name); + createWallpapersIntent.setComponent(name); + mLauncher.processWallpaper(createWallpapersIntent); + } + }); + } } else { // Add the widget to the current workspace screen Workspace w = mLauncher.getWorkspace(); |