得到活动的Activity包名
ActivityManager manager = (ActivityManager) getSystemService(Context.ACTIVITY_SERVICE);
List<RunningTaskInfo> runningTasks = manager .getRunningTasks(1);RunningTaskInfo cinfo = runningTasks.get(0);
ComponentName component = cinfo.topActivity;
Log.e("hct-zwq:currentactivity = ", component.getClassName());
Boolean mpowerrefuse = component.getClassName().equals("com.hct.scene.launcher2.Launcher");
str = getString(R.string.app_name);