Skip to content

Commit

Permalink
rename BuildIfo -> ARSCLib
Browse files Browse the repository at this point in the history
  • Loading branch information
kikfox committed Sep 15, 2023
1 parent b79375e commit cdcb175
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/*
* Copyright (C) 2022 github.com/REAndroid
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -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(){
Expand All @@ -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);
Expand All @@ -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";
}
4 changes: 2 additions & 2 deletions src/main/java/com/reandroid/arsc/chunk/PackageBlock.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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());
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/reandroid/arsc/chunk/TableBlock.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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();
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/reandroid/arsc/model/FrameworkTable.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit cdcb175

Please sign in to comment.