343780 Commits

Author SHA1 Message Date
Tyler Gunn
7c3ddcf0a1 Updates to Telecom API docs for clarity.
- Update Connection onAnswer/onReject docs to make it more clear for
a self-managed connectionservice that these methods could be called by
the framework or by a car mode in call service.
- Update the Connection onShowIncomingCallUI method to take into account
the new concurrent calling capabilities in P.

Test: Docs only change
Bug: 73112552
Change-Id: Icb47aa15d03d4bfc05380948e30686317124301e
2018-02-12 15:45:46 -08:00
Treehugger Robot
af5b90ff45 Merge "Prevent ArrayIndexOutOfBoundsException for some invalid sysui_nav_bar values" 2018-01-30 19:11:36 +00:00
nharold
8cabb012fa Merge changes from topic "cherry-pick-cell-keepalive"
* changes:
  Rework KeepalivePacketData for Compatibility with Cell
  Add Constants for NATT Keepalive to RILConstants
  Relocate KeepalivePacketData to frameworks/base
2018-01-30 18:39:07 +00:00
Treehugger Robot
1dfa830bb0 Merge "Add handover permission, fill in some missing API gaps." 2018-01-30 18:33:27 +00:00
Treehugger Robot
90529d212a Merge "DropboxManager: Add err message if passing an invalid fd to addFile()" 2018-01-30 16:16:34 +00:00
Treehugger Robot
88d9ddd386 Merge changes Ied54c246,I0ea83bc8,Ibd8cb61d
* changes:
  Create test-legacy/ for android.test.legacy target
  Add android.test.legacy.jar to SDK build
  Add android.test.legacy target
2018-01-30 14:54:25 +00:00
Treehugger Robot
ba81a4d2a9 Merge changes I59bd6ec5,I48864d48,I9b46a4e2,I09a70f3e
* changes:
  Build test-runner/tests
  Use prebuilt android.test. stubs jars for app builds
  Build stubs against SDK and clear local variables
  Use prebuilt android.test.base.jar for app builds
2018-01-30 14:22:00 +00:00
Paul Duffin
898e7de6c7 Create test-legacy/ for android.test.legacy target
The android.test.legacy (and legacy-android-test) target depends on
code from both test-base/ and test-runner/ and do not really belong
in either folder.

Having a separate folder will also provide a convenient place for
the artifacts needed to publish android.test.legacy to
maven.google.com.

Bug: 30188076
Test: make checkbuild
Change-Id: Ied54c24694b3167fcf9075a3157e92ec53b8f636
2018-01-30 13:01:30 +00:00
Paul Duffin
cc600d6d47 Build test-runner/tests
Previous change e254526f0fe5d22681555bd4a00b7ee96fee1dc1 inadvertently
removed the line to include the tests/Android.mk file.

(cherry picked from commit 006b7a2b760b89211b9530804118a8333cee314b)

Bug: 30188076
Test: make checkbuild
Change-Id: I59bd6ec5d317eb6306642974902e4c061e594aa8
Merged-In: Ia0ba14a70d2232d464420265a7a5f9c4dde3661b
2018-01-30 12:39:09 +00:00
Paul Duffin
1116291cec Add android.test.legacy.jar to SDK build
This is needed in order to create a prebuilts version of this JAR that
can be used for unbundled builds.

Bug: 30188076
Test: wait for pi-release build and check

(cherry picked from commit af06ed42b5316a12b0c37d4296cc86cb112d0021)

Change-Id: I0ea83bc88b6107f4154a9ca02f13b7c8cb367fea
2018-01-30 12:39:09 +00:00
Paul Duffin
d00221cfc6 Use prebuilt android.test. stubs jars for app builds
(cherry picked from commit e144602d9c94d46b2da11d70f526d747b5e05750)

Bug: 30188076
Test: tapas Launcher3
Change-Id: I48864d48098cfa02e15a6eaf8e4d6b53afc5b56c
Merged-In: If632c39c9d98d89d597d410ebc7973903c9fa91e
2018-01-30 12:39:09 +00:00
Paul Duffin
bee7cce828 Add android.test.legacy target
Adds a library that builds against the public API and so can be safely
statically included into applications to avoid them having to depend
on the android.test.base and android.test.runner runtime libraries.

(cherry picked from commit a70f66cb5e40105d4b0ec535f011eea83a38c86a)

Bug: 30188076
Test: make checkbuild
Change-Id: Ibd8cb61d00a65dbcf630672706323e42d82e6ba2
Merged-In: Iae7e3c64392e11035322092ed8e194740ba2d321
2018-01-30 12:39:09 +00:00
Paul Duffin
6b8b7e04ef Build stubs against SDK and clear local variables
The stubs need to be built against the current SDK where possible and
not the internal modules.

(cherry picked from commit d41d847c83c598082a6572f38d0d40f5dee427ef)

Bug: 30188076
Test: delete stub files and remake targets
Change-Id: I9b46a4e2be341fed7e5b33bbf1a80d88c5486ae6
Merged-In: Id724c16e56d1e8fe7f61cfafe7f11ea27e01e659
2018-01-30 12:39:09 +00:00
Paul Duffin
09336b5618 Use prebuilt android.test.base.jar for app builds
(cherry picked from commit 1f090a8d66126a936e40f0e872c5fe5b655fa335)

Bug: 30188076
Test: make checkbuild
Change-Id: I09a70f3e79d0935394332870613b96c653af5e85
Merged-In: I1d7e705baf5728e7a034f3bd32746de3a1d3cd78
2018-01-30 12:38:47 +00:00
Treehugger Robot
4db2d4690e Merge "Add odm sepolicy support to SELinuxMMAC.java" 2018-01-30 08:11:53 +00:00
Treehugger Robot
ab5ac7814b Merge "Remove undefined all-aidl-files-under" 2018-01-30 03:22:21 +00:00
Dan Willemsen
a56e4df08d Remove undefined all-aidl-files-under
This is not a defined function, and there are no aidl files under these
directories anyways.

Bug: 72661763
Test: find location/lib -name '*.aidl'
Test: find media/lib -name '*.aidl'
Change-Id: I000d8febd54a50d4c07b910fa374ac8019f696be
2018-01-29 16:41:43 -08:00
Hugo Benichi
cf5841db8d Merge changes I303d1102,I72c9aa43,If13a5284
* changes:
  Fix default network validation overcounting
  Prevent crash in NetworkManagementServiceTest#shutdown()
  Fix ApfTest
2018-01-30 00:26:31 +00:00
Holly Jiuyu Sun
67fb5370cd Merge "Remove SystemApi annotation from EuiccManager.getOtaStatus()" 2018-01-29 23:47:11 +00:00
Jiyong Park
dc77bcee40 Remove SystemApi annotation from EuiccManager.getOtaStatus()
EuiccManager.getOtaStatus() has been annotated as @SystemApi, but its
declaring class EuiccManager has not. Therefore, the method hasn't been
recognized as SystemApi (does not appear in system-current.txt) and no
app is using the method.

This hasn't been harmful, but will soon trigger CTS failures when we do
the exact match for SystemAPIs; a runtime entity annotated as @SystemApi
have to exist in the documented API (e.g. system-current.txt). So
removing this no-op annotation.

Bug: 67891551
Test: m -j checkapi
Change-Id: I570ef5e5c88b6b9162116d3d3a7b17367efa9d7f
2018-01-29 13:09:29 -08:00
Nathan Harold
70224716b3 Rework KeepalivePacketData for Compatibility with Cell
KeepalivePacketData currently mixes multiple concepts: the
list of parameters that are used to generate a keepalive
packet, the keepalive packet itself, and the parameters that
are needed to send a keepalive packet over an ethernet link.

The KeepalivePacketData is now a parcelable that can be used
generically by any NetworkAgent, regardless of how that Agent
fulfills its duty to initiate and maintain a keepalive session.

Bug: 69063212
Test: verified with SL4A, additional tests pending
Merged-In: I23dc4827ae729583356a8ff0f02e39a2ad2b81f5
Change-Id: I23dc4827ae729583356a8ff0f02e39a2ad2b81f5
(cherry picked from commit 26deacfbe7eb1730aea9eeb03fa265af2ce90cad)
2018-01-29 11:20:20 -08:00
Nathan Harold
1e2fdde533 Add Constants for NATT Keepalive to RILConstants
Bug: 38350389
Test: compilation
Merged-In: Ic18a7c947d2c62efe76d656bd683f9ce296f68fd
Change-Id: Ic18a7c947d2c62efe76d656bd683f9ce296f68fd
(cherry picked from commit 974aada04734ced17f3842c817e7e8c3528d0739)
2018-01-29 11:20:12 -08:00
Nathan Harold
26de1d3b90 Relocate KeepalivePacketData to frameworks/base
Due to an issue resolving the boot classpath, the
KeepalivePacketData structure cannot be referenced
by frameworks/opt/telephony while it is in services.

-Move KeepalivePacketData to android.net
-Also, relocate IpUtils without changing the package
 name.

Bug: 38350389
Test: compilation
Merged-In: If5fc63e9ad8b9b2d4c2fee47ff4bab2ab190a05a
Change-Id: If5fc63e9ad8b9b2d4c2fee47ff4bab2ab190a05a
(cherry picked from commit 41002e3080461ba6a7aee12c1d12dd13edc8626c)
2018-01-29 11:19:43 -08:00
Treehugger Robot
ac2247c406 Merge "Add android.Manifest.permission.NFC_TRANSACTION_EVENT" 2018-01-29 17:59:23 +00:00
Mikael Magnusson
c71ab6049f Prevent ArrayIndexOutOfBoundsException for some invalid sysui_nav_bar values
A user can change sysui_nav_bar via adb.

If value of sysui_nav_bar doesn't contain two semicolons, split String array
is accessed out of bounds throwing an exception, sending SystemUI
in an exception loop.

Test: manual
Test: adb exec-out settings put secure sysui_nav_bar "home;back"
Change-Id: Ia9d74be36d287085650393476029489c9a359a0f
2018-01-29 18:27:40 +01:00
Treehugger Robot
a20239bf71 Merge "Fix nav keys being tiny on sw600dp devices" 2018-01-29 14:55:21 +00:00
David Brazdil
13020490be Merge "Control hidden API toast with a system property" 2018-01-29 14:46:06 +00:00
David Brazdil
795cbfb1c1 Control hidden API toast with a system property
CL Id0a4200f912ac3303026cb26b6d8974c47332828 sets a system property
"ro.art.hiddenapi.warning" for non-release, non-user builds. This
patch reads that flag and unless the flag is set, will only ever show
the warning message if the app is debuggable.

Test: manual
Bug: 64382372
Change-Id: I9b552792779589a7a91818a82d5c86141fc0a30b
2018-01-29 10:22:54 +00:00
Hugo Benichi
bb16b75b67 Fix default network validation overcounting
When switching from a validated default network to a new validated
default network (typically because of a better score),
DefaultNetworkMetrics would not reset the last validation timestamp.

This would cause the new default network to have a total recorded
validation time overcounted by the validation time of the previous
default network.

The following fix should be applied downstream for consumers of
previously recorded data:

  validation_time = min validation_time, duration_time);

Test: runtest -x frameworks/base/tests/net/../IpConnectivityMetricsTest
Change-Id: I303d11023527c19435f5f5e796a0295ae3f76d9f
2018-01-29 16:07:33 +09:00
Hugo Benichi
e93c569bd3 Prevent crash in NetworkManagementServiceTest#shutdown()
The shutdown method in NetworkManagementServiceTest was trying to close
the local socket on the test side, causing the NativeDaemonConnector
internal to NetworkManagementService to sometime crash due to the
output stream on NetworkManagementService side to throw on pending
reads.

The correct fix would be to shutdown the NativeDaemonConnector
inside NetworkManagementService and implement NetworkManagementService's
shutdown method, however there is no way to cleanly close a
NativeDaemonConnector.

Instead, this patch doesn't do any cleanup of the listening socket, the
test local socket, and its output stream. These objects' resources get
eventually collected by the system when the test process exits.

Test: runtest frameworks-net
Change-Id: I72c9aa43403754b55e9d23bf4f3ba8b7b4a3e10a
2018-01-29 16:01:56 +09:00
Hugo Benichi
5775177aaf Fix ApfTest
By adding missing so file to Android.mk.

Test: runtest -x frameworks/base/tests/net/java/android/net/apf/ApfTest.java
Change-Id: If13a52845e0cc70a27ca6eeb976a14f91c7146ea
2018-01-29 16:00:38 +09:00
Treehugger Robot
2aed62d664 Merge "Add Tethering's UID to the legacy type NetworkCapabilities" 2018-01-27 07:20:10 +00:00
Treehugger Robot
35520445be Merge "Added nullable callback support" 2018-01-27 03:24:52 +00:00
Ruchi Kandoi
62c46eac8e Add android.Manifest.permission.NFC_TRANSACTION_EVENT
This permission would gate if an application is eligible to receive
notifications about nfc transactions taking place on the Secure
Elements.

Bug: 72556384
Test: Test dummy notifications on sample app.
Change-Id: I233f7185bbc3a5511f79ae012cc60a081968eb99
2018-01-27 01:48:31 +00:00
Jack Yu
f00ff3c93b Added nullable callback support
Sometimes data service clients do not care the result of the
requests so they pass null callback. In this case the data service
should handle it.

Test: Manual
Bug: 64132030
Change-Id: Ib188994fed4e708de875a24d5386a74a8f6db4dd
2018-01-27 01:28:21 +00:00
Treehugger Robot
b8b7589531 Merge "Add UID and Service for Secure Element Application" 2018-01-27 00:53:00 +00:00
Treehugger Robot
093ab1dc61 Merge "Renamed Result to ResultCode" 2018-01-27 00:39:37 +00:00
Treehugger Robot
a0f863d4fb Merge "Support Background Service Limitations." 2018-01-26 23:36:21 +00:00
Treehugger Robot
bb5318df8a Merge "Add support for Multi-A2DP state machines per device" 2018-01-26 22:43:53 +00:00
Pavlin Radoslavov
080a0e781c Add support for Multi-A2DP state machines per device
* Update usage of A2dpService API calls that take BluetoothDevice
  as an additional argument
* Update the description for BluetoothA2dp.connect()

Exempt-From-Owner-Approval: De-facto owner of the relevant changes is
the Bluetooth team.
Bug: 69269748
Test: Manual
Change-Id: I190ed48ef65bbc8b88b45f84ebd6ab3d21cf0b4e
Merged-In: I190ed48ef65bbc8b88b45f84ebd6ab3d21cf0b4e
(cherry picked from commit 502af2192c6d291174efa434a70101f302a5bd97)
2018-01-26 13:08:00 -08:00
Treehugger Robot
3151e86aa8 Merge "Add Settings support for Bluetooth Multi-A2DP and Multi-HFP" 2018-01-26 20:46:45 +00:00
Jack Yu
045ff781b9 Merge "Added slot id in the internal API" 2018-01-26 19:25:13 +00:00
Pavlin Radoslavov
03d44ce815 Add Settings support for Bluetooth Multi-A2DP and Multi-HFP
When there are multiple connected A2DP/HFP devices, if a connected
device's name is clicked on, that device will be chosen as
Active - i.e., it will be the device chosen for audio out / phone call.

Also:
 * Listen to the BluetoothA2dp.ACTION_ACTIVE_DEVICE_CHANGED
   and BluetoothHeadset.ACTION_ACTIVE_DEVICE_CHANGED intents
   and update the the status of the current active device.
 * When connecting a new device, and Multi-A2DP is enabled, don't
   disconnect the currently connected device.
 * Update the implementation of isA2dpPlaying() so it correctly checks
   all connected devices, not only the first one.

Test: Manual: multiple connected A2DP devices, and selecting each as
      the Active Device.
Bug: 64767509

Change-Id: I69f3c85ebf5a7f07f6deed484c6dd65705460ae4
Merged-In: I69f3c85ebf5a7f07f6deed484c6dd65705460ae4
(cherry picked from commit 1af33a192614bb490701ab2e8e21866690b3b4fa)
2018-01-26 11:12:17 -08:00
Ruchi Kandoi
dcf4c6dc26 Add UID and Service for Secure Element Application
Bug: 64994044
Test: Boot; Check Service loaded.
Merged-In: I2f48ff204acd29b1a9f6819910aba5f8f3762977
Change-Id: I2f48ff204acd29b1a9f6819910aba5f8f3762977
(cherry picked from commit dfaf4bdd1e7e12caf9bb69c8facc38e879861baf)
2018-01-26 11:11:52 -08:00
Primiano Tucci
372938942f DropboxManager: Add err message if passing an invalid fd to addFile()
Follow up to I076bfd3180fb9b4baff7e1bae2e611419061b2a7. Adds an
error message if passing -1 to addFile(int fd)

Change-Id: I73a8d88f12b14bc28ea3bc3782a9df7d96d53c92
Test: builds
2018-01-26 17:30:45 +00:00
Jack Yu
b83cc78bfd Renamed Result to ResultCode
Test: Manual
Bug: 64132030
Change-Id: Idd49322186d1a60c9846cc205964f3b2e318c31a
2018-01-26 09:21:16 -08:00
David Brazdil
656096516c Merge "Copy hidden API blacklist/dark greylist into build folder" 2018-01-26 16:03:25 +00:00
Treehugger Robot
a946cc9f53 Merge "DropBoxManager: Allow adding a file using an fd" 2018-01-26 15:51:57 +00:00
Primiano Tucci
5490b610b3 DropBoxManager: Allow adding a file using an fd
This patch adds an overload to DropBoxManager::addFile() which accepts
an already-opened file as a file descriptor. This avoids the need for
clients to create a filesystem-visible file when uploading data to
DropBox.

Test: Tested with perfetto using https://android-review.googlesource.com/c/platform/external/perfetto/+/587674
Change-Id: I076bfd3180fb9b4baff7e1bae2e611419061b2a7
Merged-In: I076bfd3180fb9b4baff7e1bae2e611419061b2a7
2018-01-26 14:25:18 +00:00
Tobias Thierer
9f82b6bab5 Merge "Track removal of Os.waitpid(..., Int32Ref, ...) from API." 2018-01-26 13:05:06 +00:00