转:http://laokaddk.blog.51cto.com/368606/1363827
-
ACTIVITY MANAGER ACTIVITIES (dumpsys activity activities)
-
Main stack:
-
TaskRecord{4199dd68 #56 A com.leaves.ipanel U 0}
-
Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.leaves.ipanel/.MainActivity }
-
Hist #3: ActivityRecord{4140fdf8 u0 com.leaves.ipanel/.ActivityB}
-
Intent { act=com.leaves.ipanel.ActivityB cmp=com.leaves.ipanel/.ActivityB }
-
ProcessRecord{41517e80 13350:com.leaves.ipanel/u0a10061}
-
Hist #2: ActivityRecord{413ff7e8 u0 com.leaves.ipanel/.ActivityA}
-
Intent { act=com.leaves.ipanel.ActivityA cmp=com.leaves.ipanel/.ActivityA }
-
ProcessRecord{41517e80 13350:com.leaves.ipanel/u0a10061}
-
Hist #1: ActivityRecord{413f8b28 u0 com.leaves.ipanel/.MainActivity}
-
Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.leaves.ipanel/.MainActivity }
-
ProcessRecord{41517e80 13350:com.leaves.ipanel/u0a10061}
-
TaskRecord{41350f60 #2 A com.android.launcher U 0}
-
Intent { act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10600000 cmp=com.android.launcher/com.android.launcher2.Launcher }
-
Hist #0: ActivityRecord{41616790 u0 com.android.launcher/com.android.launcher2.Launcher}
-
Intent { act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10000000 cmp=com.android.launcher/com.android.launcher2.Launcher }
-
ProcessRecord{41615818 628:com.android.launcher/1000}
-
publicvoid onClick(View v) {
-
// TODO Auto-generated method stub
-
Log.i(TAG, "--onClick--task id = " + getCurrentTaskId());
-
-
Intent intent = new Intent("com.leaves.ipanel.ActivityB");
-
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK);
-
startActivity(intent);
-
}
-
ACTIVITY MANAGER ACTIVITIES (dumpsys activity activities)
-
Main stack:
-
TaskRecord{4245bd10 #57 A com.leaves.ipanel U 0}
-
Intent { act=com.leaves.ipanel.ActivityB flg=0x10008000 cmp=com.leaves.ipanel/.ActivityB }
-
Hist #1: ActivityRecord{413f8b28 u0 com.leaves.ipanel/.ActivityB}
-
Intent { act=com.leaves.ipanel.ActivityB flg=0x10008000 cmp=com.leaves.ipanel/.ActivityB }
-
ProcessRecord{41413010 13441:com.leaves.ipanel/u0a10061}
-
TaskRecord{41350f60 #2 A com.android.launcher U 0}
-
Intent { act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10600000 cmp=com.android.launcher/com.android.launcher2.Launcher }
-
Hist #0: ActivityRecord{41616790 u0 com.android.launcher/com.android.launcher2.Launcher}
-
Intent { act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10000000 cmp=com.android.launcher/com.android.launcher2.Launcher }
-
ProcessRecord{41615818 628:com.android.launcher/1000}