am 7fde8e2b: Merge "Be more tolerant in TaskStackBuilder" into jb-dev
* commit '7fde8e2ba27942ed61a1d57f63f3b4eea3e0bbc8': Be more tolerant in TaskStackBuilder
This commit is contained in:
@@ -161,18 +161,12 @@ public class TaskStackBuilder {
|
|||||||
ActivityInfo info = pm.getActivityInfo(
|
ActivityInfo info = pm.getActivityInfo(
|
||||||
new ComponentName(mSourceContext, sourceActivityClass), 0);
|
new ComponentName(mSourceContext, sourceActivityClass), 0);
|
||||||
String parentActivity = info.parentActivityName;
|
String parentActivity = info.parentActivityName;
|
||||||
Intent parent = new Intent().setComponent(
|
while (parentActivity != null) {
|
||||||
new ComponentName(mSourceContext, parentActivity));
|
Intent parent = new Intent().setComponent(
|
||||||
while (parent != null) {
|
new ComponentName(mSourceContext, parentActivity));
|
||||||
mIntents.add(insertAt, parent);
|
mIntents.add(insertAt, parent);
|
||||||
info = pm.getActivityInfo(parent.getComponent(), 0);
|
info = pm.getActivityInfo(parent.getComponent(), 0);
|
||||||
parentActivity = info.parentActivityName;
|
parentActivity = info.parentActivityName;
|
||||||
if (parentActivity != null) {
|
|
||||||
parent = new Intent().setComponent(
|
|
||||||
new ComponentName(mSourceContext, parentActivity));
|
|
||||||
} else {
|
|
||||||
parent = null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} catch (NameNotFoundException e) {
|
} catch (NameNotFoundException e) {
|
||||||
Log.e(TAG, "Bad ComponentName while traversing activity parent metadata");
|
Log.e(TAG, "Bad ComponentName while traversing activity parent metadata");
|
||||||
|
|||||||
Reference in New Issue
Block a user