Commit Graph

11741 Commits

Author SHA1 Message Date
Andrei-Valentin Onea
fa9179a361 Merge "Add extra compat change overriding methods." am: b389ffe2d9 am: 799a6aa021
am: 283ba38e4d

Change-Id: I98c2335df98493a6f13c2b2eec68221aaab86785
2019-10-11 06:39:35 -07:00
Andrei-Valentin Onea
283ba38e4d Merge "Add extra compat change overriding methods." am: b389ffe2d9
am: 799a6aa021

Change-Id: I69ad99a90501707d8c2f7f223ecb2bd76ca0e530
2019-10-11 06:29:22 -07:00
Andrei-Valentin Onea
799a6aa021 Merge "Add extra compat change overriding methods."
am: b389ffe2d9

Change-Id: I77f36a1d9be2d486ca126472f26b5a35739a88cb
2019-10-11 06:22:21 -07:00
Andrei-Valentin Onea
b389ffe2d9 Merge "Add extra compat change overriding methods." 2019-10-11 13:04:08 +00:00
Anna Trostanetski
ca6ea8ffdd Merge "ADD owners to compat framework code." am: 2bbb78b5c0 am: 9f074ee036
am: fc581db1d6

Change-Id: I5f4dd5ff7fdfc4c3c54c6dffd0aff4d7bddeafda
2019-10-10 12:11:11 -07:00
Anna Trostanetski
fc581db1d6 Merge "ADD owners to compat framework code." am: 2bbb78b5c0
am: 9f074ee036

Change-Id: I60d021055eb5df79c71f74c546994670c8cb9b5b
2019-10-10 12:04:06 -07:00
Anna Trostanetski
9f074ee036 Merge "ADD owners to compat framework code."
am: 2bbb78b5c0

Change-Id: I5f89a8141ec57c153fb798cf368f02ecbe2dbbdf
2019-10-10 11:57:04 -07:00
Anna Trostanetski
2bbb78b5c0 Merge "ADD owners to compat framework code." 2019-10-10 18:42:25 +00:00
Anna Trostanetski
3503054191 Merge "Reset app reporting on app launch." am: ccaea274c0 am: 3be71b9df6
am: 7cf4b95c22

Change-Id: I44853dba5d86e799a7b40fdf14d70f8f8b96aaaf
2019-10-10 09:55:27 -07:00
Anna Trostanetski
7cf4b95c22 Merge "Reset app reporting on app launch." am: ccaea274c0
am: 3be71b9df6

Change-Id: I6b7126c8bbbfc010f5b0834b8bc3bd4adb8419d8
2019-10-10 09:49:08 -07:00
Anna Trostanetski
3be71b9df6 Merge "Reset app reporting on app launch."
am: ccaea274c0

Change-Id: I2696f954666aecf22ea8ea77bf5d5ddfaac1461a
2019-10-10 09:42:26 -07:00
Andrei Onea
ea997f222c Add extra compat change overriding methods.
This CL adds two new methods to the IPlatformCompat binder interface for
toggling multiple compat changes at once, and for clearing all the
overrides for a given package name.

Bug: 140367850
Test: http://aosp/1113771
Change-Id: I02d08d76e42da308856408dadc2c8c73c7ff20d1
2019-10-10 17:09:02 +01:00
atrost
dd7c8025cd ADD owners to compat framework code.
Test: none
Change-Id: I4f395bbceef1face1e9bb85817ce4c78563d06e8
2019-10-10 14:32:57 +01:00
atrost
893f84d353 Reset app reporting on app launch.
Store the reported changes by app and clear the app info on app launch.
This means that changes reported to the system server would be logged
once per app launch instead of once per device boot.

Bug: 138374585
Test: flash device, run test app
Change-Id: I24f5dc125488c6af3164b6503f236bc3a24e6292
Merged-In: I24f5dc125488c6af3164b6503f236bc3a24e6292
2019-10-10 14:09:30 +01:00
Tri Vo
4c3fb4e648 Merge "KernelWakelockReader: reuse buffer when parsing" am: 89e09c3918 am: cce09fd862
am: 18f8293574

Change-Id: I3cefb52654d9482c3fcfb059a5de3ddb493b88d6
2019-10-09 16:24:46 -07:00
Tri Vo
18f8293574 Merge "KernelWakelockReader: reuse buffer when parsing" am: 89e09c3918
am: cce09fd862

Change-Id: I1fb06848129620e985084b1efe375232dc6b0d2e
2019-10-09 16:17:37 -07:00
Tri Vo
cce09fd862 Merge "KernelWakelockReader: reuse buffer when parsing"
am: 89e09c3918

Change-Id: I91a9577d618c64239dd7755d710a98ce085c05ba
2019-10-09 16:10:44 -07:00
Tri Vo
b9ad9a68fb KernelWakelockReader: reuse buffer when parsing
Eliminates 32 kb buffer allocation every time readKernelWakelockStats()
is called.

Test: atest FrameworksCoreTests:KernelWakelockReaderTest
Test: "dumpsys batterystats --checkin" contains kernel wake lock
information.
Change-Id: Ifc7254ab3a5272b056cbc75233aa2dfa8219ea84
2019-10-09 12:40:01 -07:00
Tobias Thierer
b12401b24d Merge "Construct default MimeMap lazily rather than eagerly." am: 7dbc7ed543 am: 59d2c429bb
am: bfd4e55a48

Change-Id: I8110cd6d464b5d0b79498cb68cf1267402b139d8
2019-10-04 10:15:24 -07:00
Tobias Thierer
bfd4e55a48 Merge "Construct default MimeMap lazily rather than eagerly." am: 7dbc7ed543
am: 59d2c429bb

Change-Id: I023b1d784814499319c62db7e7647ce14e7c0fba
2019-10-04 10:00:29 -07:00
Tobias Thierer
59d2c429bb Merge "Construct default MimeMap lazily rather than eagerly."
am: 7dbc7ed543

Change-Id: I60c43606e536872455e8220745bf9094b0d9f56c
2019-10-04 09:47:38 -07:00
Tobias Thierer
4435606858 Construct default MimeMap lazily rather than eagerly.
A side effect of CL topic r.android.com/q/topic:bug136256059_attempt2
was that the default MimeMap instance is now loaded eagerly (pre-fork)
regardless of whether any app process ends up using it, whereas
previously it was loaded lazily (post-fork) the first time an app
process used it.

This traded off CPU and memory use post-fork vs. pre-fork. Because it
isn't known / hasn't been proven whether and how many app processes
use that instance, the net CPU and memory impact is not known: if at
least one process makes use of a relevant API, the net impact will be
neutral or positive, or else negative.

Until this can be investigated and undergo system health review, this
CL topic changes the behavior back to post-fork lazy loading of the
default MimeMap instance.

Bug: 142019040
Test: Treehugger

Change-Id: I2a3f244240c51e7ada1f41a8abadb946ebcab40b
2019-10-04 16:34:18 +00:00
Tobias Thierer
0935b64e5b Merge "Track MimeMap moving to libcore.content.type." am: 0801b7c222 am: 093c1e4eaa
am: b43f746cdc

Change-Id: Ib18214d3bd9a295a792025cae58102ebf187b0bf
2019-10-04 06:33:10 -07:00
Tobias Thierer
b43f746cdc Merge "Track MimeMap moving to libcore.content.type." am: 0801b7c222
am: 093c1e4eaa

Change-Id: If2b46820dc9ba3d8ba6b8f542521f3818b0074c9
2019-10-04 06:20:07 -07:00
Tobias Thierer
093c1e4eaa Merge "Track MimeMap moving to libcore.content.type."
am: 0801b7c222

Change-Id: I63889b3eedb8f98c99d71172dc5cc32025a8afd4
2019-10-04 06:07:03 -07:00
Tobias Thierer
0801b7c222 Merge "Track MimeMap moving to libcore.content.type." 2019-10-04 12:54:17 +00:00
Tobias Thierer
8edd837b79 Track MimeMap moving to libcore.content.type.
Another CL in this topic moves libcore.net.MimeMap to package
libcore.content.type. This CL updates associated references.

Bug: 136256059
Bug: 124232146
Test: Treehugger
Test: CtsMimeMapTestCases
Exempt-From-Owner-Approval: move affecting imports only
Change-Id: I30aac8b28a1740180ea01834a2bb66b61cb255d4
2019-10-04 12:52:38 +00:00
atrost
448e515ea9 Merge "Add UID APIs to PlatformCompat." am: 2f44b1ebbd am: db25a1bcf4
am: 6d6dc567d7

Change-Id: Ifd4227647321278a67938979a3eb55ef00d09ba5
2019-10-04 05:40:08 -07:00
atrost
6d6dc567d7 Merge "Add UID APIs to PlatformCompat." am: 2f44b1ebbd
am: db25a1bcf4

Change-Id: Ife2d0e4ee60739fecb11035e05f9eb9bb805db28
2019-10-04 05:33:38 -07:00
atrost
db25a1bcf4 Merge "Add UID APIs to PlatformCompat."
am: 2f44b1ebbd

Change-Id: I185109ad67af2bc7ce3e62e14b12bede13afb561
2019-10-04 05:21:05 -07:00
Treehugger Robot
2f44b1ebbd Merge "Add UID APIs to PlatformCompat." 2019-10-04 11:52:54 +00:00
Josh Gao
cca303ecd9 Merge "zygote: respond and wait for reply to --boot-completed." am: d34e18c036 am: 15f8fb42d6
am: 332a53756d

Change-Id: If284835a381f6f7c300c62edc59d1cf9743ac815
2019-10-03 11:11:44 -07:00
Josh Gao
332a53756d Merge "zygote: respond and wait for reply to --boot-completed." am: d34e18c036
am: 15f8fb42d6

Change-Id: I57ba0d7b301ac4652b3df54672c91dedfe1bb16c
2019-10-03 11:05:21 -07:00
Josh Gao
15f8fb42d6 Merge "zygote: respond and wait for reply to --boot-completed."
am: d34e18c036

Change-Id: I47819fa73d07ecc3507b03ef446f606407830b29
2019-10-03 10:58:24 -07:00
Josh Gao
273613653f zygote: respond and wait for reply to --boot-completed.
The zygote handles requests by polling on its sockets, and then handling
one request for each active socket. However, it does so by reading from
a socket via a BufferedReader, which means that if multiple requests are
written into the socket before the zygote gets a chance to read them,
the zygote reads multiple requests into its BufferedReader, it handles
one request, and then never responds to the request that's buffered,
leaving its client stuck waiting for a response that will never happen.

For most requests, this can't happen, because the client will wait for a
response to be sent from the zygote before sending another request, but
this isn't true for --boot-completed until this patch.

Bug: http://b/141767463
Test: forrest runs of apct/text/text_native_test-cloud-tf
Change-Id: I8b7a80abfd9443d98f8cf5aedb7669b82c0cb84a
2019-10-03 17:18:04 +00:00
atrost
64cacec12b Add UID APIs to PlatformCompat.
Needed for scoped storage (to be used from MediaProvider).
IsChangeEnabled returns true if there are no installed packages for the
required UID, or if the change is enabled for ALL of the installed
packages associated with the provided UID.

Bug: 138275545
Test: Test app
Change-Id: I6785f57e4fcfb92ed7529f4da0a6db6ffe8b3ad4
2019-10-03 15:21:24 +01:00
Tobias Thierer
dd268bd09d Merge changes from topics "bug136256059_attempt2", "bug136256059_builder" am: 6ed8fce33f am: ffd40f7bd4
am: 4b461c1588

Change-Id: Ie3442bd7a8b27b9d446137079bbacb125dff753d
2019-09-30 03:02:29 -07:00
Tobias Thierer
752d297aab Move default MimeMap implementation to frameworks. am: 878c77b704 am: 2b754d1fb3
am: effe42d0b5

Change-Id: I694d5adf4e852de1ebc9090926812780fdec6d13
2019-09-30 03:02:17 -07:00
Tobias Thierer
4b461c1588 Merge changes from topics "bug136256059_attempt2", "bug136256059_builder" am: 6ed8fce33f
am: ffd40f7bd4

Change-Id: I66ced024c5cda2ef37e62433c8e65b9d49ca9d3f
2019-09-30 02:50:20 -07:00
Tobias Thierer
effe42d0b5 Move default MimeMap implementation to frameworks. am: 878c77b704
am: 2b754d1fb3

Change-Id: I6c282aacb196189458ab5f8d715b51fa786cdfe6
2019-09-30 02:50:08 -07:00
Tobias Thierer
ffd40f7bd4 Merge changes from topics "bug136256059_attempt2", "bug136256059_builder"
am: 6ed8fce33f

Change-Id: If95ba459b29a3fd2eede6390bbab18f95f762587
2019-09-30 02:38:49 -07:00
Tobias Thierer
2b754d1fb3 Move default MimeMap implementation to frameworks.
am: 878c77b704

Change-Id: Ic8f8c2c1fc10809e3245ee6b729e69a4ecb30ffa
2019-09-30 02:38:30 -07:00
Tobias Thierer
6ed8fce33f Merge changes from topics "bug136256059_attempt2", "bug136256059_builder"
* changes:
  MimeMapImpl.createDefaultInstance() -> DefaultMimeMapFactory.create().
  Make MimeMap final and introduce MimeMap.Builder.
  Move default MimeMap implementation to frameworks.
2019-09-30 09:15:53 +00:00
Anna Trostanetski
fc8a18878a Merge "Rate limit non statsd logs." am: e8e6390829 am: c1abc25905
am: 5912d35e17

Change-Id: I1f6571cdbb59eb086fe9e929712ed453ca5ae6d1
2019-09-27 09:33:32 -07:00
Anna Trostanetski
5912d35e17 Merge "Rate limit non statsd logs." am: e8e6390829
am: c1abc25905

Change-Id: Ie6e945dbe51d8b9a871007522565c472eeffefb3
2019-09-27 09:27:19 -07:00
Tobias Thierer
af0cef987d MimeMapImpl.createDefaultInstance() -> DefaultMimeMapFactory.create().
The class no longer implements MimeMap, so the name MimeMapImpl
no longer made sense.

Test: Treehugger
Bug: 136256059
Change-Id: I2cbc70a7769232b704a9bdfde2def832c1e292b8
2019-09-27 17:25:13 +01:00
Anna Trostanetski
c1abc25905 Merge "Rate limit non statsd logs."
am: e8e6390829

Change-Id: Ib6ef1c746f26ceb384f7ed586bfc769a05da271c
2019-09-27 09:15:37 -07:00
Tobias Thierer
878c77b704 Move default MimeMap implementation to frameworks.
This is the second attempt to submit this CL. The first attempt
regressed on app startup because RuntimeInit installed the
custom MimeMap from commonInit() which runs post-fork of the zygote,
but that was fixed by installing it pre-fork.

This CL topic moves the default MimeMap implementation to frameworks.
Libcore starts with a minimal implementation sufficient to pass
CtsLibcoreTestCases,  but frameworks can inject the real implementation.
Before this CL topic, the data files and logic (MimeMapImpl) were part of
core-*.jar on device; after this CL, they instead live in framework.jar.

Tests from MimeMapTest that check behavior of that default
implementation also move to a non-libcore CTS test.

Planned work for follow-up CL:
 1. Make CTS more opinionated, with a plan to assert that all of
    the default mappings are present. How exactly the expectated
    mapping will be bundled in CTS is still TBD.
 2. Add a vendor.mime.types file (defaults to empty) where vendors
    can add additional mappings; I plan to make it such that mappings
    in that file are parsed last but never override any earlier
    mappings, as if each mime type / file extension was prefixed
    with '?'.
 3. Perhaps enforce that public APIs android.webkit.MimeTypeMap
    and java.net.URLConnection.getFileNameMap() behave consistently
    with MimeMap.getDefault().

Test: atest CtsLibcoreTestCases
Test: atest CtsMimeMapTestCases
Test: Checked that CtsLibcoreTestCases still passes on a build that
      is missing the MimeMap.setDefault() call from RuntimeInit.java.
Test: Checked that app startup time does not regress as part of this
      CL topic - see http://b/136256059#comment17
Bug: 136256059

Change-Id: I716914bf1a7e6205e539f0551f010615dacb17a8
2019-09-27 16:53:15 +01:00
atrost
a8f3c48495 Rate limit non statsd logs.
Limit 1 log per app launch as the statd logs as this is spamming logs.
Consider increasing in the future to once every x minutes/seconds if
needed.

Bug: 138374585
Bug: 141714588
Test: flash device
Change-Id: I3ed696fb557527d807d03aecc64c0207d7b93f08
2019-09-27 11:25:06 +00:00
Jeongik Cha
cac5791954 Merge changes from topic "system_ext" am: a828ee6442 am: dee02a0fae
am: 6a46c5315a

Change-Id: Ic31f9d12fffda486d36ce427848e04c7755cc531
2019-09-26 16:00:00 -07:00