From 850a943133ce7918a39da0410d54b456b298f9cb Mon Sep 17 00:00:00 2001 From: Sunny Goyal Date: Tue, 12 Apr 2016 16:09:52 -0700 Subject: [PATCH] Giving proper workspace description when the launcher is not loaded. Bug: 27326504 Change-Id: Ifc30221f756d75064a4baf5f3bfc71b8f590b4b1 Conflicts: src/com/android/launcher3/Workspace.java --- src/com/android/launcher3/Workspace.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java index 86c25b7029..bf33ccf79f 100644 --- a/src/com/android/launcher3/Workspace.java +++ b/src/com/android/launcher3/Workspace.java @@ -4476,7 +4476,11 @@ public class Workspace extends PagedView } nScreens--; } - return String.format(getContext().getString(R.string.workspace_scroll_format), + if (nScreens == 0) { + // When the workspace is not loaded, we do not know how many screen will be bound. + return getContext().getString(R.string.all_apps_home_button_label); + } + return getContext().getString(R.string.workspace_scroll_format, page + 1 - delta, nScreens); }