From d4a94601f3359899bf24900859108d30d9b3fc59 Mon Sep 17 00:00:00 2001 From: xz Date: Thu, 16 May 2019 15:28:24 +0800 Subject: [PATCH] Fix the spelling of some words --- .../com/storm/wind/xpatch/MainCommand.java | 6 ++--- .../wind/xpatch/util/ManifestParser.java | 22 +++++++++---------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/xpatch/src/main/java/com/storm/wind/xpatch/MainCommand.java b/xpatch/src/main/java/com/storm/wind/xpatch/MainCommand.java index dccb26c..5e78485 100644 --- a/xpatch/src/main/java/com/storm/wind/xpatch/MainCommand.java +++ b/xpatch/src/main/java/com/storm/wind/xpatch/MainCommand.java @@ -137,10 +137,10 @@ public class MainCommand extends BaseCommand { String manifestFilePath = unzipApkFilePath + "AndroidManifest.xml"; // parse the app main application full name from the manifest file - ManifestParser.Pair pair = ManifestParser.parseManidestFile(manifestFilePath); + ManifestParser.Pair pair = ManifestParser.parseManifestFile(manifestFilePath); String applicationName; - if (pair != null && pair.applictionName != null) { - applicationName = pair.applictionName; + if (pair != null && pair.applicationName != null) { + applicationName = pair.applicationName; } else { System.out.println(" Application name not found error !!!!!! "); applicationName = DEFAULT_APPLICATION_NAME; diff --git a/xpatch/src/main/java/com/storm/wind/xpatch/util/ManifestParser.java b/xpatch/src/main/java/com/storm/wind/xpatch/util/ManifestParser.java index c949505..97d6dcd 100644 --- a/xpatch/src/main/java/com/storm/wind/xpatch/util/ManifestParser.java +++ b/xpatch/src/main/java/com/storm/wind/xpatch/util/ManifestParser.java @@ -16,13 +16,13 @@ public class ManifestParser { /** * Get the package name and the main application name from the manifest file * */ - public static Pair parseManidestFile(String filePath) { + public static Pair parseManifestFile(String filePath) { AXmlResourceParser parser = new AXmlResourceParser(); File file = new File(filePath); String packageName = null; - String applictionName = null; + String applicationName = null; if (!file.exists()) { - System.out.println(" manifest file not exsit!!! filePath -> " + filePath); + System.out.println(" manifest file not exist!!! filePath -> " + filePath); return null; } try { @@ -50,12 +50,12 @@ public class ManifestParser { if ("application".equals(name)) { if ("name".equals(attrName)) { - applictionName = parser.getAttributeValue(i); + applicationName = parser.getAttributeValue(i); } } - if (packageName != null && packageName.length() > 0 && applictionName != null && applictionName.length() > 0) { - return new Pair(packageName, applictionName); + if (packageName != null && packageName.length() > 0 && applicationName != null && applicationName.length() > 0) { + return new Pair(packageName, applicationName); } } } else if (type == XmlPullParser.END_TAG) { @@ -64,18 +64,18 @@ public class ManifestParser { } } catch (XmlPullParserException | IOException e) { e.printStackTrace(); - System.out.println("parseManidestFile failed, reason --> " + e.getMessage()); + System.out.println("parseManifestFile failed, reason --> " + e.getMessage()); } - return new Pair(packageName, applictionName); + return new Pair(packageName, applicationName); } public static class Pair { public String packageName; - public String applictionName; + public String applicationName; - public Pair(String packageName, String applictionName) { + public Pair(String packageName, String applicationName) { this.packageName = packageName; - this.applictionName = applictionName; + this.applicationName = applicationName; } }