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

Commit 029abfdc authored by Michael Jurka's avatar Michael Jurka Committed by Android (Google) Code Review
Browse files

Merge "Fix NPE" into jb-dev

parents 2218f6c2 a8eac1de
Loading
Loading
Loading
Loading
+11 −6
Original line number Diff line number Diff line
@@ -713,6 +713,9 @@ public class RecentsPanelView extends FrameLayout implements OnItemClickListener

    public void handleSwipe(View view) {
        TaskDescription ad = ((ViewHolder) view.getTag()).taskDescription;
        if (ad == null) {
            Log.v(TAG, "Not able to find activity description for swiped task");
        }
        if (DEBUG) Log.v(TAG, "Jettison " + ad.getLabel());
        mRecentTaskDescriptions.remove(ad);

@@ -727,6 +730,7 @@ public class RecentsPanelView extends FrameLayout implements OnItemClickListener
        // the task.
        final ActivityManager am = (ActivityManager)
                mContext.getSystemService(Context.ACTIVITY_SERVICE);
        if (am != null) {
            am.removeTask(ad.persistentTaskId, ActivityManager.REMOVE_TASK_KILL_PROCESS);

            // Accessibility feedback
@@ -735,6 +739,7 @@ public class RecentsPanelView extends FrameLayout implements OnItemClickListener
            sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_SELECTED);
            setContentDescription(null);
        }
    }

    private void startApplicationDetailsActivity(String packageName) {
        Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS,