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

Commit b00b8b0d authored by Adam Powell's avatar Adam Powell
Browse files

Be more tolerant in TaskStackBuilder

Let callers try to get a parent stack for an activity class with no
parent declared.

Bug 6503702

Change-Id: Iec1bc7a8d9e5b65b756a8ebd0e53d63506796aa3
parent 4441a369
Loading
Loading
Loading
Loading
+3 −9
Original line number Diff line number Diff line
@@ -161,18 +161,12 @@ public class TaskStackBuilder {
            ActivityInfo info = pm.getActivityInfo(
                    new ComponentName(mSourceContext, sourceActivityClass), 0);
            String parentActivity = info.parentActivityName;
            while (parentActivity != null) {
                Intent parent = new Intent().setComponent(
                        new ComponentName(mSourceContext, 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(mSourceContext, parentActivity));
                } else {
                    parent = null;
                }
            }
        } catch (NameNotFoundException e) {
            Log.e(TAG, "Bad ComponentName while traversing activity parent metadata");