It's a combination of the flags:
public static final int FLAG_ACTIVITY_NEW_TASK = 0x10000000;
and
public static final int FLAG_ACTIVITY_RESET_TASK_IF_NEEDED = 0x00200000;
0x10000000 is the hexadecimal notation for 268435456.
0x00200000 is the hexadecimal notation for 2097152.
If you add these numbers, you get:
0x10200000, which is the hexadecimal notation for 270532608.
So the first time you start your app, you just get FLAG_ACTIVITY_NEW_TASK
, but the second time you will also get FLAG_ACTIVITY_RESET_TASK_IF_NEEDED
. This is just a bitwise OR operation.
To check if your desired flag is active, you can do a bitwise AND like this:
boolean hasNewTaskFlag = (flg & FLAG_ACTIVITY_NEW_TASK) != 0;
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…