Back to project page permission-explorer.
The source code is released under:
Copyright (C) 2012 Rui Gon?alves and Daniel Cibr?o Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"),...
If you think the Android project permission-explorer listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package pt.up.fe.ssin.pexplorer.utils; //from w w w . jav a2 s .com import android.content.pm.PermissionGroupInfo; import android.content.pm.PermissionInfo; public class PermissionUtils { public static String getShortName(PermissionInfo perm) { int lastDot = perm.name.lastIndexOf('.'); return perm.name.substring(lastDot + 1); } public static String getShortName(PermissionGroupInfo group) { int lastDot = group.name.lastIndexOf('.'); return group.name.substring(lastDot + 1); } public static Pair<String, String> decomposeName(PermissionInfo perm) { int lastDot = perm.name.lastIndexOf('.'); return new Pair<String, String>(lastDot < 0 ? "" : perm.name.substring( 0, lastDot), perm.name.substring(lastDot + 1)); } public static Pair<String, String> decomposeName(PermissionGroupInfo group) { int lastDot = group.name.lastIndexOf('.'); return new Pair<String, String>(lastDot < 0 ? "" : group.name.substring(0, lastDot), group.name.substring(lastDot + 1)); } }