判断是否安装应用 @param packageName 应用包名 @return true yes, false no
(final String packageName)
| 157 | * @return {@code true} yes, {@code false} no |
| 158 | */ |
| 159 | public static boolean isInstalledApp(final String packageName) { |
| 160 | if (TextUtils.isEmpty(packageName)) return false; |
| 161 | return ShellUtils.execCmd( |
| 162 | "pm path " + packageName, false |
| 163 | ).isSuccessWithSuccessOutput(); |
| 164 | } |
| 165 | |
| 166 | /** |
| 167 | * 查看应用安装路径 |
nothing calls this directly
no test coverage detected