package com.maplehaze.adsdk.demo.utils;

import android.app.Activity;
import android.content.Intent;

import com.maplehaze.adsdk.demo.StartActivity;

public class RestartUtl {

    public static void startClearLastTask(Activity restoreActivity) {
        try{
            Intent intent = new Intent(restoreActivity, StartActivity.class);
            intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK);
            restoreActivity.startActivity(intent);
            restoreActivity.finish();
        }catch (Exception e){

        }

    }
}
