Java Code Examples for android.content.Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET

The following are Jave code examples for showing how to use FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET of the android.content.Intent class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: chromium-net-for-android   File: ApiCompatibilityUtils.java   View Source Code Vote up 6 votes
@SuppressWarnings("deprecation")
public static int getActivityNewDocumentFlag() {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
        return Intent.FLAG_ACTIVITY_NEW_DOCUMENT;
    } else {
        return Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET;
    }
}
 
Example 2
Project: iosched-reader   File: SessionDetailModel.java   View Source Code Vote up 6 votes
private int getFlagForUrlLink() {
    if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
        return Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET;
    } else {
        return Intent.FLAG_ACTIVITY_NEW_DOCUMENT;
    }
}