From cdcb17510fbf67ac1ef47b8f99caf6f4c052e4b5 Mon Sep 17 00:00:00 2001 From: kikfox Date: Fri, 15 Sep 2023 13:41:52 +0200 Subject: [PATCH] rename BuildIfo -> ARSCLib --- .../com/reandroid/arsc/{BuildInfo.java => ARSCLib.java} | 8 ++++---- src/main/java/com/reandroid/arsc/chunk/PackageBlock.java | 4 ++-- src/main/java/com/reandroid/arsc/chunk/TableBlock.java | 4 ++-- .../java/com/reandroid/arsc/model/FrameworkTable.java | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) rename src/main/java/com/reandroid/arsc/{BuildInfo.java => ARSCLib.java} (90%) diff --git a/src/main/java/com/reandroid/arsc/BuildInfo.java b/src/main/java/com/reandroid/arsc/ARSCLib.java similarity index 90% rename from src/main/java/com/reandroid/arsc/BuildInfo.java rename to src/main/java/com/reandroid/arsc/ARSCLib.java index 1b1aa7b94..edd042c1f 100755 --- a/src/main/java/com/reandroid/arsc/BuildInfo.java +++ b/src/main/java/com/reandroid/arsc/ARSCLib.java @@ -1,4 +1,4 @@ - /* +/* * Copyright (C) 2022 github.com/REAndroid * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -18,7 +18,7 @@ import java.io.InputStream; import java.util.Properties; -public class BuildInfo { +public class ARSCLib { private static Properties sProperties; public static String getName(){ @@ -45,7 +45,7 @@ private static Properties getProperties(){ return sProperties; } private static Properties loadProperties(){ - InputStream inputStream=BuildInfo.class.getResourceAsStream("/arsclib.properties"); + InputStream inputStream= ARSCLib.class.getResourceAsStream("/arsclib.properties"); Properties properties=new Properties(); try{ properties.load(inputStream); @@ -54,5 +54,5 @@ private static Properties loadProperties(){ return properties; } - public static final String NAME_arsc_lib_version="arsc_lib_version"; + public static final String NAME_arsc_lib_version = "arsc_lib_version"; } diff --git a/src/main/java/com/reandroid/arsc/chunk/PackageBlock.java b/src/main/java/com/reandroid/arsc/chunk/PackageBlock.java index fdc02efb5..f716b8331 100755 --- a/src/main/java/com/reandroid/arsc/chunk/PackageBlock.java +++ b/src/main/java/com/reandroid/arsc/chunk/PackageBlock.java @@ -15,7 +15,7 @@ */ package com.reandroid.arsc.chunk; -import com.reandroid.arsc.BuildInfo; +import com.reandroid.arsc.ARSCLib; import com.reandroid.arsc.array.LibraryInfoArray; import com.reandroid.arsc.array.SpecTypePairArray; import com.reandroid.arsc.base.Block; @@ -657,7 +657,7 @@ public JSONObject toJson() { public JSONObject toJson(boolean addTypes) { JSONObject jsonObject=new JSONObject(); - jsonObject.put(BuildInfo.NAME_arsc_lib_version, BuildInfo.getVersion()); + jsonObject.put(ARSCLib.NAME_arsc_lib_version, ARSCLib.getVersion()); jsonObject.put(NAME_package_id, getId()); jsonObject.put(NAME_package_name, getName()); diff --git a/src/main/java/com/reandroid/arsc/chunk/TableBlock.java b/src/main/java/com/reandroid/arsc/chunk/TableBlock.java index a58527751..cd868f3b1 100755 --- a/src/main/java/com/reandroid/arsc/chunk/TableBlock.java +++ b/src/main/java/com/reandroid/arsc/chunk/TableBlock.java @@ -16,7 +16,7 @@ package com.reandroid.arsc.chunk; import com.reandroid.arsc.ApkFile; -import com.reandroid.arsc.BuildInfo; +import com.reandroid.arsc.ARSCLib; import com.reandroid.arsc.array.PackageArray; import com.reandroid.arsc.model.ResourceEntry; import com.reandroid.arsc.header.HeaderBlock; @@ -715,7 +715,7 @@ public PackageBlock parsePublicXml(XmlPullParser parser) throws IOException, public JSONObject toJson() { JSONObject jsonObject=new JSONObject(); - jsonObject.put(BuildInfo.NAME_arsc_lib_version, BuildInfo.getVersion()); + jsonObject.put(ARSCLib.NAME_arsc_lib_version, ARSCLib.getVersion()); jsonObject.put(NAME_packages, getPackageArray().toJson()); JSONArray jsonArray = getStringPool().toJson(); diff --git a/src/main/java/com/reandroid/arsc/model/FrameworkTable.java b/src/main/java/com/reandroid/arsc/model/FrameworkTable.java index b1ff02e51..4280a810c 100755 --- a/src/main/java/com/reandroid/arsc/model/FrameworkTable.java +++ b/src/main/java/com/reandroid/arsc/model/FrameworkTable.java @@ -15,7 +15,7 @@ */ package com.reandroid.arsc.model; -import com.reandroid.arsc.BuildInfo; +import com.reandroid.arsc.ARSCLib; import com.reandroid.arsc.array.SpecTypePairArray; import com.reandroid.arsc.array.TypeBlockArray; import com.reandroid.arsc.chunk.ChunkType; @@ -178,7 +178,7 @@ private void shrinkTableString(){ TableStringPool tableStringPool=getStringPool(); tableStringPool.getStringsArray().ensureSize(1); TableString title=tableStringPool.get(0); - title.set(BuildInfo.getRepo()); + title.set(ARSCLib.getRepo()); for(TableString tableString:tableStringPool.getStringsArray().listItems()){ if(tableString==title){ continue;