6300 Commits

Author SHA1 Message Date
TreeHugger Robot
8a903bdb33 Merge "Interface of writing key value pair atom to socket and parsing from statsd." 2018-09-08 03:24:26 +00:00
Yangster-mac
e124e42582 Interface of writing key value pair atom to socket and parsing from statsd.
Test: statsd unit test
BUG: b/114231161

Change-Id: I3543900934b5e8e0677bf1e7cc454d61064a2475
2018-09-07 11:09:37 -07:00
David Brazdil
d3e4a4aead Merge changes from topic "hiddenapi-dark-grey" am: 3d93d8f323 am: 5c776dea7e
am: fa5ad5cb9b

Change-Id: I22668080195cc78f3ee2576f6094eeb524781c96
2018-09-07 03:43:20 -07:00
David Brazdil
a5249f9b0d Check in P dark greylist, use it for hidden API list generation am: 3cc74c71ef am: 38d2793a7d
am: a77f53d1e3

Change-Id: I42afed836a9e325cdf10585eb62aaf9cab35c5d2
2018-09-07 03:32:05 -07:00
David Brazdil
5c776dea7e Merge changes from topic "hiddenapi-dark-grey"
am: 3d93d8f323

Change-Id: I7ee3cfd512553bcf5ff3297a7df0db6786d3436a
2018-09-07 03:00:37 -07:00
David Brazdil
38d2793a7d Check in P dark greylist, use it for hidden API list generation
am: 3cc74c71ef

Change-Id: I266a8661800078c7fd3f1717b94c81f3a7e9545a
2018-09-07 02:48:00 -07:00
David Brazdil
3d93d8f323 Merge changes from topic "hiddenapi-dark-grey"
* changes:
  Ignore comment lines in hidden api lists
  Mark hidden API lists .KATI_RESTAT
  Check in P dark greylist, use it for hidden API list generation
2018-09-07 09:31:56 +00:00
Tobias Thierer
8dcc5f9914 Merge "Fix compilation when targeting OpenJDK 9." am: 0d2f465ed7 am: e03a757d87
am: 084d8365b2

Change-Id: I628c836ce87bde417f7cba64cf4bb20e206bc835
2018-09-06 13:22:40 -07:00
Tobias Thierer
e03a757d87 Merge "Fix compilation when targeting OpenJDK 9."
am: 0d2f465ed7

Change-Id: I066771334a0d7c4d79c4035ccce95c08d7a23892
2018-09-06 12:31:56 -07:00
Tobias Thierer
8fb3615729 Fix compilation when targeting OpenJDK 9.
CL [1] added a new compilation target that uses internal API
that is now in the jdk.compiler module and is not exported
(it is subject to removal without notice in future versions of
OpenJDK). The fact that these packages are not exported suggests
that a replacement API is already available, but I don't know the
details.

For now, this CL uses javac command-line flags to export these
packages, which fixes compilation. Since the commit message from
CL [1] implies that the entire tool can be removed once bug 77284273
is fixed, a longer-term solution should not be required.

[1] https://android-review.googlesource.com/c/platform/frameworks/base/+/745655
    commit bad89e5e5b171a71e42d7c738ec97a39747e4318

Test: The following breaks before but not after this CL:
  EXPERIMENTAL_USE_OPENJDK9=true make unsupportedappusage-annotation-processor
Bug: 113853502

Change-Id: I24b77af9262891428a01e2eccc18fa3a5c3b3bc9
2018-09-06 17:33:57 +01:00
David Brazdil
ae88d4e21e Ignore comment lines in hidden api lists
It is sometimes useful to add comments at the top of a source file. This
patch changes hidden API list generation to ignore lines beginning with
a hash.

Note that due to the sorting constraints on hidden API lists, comments
can be only at the top of the files.

Test: m appcompat
Change-Id: I1bc6fd44d1b1f10a5adc45093d7f7ed5a0c5a54f
2018-09-06 15:10:28 +01:00
David Brazdil
3cc74c71ef Check in P dark greylist, use it for hidden API list generation
We want to preserve the same semantics as P wrt dark greylist. This will
eventually become the "blacklist for target SDK >= P".

Bug: 113881436
Test: phone boots
Change-Id: I3bb72102e1d054eb0f2cae089ab633a0bc2bb276
2018-09-06 11:10:51 +01:00
TreeHugger Robot
8019cb8898 Merge "Refactor String8 to std::string calls" 2018-09-05 17:35:38 +00:00
Mathew Inwood
88924e0e24 Merge "Processor for @UnsupportedAppUsage annotations." am: e5440456ca am: 22ea0b7a52
am: d20588332d

Change-Id: I097550eeaf0307e3518aaf2d8e3f30338f9fa9dc
2018-09-05 10:01:21 -07:00
Mathew Inwood
22ea0b7a52 Merge "Processor for @UnsupportedAppUsage annotations."
am: e5440456ca

Change-Id: I5e4d53b92c20bf3c34248c6cf4798ab4ba34af7c
2018-09-05 09:33:33 -07:00
Mathew Inwood
bad89e5e5b Processor for @UnsupportedAppUsage annotations.
The processor outputs unsupportedappusage_index.csv, containing source
position info for every@UnsupportedAppUsage annotation processed. It is a
mapping of dex signature to the source postion of the annotation on that
signature. It is used as input for scripts which update the annotations.

We include a META-INF file which causes the compiler to automatically
pick up the annotation processor. Otherwise we would need to explicitly
specify the processor with a -processor flag to javac.

We create a new build target for just the @UnsupportedAppUsage annotation
and the @IntDef annotation (which it depends on) so that the processor can
also depend on that directly.

The processor only runs on a new build target framework-annotation-proc
so that it is not invoked as part of a regular build. This is done so
that we don't slow down peoples builds: Soong does not support annotation
processors when javac sharding is in use. This workaround can be removed
once b/77284273 is fixed.

Test: m framework-annotation-proc
Bug: 113853502

Change-Id: Ie9cd5a90ddf7a51f6035e849703fc39ad9127557
2018-09-05 15:01:21 +01:00
TreeHugger Robot
bd263a40ca Merge "AAPT2: Fix dump apk format" 2018-08-31 00:01:40 +00:00
Ryan Mitchell
dea2fe3f9f AAPT2: Fix dump apk format
Dumping resources printed the incorrect apk type.

Bug: 113062289
Test: manual
Change-Id: I8b250a470afa26697f80b1dfa8ba677ed654a958
2018-08-30 13:48:54 -07:00
David Brazdil
c72888de5d Merge "Rewrite hidden API list generation in Python" am: a264c2c83e am: 8f7b234417
am: 8107e81a78

Change-Id: Ib37713052218289bbfe424855ab96e5cab9a27ad
2018-08-30 11:41:53 -07:00
David Brazdil
8f7b234417 Merge "Rewrite hidden API list generation in Python"
am: a264c2c83e

Change-Id: Ib785891e303ef7c4a78175debae3e92b3a82410f
2018-08-30 11:18:29 -07:00
David Brazdil
8503b9045b Rewrite hidden API list generation in Python
Generating hidden API lists has grown in complexity and the original
Makefile rule has become a bottleneck for build times. Rewrite the
logic in Python.

Bug: 113278235
Bug: 73736106
Test: frameworks/base/tools/hiddenapi/generate_hiddenapi_lists_test.py
Change-Id: I63f03133d70260d06c55f482b844a4980dc6f734
2018-08-30 16:19:26 +01:00
Dan Willemsen
2d30bf731d Merge "Convert aapt to Soong" am: 7bd321ca25 am: 9f5e3e822c
am: 946e6eedc2

Change-Id: Iffb3b89148643365a356512d806a4e9e123e359b
2018-08-29 20:02:39 -07:00
Dan Willemsen
9f5e3e822c Merge "Convert aapt to Soong"
am: 7bd321ca25

Change-Id: Ia55efab04b2117049d34335ff4141f5eeb1ef25a
2018-08-29 19:32:51 -07:00
Dan Willemsen
5d12935f35 Convert aapt to Soong
See build/soong/README.md for more information.

Test: cd frameworks/base/tools/aapt; mma
Test: aapt version
Change-Id: Ice97e9b32c53cfed30d68acd5717d8c66712df4c
2018-08-29 17:24:18 -07:00
Ryan Mitchell
8d4ee973fa AAPT2: Fix resource table load time regression
A previous change (deee395) caused duplicate entries to be created for
entries eith entry ids greater than 0x0ff. This is because the wrong
data type was used (uint8_t instead of uint16_t). This made loading in
resources slower as well since more entries had to be iterated over.

Bug: 36051266
Test: Dumping all resources in 700 apks found in the android tree took 1
minute instead of 5 minutes. Created a test in aapt2_tests.

Change-Id: I1c3d830da517a56ac3496221dbe605c72e0c6014
2018-08-27 22:35:34 +00:00
Todd Kennedy
35c5782bb9 Merge "dump package name"
am: 7113ec2cb4

Change-Id: Ic3713aa75078963ca429ac4666d6e07c863af230
2018-08-24 14:04:13 -07:00
TreeHugger Robot
7d64dbe87a Merge "dump package name" 2018-08-24 19:34:34 +00:00
Todd Kennedy
895e19edf0 dump package name
Test: aapt2 dump packagename foo.apk bar.apk
Bug: 113105112
Change-Id: Ibea429adc3a2a890be10548824583addc59ad42d
Merged-In: Ibea429adc3a2a890be10548824583addc59ad42d
2018-08-24 19:29:22 +00:00
Todd Kennedy
908b7fcfa1 dump package name
Test: aapt2 dump packagename foo.apk
Bug: 113105112
Change-Id: Ibea429adc3a2a890be10548824583addc59ad42d
2018-08-24 10:55:44 -07:00
Jeff Sharkey
fb7b3732c1 Upload hook that guides people towards AOSP.
The canonical location of certain parts of the source tree live in
AOSP, and should not be changed internally to avoid merge conflicts.

This initially starts with "OWNERS" files, but the hook can easily
be repeated to match any files based on file path regexes.

Bug: 113136846
Test: manual
Change-Id: I113e63b6133f20389d84ec0d6d8b81cdbdf35d38
2018-08-23 22:24:03 -06:00
Ryan Mitchell
ed72380fac Merge "AAPT2: Add supported manifest elements" 2018-08-23 21:45:53 +00:00
TreeHugger Robot
0f3a3ac1f8 Merge "Add more accurate logging for stats log loss." 2018-08-23 18:00:09 +00:00
Donald Chai
59e374e144 Merge "AAPT: Render resource ID values with 0x%08x in "dump xmltree" output as is done elsewhere." 2018-08-23 03:49:17 +00:00
Yao Chen
0f5d661803 Add more accurate logging for stats log loss.
+ Only record eventual failure after the retries to get a accurate log loss count.
+ Record all types of failures which lead to log loss
+ Change the timestamp from elapsedRealtime to wallclock time for easier debugging server side
+ Also log the count too.

Bug: 80538532
Test: manually tested

Change-Id: I4fcccae3fa39c9e280a842e27c6432bb0a090b85
2018-08-22 14:21:42 -07:00
Todd Kennedy
595d12e581 Merge "Mark symbols as dynamic for shared libraries" am: c07d4e7118 am: 857718307c
am: 6b8d5414e0

Change-Id: I9bb2b7333abb11747d48a4ced8686052c77963aa
2018-08-21 03:26:41 -07:00
Todd Kennedy
857718307c Merge "Mark symbols as dynamic for shared libraries"
am: c07d4e7118

Change-Id: I7aa896f294e6b940b57d29afad05594c6e90fb7d
2018-08-21 02:58:25 -07:00
Treehugger Robot
c07d4e7118 Merge "Mark symbols as dynamic for shared libraries" 2018-08-20 21:31:28 +00:00
Donald Chai
5f92797fbf AAPT: Render resource ID values with 0x%08x in "dump xmltree" output as
is done elsewhere.

Test: N/A
Change-Id: I7ff686425fec447ae43b364e592b81bfcbc1df30
2018-08-20 17:11:27 +00:00
Donald Chai
e0936a1fda Merge "Include values in error message." 2018-08-20 17:11:01 +00:00
Ryan Mitchell
93a2daf1c0 Merge "AAPT2: Set array element keys" 2018-08-20 16:41:33 +00:00
Donald Chai
9f1911181d Include values in error message.
Bug: 112554546
Test: N/A
Change-Id: I56c468a9a4f162f6ce8079d6b4b61c5ec4b8f633
2018-08-20 03:48:47 +00:00
TreeHugger Robot
7dd9fce652 Merge "Create log event from key value maps." 2018-08-19 23:23:17 +00:00
Yangster-mac
48b3d62bfe Create log event from key value maps.
BUG: b/112816333
Test: statsd test.
Change-Id: Ib66f06186abfacd77807436379e1e142a5b87c99
2018-08-19 22:37:59 +00:00
Ryan Mitchell
0f7da5eda8 AAPT2: Set array element keys
Many google3 apps using lemon resource filtering had difficulty
converting to aapt2. AAPT2 never set the name of the ResTable_map name
value mapping.

Bug: 78472540
Test: blaze build java/com/google/android/apps/gmail:Gmail_go_release
and checking that all array resources are present
Change-Id: I3d253a4c52c6100085e4c1083f4c36a943f11c76
2018-08-17 14:37:33 -07:00
Ryan Mitchell
ead275e19f Merge "AAPT2: Compile --zip flag" 2018-08-16 17:26:08 +00:00
Ryan Mitchell
5d2755129d AAPT2: Reformatted dump command invocations
Use with:
  aapt2 dump apc [apc]
  aapt2 dump configurations [apk]
  aapt2 dump strings [apk]
  aapt2 dump resources [apk]
  aapt2 dump xmlstrings [apk] --file [file]
  aapt2 dump xmltree [apk] --file [file]

Will add permissions and badging in a later commit.

Bug: 73351292
Test: Manual tests of the commands
Change-Id: I97eec01222af14053a98bd70255f1bfecd16b1c4
2018-08-14 15:56:29 -07:00
Ryan Mitchell
1a8a69075e Merge "AAPT2: Loosen loading apk format requirements" 2018-08-14 22:51:35 +00:00
Ryan Mitchell
f3649d6690 AAPT2: Compile --zip flag
Added a --zip flag similar to --dir that allows resources to be passed
into "aapt2 compile" using a zip file.

Also refactored Compile.cpp to be easier to mock and test in the future.

Bug: 74574557
Test: aapt2_tests
Change-Id: Idb90cb97e23a219525bdead38220cbf7bc6f3cab
2018-08-14 15:42:01 -07:00
Ryan Mitchell
dc8d0be1e2 Merge "AAPT2: Update SDK development codename to Q" 2018-08-14 18:20:57 +00:00
Ryan Mitchell
eef1b6cd4b Merge "AAPT2: Adaptive icon refactor" 2018-08-14 18:20:57 +00:00