I am watching a behavior of Intent.FLAG_ACTIVITY_CLEAR_TOP.
For example i have three activities A,B and C Now Flow is A -> B -> C
Now when i am starting A from C with this flag with following code.
Intent intent_to_a=new Intent(C.this,A.class);
intent_to_home.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(intent_to_a);
AFAIK, Intent.FLAG_ACTIVITY_CLEAR_TOP should remove B and should resume the A .It also does the same but in a strange way. It removes B , than removes A than creates A. Method onDestroy of A is also being called. Can anyone tell me is it proper or not? If i don't want it to get destroy what should i do?