I got the answers myself.
For the first question,I found the answer in the note of method startActivityForResult(Intent,int,Bundle).
enter image description here
As shown in the following figure,the shown Activity may be ActivityX if ActivityY finishes ,so it immediately receive a cancel result for the uncertain result.It just happens when api is below 20.
enter image description here
For the next question,I found the answer in source code.
ActivityStack topStack = getFocusedStack();
ActivityRecord top = topStack.topRunningNonDelayedActivityLocked(notTop);
if (top != null && r.resultTo == null) {
Slog.d("DDY", "========------ " );
if (top.realActivity.equals(r.realActivity) && top.userId == r.userId) {
if (top.app != null && top.app.thread != null) {
if ((launchFlags&Intent.FLAG_ACTIVITY_SINGLE_TOP) != 0
|| r.launchMode == ActivityInfo.LAUNCH_SINGLE_TOP
|| r.launchMode == ActivityInfo.LAUNCH_SINGLE_TASK) {
......
top.deliverNewIntentLocked(callingUid, r.intent);
When a Activity try to start itself,r.resultTo is not null,so it start with standard mode.