Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.util.HashSet;
import android.app.Activity;

public class Main {
    public static HashSet<Activity> activities = new HashSet<Activity>();

    public static void finshActivities(Activity activity) {
        if (activity == null) {
            return;
        }
        for (Activity ac : activities) {
            if (ac != activity) {
                ac.finish();
            }
        }
        activities.clear();
    }
}