Example usage for android.app Activity isFinishing

List of usage examples for android.app Activity isFinishing

Introduction

In this page you can find the example usage for android.app Activity isFinishing.

Prototype

public boolean isFinishing() 

Source Link

Document

Check to see whether this activity is in the process of finishing, either because you called #finish on it or someone else has requested that it finished.

Usage

From source file:Main.java

public static void finishActivity(Activity context) {
    if (!context.isFinishing()) {
        context.finish();
    }
}

From source file:Main.java

public static boolean isValidContext(Context c) {

    Activity a = (Activity) c;

    if (a.isFinishing()) {
        return false;
    } else {/*from w  ww . j a v a2 s.  com*/
        return true;
    }
}

From source file:Main.java

public static void removeAllActivity() {

    for (Activity activity : list) {
        if (!activity.isFinishing()) {
            activity.finish();//w w  w .ja  v  a 2s  .c o m
        }
    }
}

From source file:Main.java

public static boolean isSafe(Activity activity) {
    if (activity != null && !activity.isFinishing()) {
        return true;
    }/*from ww  w.  j ava2 s. c o  m*/
    return false;
}

From source file:Main.java

public static boolean isActivityAlive(Activity activity) {
    return activity != null && !activity.isFinishing();
}

From source file:Main.java

public static boolean activityIsLiving(Activity activity) {
    if (activity == null || activity.isFinishing() || activity.isDestroyed()) {
        return false;
    } else {//  ww  w. j  a  v  a2s .c o m
        return true;
    }
}

From source file:Main.java

public static void finishAllActivity() {
    for (Activity activity : activities) {
        if (!activity.isFinishing()) {
            activity.finish();/*from  www.  j a v a 2s  . co m*/
        }
    }
}

From source file:Main.java

public static void finishAllActivity() {
    for (Activity activity : activityMan) {
        if (!activity.isFinishing()) {
            activity.finish();/*from ww  w. j  av  a2 s .  c o  m*/
        }
    }
}

From source file:Main.java

public static void finishAll() {
    for (Activity activity : mActivities) {
        if (!activity.isFinishing()) {
            activity.finish();/*w  w w. java2 s  .  co  m*/
        }
    }
}

From source file:Main.java

public static void finishAllActivity() {
    for (Activity activity : mActivityList) {
        if (!activity.isFinishing())
            activity.finish();//from  ww  w .j  a  v  a2  s  .  c  o  m
    }
}