Commit Graph

6142 Commits

Author SHA1 Message Date
Yao Chen
441d76894f Merge "Support stats log in lmkd." into pi-dev am: dcd71294a4
am: 4ea3ecbc14

Change-Id: I0df060654430e40089ca43c4b350ab5b96b1a6c2
2018-05-04 13:51:23 -07:00
Yao Chen
4ea3ecbc14 Merge "Support stats log in lmkd." into pi-dev
am: dcd71294a4

Change-Id: I2607f3f94cc74e5bddccc664acbd8f139af85151
2018-05-04 13:35:07 -07:00
Yao Chen
88e881017c Support stats log in lmkd.
This CL changes the relevant cpp files to c files. And added functionalities to reset the log
context for reuse.

Background:
+ lmkd doesn't use the generated statslog code because:
   1. lmkd doesn't want to create a 4K log context for each log. lmkd is single threaded and can
      reuse the same log context.
   2. lmkd is written in c, and the existing statslog.h/.cpp are not compatible

Bug: 78603347
Test: manually tested with alloc-stress
Change-Id: Ife6f5c69248ecf5af730269e67f229ba4c72f37f
2018-05-03 15:42:17 -07:00
Ryan Mitchell
461b3001f6 Merge "AAPT2: Fix quoted text in res/xml assets" into pi-dev am: 150bafd217
am: cc6e856522

Change-Id: Ie22b644b07da19fcc51e59529f5e38ee2f1f9137
2018-05-02 17:49:08 -07:00
Yi Jin
68a16c4277 Merge "Add a section flag to bypass failure if a specific path can't be found." into pi-dev
am: e09cde0cd9

Change-Id: I01c5a7a2c1ead02f5af0514cf9bf9b83f1682316
2018-05-02 15:10:58 -07:00
Yi Jin
e09cde0cd9 Merge "Add a section flag to bypass failure if a specific path can't be found." into pi-dev 2018-05-02 21:36:23 +00:00
Ryan Mitchell
60f06b7770 Merge "AAPT2: Fixed id parsing error" into pi-dev am: f4c089dd90
am: 932c44d329

Change-Id: I661784fcabac19d4d9bae137904b9282d9765d79
2018-05-02 13:55:05 -07:00
Ryan Mitchell
cc6e856522 Merge "AAPT2: Fix quoted text in res/xml assets" into pi-dev
am: 150bafd217

Change-Id: I5bb4a63234cf3ee022bbf59edd5b613abefd8bef
2018-05-02 13:43:45 -07:00
Ryan Mitchell
0dcb20c727 AAPT2: Fix quoted text in res/xml assets
AAPT2 aggressively processed xml nodes and regressed from the behavior
of AAPT. This change restores AAPT's processing of xml nodes with
quotations.

Bug: 71805084
Test: Created tests in XmlFlattener_test.cpp and ran the test in the
Android Studio project given in the bug

Change-Id: Idedb4f1002e9fd705ceb5feae35289235b754b02
2018-05-02 17:53:21 +00:00
Ryan Mitchell
932c44d329 Merge "AAPT2: Fixed id parsing error" into pi-dev
am: f4c089dd90

Change-Id: I81147ee8629edc98ba19565083c09d7dce8e6bf7
2018-05-02 09:42:11 -07:00
Ryan Mitchell
f4c089dd90 Merge "AAPT2: Fixed id parsing error" into pi-dev 2018-05-02 16:27:03 +00:00
Izabela Orlowska
d51efe818b AAPT2: add flag for strict visibility
Will only detect whether a resource was defined as both 'public' and
'private' (but will allow overriding 'undefined' visiblity for now).

Test: TableMerger_test + manual
Bug: 72735798

Change-Id: If0749559c91c4d8820a6286fc9ddc80209c1e5e9
2018-05-02 13:14:33 +01:00
Yi Jin
7fe3dee3ae Add a section flag to bypass failure if a specific path can't be found.
This is a temporary solution to bypass failure of reading cpu info or 
battery type in P if the path doesn't exist on some devices. See bug for
details. However in Q, incidentd should implement reading from the
common Linux kernel interfaces.

Bug: 78028767
Bug: 78239764
Test: atest incidentd_test
Change-Id: I08ffcb21709efe5478d2ac46121deb5795af1024
Merged-In: I08ffcb21709efe5478d2ac46121deb5795af1024
2018-05-02 01:31:08 +00:00
Yi Jin
3f3603587c Add a section flag to bypass failure if a specific path can't be found.
This is a temporary solution to bypass failure of reading cpu info or
battery type in P if the path doesn't exist on some devices. See bug for
details. However in Q, incidentd should implement reading from the
common Linux kernel interfaces.

Bug: 78028767
Bug: 78239764
Test: atest incidentd_test
Change-Id: I08ffcb21709efe5478d2ac46121deb5795af1024
2018-05-01 16:25:52 -07:00
Ryan Mitchell
eaf77e1d3a AAPT2: Fixed id parsing error
A previous change, editied the logic for parsing ids to allow for ids to
reference other ids. This change though caused a regression that made
ids in the form '<id name="name" />' cease to parse. This changes fixes
that regression.

Bug: 78513618
Test: Updated tests in ResourceParser_test.cpp
Change-Id: I3608bb764464e951a50910be55e199c6ec575d09
2018-05-01 11:11:55 -07:00
Todd Kennedy
0a81745b48 Merge "Allow using reserved package IDs" into pi-dev am: 13588dc9e4
am: c323122e93

Change-Id: I0addf146d9519a93bc2f8f73898a3454cb1cfb56
2018-04-26 15:27:00 -07:00
Todd Kennedy
c323122e93 Merge "Allow using reserved package IDs" into pi-dev
am: 13588dc9e4

Change-Id: If17488c1194560fce69a9bedeb1553795d415c30
2018-04-26 15:09:29 -07:00
Todd Kennedy
13588dc9e4 Merge "Allow using reserved package IDs" into pi-dev 2018-04-26 21:29:17 +00:00
Todd Kennedy
325129964e Allow using reserved package IDs
Pre-O, the platform treats negative resource IDs [those with
a package ID of 0x80 or higher] as invalid.  In order to work
around this limitation, we allow the use of traditionally
reserved resource IDs [those between 0x02 and 0x7E].

Bug: 78041707
Test: ./out/host/linux-x86/nativetest64/aapt2_tests/aapt2_tests
Test: ./out/host/linux-x86/nativetest/libandroidfw_tests/libandroidfw_tests
Test: Manual. Create a feature split with a package ID of 0x7E and see it runs and can reference base resources.

Change-Id: I3d9782cc05d3a55e1a2467bf39566788847e1160
2018-04-26 10:27:30 -07:00
Mathew Inwood
1b216d84c0 Merge "Add presubmit hook for hidden API lists." into pi-dev
am: 02033386c2

Change-Id: I6c437a6ffa62794f1fc88d0c8bcdcef798b68d8c
2018-04-24 09:47:36 -07:00
Mathew Inwood
e5dc64d428 Add presubmit hook for hidden API lists.
Check that they're sorted as expected and contain no duplicates.
The sort order now uses:
$ LC_COLLATE=C sort -f

So that non-alphanumeric characters are not ignored, giving a more
intuitive sort order. the '-f' means ignore case.

Also sort the existing lists accordingly.

Test: repo upload
Bug: 64382372
Merged-In: I52b884da33a9a46455df6747a215683d9d3c3218
Change-Id: I4cdd3bc5c11be91a9a3f678580af49ac67f3c968
2018-04-24 15:15:13 +01:00
Mathew Inwood
a10f2e2405 Add presubmit hook for hidden API lists.
Check that they're sorted as expected and contain no duplicates.
The sort order now uses:
$ LC_COLLATE=C sort -f

So that non-alphanumeric characters are not ignored, giving a more
intuitive sort order. the '-f' means ignore case.

Also sort the existing lists accordingly.

Test: repo upload
Bug: 64382372
Change-Id: I52b884da33a9a46455df6747a215683d9d3c3218
2018-04-24 15:02:22 +01:00
Todd Kennedy
4cb8826c28 Merge "Allow overriding the compile SDK" into pi-dev am: fd5166ddac
am: e31a442140

Change-Id: Iaaaee5337ba37a24d409c2e453995e314c562bce
2018-04-23 20:30:05 -07:00
Todd Kennedy
e31a442140 Merge "Allow overriding the compile SDK" into pi-dev
am: fd5166ddac

Change-Id: I53d265b82f4a0e9b86b1324900e133911a355104
2018-04-23 20:23:12 -07:00
TreeHugger Robot
fd5166ddac Merge "Allow overriding the compile SDK" into pi-dev 2018-04-24 03:14:04 +00:00
Siyamed Sinir
edcdab22c4 Merge "Update fontchain_linter for emoji 11" into pi-dev
am: 485a197ab0

Change-Id: I1388a4b0292836f492a1f0d60406c266a0c1af15
2018-04-23 11:48:54 -07:00
Siyamed Sinir
485a197ab0 Merge "Update fontchain_linter for emoji 11" into pi-dev 2018-04-23 18:19:22 +00:00
Yao Chen
c0100c1222 Merge changes from topic "statsd_socket_review" into pi-dev am: 46fca44ee5
am: 3585804c70

Change-Id: I97f951a53f7d0466be48c521a58ac77b3616145a
2018-04-20 20:33:43 -07:00
Yao Chen
3585804c70 Merge changes from topic "statsd_socket_review" into pi-dev
am: 46fca44ee5

Change-Id: Iae06193a18ad48a664904dbd5bc26c5b4c7ae45f
2018-04-20 19:56:54 -07:00
Todd Kennedy
9f6dec11e6 Allow overriding the compile SDK
We automatically pull the compile SDK from the platform. But,
in certain circumstances the platform's SDK codename is
incorrect. Allow the name to be overridden on the command line.

Change-Id: I398f1b00b29db42e4ce202b94cda483c98971a14
Fixes: 78324052
Test: ./out/host/linux-x86/nativetest64/aapt2_tests/aapt2_tests
2018-04-20 22:41:52 +00:00
Yao Chen
f7bc6ab7fa Allow StatsLog to directly write to statsd's socket.
+ Reuse the log_event_list from liblog. StatsLog's binary format remains unchanged
+ Copied socket write code from liblog, including the retry logic.
+ Added build flags to control the StatsLog channel (logd, statsd, or both for debugging)

Bug: 78239479
Test: locally tested and saw logs being written to statsd

Change-Id: I7b1f0069ead00bbf3c29e4bd5b7f363a7ce26abe
2018-04-20 14:52:01 -07:00
Michael Wachenschwanz
07c0fc37fb Merge "Fix fraction and dimension type in Resource.proto" into pi-dev am: 1a12311433
am: 4dcb9b082b

Change-Id: I5068164f7904d21b3de56be20c37092faac751be
2018-04-20 12:39:11 -07:00
Michael Wachenschwanz
4dcb9b082b Merge "Fix fraction and dimension type in Resource.proto" into pi-dev
am: 1a12311433

Change-Id: I2463fab9dd5705a4af11fa17aebf0c23c7c12d07
2018-04-20 12:25:47 -07:00
TreeHugger Robot
1a12311433 Merge "Fix fraction and dimension type in Resource.proto" into pi-dev 2018-04-20 18:59:11 +00:00
Michael Wachenschwanz
8b74927e9e Fix fraction and dimension type in Resource.proto
Change fraction and dimnesion type from float to uint32

Change-Id: I641dc42cf7b6bdd8bc16c8cdbd573ec3281a084a
Fixes: 78182701
Test: aapt2_tests
2018-04-20 10:46:47 -07:00
Ryan Mitchell
027453d6fb Merge "AAPT2: Support id reference chaining from AAPT" into pi-dev am: 247ecfa498
am: e9bbefa7dc

Change-Id: Ic40b9e08352e561e21284d72592860b868f6edc1
2018-04-19 15:20:51 -07:00
Ryan Mitchell
e9bbefa7dc Merge "AAPT2: Support id reference chaining from AAPT" into pi-dev
am: 247ecfa498

Change-Id: I507b421d60294ea9262d5be579f22fdc2892c7fe
2018-04-19 14:58:17 -07:00
Ryan Mitchell
247ecfa498 Merge "AAPT2: Support id reference chaining from AAPT" into pi-dev 2018-04-19 21:35:59 +00:00
Siyamed Sinir
d97df5a280 Update fontchain_linter for emoji 11
* Add default genders for super villain and super hero.
* Read capability to read from emoji exclusions file.
* Update lint rule to use different glyphs for couple with heart.

Test: m fontchain_lint
Test: Visual test with a build and sample app
Bug: 77148691
Change-Id: Icd92f0455709625b3998fc8eef1d448e17a5d71f
Merged-In: Icd92f0455709625b3998fc8eef1d448e17a5d71f
Merged-In: I56dd3c1e1258bab2fcbdf42e5c42587e45dd92fe
(cherry picked from commit e853efc081)
2018-04-19 12:10:16 -07:00
Siyamed Sinir
761b57e02d Merge "Add Emoji 11 font will all glyphs" 2018-04-19 01:51:54 +00:00
Ryan Mitchell
cf05869e24 Merge "AAPT2: Modified StringPool uniqueness detection #2" into pi-dev am: b2182c412c
am: 8751b6ee4e

Change-Id: I36e19f3e0013bdcaa8fc2ce110a78cc544168ef6
2018-04-18 15:49:17 -07:00
Ryan Mitchell
8751b6ee4e Merge "AAPT2: Modified StringPool uniqueness detection #2" into pi-dev
am: b2182c412c

Change-Id: Ib7829b0203134eecdfd59a3dcd1e78b8fbdd39b4
2018-04-18 15:22:06 -07:00
y
4602926f83 AAPT2: Modified StringPool uniqueness detection #2
b/77862560 detected that when converting an apk to binary using aapt2,
all resource ids of attributes that have been replaced with resource
identifiers become set to the identifier of the first attribute. This is
because the attribute names are all empty because the names are not necessary
since the resource ids are present. The empty attribute names all map to
the same string pool reference and cause all the ids to be the first
empty string into the string pool.

The ag/3897499 approach to fix the specified bug was extremely inefficient
and caused hour long builds. This change takes advantage of the multimap
data structure to do lookups efficiently.

Bug: 77862560
Test: Converted apk in listed bug from proto to binary and observed
correct resource ids and correct badging. Also built the Android tree to
check for regressions in build time.

Change-Id: I27a9ee4ffbed8b9ff6f238ad315cdf87b588947c
2018-04-18 20:58:50 +00:00
Siyamed Sinir
cf3980ddc0 Add Emoji 11 font will all glyphs
We now use different glyphs for couple with heart emoji. This CL
removes the constraint from font chain lint.

Test: m fontchain_lint
Test: Build and visual check
Bug: 77148691
Change-Id: I56dd3c1e1258bab2fcbdf42e5c42587e45dd92fe
2018-04-18 12:31:00 -07:00
y
9efbbef2e0 AAPT2: Support id reference chaining from AAPT
AAPT would allow for ids to be declared in the form:

<item name="name" type="id>@id/other</item>

@id/name should hold a reference to @id/other. When
getResources().getValue() is called on R.id.name with resolveRefs
enabled, the resuling reference should be R.id.other.

Bug: 69445910
Test: Created tests for correct parsing of id references and correct
resolving of deep references

Change-Id: Id1feb37b2565c213dc6a19b4c401906260d7fc14
2018-04-18 11:46:53 -07:00
Izabela Orlowska
1056019c2d AAPT2: include package name in styleable children
When writing partial R files, also include the package of the styleable
child:
<declare-styleable name="ds1">
    <attr name="font"/>
    <attr name="android:font"/>
    <attr name="tools:font"/>
    <attr name="com.foo.bar:font"/>
</declare-styleable>
will produce:
default int styleable ds1_font
default int styleable ds1_android_font
default int styleable ds1_tools_font
default int styleable ds1_com_foo_bar_font

Bug: 73927419
Test: manual, see description
Change-Id: Ica493408c7c6d9e7fae2b693c96fbc20a723ce08
2018-04-18 14:27:52 +01:00
Ryan Mitchell
b5e66d8516 Merge "Revert "AAPT: Modified StringPool uniqueness detection"" into pi-dev am: 61ac57283f
am: 312a3ff350

Change-Id: I956eefccec0613ed3b6caf0ec665c8079b6a41bf
2018-04-16 13:02:15 -07:00
Ryan Mitchell
312a3ff350 Merge "Revert "AAPT: Modified StringPool uniqueness detection"" into pi-dev
am: 61ac57283f

Change-Id: Ibd7e47e33d49e6c609b9b73960186020728ac0f5
2018-04-16 12:45:57 -07:00
Ryan Mitchell
61ac57283f Merge "Revert "AAPT: Modified StringPool uniqueness detection"" into pi-dev 2018-04-16 19:28:43 +00:00
Ryan Mitchell
61ffd40290 Revert "AAPT: Modified StringPool uniqueness detection"
This reverts commit 35ecb89a8a.

Reason for revert: <Long make duration (infinite loop)>

Change-Id: I10d1cf53ca3054d40e23b06368ebaff6af69beab
2018-04-16 18:21:14 +00:00