Commit Graph

6076 Commits

Author SHA1 Message Date
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
Ryan Mitchell
0349510358 Merge "Check the size of the strings in the StringPool before flattening." into pi-dev
am: 7281fe0a9b

Change-Id: Id32a86c95b8a6da72e0abe20dc0e47355809e442
2018-04-04 12:54:28 -07:00
Ryan Mitchell
70414f22dc Check the size of the strings in the StringPool before flattening.
Test: Tested for normal functionality when string does not exceed
maximum length and tests for detection of string that is too lonhg for
UTF8i
Bug: b/74176037

Change-Id: Ic71d3671a069e7012e8ca107e79e071499eebbf6
(cherry picked from commit a15c2a8957)
2018-04-04 15:54:43 +00:00
Ryan Mitchell
9beaa9cfe3 Changed AAPT2 to abide by AAPT resource whitespace triming.
Bug: b/74331008
Test: Created tests in ResourceParser_test.cpp
Change-Id: Id7b387692b795774cd77452ca8cf06a8447bf3be
(cherry picked from commit a048807712)
2018-04-04 15:54:05 +00:00
Ryan Mitchell
e5b38a676c Added --debug-mode flag to AAPT2
Bug: 74968793
Test: Tested for correct debuggable attribute presense with and without
flag

Change-Id: I0148d1caba62db8cf258926f1d9e87a849aa283f
(cherry picked from commit 444f9bb6a1)
2018-04-04 15:51:53 +00:00
Yi Jin
194a7f6c86 Merge "Use modern c++ code style for incidentd." into pi-dev am: 56051569ab
am: 85d3cc02a1

Change-Id: Ia85dd17da1e0aefbb3bdece55c96f4e6b6686119
2018-04-02 18:07:02 -07:00
Yi Jin
85d3cc02a1 Merge "Use modern c++ code style for incidentd." into pi-dev
am: 56051569ab

Change-Id: Ifd36cb23ae185b8a37805deb6163e87a2e9ee1c9
2018-04-02 23:04:07 +00:00
Yi Jin
6cacbcbf43 Use modern c++ code style for incidentd.
This cl does not contain code logic changes.

Bug: 77333635
Test: manual and incidentd_test
Change-Id: Iea0a402b1051defd45159ca267e6dd705f9ffa49
2018-03-30 17:36:49 -07:00
TreeHugger Robot
68c02569ef Merge "Check the size of the strings in the StringPool before flattening." 2018-03-30 00:15:39 +00:00
Yao Chen
3808c8e074 Merge "Surface the log write errors to StatsLog.write" into pi-dev am: 03cd687912
am: e079e5784f

Change-Id: Ia329c68a8b737a62ce78ebcbd2082bd022d9d5fe
2018-03-29 22:52:09 +00:00
Ryan Mitchell
a15c2a8957 Check the size of the strings in the StringPool before flattening.
Test: Tested for normal functionality when string does not exceed
maximum length and tests for detection of string that is too lonhg for
UTF8i
Bug: b/74176037

Change-Id: Ic71d3671a069e7012e8ca107e79e071499eebbf6
2018-03-29 15:42:13 -07:00
Yao Chen
e079e5784f Merge "Surface the log write errors to StatsLog.write" into pi-dev
am: 03cd687912

Change-Id: I99ae0b3e887a0fd97a8826e52573d4d33dc1349e
2018-03-29 21:40:23 +00:00
TreeHugger Robot
03cd687912 Merge "Surface the log write errors to StatsLog.write" into pi-dev 2018-03-29 20:57:56 +00:00
TreeHugger Robot
7610502c7a Merge "Changed AAPT2 to abide by AAPT resource whitespace triming." 2018-03-29 18:22:22 +00:00
Yao Chen
97e21ec340 Surface the log write errors to StatsLog.write
Test: statsd_test
Bug: 77222120
Change-Id: I1c6e41a3949ce21fbec6893da7f5f94f5aec8c36
2018-03-29 11:00:38 -07:00
Greg Kaiser
3d664f1fb4 Merge "tools/bit: Avoid leak in error condition" am: db43124b01 am: b3851d92ce
am: 739d7864e3

Change-Id: I2ba292aade2c3612b4876af099b9b72fffb45db2
2018-03-29 17:14:32 +00:00
Greg Kaiser
739d7864e3 Merge "tools/bit: Avoid leak in error condition" am: db43124b01
am: b3851d92ce

Change-Id: I6b51d22ee200e11b5a731461f295f5da8937a683
2018-03-29 16:57:00 +00:00
Ryan Mitchell
a048807712 Changed AAPT2 to abide by AAPT resource whitespace triming.
Bug: b/74331008
Test: Created tests in ResourceParser_test.cpp
Change-Id: Id7b387692b795774cd77452ca8cf06a8447bf3be
2018-03-29 09:05:40 -07:00
TreeHugger Robot
97ffbfe266 Merge "Added --debug-mode flag to AAPT2" 2018-03-28 17:46:19 +00:00
Jeff Sharkey
e26e50ebec Merge "Detect paths without lunch." into pi-dev am: 7f0d63d158
am: 3fbbd0f95d

Change-Id: I16278379a955886268268a242d0f3dbb4b9e140d
2018-03-28 15:10:32 +00:00
Jeff Sharkey
c65461e584 Detect paths without lunch.
Test: manual
Bug: 76097999
Change-Id: I47b97719f6aa957b0a216e6e1930ae2fe2f0108b
2018-03-27 16:26:19 -06:00
Izabela Orlowska
c7ac3a1f4d AAPT2: add flag for forcing visibility level
Test: manual
Bug: 72735798
Change-Id: I29480e66384dd2da27e17ab454ac1fe8a033ee3e
2018-03-27 18:29:36 +01:00
Jeff Sharkey
8ae17b8cc4 Merge "Add linter for strings.xml." into pi-dev am: 642c0be3f3
am: 6527cd70a2

Change-Id: I63b2c1e8be1e3ac908094b9822f0c5cc4072196e
2018-03-27 01:32:36 +00:00
Greg Kaiser
5799d65f12 tools/bit: Avoid leak in error condition
In the unlikely event of fread() failing, we want to avoid leaking
our buffer or the file handle.

Test: Treehugger
Change-Id: I1866d00c74ad38af4559d747fee696a60464c9f0
2018-03-26 14:01:38 -07:00
Jeff Sharkey
abe058c0f0 Add linter for strings.xml.
Strings are tedious to get right, so write a lint script that catches
common errors to warn developers before they're uploaded.

Test: builds, boots
Bug: 76097999
Change-Id: I9826ca796c17cd93a100951d56214653de63a379
2018-03-26 11:04:48 -06:00
Ryan Mitchell
444f9bb6a1 Added --debug-mode flag to AAPT2
Bug: 74968793
Test: Tested for correct debuggable attribute presense with and without
flag

Change-Id: I0148d1caba62db8cf258926f1d9e87a849aa283f
2018-03-23 13:35:00 -07:00
Xin Li
fcf61630bf Enable Belarusian and Latin languages in fontchain_lint tool.
Bug: 68058172
Merged-In: I747cbb5ea3d36ca63335bfe6b337fad1e75ee79b
2018-03-21 20:20:57 +00:00
Yao Chen
bf12e3fedf Merge "Add uid field annotation in atoms.proto and statd memory usage optimization." into pi-dev am: aed0fed078
am: 38063f33f3

Change-Id: I9e5893b7d50fbffd9524991fffcb7498a9dbea7b
2018-03-20 18:12:24 +00:00
TreeHugger Robot
aed0fed078 Merge "Add uid field annotation in atoms.proto and statd memory usage optimization." into pi-dev 2018-03-20 17:12:25 +00:00
Cory Smith
34b10c529a Merge "Writes the resource table proto out when writing a LoadedApk." into pi-dev am: 449be81065
am: 6a43bd634e

Change-Id: I3e84028a1e74b28d2804d66971cf4610874ae349
2018-03-18 23:29:45 +00:00
corysmith@google.com
f7db43ee35 Writes the resource table proto out when writing a LoadedApk.
Small fixes for consistancy to use constants instead of strings.

Change-Id: I33439c376e1634b7957730ce16e241b0f5bb92f8
Fixes: 74594854
Test: Manual, tested against blaze test //javatests/com/google/devtools/build/android:UnitTests
2018-03-18 14:30:13 -04:00
Yao Chen
c40a19d2e4 Add uid field annotation in atoms.proto and statd memory usage optimization.
[memory]
  statsd binary size from 664k -> 600k
  memory usage 1978k -> 1813k (with no configs)
  + Avoid initialize any static map in statslog.h to avoid many copies of the map in each include.
    - Do it in cpp so that it is initialized only in places that use them

[Uid annotation]
+ Uid annotation is needed for extracting uid from dimension for UidCpuPuller.
+ After the change, stand-alone uids don't need to be in field 1 anymore.
+ Also added exclusive bit annotation in AppDied
+ Currently only allow one uid field in an Atom. This is to keep things simple until
  we find an exception.

Test: statsd_test
Bug: 73958484
Bug: 72129300

Change-Id: I8a916d5c00d5930e24ae7e0825a57dea19c0e744
2018-03-16 13:56:38 -07:00
Chris Warrington
39c5d78b49 Merge "AAPT2: Automatic Static Library Namespacing." 2018-03-16 15:24:36 +00:00
Yi Jin
27cc791756 Merge "Fix bug to break switch cases." into pi-dev am: f3bf703025
am: 0a5e1feeb6

Change-Id: I9e971743278f65864629fcae50b3f80a2352bbf4
2018-03-15 23:46:52 +00:00
Yi Jin
934cc613fd Fix bug to break switch cases.
Bug: 75001195
Test: N/A
Change-Id: I99274cbf34d191c25ad9ced08f999c59f922cb25
2018-03-15 14:23:01 -07:00
Chris Warrington
481f027ddc AAPT2: Automatic Static Library Namespacing.
Introduces a link flag --auto-namespace-static-lib for use when linking
static libraries.

When linking a static library with compiled sources that have references
to resources in provided libraries without an explicit package name,
the flag enables automatic inference of the package.

If a resource is present in the package that is being compiled, that is
used, otherwise the reference is rewritten to the highest precedence
resource with matching name and type.

Test: m out/host/linux-x86/nativetest64/aapt2_tests/aapt2_tests && \
      $ANDROID_HOST_OUT/nativetest64/aapt2_tests/aapt2_tests
Test: m frameworks/base/tools/aapt2/integration-tests
Change-Id: I6c6017e054654d1f60782d0a428a7a2a47f8952b
2018-03-14 15:05:39 +00:00
Kweku Adams
eadd123d68 Dumping stack traces to proto.
Bug: 72177715
Test: flash device and check incident.proto output
Change-Id: Id2a15e0fc62b66efe875949af97f0eb651c7e322
(cherry picked from commit 5c804e2b98)
2018-03-07 21:50:12 +00:00
Kweku Adams
017adb2dfb Merge "Dumping stack traces to proto." 2018-03-07 21:49:30 +00:00