Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6623cc9a authored by Andrey Yepin's avatar Andrey Yepin
Browse files

Remove released flag: a11y announce suggested apps group.

Fix: 410453709
Test: presubmits, manual smoke test.
Flag: EXEMPT removing android.service.chooser.announce_shortcuts_and_suggested_apps_legacy
Change-Id: I9ba89bec3dcc1b8516753c784aad3dc5b6962b30
parent 9cfc68f8
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
package: "android.service.chooser"
container: "system"

flag {
  name: "announce_shortcuts_and_suggested_apps_legacy"
  namespace: "intentresolver"
  description: "Enable talkback announcement for the app shortcuts and the suggested apps target groups in the legacy sharesheet codebase."
  bug: "380211084"
  metadata {
    purpose: PURPOSE_BUGFIX
  }
}

flag {
  name: "chooser_album_text"
  is_exported: true
+6 −17
Original line number Diff line number Diff line
@@ -16,8 +16,6 @@

package com.android.internal.app;

import static android.service.chooser.Flags.announceShortcutsAndSuggestedAppsLegacy;

import android.annotation.Nullable;
import android.content.Context;
import android.util.AttributeSet;
@@ -55,10 +53,8 @@ public class ChooserGridLayoutManager extends GridLayoutManager {
    public ChooserGridLayoutManager(Context context, AttributeSet attrs, int defStyleAttr,
            int defStyleRes) {
        super(context, attrs, defStyleAttr, defStyleRes);
        if (announceShortcutsAndSuggestedAppsLegacy()) {
        readGroupTitles(context);
    }
    }

    /**
     * Creates a vertical GridLayoutManager
@@ -68,10 +64,8 @@ public class ChooserGridLayoutManager extends GridLayoutManager {
     */
    public ChooserGridLayoutManager(Context context, int spanCount) {
        super(context, spanCount);
        if (announceShortcutsAndSuggestedAppsLegacy()) {
        readGroupTitles(context);
    }
    }

    /**
     * @param context       Current context, will be used to access resources.
@@ -83,10 +77,8 @@ public class ChooserGridLayoutManager extends GridLayoutManager {
    public ChooserGridLayoutManager(Context context, int spanCount, int orientation,
            boolean reverseLayout) {
        super(context, spanCount, orientation, reverseLayout);
        if (announceShortcutsAndSuggestedAppsLegacy()) {
        readGroupTitles(context);
    }
    }

    private void readGroupTitles(Context context) {
        mShortcutGroupTitle = context.getString(R.string.shortcut_group_a11y_title);
@@ -129,7 +121,7 @@ public class ChooserGridLayoutManager extends GridLayoutManager {
            View host,
            AccessibilityNodeInfo info) {
        super.onInitializeAccessibilityNodeInfoForItem(recycler, state, host, info);
        if (announceShortcutsAndSuggestedAppsLegacy() && host instanceof ViewGroup) {
        if (host instanceof ViewGroup) {
            if (host.getId() == R.id.shortcuts_container) {
                info.setClassName(ListView.class.getName());
                info.setContainerTitle(mShortcutGroupTitle);
@@ -157,15 +149,12 @@ public class ChooserGridLayoutManager extends GridLayoutManager {
    public void onInitializeAccessibilityNodeInfo(RecyclerView.Recycler recycler,
            RecyclerView.State state, AccessibilityNodeInfo info) {
        super.onInitializeAccessibilityNodeInfo(recycler, state, info);
        if (announceShortcutsAndSuggestedAppsLegacy()) {
        info.setContainerTitle(mAllAppListGroupTitle);
    }
    }

    @Override
    public boolean isLayoutHierarchical(RecyclerView.Recycler recycler, RecyclerView.State state) {
        return announceShortcutsAndSuggestedAppsLegacy()
                || super.isLayoutHierarchical(recycler, state);
        return true;
    }

    private CollectionInfo createShortcutsA11yCollectionInfo(ViewGroup container) {