Merge "Fixing issue with numerous empty screens showing when adding a shortcut to a clear workspace. (Bug 10785413)" into jb-ub-now-indigo-rose
This commit is contained in:
@@ -3664,6 +3664,9 @@ public class Launcher extends Activity
|
||||
addAnimated.size(), true);
|
||||
}
|
||||
|
||||
// Remove the extra empty screen
|
||||
mWorkspace.removeExtraEmptyScreen();
|
||||
|
||||
if (!AppsCustomizePagedView.DISABLE_ALL_APPS &&
|
||||
addedApps != null && mAppsCustomizeContent != null) {
|
||||
mAppsCustomizeContent.addApps(addedApps);
|
||||
|
||||
@@ -318,8 +318,10 @@ public class LauncherModel extends BroadcastReceiver {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Add this icon to the db, creating a new page if necessary
|
||||
int startSearchPageIndex = 1;
|
||||
// Add this icon to the db, creating a new page if necessary. If there
|
||||
// is only the empty page then we just add items to the first page.
|
||||
// Otherwise, we add them to the next pages.
|
||||
int startSearchPageIndex = workspaceScreens.isEmpty() ? 0 : 1;
|
||||
Pair<Long, int[]> coords = LauncherModel.findNextAvailableIconSpace(context,
|
||||
name, launchIntent, startSearchPageIndex, workspaceScreens);
|
||||
if (coords == null) {
|
||||
|
||||
Reference in New Issue
Block a user