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

Commit 13740708 authored by Adam Powell's avatar Adam Powell Committed by Android (Google) Code Review
Browse files

Merge "Fix bug in TaskStackBuilder#addParentStack" into jb-dev

parents 79b7742c 5c43ec93
Loading
Loading
Loading
Loading
+3 −9
Original line number Diff line number Diff line
@@ -196,18 +196,12 @@ public class TaskStackBuilder {
        try {
            ActivityInfo info = pm.getActivityInfo(sourceActivityName, 0);
            String parentActivity = info.parentActivityName;
            while (parentActivity != null) {
                Intent parent = new Intent().setComponent(
                        new ComponentName(info.packageName, parentActivity));
            while (parent != null) {
                mIntents.add(insertAt, parent);
                info = pm.getActivityInfo(parent.getComponent(), 0);
                parentActivity = info.parentActivityName;
                if (parentActivity != null) {
                    parent = new Intent().setComponent(
                            new ComponentName(info.packageName, parentActivity));
                } else {
                    parent = null;
                }
            }
        } catch (NameNotFoundException e) {
            Log.e(TAG, "Bad ComponentName while traversing activity parent metadata");