Home
last modified time | relevance | path

Searched refs:ApkAssets (Results 1 – 25 of 51) sorted by relevance

123

/frameworks/base/core/java/android/content/res/loader/
DResourcesProvider.java23 import android.content.res.ApkAssets;
51 private final ApkAssets mApkAssets;
61 return new ResourcesProvider(ApkAssets.loadEmptyForLoader(ApkAssets.PROPERTY_LOADER, in empty()
101 return new ResourcesProvider(ApkAssets.loadFromFd(fileDescriptor.getFileDescriptor(), in loadFromApk()
102 fileDescriptor.toString(), ApkAssets.PROPERTY_LOADER, assetsProvider)); in loadFromApk()
130 return new ResourcesProvider(ApkAssets.loadFromFd(fileDescriptor.getFileDescriptor(), in loadFromApk()
131 fileDescriptor.toString(), offset, length, ApkAssets.PROPERTY_LOADER, in loadFromApk()
156 ApkAssets.loadTableFromFd(fileDescriptor.getFileDescriptor(), in loadFromTable()
157 fileDescriptor.toString(), ApkAssets.PROPERTY_LOADER, assetsProvider)); in loadFromTable()
187 ApkAssets.loadTableFromFd(fileDescriptor.getFileDescriptor(), in loadFromTable()
[all …]
DResourcesLoader.java20 import android.content.res.ApkAssets;
58 private ApkAssets[] mApkAssets;
160 public List<ApkAssets> getApkAssets() { in getApkAssets()
241 mApkAssets = new ApkAssets[mProviders.length]; in notifyProvidersChangedLocked()
/frameworks/base/core/java/android/content/res/
DApkAssets.java44 public final class ApkAssets { class
126 public static @NonNull ApkAssets loadFromPath(@NonNull String path) throws IOException { in loadFromPath()
138 public static @NonNull ApkAssets loadFromPath(@NonNull String path, @PropertyFlags int flags) in loadFromPath()
140 return new ApkAssets(FORMAT_APK, path, flags, null /* assets */); in loadFromPath()
152 public static @NonNull ApkAssets loadFromPath(@NonNull String path, @PropertyFlags int flags, in loadFromPath()
154 return new ApkAssets(FORMAT_APK, path, flags, assets); in loadFromPath()
170 public static @NonNull ApkAssets loadFromFd(@NonNull FileDescriptor fd, in loadFromFd()
173 return new ApkAssets(FORMAT_APK, fd, friendlyName, flags, assets); in loadFromFd()
193 public static @NonNull ApkAssets loadFromFd(@NonNull FileDescriptor fd, in loadFromFd()
197 return new ApkAssets(FORMAT_APK, fd, friendlyName, offset, length, flags, assets); in loadFromFd()
[all …]
DAssetManager.java69 private static final ApkAssets[] sEmptyApkAssets = new ApkAssets[0];
75 @GuardedBy("sSync") private static ApkAssets[] sSystemApkAssets = new ApkAssets[0];
76 @GuardedBy("sSync") private static ArraySet<ApkAssets> sSystemApkAssetsSet;
107 @GuardedBy("this") private ApkAssets[] mApkAssets;
125 private ArrayList<ApkAssets> mUserApkAssets = new ArrayList<>();
128 public Builder addApkAssets(ApkAssets apkAssets) { in addApkAssets()
140 final ApkAssets[] systemApkAssets = getSystem().getApkAssets(); in build()
145 final ArrayList<ApkAssets> loaderApkAssets = new ArrayList<>(); in build()
146 final ArraySet<ApkAssets> uniqueLoaderApkAssets = new ArraySet<>(); in build()
148 final List<ApkAssets> currentLoaderApkAssets = mLoaders.get(i).getApkAssets(); in build()
[all …]
/frameworks/base/libs/androidfw/tests/
DApkAssets_test.cpp38 std::unique_ptr<const ApkAssets> loaded_apk = in TEST()
39 ApkAssets::Load(GetTestDataPath() + "/basic/basic.apk"); in TEST()
53 std::unique_ptr<const ApkAssets> loaded_apk = ApkAssets::LoadFromFd(std::move(fd), path); in TEST()
63 std::unique_ptr<const ApkAssets> loaded_apk = in TEST()
64 ApkAssets::Load(GetTestDataPath() + "/appaslib/appaslib.apk"); in TEST()
72 loaded_apk = ApkAssets::Load(GetTestDataPath() + "/appaslib/appaslib.apk", PROPERTY_DYNAMIC); in TEST()
82 std::unique_ptr<const ApkAssets> loaded_apk = in TEST()
83 ApkAssets::Load(GetTestDataPath() + "/basic/basic.apk"); in TEST()
94 std::unique_ptr<const ApkAssets> loaded_apk = in TEST()
95 ApkAssets::Load(GetTestDataPath() + "/basic/basic.apk"); in TEST()
DAssetManager2_bench.cpp41 std::unique_ptr<const ApkAssets> apk = ApkAssets::Load(path); in BM_AssetManagerLoadAssets()
64 std::unique_ptr<const ApkAssets> apk = ApkAssets::Load(path); in BM_AssetManagerLoadFrameworkAssets()
132 std::unique_ptr<const ApkAssets> apk = ApkAssets::Load(GetTestDataPath() + "/styles/styles.apk"); in BM_AssetManagerGetBag()
180 std::unique_ptr<const ApkAssets> apk = ApkAssets::Load(kFrameworkPath); in BM_AssetManagerGetResourceLocales()
216 std::unique_ptr<const ApkAssets> apk = ApkAssets::Load(kFrameworkPath); in BM_AssetManagerSetConfigurationFramework()
DAttributeResolution_bench.cpp39 std::unique_ptr<const ApkAssets> styles_apk = in BM_ApplyStyle()
40 ApkAssets::Load(GetTestDataPath() + "/styles/styles.apk"); in BM_ApplyStyle()
83 std::unique_ptr<const ApkAssets> framework_apk = ApkAssets::Load(kFrameworkPath); in BM_ApplyStyleFramework()
89 std::unique_ptr<const ApkAssets> basic_apk = in BM_ApplyStyleFramework()
90 ApkAssets::Load(GetTestDataPath() + "/basic/basic.apk"); in BM_ApplyStyleFramework()
DTheme_bench.cpp31 std::unique_ptr<const ApkAssets> apk = ApkAssets::Load(kFrameworkPath); in BM_ThemeApplyStyleFramework()
65 std::unique_ptr<const ApkAssets> apk = ApkAssets::Load(kFrameworkPath); in BM_ThemeGetAttribute()
DBenchmarkHelpers.cpp56 std::vector<std::unique_ptr<const ApkAssets>> apk_assets; in GetResourceBenchmark()
57 std::vector<const ApkAssets*> apk_assets_ptrs; in GetResourceBenchmark()
59 std::unique_ptr<const ApkAssets> apk = ApkAssets::Load(path); in GetResourceBenchmark()
DAssetManager2_test.cpp52 basic_assets_ = ApkAssets::Load("basic/basic.apk"); in SetUp()
55 basic_de_fr_assets_ = ApkAssets::Load("basic/basic_de_fr.apk"); in SetUp()
58 style_assets_ = ApkAssets::Load("styles/styles.apk"); in SetUp()
61 lib_one_assets_ = ApkAssets::Load("lib_one/lib_one.apk"); in SetUp()
64 lib_two_assets_ = ApkAssets::Load("lib_two/lib_two.apk"); in SetUp()
67 libclient_assets_ = ApkAssets::Load("libclient/libclient.apk"); in SetUp()
70 appaslib_assets_ = ApkAssets::Load("appaslib/appaslib.apk", PROPERTY_DYNAMIC); in SetUp()
73 system_assets_ = ApkAssets::Load("system/system.apk", PROPERTY_SYSTEM); in SetUp()
76 app_assets_ = ApkAssets::Load("app/app.apk"); in SetUp()
79 overlay_assets_ = ApkAssets::LoadOverlay("overlay/overlay.idmap"); in SetUp()
[all …]
DIdmap_test.cpp44 system_assets_ = ApkAssets::Load("system/system.apk"); in SetUp()
47 overlay_assets_ = ApkAssets::LoadOverlay("overlay/overlay.idmap"); in SetUp()
50 overlayable_assets_ = ApkAssets::Load("overlayable/overlayable.apk"); in SetUp()
60 std::unique_ptr<const ApkAssets> system_assets_;
61 std::unique_ptr<const ApkAssets> overlay_assets_;
62 std::unique_ptr<const ApkAssets> overlayable_assets_;
228 auto loader_assets = ApkAssets::LoadTable("loader/resources.arsc", PROPERTY_LOADER); in TEST_F()
254 auto apk_assets = ApkAssets::LoadOverlay(temp_file.path); in TEST_F()
DTheme_test.cpp39 system_assets_ = ApkAssets::Load(GetTestDataPath() + "/system/system.apk", PROPERTY_SYSTEM); in SetUp()
42 style_assets_ = ApkAssets::Load(GetTestDataPath() + "/styles/styles.apk"); in SetUp()
45 libclient_assets_ = ApkAssets::Load(GetTestDataPath() + "/libclient/libclient.apk"); in SetUp()
48 lib_one_assets_ = ApkAssets::Load(GetTestDataPath() + "/lib_one/lib_one.apk"); in SetUp()
51 lib_two_assets_ = ApkAssets::Load(GetTestDataPath() + "/lib_two/lib_two.apk"); in SetUp()
56 std::unique_ptr<const ApkAssets> system_assets_;
57 std::unique_ptr<const ApkAssets> style_assets_;
58 std::unique_ptr<const ApkAssets> libclient_assets_;
59 std::unique_ptr<const ApkAssets> lib_one_assets_;
60 std::unique_ptr<const ApkAssets> lib_two_assets_;
/frameworks/base/core/jni/
Dandroid_content_res_ApkAssets.cpp144 return ApkAssets::CreateAssetFromFd(base::unique_fd(fd), in OpenInternal()
170 std::unique_ptr<const ApkAssets> apk_assets; in NativeLoad()
173 apk_assets = ApkAssets::Load(path.c_str(), property_flags, std::move(loader_assets)); in NativeLoad()
176 apk_assets = ApkAssets::LoadOverlay(path.c_str(), property_flags); in NativeLoad()
179 apk_assets = ApkAssets::LoadTable(path.c_str(), property_flags, std::move(loader_assets)); in NativeLoad()
182 apk_assets = ApkAssets::LoadFromDir(path.c_str(), property_flags, std::move(loader_assets)); in NativeLoad()
221 std::unique_ptr<const ApkAssets> apk_assets; in NativeLoadFromFd()
224 apk_assets = ApkAssets::LoadFromFd(std::move(dup_fd), friendly_name_utf8.c_str(), in NativeLoadFromFd()
228 apk_assets = ApkAssets::LoadTableFromFd(std::move(dup_fd), friendly_name_utf8.c_str(), in NativeLoadFromFd()
282 std::unique_ptr<const ApkAssets> apk_assets; in NativeLoadFromFdOffset()
[all …]
/frameworks/base/libs/androidfw/include/androidfw/
DApkAssets.h70 class ApkAssets {
78 static std::unique_ptr<const ApkAssets> Load(
87 static std::unique_ptr<const ApkAssets> LoadFromFd(
93 static std::unique_ptr<const ApkAssets> LoadTable(
101 static std::unique_ptr<const ApkAssets> LoadTableFromFd(
108 static std::unique_ptr<const ApkAssets> LoadOverlay(const std::string& idmap_path,
113 static std::unique_ptr<const ApkAssets> LoadFromDir(
118 static std::unique_ptr<const ApkAssets> LoadEmpty(
167 DISALLOW_COPY_AND_ASSIGN(ApkAssets);
169 static std::unique_ptr<const ApkAssets> LoadImpl(
[all …]
/frameworks/base/libs/androidfw/
DApkAssets.cpp44 ApkAssets::ApkAssets(std::unique_ptr<const AssetsProvider> assets_provider, in ApkAssets() function in android::ApkAssets
73 const off64_t length = ApkAssets::kUnknownLength) { in Create()
76 const int32_t result = (length == ApkAssets::kUnknownLength) in Create()
260 return ApkAssets::CreateAssetFromFile(resolved_path); in OpenInternal()
334 std::unique_ptr<const ApkAssets> ApkAssets::Load( in Load()
344 std::unique_ptr<const ApkAssets> ApkAssets::LoadFromFd( in LoadFromFd()
357 std::unique_ptr<const ApkAssets> ApkAssets::LoadTable( in LoadTable()
366 std::unique_ptr<const ApkAssets> ApkAssets::LoadTableFromFd( in LoadTableFromFd()
377 std::unique_ptr<const ApkAssets> ApkAssets::LoadOverlay(const std::string& idmap_path, in LoadOverlay()
402 std::unique_ptr<const ApkAssets> ApkAssets::LoadFromDir( in LoadFromDir()
[all …]
/frameworks/base/core/java/android/content/pm/split/
DSplitAssetDependencyLoader.java25 import android.content.res.ApkAssets;
45 private final ApkAssets[][] mCachedSplitApks;
58 mCachedSplitApks = new ApkAssets[mSplitPaths.length][]; in SplitAssetDependencyLoader()
67 private static ApkAssets loadApkAssets(String path, @ParseFlags int flags) in loadApkAssets()
75 return ApkAssets.loadFromPath(path); in loadApkAssets()
82 private static AssetManager createAssetManagerWithAssets(ApkAssets[] apkAssets) { in createAssetManagerWithAssets()
93 final ArrayList<ApkAssets> assets = new ArrayList<>(); in constructSplit()
109 mCachedSplitApks[splitIdx] = assets.toArray(new ApkAssets[assets.size()]); in constructSplit()
DDefaultSplitAssetLoader.java24 import android.content.res.ApkAssets;
50 private static ApkAssets loadApkAssets(String path, @ParseFlags int flags) in loadApkAssets()
58 return ApkAssets.loadFromPath(path); in loadApkAssets()
71 ApkAssets[] apkAssets = new ApkAssets[(mSplitCodePaths != null in getBaseAssetManager()
/frameworks/base/cmds/idmap2/tests/
DPrettyPrintVisitorTests.cpp33 using android::ApkAssets;
42 std::unique_ptr<const ApkAssets> target_apk = ApkAssets::Load(target_apk_path); in TEST()
46 std::unique_ptr<const ApkAssets> overlay_apk = ApkAssets::Load(overlay_apk_path); in TEST()
DIdmapTests.cpp173 std::unique_ptr<const ApkAssets> target_apk = ApkAssets::Load(target_apk_path); in TEST()
176 std::unique_ptr<const ApkAssets> overlay_apk = ApkAssets::Load(overlay_apk_path); in TEST()
201 std::unique_ptr<const ApkAssets> target_apk = ApkAssets::Load(target_apk_path); in TestIdmapDataFromApkAssets()
207 std::unique_ptr<const ApkAssets> overlay_apk = ApkAssets::Load(overlay_apk_path); in TestIdmapDataFromApkAssets()
227 std::unique_ptr<const ApkAssets> target_apk = ApkAssets::Load(target_apk_path); in TEST()
230 std::unique_ptr<const ApkAssets> overlay_apk = ApkAssets::Load(overlay_apk_path); in TEST()
268 std::unique_ptr<const ApkAssets> target_apk = ApkAssets::Load(target_apk_path); in TEST()
271 std::unique_ptr<const ApkAssets> overlay_apk = ApkAssets::Load(overlay_apk_path); in TEST()
364 std::unique_ptr<const ApkAssets> target_apk = ApkAssets::Load(target_apk_path); in TEST()
368 std::unique_ptr<const ApkAssets> overlay_apk = ApkAssets::Load(overlay_apk_path); in TEST()
[all …]
DRawPrintVisitorTests.cpp52 std::unique_ptr<const ApkAssets> target_apk = ApkAssets::Load(target_apk_path); in TEST()
56 std::unique_ptr<const ApkAssets> overlay_apk = ApkAssets::Load(overlay_apk_path); in TEST()
/frameworks/base/cmds/idmap2/idmap2/
DCreate.cpp33 using android::ApkAssets;
92 const std::unique_ptr<const ApkAssets> target_apk = ApkAssets::Load(target_apk_path); in Create()
97 const std::unique_ptr<const ApkAssets> overlay_apk = ApkAssets::Load(overlay_apk_path); in Create()
DCreateMultiple.cpp36 using android::ApkAssets;
93 const std::unique_ptr<const ApkAssets> target_apk = ApkAssets::Load(target_apk_path); in CreateMultiple()
109 const std::unique_ptr<const ApkAssets> overlay_apk = ApkAssets::Load(overlay_apk_path); in CreateMultiple()
DLookup.cpp44 using android::ApkAssets;
199 std::vector<std::unique_ptr<const ApkAssets>> apk_assets; in Lookup()
213 auto target_apk = ApkAssets::Load(target_path); in Lookup()
231 auto overlay_apk = ApkAssets::LoadOverlay(idmap_path); in Lookup()
240 std::vector<const ApkAssets*> raw_pointer_apk_assets; in Lookup()
242 [](const auto& p) -> const ApkAssets* { return p.get(); }); in Lookup()
/frameworks/base/cmds/idmap2/include/idmap2/
DRawPrintVisitor.h29 class ApkAssets; variable
51 std::unique_ptr<const ApkAssets> target_apk_;
52 std::unique_ptr<const ApkAssets> overlay_apk_;
DPrettyPrintVisitor.h28 class ApkAssets; variable
44 std::unique_ptr<const ApkAssets> target_apk_;

123