Fixing all apps accessibility (issue: 5478505)
Change-Id: I8f5ba2e4acd620520a57ef0b464171c6e0966d4e
diff --git a/src/com/android/launcher2/AppsCustomizePagedView.java b/src/com/android/launcher2/AppsCustomizePagedView.java
index 7bc4b51..4718b31 100644
--- a/src/com/android/launcher2/AppsCustomizePagedView.java
+++ b/src/com/android/launcher2/AppsCustomizePagedView.java
@@ -1419,14 +1419,17 @@
protected String getCurrentPageDescription() {
int page = (mNextPage != INVALID_PAGE) ? mNextPage : mCurrentPage;
int stringId = R.string.default_scroll_format;
-
+ int count = 0;
+
if (page < mNumAppsPages) {
stringId = R.string.apps_customize_apps_scroll_format;
+ count = mNumAppsPages;
} else {
page -= mNumAppsPages;
stringId = R.string.apps_customize_widgets_scroll_format;
+ count = mNumWidgetPages;
}
- return String.format(mContext.getString(stringId), page + 1, getChildCount());
+ return String.format(mContext.getString(stringId), page + 1, count);
}
}