Commit Graph

31 Commits

Author SHA1 Message Date
Julian Winkler
8d4d0021b3 use libandroidfw also for themes 2024-02-06 16:41:49 +01:00
Julian Winkler
3284518418 AssetManager: use libandroidfw instead of ARSClib for resources.arsc parsing
This reduces startup time and RAM usage. Not yet feature complete with
the ARSClib based implementation, but Gravity Defied runs already
2024-02-06 16:41:48 +01:00
Julian Winkler
493cb8284a fix some Drawable related crashes in NewPipe 2023-12-30 23:38:56 +01:00
Julian Winkler
72a8b3a047 add more stubs 2023-11-12 12:16:23 +01:00
Mis012
0b0cfed345 misc: fix stuff up to make SDL example work again
it still behaves weirdly, should probably find some
other example since I don't trust my own code.
2023-10-29 22:48:02 +01:00
Julian Winkler
9025142bdd AssetManager: speed up XML inflation using HashMap caching
This makes XML inflation around 10 times faster. Inflating a layout XML
with one TextView and one ImageView now takes 4 ms instead of 40 ms
2023-10-29 15:28:06 +01:00
Mis012
43306bf174 api-impl/android/content/res/AssetManager: fix infinite loop with suspicious self-referencing arsc entries 2023-10-09 20:11:36 +02:00
Mis012
1b33acb658 api-impl/android/content: implement metadata bundle in PackageInfo 2023-10-08 22:33:14 +02:00
Julian Winkler
97f8c2ed0f Add some missing APIs.
android.widget.Filter and android.webkit.MimeTypeMap are copied from
AOSP. Other new classes are only stub implementations.
2023-09-01 16:05:26 +02:00
Julian Winkler
c6b98b14f8 Resources + LayoutInflater: throw same Exceptions as on AOSP 2023-09-01 12:39:20 +02:00
Julian Winkler
28cd0006bc some fixes to make NewPipe not crash when layouting 2023-08-23 14:52:56 +02:00
Julian Winkler
c4b7bdc63d ViewGroup: handle scroll events 2023-08-23 12:39:55 +02:00
Julian Winkler
34d214e9ae AssetManager.java: fill indices array when loading TypedArray
This is needed for TypedArray.getIndexCount() and related functions
2023-08-22 22:30:03 +02:00
Julian Winkler
3fd81baeaf AssetManager: fix loading without merge
use cookie values to find correct StringPool
2023-08-22 22:29:03 +02:00
Julian Winkler
2b97e3bd57 AssetManager.java: iterate tableBlocks instead of merging
The merging process is too slow
2023-08-22 19:44:09 +02:00
Julian Winkler
c60e97f13f implement obtainStyledAttributes() functions properly 2023-08-22 15:51:13 +02:00
Julian Winkler
64cbb17a67 add support for loading framework-res.apk for system resources 2023-08-08 14:18:20 +02:00
Julian Winkler
4de91fdaaa AssetManager.getResourceValue: handle references and invalid IDs 2023-08-08 14:18:20 +02:00
Julian Winkler
77459e34e0 add AssetManager.getArrayIntResource and Context.getString 2023-08-08 14:18:20 +02:00
Julian Winkler
5c6b83e8f1 LayoutInflator: support <include/> tags 2023-08-08 14:18:20 +02:00
Mis012
9f87192a78 api-impl/android/content/res/AssetManager.java: fix lack of throwing exception on failure
ClassLoader.getResourceAsStream() eats the IOException, so we need
to throw a new one when it returns null. We also report the errno
we got from openAsset.
2023-06-22 15:20:37 +02:00
Mis012
0a9591c474 src/api-impl: fix up code style, mainly for code imported from AOSP
used the following (plus manual edits):
`clang-format --style="{BasedOnStyle: LLVM, IndentWidth: 8, UseTab: Always, AllowShortIfStatementsOnASingleLine: false, IndentCaseLabels: true, ColumnLimit: 0}`
2023-06-22 11:45:46 +02:00
Julian Winkler
12e9e9788a load assets and bitmaps directly from apk 2023-06-21 22:38:08 +02:00
Julian Winkler
3709e30f64 load layout XMLs directly from apk file 2023-06-21 22:38:08 +02:00
Julian Winkler
db53d3679f replace arsc_parser with ARSClib 2023-06-21 22:38:08 +02:00