fix: app 列表不返回 droidvnc_ng_pkg
This commit is contained in:
@@ -22,6 +22,7 @@ public class AdbUtil {
|
|||||||
|
|
||||||
private static AdbUtil instance;
|
private static AdbUtil instance;
|
||||||
|
|
||||||
|
private static String DEFAULT_DROIDVNC_NG_PKG_NAME = "net.christianbeier.droidvnc_ng";
|
||||||
private static String DEFAULT_DROIDVNC_NG_APK_PATH = "./lib/droidvnc-np-2.6.0.apk";
|
private static String DEFAULT_DROIDVNC_NG_APK_PATH = "./lib/droidvnc-np-2.6.0.apk";
|
||||||
private static String DEFAULT_DROIDVNC_NG_DEFAULTS_JSON_PATH = "./lib/droidvnc-np-defaults.json";
|
private static String DEFAULT_DROIDVNC_NG_DEFAULTS_JSON_PATH = "./lib/droidvnc-np-defaults.json";
|
||||||
|
|
||||||
@@ -387,6 +388,7 @@ public class AdbUtil {
|
|||||||
String[] lines = result.split("\\n");
|
String[] lines = result.split("\\n");
|
||||||
for (String line : lines) {
|
for (String line : lines) {
|
||||||
String packageName = T.StrUtil.trim(line.substring(prefix.length()));
|
String packageName = T.StrUtil.trim(line.substring(prefix.length()));
|
||||||
|
if (T.StrUtil.equals(DEFAULT_DROIDVNC_NG_PKG_NAME, packageName)) continue;
|
||||||
|
|
||||||
String dumpsysResult = CommandExec.exec(AdbCommandBuilder.builder()
|
String dumpsysResult = CommandExec.exec(AdbCommandBuilder.builder()
|
||||||
.serial(this.getSerial())
|
.serial(this.getSerial())
|
||||||
@@ -423,6 +425,9 @@ public class AdbUtil {
|
|||||||
String appName = apkInfo.getLabel();
|
String appName = apkInfo.getLabel();
|
||||||
String iconFilename = apkInfo.getIcon();
|
String iconFilename = apkInfo.getIcon();
|
||||||
String base64IconDate = apkUtil.extractFileFromApk(localApk.getAbsolutePath(), iconFilename);
|
String base64IconDate = apkUtil.extractFileFromApk(localApk.getAbsolutePath(), iconFilename);
|
||||||
|
if (T.StrUtil.isNotEmpty(base64IconDate)) {
|
||||||
|
base64IconDate = "data:image/jpeg;base64," + base64IconDate;
|
||||||
|
}
|
||||||
|
|
||||||
Map<String, Object> relMap = T.MapUtil.newHashMap();
|
Map<String, Object> relMap = T.MapUtil.newHashMap();
|
||||||
relMap.put("pkg", packageName);
|
relMap.put("pkg", packageName);
|
||||||
|
|||||||
Reference in New Issue
Block a user