Changing default screen to 0

Change-Id: I16b2440f99d4b91a3a74226cdac7054e7d5fd7f5
This commit is contained in:
Adam Cohen
2013-06-06 21:35:12 -07:00
parent f0f4eda318
commit 9efb412971
5 changed files with 7 additions and 5 deletions

View File

@@ -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);