Android-x86
Fork
Donation

  • R/O
  • HTTP
  • SSH
  • HTTPS

packages-apps-Launcher: Commit

packages/apps/Launcher


Commit MetaInfo

Revision2f2a6b72edc1606aaa85afcb7cec7396332c90ea (tree)
Time2009-12-03 15:39:53
AuthorJoe Onorato <joeo@andr...>
CommiterJoe Onorato

Log Message

From Launcher2: Make the launcher send the position of the icon that's launching an intent.

Change Summary

Incremental Difference

--- a/src/com/android/launcher/Launcher.java
+++ b/src/com/android/launcher/Launcher.java
@@ -1641,6 +1641,10 @@ public final class Launcher extends Activity implements View.OnClickListener, On
16411641 if (tag instanceof ApplicationInfo) {
16421642 // Open shortcut
16431643 final Intent intent = ((ApplicationInfo) tag).intent;
1644+ int[] pos = new int[2];
1645+ v.getLocationOnScreen(pos);
1646+ intent.setSourceBounds(
1647+ new Rect(pos[0], pos[1], pos[0]+v.getWidth(), pos[1]+v.getHeight()));
16441648 startActivitySafely(intent);
16451649 } else if (tag instanceof FolderInfo) {
16461650 handleFolderClick((FolderInfo) tag);
Show on old repository browser