add isTopActivity in PackageUtils.java