diff options
Diffstat (limited to 'src/com/android/launcher3/InstallShortcutReceiver.java')
-rw-r--r-- | src/com/android/launcher3/InstallShortcutReceiver.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/com/android/launcher3/InstallShortcutReceiver.java b/src/com/android/launcher3/InstallShortcutReceiver.java index a0ea93b72..d61cec03d 100644 --- a/src/com/android/launcher3/InstallShortcutReceiver.java +++ b/src/com/android/launcher3/InstallShortcutReceiver.java @@ -253,8 +253,8 @@ public class InstallShortcutReceiver extends BroadcastReceiver { // Try adding to the workspace screens incrementally, starting at the default or center // screen and alternating between +1, -1, +2, -2, etc. (using ~ ceil(i/2f)*(-1)^(i-1)) final int screen = Launcher.DEFAULT_SCREEN; - for (int i = 0; i < (2 * Launcher.SCREEN_COUNT) + 1 && !found; ++i) { - int si = screen + (int) ((i / 2f) + 0.5f) * ((i % 2 == 1) ? 1 : -1); + for (int i = 0; i < Launcher.SCREEN_COUNT; i++) { + int si = i; if (0 <= si && si < Launcher.SCREEN_COUNT) { found = installShortcut(context, data, items, name, intent, si, exists, sp, result); |