当前位置: 首页>>代码示例>>Java>>正文


Java UndefinedResObject类代码示例

本文整理汇总了Java中brut.androlib.err.UndefinedResObject的典型用法代码示例。如果您正苦于以下问题:Java UndefinedResObject类的具体用法?Java UndefinedResObject怎么用?Java UndefinedResObject使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


UndefinedResObject类属于brut.androlib.err包,在下文中一共展示了UndefinedResObject类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: putPackageInfo

import brut.androlib.err.UndefinedResObject; //导入依赖的package包/类
private void putPackageInfo(MetaInfo meta) throws AndrolibException {
    String renamed = getResTable().getPackageRenamed();
    String original = getResTable().getPackageOriginal();

    int id = getResTable().getPackageId();
    try {
        id = getResTable().getPackage(renamed).getId();
    } catch (UndefinedResObject ignored) {}

    if (Strings.isNullOrEmpty(original)) {
        return;
    }

    meta.packageInfo = new PackageInfo();

    // only put rename-manifest-package into apktool.yml, if the change will be required
    if (!renamed.equalsIgnoreCase(original)) {
        meta.packageInfo.renameManifestPackage = renamed;
    }
    meta.packageInfo.forcedPackageId = String.valueOf(id);
}
 
开发者ID:imkiva,项目名称:AndroidApktool,代码行数:22,代码来源:ApkDecoder.java

示例2: decode

import brut.androlib.err.UndefinedResObject; //导入依赖的package包/类
public String decode(int type, int value, String rawValue, int attrResId)
        throws AndrolibException {
    ResScalarValue resValue = mCurrentPackage.getValueFactory().factory(
            type, value, rawValue);

    String decoded = null;
    if (attrResId > 0) {
        try {
            ResAttr attr = (ResAttr) getCurrentPackage().getResTable()
                    .getResSpec(attrResId).getDefaultResource().getValue();

            decoded = attr.convertToResXmlFormat(resValue);
        } catch (UndefinedResObject | ClassCastException ex) {
            // ignored
        }
    }

    return decoded != null ? decoded : resValue.encodeAsResXmlAttr();
}
 
开发者ID:imkiva,项目名称:AndroidApktool,代码行数:20,代码来源:ResAttrDecoder.java

示例3: getPackage

import brut.androlib.err.UndefinedResObject; //导入依赖的package包/类
public ResPackage getPackage(int id) throws AndrolibException {
    ResPackage pkg = mPackagesById.get(id);
    if (pkg != null) {
        return pkg;
    }
    if (mAndRes != null) {
        return mAndRes.loadFrameworkPkg(this, id, mAndRes.apkOptions.frameworkTag);
    }
    throw new UndefinedResObject(String.format("package: id=%d", id));
}
 
开发者ID:imkiva,项目名称:AndroidApktool,代码行数:11,代码来源:ResTable.java

示例4: getResSpec

import brut.androlib.err.UndefinedResObject; //导入依赖的package包/类
public ResResSpec getResSpec(String name) throws AndrolibException {
    ResResSpec spec = mResSpecs.get(name);
    if (spec == null) {
        throw new UndefinedResObject(String.format("resource spec: %s/%s", getName(), name));
    }
    return spec;
}
 
开发者ID:imkiva,项目名称:AndroidApktool,代码行数:8,代码来源:ResTypeSpec.java

示例5: getResSpec

import brut.androlib.err.UndefinedResObject; //导入依赖的package包/类
public ResResSpec getResSpec(ResID resID) throws UndefinedResObject {
    ResResSpec spec = mResSpecs.get(resID);
    if (spec == null) {
        throw new UndefinedResObject("resource spec: " + resID.toString());
    }
    return spec;
}
 
开发者ID:imkiva,项目名称:AndroidApktool,代码行数:8,代码来源:ResPackage.java

示例6: getConfig

import brut.androlib.err.UndefinedResObject; //导入依赖的package包/类
public ResType getConfig(ResConfigFlags flags) throws AndrolibException {
    ResType config = mConfigs.get(flags);
    if (config == null) {
        throw new UndefinedResObject("config: " + flags);
    }
    return config;
}
 
开发者ID:imkiva,项目名称:AndroidApktool,代码行数:8,代码来源:ResPackage.java

示例7: getType

import brut.androlib.err.UndefinedResObject; //导入依赖的package包/类
public ResTypeSpec getType(String typeName) throws AndrolibException {
    ResTypeSpec type = mTypes.get(typeName);
    if (type == null) {
        throw new UndefinedResObject("type: " + typeName);
    }
    return type;
}
 
开发者ID:imkiva,项目名称:AndroidApktool,代码行数:8,代码来源:ResPackage.java

示例8: getResource

import brut.androlib.err.UndefinedResObject; //导入依赖的package包/类
public ResResource getResource(ResResSpec spec) throws AndrolibException {
    ResResource res = mResources.get(spec);
    if (res == null) {
        throw new UndefinedResObject(String.format("resource: spec=%s, config=%s", spec, this));
    }
    return res;
}
 
开发者ID:imkiva,项目名称:AndroidApktool,代码行数:8,代码来源:ResType.java

示例9: getResource

import brut.androlib.err.UndefinedResObject; //导入依赖的package包/类
public ResResource getResource(ResConfigFlags config) throws AndrolibException {
    ResResource res = mResources.get(config);
    if (res == null) {
        throw new UndefinedResObject(String.format("resource: spec=%s, config=%s", this, config));
    }
    return res;
}
 
开发者ID:imkiva,项目名称:AndroidApktool,代码行数:8,代码来源:ResResSpec.java

示例10: tagResIdsForFile

import brut.androlib.err.UndefinedResObject; //导入依赖的package包/类
private void tagResIdsForFile(ResTable resTable, Directory dir,
                              String fileName) throws IOException, DirectoryException,
        AndrolibException {
    Iterator<String> it = IOUtils.readLines(dir.getFileInput(fileName))
            .iterator();
    PrintWriter out = new PrintWriter(dir.getFileOutput(fileName));
    while (it.hasNext()) {
        String line = it.next();
        if (RES_NAME_PATTERN.matcher(line).matches()) {
            out.println(line);
            out.println(it.next());
            continue;
        }
        Matcher m = RES_ID_PATTERN.matcher(line);
        if (m.matches()) {
            int resID = parseResID(m.group(3));
            if (resID != -1) {
                try {
                    ResResSpec spec = resTable.getResSpec(resID);
                    out.println(String.format(RES_NAME_FORMAT,
                            spec.getFullName()));
                } catch (UndefinedResObject ex) {
                    if (!R_FILE_PATTERN.matcher(fileName).matches()) {
                        LOGGER.warning(String.format(
                                "Undefined resource spec in %s: 0x%08x",
                                fileName, resID));
                    }
                }
            }
        }
        out.println(line);
    }
    out.close();
}
 
开发者ID:imkiva,项目名称:AndroidApktool,代码行数:35,代码来源:ResSmaliUpdater.java

示例11: getPackage

import brut.androlib.err.UndefinedResObject; //导入依赖的package包/类
public ResPackage getPackage(int id) throws AndrolibException {
	ResPackage pkg = mPackagesById.get(id);
	if (pkg != null) {
		return pkg;
	}
	if (mAndRes != null) {
		return mAndRes.loadFrameworkPkg(this, id, mFrameTag);
	}
	throw new UndefinedResObject(String.format("package: id=%d", id));
}
 
开发者ID:Sukelluskello,项目名称:VectorAttackScanner,代码行数:11,代码来源:ResTable.java

示例12: getResource

import brut.androlib.err.UndefinedResObject; //导入依赖的package包/类
public ResResource getResource(ResResSpec spec) throws AndrolibException {
	ResResource res = mResources.get(spec);
	if (res == null) {
		throw new UndefinedResObject(String.format(
				"resource: spec=%s, config=%s", spec, this));
	}
	return res;
}
 
开发者ID:Sukelluskello,项目名称:VectorAttackScanner,代码行数:9,代码来源:ResConfig.java

示例13: getResSpec

import brut.androlib.err.UndefinedResObject; //导入依赖的package包/类
public ResResSpec getResSpec(ResID resID) throws UndefinedResObject {
	ResResSpec spec = mResSpecs.get(resID);
	if (spec == null) {
		throw new UndefinedResObject("resource spec: " + resID.toString());
	}
	return spec;
}
 
开发者ID:Sukelluskello,项目名称:VectorAttackScanner,代码行数:8,代码来源:ResPackage.java

示例14: getConfig

import brut.androlib.err.UndefinedResObject; //导入依赖的package包/类
public ResConfig getConfig(ResConfigFlags flags) throws AndrolibException {
	ResConfig config = mConfigs.get(flags);
	if (config == null) {
		throw new UndefinedResObject("config: " + flags);
	}
	return config;
}
 
开发者ID:Sukelluskello,项目名称:VectorAttackScanner,代码行数:8,代码来源:ResPackage.java

示例15: getType

import brut.androlib.err.UndefinedResObject; //导入依赖的package包/类
public ResType getType(String typeName) throws AndrolibException {
	ResType type = mTypes.get(typeName);
	if (type == null) {
		throw new UndefinedResObject("type: " + typeName);
	}
	return type;
}
 
开发者ID:Sukelluskello,项目名称:VectorAttackScanner,代码行数:8,代码来源:ResPackage.java


注:本文中的brut.androlib.err.UndefinedResObject类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。