public void CheckTop(String packagename,int casenum)
{
Context context = getBaseContext();
ActivityManager am = (ActivityManager) context.
getSystemService(Activity.ACTIVITY_SERVICE); String className = am.getRunningTasks(1).get(0).topActivity.getClassName();
if(!className.contains(packagename) )
{
lo
Log.d("TAG", " Test fail...");
}
else
{
Log.d("TAG", " Test pass...");
}
}