Commit Graph

6113 Commits

Author SHA1 Message Date
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
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
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
Ryan Mitchell
ac7c9dda2c Merge "AAPT: Modified StringPool uniqueness detection" into pi-dev am: 356feb53b6
am: 789ffb45c5

Change-Id: I577bd1b6a7de0a81fbb5f23a0f31e3f5f5352d4b
2018-04-16 10:47:31 -07:00
Ryan Mitchell
789ffb45c5 Merge "AAPT: Modified StringPool uniqueness detection" into pi-dev
am: 356feb53b6

Change-Id: Ib8b9fbea279f61b5df9058d9f72dfb23f9d9dbc6
2018-04-16 10:32:42 -07:00
Ryan Mitchell
356feb53b6 Merge "AAPT: Modified StringPool uniqueness detection" into pi-dev 2018-04-16 17:15:53 +00:00
Wale Ogunwale
605007578e Finalizing P SDK am: 3da5f3b2dd
am: fc89e7f17a

Change-Id: I85aaa6fb6de6cc76a2ac004c7e575737537401fc
2018-04-14 16:04:49 -07:00
y
35ecb89a8a AAPT: Modified StringPool uniqueness detection
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.

Bug: 77862560
Test: Converted apk in listed bug from proto to binary and observed
correct resource ids and correct badging.

Change-Id: I635c13cd1ad7a395fe40a57198cfe5ec91602d01
2018-04-13 16:15:42 -07:00
Wale Ogunwale
fc89e7f17a Finalizing P SDK
am: 3da5f3b2dd

Change-Id: Id5002a3fc4d35352a4ace67e794c1a52e21c496c
2018-04-13 14:18:27 -07:00
Siyamed Sinir
a017096e85 Merge "Update fontchain _linter for new emoji" 2018-04-12 22:46:58 +00:00
Wale Ogunwale
3da5f3b2dd Finalizing P SDK
Bug: 77588754
Test: builds
Change-Id: Ic06cad790a3dc53d012a7c43dfac911fc6dc61e7
2018-04-12 15:26:31 -07:00
Siyamed Sinir
e853efc081 Update fontchain _linter for new emoji
* Add default genders for super villain and super hero.
* Read capability to read from emoji exclusions file 

Test: m fontchain_lint
Test: Visual test with a build and sample app
Bug: 77148691
Change-Id: Icd92f0455709625b3998fc8eef1d448e17a5d71f
2018-04-12 13:11:42 -07:00
Ryan Mitchell
a086da2cd0 Merge "AAPT: Multiple period legacy support and errors" into pi-dev am: f845891031
am: 68dc7ca568

Change-Id: I9da94ea0e84ff3caf28597b1038ed6e4ac158280
2018-04-12 11:51:16 -07:00
Ryan Mitchell
68dc7ca568 Merge "AAPT: Multiple period legacy support and errors" into pi-dev
am: f845891031

Change-Id: Id1ac75606df1b8bf99281febf5c7266de6889457
2018-04-12 10:39:00 -07:00
Ryan Mitchell
f845891031 Merge "AAPT: Multiple period legacy support and errors" into pi-dev 2018-04-12 17:21:32 +00:00
y
d6b83299a6 AAPT: Multiple period legacy support and errors
AAPT would accept files with multiple periods in the filename as input.
This lead to cases explained in b/74999475. This change adds error
messages for files with multiple periods unless the legacy flag is
present. With the legacy flag present, AAPT2 will behave like AAPT
rather than throwing an error.

Test: Added tests to aapt2_tests
Bug: 73071563
Bug: 74999475
Change-Id: I28dfceeea7b39f8e4b9e6671e0fc8793cf388f52
2018-04-11 15:52:43 -07:00
Jeff Sharkey
b35cceb21a Merge "Lint to identify "deprecated at birth" APIs." into pi-dev am: 992f6120c0
am: e29ec0cdc5

Change-Id: Iadd90734483ca6a2100fe18d0d2a9b3996d42a56
2018-04-11 14:49:20 -07:00
Jeff Sharkey
e29ec0cdc5 Merge "Lint to identify "deprecated at birth" APIs." into pi-dev
am: 992f6120c0

Change-Id: I0f734d9a3d6746d5d828919b74d2603eba0bcf02
2018-04-11 14:38:27 -07:00
Jeff Sharkey
8b141b9db0 Lint to identify "deprecated at birth" APIs.
When API council requests changes, teams regularly perform the
requested refactoring, but simply mark the old APIs as @Deprecated
without @removed, due to internal users.

As part of finalizing an SDK, we should ensure that no new APIs are
marked @Deprecated, since they're typically cleanup that someone
forgot to finish.  This extension to the lint script makes it easy
to identify these cases.

$ python tools/apilint/apilint.py --show-deprecations-at-birth \
        api/current.txt ../../prebuilts/sdk/api/28.txt

$ python tools/apilint/apilint.py --show-deprecations-at-birth \
        api/system-current.txt ../../prebuilts/sdk/system-api/28.txt

Bug: 77588754
Test: manual inspection
Change-Id: Ie9658006bb08f780bee0e503481d3bafec1038a1
2018-04-11 10:43:16 -06:00
Yangster-mac
de61a6b43d Merge "Logd retry throttling." into pi-dev am: 3ed866222d
am: 3e871cb76f

Change-Id: I33e6de119dda1209523de1fdade8e1a4c5e08da5
2018-04-10 17:19:44 -07:00
Yangster-mac
3e871cb76f Merge "Logd retry throttling." into pi-dev
am: 3ed866222d

Change-Id: Id8ef2c9086f0cbfa69d157d8abb8c891c07fec3d
2018-04-10 17:08:41 -07:00
Yangster-mac
ca5c0869f0 Logd retry throttling.
Test: statsd test

BUG: b/77852322
Change-Id: I3b4c46aaa592e21bfed13330c2ca72fac8e8320a
2018-04-10 11:20:57 -07:00
Mohamed Heikal
57ffac7f10 Merge "AAPT2: Adds config support for manipulating resources" 2018-04-09 14:57:04 +00:00
Mohamed Heikal
d3c5fb64e3 AAPT2: Adds config support for manipulating resources
aapt2 optimise command can now take a resources config file as an
argument. The config has the name of each resource and a list of
directives. Currently implemented is the "remove" directive which marks
the resource for deletion.

The obfuscation whitelist code and argument name was changed to prevent
confusion.

Test: make aapt2_tests
Bug: b/27523794

Change-Id: I2d8e1985e5ea2286131c25231e2c411f3d9610ce
2018-04-06 15:03:23 -04:00
Yangster-mac
f7cfcc4a07 Merge "Retry logs write when it fails. Report skipped event in statsd." into pi-dev am: 164a73e0cf
am: 0425263117

Change-Id: Icaab7324de5c553e963f646b7c4fec058cab6646
2018-04-05 11:57:46 -07:00
Yangster-mac
0425263117 Merge "Retry logs write when it fails. Report skipped event in statsd." into pi-dev
am: 164a73e0cf

Change-Id: I6aac360fe74bb5ca3e3b95dc3f2685a99da0fe2a
2018-04-05 11:22:16 -07:00
TreeHugger Robot
164a73e0cf Merge "Retry logs write when it fails. Report skipped event in statsd." into pi-dev 2018-04-05 18:04:18 +00:00
Yangster-mac
b8382a10a0 Retry logs write when it fails.
Report skipped event in statsd.

Test: manual test
BUG: b/77222120
Change-Id: I257f5e76d557893c4eb4a8e8a13396d8b5d1afc0
2018-04-04 17:53:48 -07:00
Ryan Mitchell
7e25e9c90c Merge "Changed AAPT2 to abide by AAPT resource whitespace triming." into pi-dev
am: 6a23deef5d

Change-Id: Iec9bec5ba7f58c5ef5ef283bac16e2a1d6ebee6d
2018-04-04 17:34:32 -07:00
Ryan Mitchell
6a23deef5d Merge "Changed AAPT2 to abide by AAPT resource whitespace triming." into pi-dev 2018-04-05 00:14:38 +00:00
Ryan Mitchell
03beea58ba Merge "Added --debug-mode flag to AAPT2" into pi-dev
am: 498baa82e6

Change-Id: I212efa4392f4da28817f88d589f865d17495f17c
2018-04-04 14:59:47 -07:00
Ryan Mitchell
498baa82e6 Merge "Added --debug-mode flag to AAPT2" into pi-dev 2018-04-04 21:21:28 +00:00