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

Commit 1737776f authored by Jim Miller's avatar Jim Miller
Browse files

Fix 5386408: Send accessibility event when a recent app is removed.

Change-Id: I7c88eac5d1c5ecaf96e7a0fcfbb8ab6a3d1dbf50
parent 63c8a47b
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -305,6 +305,9 @@
    <!-- Content description of the ringer silent icon in the notification panel for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_ringer_silent">Ringer silent.</string>

    <!-- Content description to tell the user an application has been removed from recents -->
    <string name="accessibility_recents_item_dismissed"><xliff:g id="app" example="Calendar">%s</xliff:g> dismissed.</string>

    <!-- Title of dialog shown when 2G-3G data usage has exceeded limit and has been disabled. [CHAR LIMIT=48] -->
    <string name="data_usage_disabled_dialog_3g_title">2G-3G data disabled</string>
    <!-- Title of dialog shown when 4G data usage has exceeded limit and has been disabled. [CHAR LIMIT=48] -->
+7 −0
Original line number Diff line number Diff line
@@ -38,6 +38,7 @@ import android.view.MenuItem;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.view.accessibility.AccessibilityEvent;
import android.view.animation.AnimationUtils;
import android.widget.AdapterView;
import android.widget.BaseAdapter;
@@ -511,6 +512,12 @@ public class RecentsPanelView extends RelativeLayout
        final ActivityManager am = (ActivityManager)
                mContext.getSystemService(Context.ACTIVITY_SERVICE);
        am.removeTask(ad.persistentTaskId, ActivityManager.REMOVE_TASK_KILL_PROCESS);

        // Accessibility feedback
        setContentDescription(
                mContext.getString(R.string.accessibility_recents_item_dismissed, ad.getLabel()));
        sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_SELECTED);
        setContentDescription(null);
    }

    private void startApplicationDetailsActivity(String packageName) {