mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 16:26:47 +00:00
Removing accessibility description from page indicators
The current page is announced upon switching to it. Is should be done this way for all future page implementations with indicators. Bug: 77827828 Test: Manual Change-Id: I8f2f163a261dd7098939674d39e014236fc66d5d
This commit is contained in:
@@ -203,7 +203,6 @@ public abstract class PagedView<T extends View & PageIndicator> extends ViewGrou
|
||||
if (mPageIndicatorViewId > -1) {
|
||||
mPageIndicator = parent.findViewById(mPageIndicatorViewId);
|
||||
mPageIndicator.setMarkersCount(getChildCount());
|
||||
mPageIndicator.setPageDescription(getPageIndicatorDescription());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -310,7 +309,6 @@ public abstract class PagedView<T extends View & PageIndicator> extends ViewGrou
|
||||
|
||||
private void updatePageIndicator() {
|
||||
if (mPageIndicator != null) {
|
||||
mPageIndicator.setPageDescription(getPageIndicatorDescription());
|
||||
mPageIndicator.setActiveMarker(getNextPage());
|
||||
}
|
||||
}
|
||||
@@ -1541,10 +1539,6 @@ public abstract class PagedView<T extends View & PageIndicator> extends ViewGrou
|
||||
return false;
|
||||
}
|
||||
|
||||
protected String getPageIndicatorDescription() {
|
||||
return getCurrentPageDescription();
|
||||
}
|
||||
|
||||
protected boolean canAnnouncePageDescription() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@ import android.util.AttributeSet;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.LinearLayout;
|
||||
|
||||
import com.android.launcher3.Launcher;
|
||||
import com.android.launcher3.R;
|
||||
import com.android.launcher3.Utilities;
|
||||
@@ -167,10 +168,4 @@ public class PersonalWorkSlidingTabStrip extends LinearLayout implements PageInd
|
||||
|
||||
@Override
|
||||
public void setMarkersCount(int numMarkers) { }
|
||||
|
||||
@Override
|
||||
public void setPageDescription(CharSequence description) {
|
||||
// We don't want custom page description as the tab-bar already has two tabs with their
|
||||
// own descriptions.
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,6 +25,4 @@ public interface PageIndicator {
|
||||
void setActiveMarker(int activePage);
|
||||
|
||||
void setMarkersCount(int numMarkers);
|
||||
|
||||
void setPageDescription(CharSequence description);
|
||||
}
|
||||
|
||||
@@ -227,11 +227,6 @@ public class PageIndicatorDots extends View implements PageIndicator {
|
||||
requestLayout();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPageDescription(CharSequence description) {
|
||||
setContentDescription(description);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
|
||||
// Add extra spacing of mDotRadius on all sides so than entry animation could be run.
|
||||
|
||||
@@ -186,11 +186,6 @@ public class WorkspacePageIndicator extends View implements Insettable, PageIndi
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPageDescription(CharSequence description) {
|
||||
setContentDescription(description);
|
||||
}
|
||||
|
||||
public void setShouldAutoHide(boolean shouldAutoHide) {
|
||||
mShouldAutoHide = shouldAutoHide;
|
||||
if (shouldAutoHide && mLinePaint.getAlpha() > 0) {
|
||||
|
||||
Reference in New Issue
Block a user