Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修复v1签名状态下的,读取渠道信息为空的问题 #158

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified command/jar/VasDolly.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions command/src/main/java/com/tencent/vasdolly/command/Util.java
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public static String getSignMode(File apkFile) {
*/
public static String readChannel(File apkFile) {
String channel = ChannelReader.getChannelByV2(apkFile);
if (channel == null) {
if (channel.isEmpty()) {
channel = ChannelReader.getChannelByV1(apkFile);
}
return channel;
Expand Down Expand Up @@ -185,7 +185,7 @@ private static void generateV1ChannelApk(File baseApk, List<String> channelList,
//判断基础包是否已经包含渠道信息

String testChannel = ChannelReader.getChannelByV1(baseApk);
if (testChannel != null) {
if (!testChannel.isEmpty()) {
System.out.println("baseApk : " + baseApk.getAbsolutePath() + " has a channel : " + testChannel + ", only ignore");
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public class ChannelReaderUtil {
public static String getChannel(Context context) {
if (mChannelCache == null) {
String channel = getChannelByV2(context);
if (channel == null) {
if (channel.isEmpty()) {
channel = getChannelByV1(context);
}
mChannelCache = channel;
Expand Down