am 13724ea6: Make the launcher send the position of the icon that\'s launching an intent.
Merge commit '13724ea6078748195bcf747641bf6ee8fbbe0f4b' into eclair-mr2 * commit '13724ea6078748195bcf747641bf6ee8fbbe0f4b': Make the launcher send the position of the icon that's launching an intent.
This commit is contained in:
@@ -1395,6 +1395,10 @@ public final class Launcher extends Activity
|
||||
if (tag instanceof ApplicationInfo) {
|
||||
// Open shortcut
|
||||
final Intent intent = ((ApplicationInfo) tag).intent;
|
||||
int[] pos = new int[2];
|
||||
v.getLocationOnScreen(pos);
|
||||
intent.setSourceBounds(
|
||||
new Rect(pos[0], pos[1], pos[0]+v.getWidth(), pos[1]+v.getHeight()));
|
||||
startActivitySafely(intent);
|
||||
} else if (tag instanceof FolderInfo) {
|
||||
handleFolderClick((FolderInfo) tag);
|
||||
|
||||
Reference in New Issue
Block a user