Commit Graph

424998 Commits

Author SHA1 Message Date
Hall Liu
31de23da21 Add SDK compatibility code for new call states
Add code that translates the new call states to old call states for
in-call UIs that don't yet support background call screening.

Test: CTS
Bug: 140317205
Change-Id: I104f5f7ab3e3dc075e1d9ed5c64fcd924f9a977b
2019-10-11 17:59:42 -07:00
Treehugger Robot
038d1b5b27 Merge "Rename DEFAULT_CARD_INDEX" 2019-10-09 18:25:34 +00:00
Treehugger Robot
884dd0f559 Merge "Fix race in TelephonyScanManager" 2019-10-09 18:20:14 +00:00
Treehugger Robot
b6a549d916 Merge "vendor.mime.types: Revert accidental modification." 2019-10-09 18:05:24 +00:00
Jordan Liu
a2f0d3dbce Merge "Fix comment for BIND_CELL_BROADCAST" 2019-10-09 16:05:12 +00:00
Jordan Liu
32382561a6 Merge "Add CellBroadcastService and related permissions" 2019-10-09 16:04:55 +00:00
Tobias Thierer
033bce99cd vendor.mime.types: Revert accidental modification.
I had added some lines during verification of the base CL [1], but had
accidentally committed, uploaded and merged them. This CL reverts the
accidental addition.

[1] r.android.com/1136528 commit 8e1c1f4d9d

Bug: 142267887
Test: Treehugger
Change-Id: If9ef2a956c8862b7022137111e6c512455780fc6
2019-10-09 17:01:27 +01:00
Tobias Thierer
d1bafa9ce1 Merge "Minimize default MIME map and optimize loading." 2019-10-09 15:58:55 +00:00
Mohammad Islam
5a8283d7fd Merge changes from topic "wait-for-staged-session"
* changes:
  Merge get-stagedsessions with `pm list` and improve on it
  Add flag for staged session to get ready during installation
2019-10-09 08:34:34 +00:00
Treehugger Robot
299036ea2f Merge "Apply JNI optimizations to HwParcel" 2019-10-08 23:17:25 +00:00
Daniel Colascione
c94b8c3dcc Apply JNI optimizations to HwParcel
This change reduces the JNI overhead of binder calls by about 160ns
per parameter.

Test: boots
Change-Id: Ie3acdbf9f3ad48c884042ada5e63bd9757c6b2e6
2019-10-08 14:12:48 -07:00
Tobias Thierer
8e1c1f4d9d Minimize default MIME map and optimize loading.
This CL topic speeds up DefaultMimeMapFactory.create() from 15.5msec
to 5.7msec (measured by bundling a copy of the logic and data into
a test app) and saves 5.2 KByte of space (16 KBytes uncompressed) in
framework.jar. This CL topic does not change the amount of heap memory
consumed by the loaded MimeMap.

This is achieved by moving the following parsing steps from
DefaultMimeMapFactory into a build-time optimization step:

 * strip off comments (starting with '#')
 * normalize whitespace (trim leading and trailing whitespace;
   replace remaining whitespace with a single ' ').
 * drop lines that do not contain a ' ' after this step (those
   only contained comments or only a MIME type without any
   extension).
 * use String.indexOf(char) in favor of String.contains(String) or
   Pattern matching.

Noteworthy extra step specific to this CL:
 * specifically for vendor.mime.types (but not android.mime.types),
   add a prefix '?' to MIME types and extensions at build time,
   rather than at runtime.

Note that after this CL, DefaultMimeMapFactory can now *only* parse
minimized *mime.types files, not the original (non-minimized) file
format.

Test: Checked that the mapping didn't change by checking that
      a device flashed after this CL passes CtsMimeMapTestCases
      built before this CL.
Test: Ran "make mimemap-res.jar" and manually verified that files
      in the resulting jar look as expected.
Test: Locally added some extra mappings to vendor.mime.types, some
      of them with a leading '?', and verified that they all show
      up with exactly one leading '?' for the MIME type and each
      extension within mimemap-res.jar.
Bug: 142267887

Change-Id: Idf1ef945a4ac225476f2036fbc8bb35eb9c090af
2019-10-08 21:03:44 +01:00
Jordan Liu
59ead295e6 Fix comment for BIND_CELL_BROADCAST
Bug: 135956699
Test: no behavior change
Change-Id: I441c5265acb12fe21d8fe8d23b005dd87e84809d
2019-10-08 11:23:02 -07:00
Jordan Liu
b59c74f302 Add CellBroadcastService and related permissions
CellBroadcastService is bound to by the platform to handle cell
broadcasts.

Bug: 135956699
Test: manual
Change-Id: Ib1b20da03d271fc0b2736774b2ca6c6514944093
Merged-In: Ib1b20da03d271fc0b2736774b2ca6c6514944093
2019-10-08 11:20:46 -07:00
Iavor-Valentin Iftime
311fc569f3 Merge "API to detect which network interfaces support wake-on-lan" 2019-10-08 15:08:18 +00:00
Valentin Iftime
c86ebbaebc API to detect which network interfaces support wake-on-lan
Add a new method in LinkProperties, isWakeOnLanEnabled() which returns
true if network interface is defined in config_wakeonlan_enabled_interfaces
string-array (config.xml)

Bug: 132705025
Test: atest LinkPropertiesTest & atest ConnectivityServiceTest
Change-Id: I3f7803aafd2f8eaf8aa18419b21339e15d4b7a0b
2019-10-08 13:03:30 +02:00
Treehugger Robot
04665dbfcc Merge "ConnectivityService: Grant networkstack uid extra privileges" 2019-10-08 03:12:58 +00:00
Hall Liu
418e7798ab Fix race in TelephonyScanManager
TelephonyScanManager may sometimes encounter a race condition where
Telephony sends it the first scan result before it has saved the
returned scan ID. This causes a crash in the app that's requesting the
scan.

To fix this, synchronize on mScanInfo while requesting the network scan
so that the handler in TelephonyScanManager will wait for the scan ID to
be saved before processing the first message from Telephony.

Bug: 142068098
Test: manual
Change-Id: I0b2b4c6dc749e21641843818293941704ed870a6
2019-10-07 15:38:02 -07:00
Mohammad Samiul Islam
40110561de Merge get-stagedsessions with pm list and improve on it
Bug: 140290940
Test: adb shell pm list staged-sessions ---only-ready
      --only-sessionid --only-parent
Change-Id: I9b866569815f182edfc9743ee1a66224b7f36b41
Merged-In: I9b866569815f182edfc9743ee1a66224b7f36b41
2019-10-07 19:37:51 +01:00
Mohammad Samiul Islam
f49c85f24b Add flag for staged session to get ready during installation
Currently, the PackageManagerShellCommand returns success when a
staged session is successfully commited, regardless of the result
from pre-reboot verification. The flag will force the adb shell to
wait for the verification to complete and output result accordingly.
This will ensure a better experience for the testers.

Bug: 130039562
Test: manual testing by installing apex and observing new detailed
      success message
      $ adb install --apex --wait-for-staged-session-ready
      --wait 2000 com.android.tzdata.apex
Change-Id: Ib7aa9b5dfb683956e48e55461b29278069573aec
Merged-In: Ib7aa9b5dfb683956e48e55461b29278069573aec
2019-10-07 19:07:27 +01:00
Peiyong Lin
f605363ce4 Merge "Add owners for GraphicsEnvironment.java." 2019-10-07 16:43:11 +00:00
Tao Bao
56f111e13b Merge "Use ParcelFileDescriptor over FileDescriptor" 2019-10-07 16:38:11 +00:00
Nikita Ioffe
c6a12ee85c Merge "Make init.updatable_crashing a read/write property" 2019-10-07 13:51:25 +00:00
Chalard Jean
36ad0924b9 Merge "Rename CallbackRecord to CallbackEntry" 2019-10-07 05:28:57 +00:00
Chalard Jean
059c426d15 Rename CallbackRecord to CallbackEntry
Test: FrameworkNetTests NetworkStackTests
Change-Id: I8f6ea8fb6879cf7c40396d92f13cb5e12cc45ee7
2019-10-07 13:00:50 +09:00
Roshan Pius
e896c6d665 ConnectivityService: Grant networkstack uid extra privileges
The wifi network factories/agents are going to run in the network stack
process for devices which accept wifi mainline module. Allow these
factories/agents to perform privileged operations.

Bug: 142115344
Test: ACTS test
Change-Id: I2dd412ac5c6b67f52c87113fcda345e1f531f9c4
WifiNetworkRequestTest:test_connect_failure_user_rejected passes now.
(cherry-picked from c7580b1d59ee126cd6867cb6fe4485a69e2b4622)
2019-10-06 14:32:19 -07:00
Dan Shi
03f8581876 Merge "Move CtsDevicePolicyManagerTestCases to its own group" 2019-10-05 23:29:39 +00:00
Dan Shi
38b83f0558 Merge "Sync TEST_MAPPING file from master branch" 2019-10-05 18:57:34 +00:00
Dan Shi
994414753f Move CtsDevicePolicyManagerTestCases to its own group
Rebase from master branch

Bug: 141061952
Test: none
Change-Id: I54d9e1fbaa1bab11581bcd66d55255ae713b1bf6
2019-10-04 22:45:39 -07:00
Dan Shi
78fdd5605f Sync TEST_MAPPING file from master branch
Bug: 141061952
Test: none
Change-Id: I5ed8cb0d499a75562f8db32989eed32a8a877ae7
2019-10-04 22:43:37 -07:00
Treehugger Robot
fe6978a73f Merge "Change the Listener API names" 2019-10-05 01:56:54 +00:00
Peiyong Lin
92aecf1884 Add owners for GraphicsEnvironment.java.
BUG: N/A
Test: N/A
2019-10-04 17:58:36 -07:00
Shuo Qian
d96637660f Change the Listener API names
Test: cts
Bug: 135204580
Change-Id: I1f64d6eb6b113ca85f43a3f6a578c68dbb8bd5ed
2019-10-04 13:24:23 -07:00
Tobias Thierer
7dbc7ed543 Merge "Construct default MimeMap lazily rather than eagerly." 2019-10-04 16:34:30 +00: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
Nikita Ioffe
76a0579ad7 Make init.updatable_crashing a read/write property
This property will need to be reset during userspace reboot, so it can't
be a read-only property anymore.

Test: builds
Test: atest apex_rollback_tests
Bug: 135984674
Change-Id: I9f5ec10ed31b63642192573139e44d43e726ea9c
2019-10-04 16:51:06 +01:00
Shuo Qian
46cf71d1d0 Merge "Add both Emergency Number listener for testing" 2019-10-04 15:50:43 +00:00
Julia Reynolds
d3ec7950e3 Merge "Reduce unnecessary NotificationListener binder transaction." 2019-10-04 13:41:58 +00: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
Treehugger Robot
2f44b1ebbd Merge "Add UID APIs to PlatformCompat." 2019-10-04 11:52:54 +00:00
Kyeongkab.Nam
73fde3809a Use ParcelFileDescriptor over FileDescriptor
The java.io.FileDescriptor object has a poor definition of ownership,
which can result in obscure use-after-close bugs. Instead, APIs should
return or accept ParcelFileDescriptor instances.

Bug: 130209137
Test: manual
Change-Id: Ifb3dd53dc138ec47f416f2d4b46c4668bc8ee1d8
2019-10-04 17:58:11 +09:00
Treehugger Robot
217ec71c8d Merge "Prune BugreportManagerTestCases out of general-tests." 2019-10-04 04:27:45 +00:00
Treehugger Robot
e8bad137bb Merge "Add /memfd:jit-zygote-cache to HEAP_DALVIK_OTHER_ZYGOTE_CODE_CACHE." 2019-10-03 22:20:14 +00:00
Shuo Qian
650ff647e4 Add both Emergency Number listener for testing
Test: CTS
Bug: 135204580
Change-Id: Ifb20b9a20f9493fb7fe671c0fd2d8b4de7ea9f67
2019-10-03 15:09:00 -07:00
Marco Nelissen
46f3e8f929 Merge "Fix DRM includes" 2019-10-03 20:03:44 +00:00
Nicolas Geoffray
5722e83555 Add /memfd:jit-zygote-cache to HEAP_DALVIK_OTHER_ZYGOTE_CODE_CACHE.
Forgot this in the previous commit.

Bug: 119800099
Test: dumpsys meminfo on blueline
Change-Id: I268ff0b68cfa9386c2805da13cf7c0db4bf28fd1
2019-10-03 20:34:23 +01:00
Elliott Hughes
363a602bd1 Merge "Remove a user/userdebug difference." 2019-10-03 19:03:23 +00:00
Treehugger Robot
d34e18c036 Merge "zygote: respond and wait for reply to --boot-completed." 2019-10-03 17:43:22 +00: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