OSDN Git Service

android-x86/frameworks-base.git
6 years agoMerge "Copy hidden API blacklist/dark greylist into build folder"
David Brazdil [Fri, 26 Jan 2018 16:03:25 +0000 (16:03 +0000)]
Merge "Copy hidden API blacklist/dark greylist into build folder"

6 years agoMerge "DropBoxManager: Allow adding a file using an fd"
Treehugger Robot [Fri, 26 Jan 2018 15:51:57 +0000 (15:51 +0000)]
Merge "DropBoxManager: Allow adding a file using an fd"

6 years agoDropBoxManager: Allow adding a file using an fd
Primiano Tucci [Fri, 26 Jan 2018 14:25:18 +0000 (14:25 +0000)]
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

6 years agoMerge "Track removal of Os.waitpid(..., Int32Ref, ...) from API."
Tobias Thierer [Fri, 26 Jan 2018 13:05:06 +0000 (13:05 +0000)]
Merge "Track removal of Os.waitpid(..., Int32Ref, ...) from API."

6 years agoMerge "Add dalvik.vm.minidebuginfo property for ART"
David Srbecky [Fri, 26 Jan 2018 12:37:48 +0000 (12:37 +0000)]
Merge "Add dalvik.vm.minidebuginfo property for ART"

6 years agoCopy hidden API blacklist/dark greylist into build folder
David Brazdil [Fri, 26 Jan 2018 11:13:35 +0000 (11:13 +0000)]
Copy hidden API blacklist/dark greylist into build folder

This change is meant for ART buildbots which build against a pinned
commit of the framework and thus do not have the commit which
introduced hidden API lists. Normal builds will now copy the blacklist
and dark greylist into the build folder first, and then generate the
light greylist as usual. If a buildbot does not have the framework
changes, it can create dummy API lists in the build folder before
starting the build and avoid the issue.

Test: make
Bug: 64382372
Change-Id: Ib6e53a45bcc917abb4ba67fdcbf01d4a19c2d56f

6 years agoMerge "Watchdog: Add statsd to interesting processes"
Treehugger Robot [Fri, 26 Jan 2018 03:52:14 +0000 (03:52 +0000)]
Merge "Watchdog: Add statsd to interesting processes"

6 years agoMerge "Add Voice / Data network specific reg states."
Xiangyu/Malcolm Chen [Fri, 26 Jan 2018 00:41:27 +0000 (00:41 +0000)]
Merge "Add Voice / Data network specific reg states."

6 years agoMerge "Deprecate android.util.Mutable*."
Treehugger Robot [Fri, 26 Jan 2018 00:28:52 +0000 (00:28 +0000)]
Merge "Deprecate android.util.Mutable*."

6 years agoMerge "Open Mobile API for frameworks/base"
Ruchi Kandoi [Thu, 25 Jan 2018 23:30:50 +0000 (23:30 +0000)]
Merge "Open Mobile API for frameworks/base"

6 years agoMerge "Show a warning toast/dialog when an app uses hidden APIs"
David Brazdil [Thu, 25 Jan 2018 19:53:13 +0000 (19:53 +0000)]
Merge "Show a warning toast/dialog when an app uses hidden APIs"

6 years agoMerge "Tcp socket metrics: implement INetdEventListener callback"
Treehugger Robot [Thu, 25 Jan 2018 19:23:18 +0000 (19:23 +0000)]
Merge "Tcp socket metrics: implement INetdEventListener callback"

6 years agoAdd Voice / Data network specific reg states.
Malcolm Chen [Thu, 25 Jan 2018 00:27:09 +0000 (16:27 -0800)]
Add Voice / Data network specific reg states.

In NetworkRegistrationState.java, add hidden inner classes that
stores information specific to voice network registration state
and data network registration state.

Bug: 64132030
Test: build
Change-Id: I746be2a50cfa138acc5b2b40e38ab875ceab6d8d

6 years agoMerge "ActivityManager: Add support for agents on startup"
Treehugger Robot [Thu, 25 Jan 2018 18:08:07 +0000 (18:08 +0000)]
Merge "ActivityManager: Add support for agents on startup"

6 years agoOpen Mobile API for frameworks/base
Ruchi Kandoi [Fri, 8 Dec 2017 23:07:03 +0000 (15:07 -0800)]
Open Mobile API for frameworks/base

This contribution is an implementation of the GlobalPlatform
Open Mobile API for Android with some modifications to
namespaces and packages to make it suitable as a core
Android component.

This contribution is based on
0001-Open-Source-Contribution-of-Smartcard-Service-for-fr.patch
which can be found in
https://portland.source.codeaurora.org/patches/quic/la/PATCH_217881_OpenMobileAPI_20171206.tar.gz

The submitted patch was derived from
https://source.codeaurora.org/quic/la/platform/packages/apps/SmartCardService/commit/?h=LA.BF64.1.2.1&id=06ecea9abb8264049f52c7e31c0bc13330a425d5.

Test: Sample Application; open Channels and transmit APDUs

Change-Id: Iac5206bd84798ca0fcdb504c89e1da5383012a5a
Signed-off-by: Jeremy O'Donoghue <jodonogh@codeaurora.org>
6 years agoMerge "Fill in methods in EuiccCardController."
Holly Jiuyu Sun [Thu, 25 Jan 2018 17:22:50 +0000 (17:22 +0000)]
Merge "Fill in methods in EuiccCardController."

6 years agoMerge "PrintSpooler: Fix EqualsNaN in test"
Treehugger Robot [Thu, 25 Jan 2018 15:05:27 +0000 (15:05 +0000)]
Merge "PrintSpooler: Fix EqualsNaN in test"

6 years agoTrack removal of Os.waitpid(..., Int32Ref, ...) from API.
Tobias Thierer [Wed, 24 Jan 2018 13:25:51 +0000 (13:25 +0000)]
Track removal of Os.waitpid(..., Int32Ref, ...) from API.

Test: Treehugger
Bug: 70985234

(cherry picked from commit 08005bbe9157c84f88189a7d7e9db466324af910)

Change-Id: I62229d01c13ac12e8c263e601d46ceb4f7ae7a0e
Merged-In: I62229d01c13ac12e8c263e601d46ceb4f7ae7a0e

6 years agoMerge "Update CellInfo API to accomodate new fields."
Treehugger Robot [Thu, 25 Jan 2018 12:50:37 +0000 (12:50 +0000)]
Merge "Update CellInfo API to accomodate new fields."

6 years agoDeprecate android.util.Mutable*.
Tobias Thierer [Wed, 24 Jan 2018 13:40:56 +0000 (13:40 +0000)]
Deprecate android.util.Mutable*.

Since http://r.android.com/565744 , these classes do not appear
in the signature of any other Android API. There are no plans to
make them part of any future API signatures.

They do not provide useful abstractions because:
 - They lack encapsulation and functionality (value is nonfinal;
   lack of equals/hashCode and toString).
 - It's trivial for apps to implement similar types for their
   internal use.

Only three of these eight classes (Mutable{Int,Long,Boolean}) are
used internally in Android; most of these usages could be written
better with named, more specific classes.

Therefore these classes do not pull their own weight on the API
surface of android.util.

This CL deprecates all eight classes in preparation for removing
them from the Android API surface at some point in the future, and
to allow the unused classes to be removed entirely.

Bug: 71546998
Test: Treehugger

(cherry picked from commit d57219411b3718da0850ef109e63d1a311a03d31)

Change-Id: Ib8736faa86d0ae5eec2c47a294f21adcf21d3dc4
Merged-In: I1cc1eb5ca9c36749bbb9a233d60036f6319bf2d3

6 years agoMerge "Create hidden API lists"
David Brazdil [Thu, 25 Jan 2018 07:55:35 +0000 (07:55 +0000)]
Merge "Create hidden API lists"

6 years agoMerge "Add ServiceState APIs for carrier aggregation."
Treehugger Robot [Thu, 25 Jan 2018 07:47:55 +0000 (07:47 +0000)]
Merge "Add ServiceState APIs for carrier aggregation."

6 years agoUpdate CellInfo API to accomodate new fields.
Eric Schwarzenbach [Wed, 10 Jan 2018 19:33:52 +0000 (11:33 -0800)]
Update CellInfo API to accomodate new fields.

Adds CellConnectionStatus to top level CellInfo type. Adds cell bandwidth
to the CellIdentityLte.

Bug: 72117223
Test: runtest frameworks-telephony

Change-Id: Id5f3b5a2bd4119c099f5e739d5579974e7adc897

6 years agoMerge "Add slotId in INetworkService.aidl methods."
Treehugger Robot [Thu, 25 Jan 2018 07:13:17 +0000 (07:13 +0000)]
Merge "Add slotId in INetworkService.aidl methods."

6 years agoMerge "Move Keepalive out of IpSecTransform.Builder"
nharold [Thu, 25 Jan 2018 05:50:33 +0000 (05:50 +0000)]
Merge "Move Keepalive out of IpSecTransform.Builder"

6 years agoMerge "Fix a bug where a NetworkAgent gets repeatedly torn down"
Chalard Jean [Thu, 25 Jan 2018 05:37:21 +0000 (05:37 +0000)]
Merge "Fix a bug where a NetworkAgent gets repeatedly torn down"

6 years agoPrintSpooler: Fix EqualsNaN in test
Andreas Gampe [Thu, 25 Jan 2018 02:37:07 +0000 (18:37 -0800)]
PrintSpooler: Fix EqualsNaN in test

Fix NaN comparisons in WorkflowTest.

Bug: 72451126
Test: m javac-check RUN_ERROR_PRONE=true
Merged-In: I3eba48ac3f8dc343cd22cac0f9fbf4d4e6c76631
Change-Id: I19db273ee442c912c2c1052d53b5b2e0c5cd968b

6 years agoFix a bug where a NetworkAgent gets repeatedly torn down
Chalard Jean [Thu, 25 Jan 2018 00:41:51 +0000 (09:41 +0900)]
Fix a bug where a NetworkAgent gets repeatedly torn down

mUids is not marshalled correctly when null so if the
NetworkAgent runs in another process and is not a VPN then
the system will see its allowed Uids as being the empty
list (= nobody can use this network) instead of a null
list (= everybody can use this network). This breaks
emulator networking.

Bug: 72436966
Test: runtests frameworks-net
Test: also manual testing, this does fix emulator networking
      and seems not to break phone networking
Change-Id: Id2bbf3808e80b19cd055c832c11cf72372710942

6 years agoTcp socket metrics: implement INetdEventListener callback
Hugo Benichi [Tue, 23 Jan 2018 02:43:16 +0000 (11:43 +0900)]
Tcp socket metrics: implement INetdEventListener callback

This patch implements the new INetdEventListener.onTcpSocketStatsEvent
callback added in INetdEventListener.

For the time being, tcp socket stats are tracked inside TcpMetrics only
for dumpsys printing and bug report integration as a first step.

Bug: 64147860
Test: manually tested, watching output of
      $ adb shell dumpsys connmetrics
Change-Id: I10ab24c6da4bb654d9198a4d8d00ccdc972cc0d5

6 years agoMove Keepalive out of IpSecTransform.Builder
Nathan Harold [Thu, 7 Dec 2017 03:12:28 +0000 (19:12 -0800)]
Move Keepalive out of IpSecTransform.Builder

The lifecycle of Keepalive offloading is, unfortunately
different from that of an IpSecTransform. Because starting
a keepalive is fundamentally asynchronous, and isn't valid
until after a transform exists, it will now be a separate
optional procedure that may succeed or fail. It remains
linked with a Transform by the need for a Transform to exist
in order to initiate a Keepalive.

Bug: 38350389
Test: compilation
Change-Id: Ia76fccee41f86d694dff436043293d0c0762c041

6 years agoMerge "Add FLAG_ACTIVITY_NEW_TASK when starting UI-based tether provisioning."
Treehugger Robot [Thu, 25 Jan 2018 03:09:27 +0000 (03:09 +0000)]
Merge "Add FLAG_ACTIVITY_NEW_TASK when starting UI-based tether provisioning."

6 years agoMerge "Adds stripTrailingFs"
Treehugger Robot [Thu, 25 Jan 2018 02:44:26 +0000 (02:44 +0000)]
Merge "Adds stripTrailingFs"

6 years agoFill in methods in EuiccCardController.
Holly Jiuyu Sun [Thu, 18 Jan 2018 23:16:31 +0000 (15:16 -0800)]
Fill in methods in EuiccCardController.

Add RESULT_UNKNOWN in EuiccCardManager.

Bug: 38206971
Test: test on phone
Change-Id: I972ba0ab5ff6bb8e6ef50c8684a19bb9cd48a721

6 years agoWatchdog: Add statsd to interesting processes
Andreas Gampe [Thu, 25 Jan 2018 01:55:17 +0000 (17:55 -0800)]
Watchdog: Add statsd to interesting processes

Dump statsd stacks on watchdog abort.

Bug: 72461610
Test: m
Change-Id: I01e1fa4fb4ba6e2644f9bf4464cc010bb4e82215

6 years agoActivityManager: Add support for agents on startup
Andreas Gampe [Mon, 22 Jan 2018 23:15:54 +0000 (15:15 -0800)]
ActivityManager: Add support for agents on startup

Add setAgentApp similar to setDebugApp. If given, attempt to attach the given
agent during handleBindApplication.

The flow needed a slight refactor. It is not possible to do a debuggability
check at setAgentApp time (without checking all installed apps). Instead,
when a ProfilerInfo contains an agent, perform a debuggability check then.
This is consistent with how setDebugApp works.

Expose through the shell command:

  cmd activity set-agent-app process agent

Add CTS coverage.

Bug: 69929492
Test: m
Test: m cts
Test: cts-tradefed run commandAndExit cts-dev -m CtsJvmtiAttachingHostTestCases
Change-Id: I65e869debd45e6073f9ab21cb9de9c9deb828a2e

6 years agoAdd slotId in INetworkService.aidl methods.
Malcolm Chen [Wed, 24 Jan 2018 01:35:51 +0000 (17:35 -0800)]
Add slotId in INetworkService.aidl methods.

Since one Service can only return same binder to all connected
clients, we add slotId in INetworkService.aidl methods to redirect
requests to correct provider.

Bug: 64132030
Test: build
Change-Id: Iae5d81a689a43ed783d7dff0f51735c42a6483be

6 years agoMerge "Update comments for ACTION_CARRIER_CONFIG_CHANGED."
Treehugger Robot [Thu, 25 Jan 2018 01:33:33 +0000 (01:33 +0000)]
Merge "Update comments for ACTION_CARRIER_CONFIG_CHANGED."

6 years agoAdd ServiceState APIs for carrier aggregation.
Eric Schwarzenbach [Thu, 18 Jan 2018 22:42:00 +0000 (14:42 -0800)]
Add ServiceState APIs for carrier aggregation.

Adds getDuplexMode, getChannelNumber, and getCellBandwidths to
ServiceState.

Bug: 72117602
Test: runtest
Change-Id: I04be7d0a7d88693ef21b252ecc21aa974c2f89c8

6 years agoMerge "BitmapDrawable: Suppress errorprone warning"
Andreas Gampe [Thu, 25 Jan 2018 00:56:11 +0000 (00:56 +0000)]
Merge "BitmapDrawable: Suppress errorprone warning"

6 years agoMerge "Set Zygote.DISABLE_HIDDEN_API_CHECKS for system apps"
Treehugger Robot [Wed, 24 Jan 2018 23:09:28 +0000 (23:09 +0000)]
Merge "Set Zygote.DISABLE_HIDDEN_API_CHECKS for system apps"

6 years agoUpdate comments for ACTION_CARRIER_CONFIG_CHANGED.
Amit Mahajan [Wed, 24 Jan 2018 20:54:44 +0000 (12:54 -0800)]
Update comments for ACTION_CARRIER_CONFIG_CHANGED.

Test: none
Bug: 64131518
Change-Id: I7efbbb393289cc11d529898ea3d7f96b0e89f445

6 years agoMerge "Add scan interval and window lengths to Settings.Global."
Treehugger Robot [Wed, 24 Jan 2018 21:49:00 +0000 (21:49 +0000)]
Merge "Add scan interval and window lengths to Settings.Global."

6 years agoSet Zygote.DISABLE_HIDDEN_API_CHECKS for system apps
David Brazdil [Wed, 17 Jan 2018 18:06:47 +0000 (18:06 +0000)]
Set Zygote.DISABLE_HIDDEN_API_CHECKS for system apps

When forking a process for a system app, pass a flag to ART that
will disable enforcement of hidden API access checks.

Test: manual
Bug: 64382372
Change-Id: I5ba81d84a44c9467613f060428b11e1d9d725bd3

6 years agoBitmapDrawable: Suppress errorprone warning
Andreas Gampe [Wed, 24 Jan 2018 21:25:22 +0000 (13:25 -0800)]
BitmapDrawable: Suppress errorprone warning

Suppress a warning for constructor-chaining not using all parameters.

Bug: 72451126
Test: m javac-check RUN_ERROR_PRONE=true
Change-Id: Ie47dec119ec578b79d866d9c5041bb7b68eac146

6 years agoMerge "Revert "Revert "Add getUiccSlots() and switchSlots() in TelephonyManager."""
Holly Jiuyu Sun [Wed, 24 Jan 2018 21:11:07 +0000 (21:11 +0000)]
Merge "Revert "Revert "Add getUiccSlots() and switchSlots() in TelephonyManager."""

6 years agoCreate hidden API lists
David Brazdil [Mon, 22 Jan 2018 22:23:13 +0000 (22:23 +0000)]
Create hidden API lists

Android is beginning to put restrictions on the usage of private APIs.
In order to facilitate a transitionary period, some APIs will remain
accessible but issue a warning (greylist), other will see restrictions
right away (blacklist).

This patch create two new text files which will be used to store manual
lists of dex signatures of hidden APIs. These are the blacklist and
dark greylist. They should be mutually exclusive and both be subsets of
INTERNAL_PLATFORM_PRIVATE_DEX_API_FILE. The last list, light greylist,
is generated as INTERNAL_PLATFORM_PRIVATE_DEX_API_FILE minus the two
manual lists.

Bug: 64382372
Test: m
Change-Id: Ia694ef79bece819c87db853ccaea5e95f38d3e84

6 years agoAdds stripTrailingFs
Jun Yin [Wed, 24 Jan 2018 20:13:37 +0000 (12:13 -0800)]
Adds stripTrailingFs

This function removes padding 'F' characters in a string (e.g., ICCID).

Bug: 38206971
Test: unit test in another cl
Change-Id: If77604576c5bd26404cdc436f8297191664325a4

6 years agoMerge "Set DEXOPT_DISABLE_HIDDEN_API_CHECKS for system apps"
Treehugger Robot [Wed, 24 Jan 2018 20:28:21 +0000 (20:28 +0000)]
Merge "Set DEXOPT_DISABLE_HIDDEN_API_CHECKS for system apps"

6 years agoShow a warning toast/dialog when an app uses hidden APIs
David Brazdil [Wed, 24 Jan 2018 19:54:30 +0000 (19:54 +0000)]
Show a warning toast/dialog when an app uses hidden APIs

Check VMRuntime.hasUsedHiddenApi() on each Activity start and show
a toast/dialog urging the user to check logcat.

Test: manual
Bug: 64382372
Change-Id: Ida8a6ed9ab9b56a76882501b2a3473a5f1448cb3

6 years agoMerge "Add new IMS reasoninfo to handle alternate emergency disconnect scenario."
Treehugger Robot [Wed, 24 Jan 2018 19:33:33 +0000 (19:33 +0000)]
Merge "Add new IMS reasoninfo to handle alternate emergency disconnect scenario."

6 years agoMerge "Added network service interface"
Xiangyu/Malcolm Chen [Wed, 24 Jan 2018 19:13:58 +0000 (19:13 +0000)]
Merge "Added network service interface"

6 years agoAdded network service interface
Jack Yu [Thu, 21 Dec 2017 19:00:05 +0000 (11:00 -0800)]
Added network service interface

The interface for mobile network service. This is the base class
for vendor or first party data service provider to implement
the network service for cellular or IWLAN network support.

Test: Manual
bug: 64132030
Change-Id: Ia358cbb18fc6d15dcc45c75f14b7c952f899e101

6 years agoMerge "Add tunnel-mode calls to netd in IpSecService"
Benedict Wong [Wed, 24 Jan 2018 18:10:55 +0000 (18:10 +0000)]
Merge "Add tunnel-mode calls to netd in IpSecService"

6 years agoMerge "BT-HFP: Update Bluetooth headset state handler to Multi-HFP"
Treehugger Robot [Wed, 24 Jan 2018 18:03:21 +0000 (18:03 +0000)]
Merge "BT-HFP: Update Bluetooth headset state handler to Multi-HFP"

6 years agoRevert "Revert "Add getUiccSlots() and switchSlots() in TelephonyManager.""
Holly Jiuyu Sun [Wed, 24 Jan 2018 17:57:39 +0000 (17:57 +0000)]
Revert "Revert "Add getUiccSlots() and switchSlots() in TelephonyManager.""

This reverts commit 5c9dcc0e7202884b3a4a54c28f30854f377fde29.

Reason for revert: The original failure was not caused by this CL and this CL does not depend on the broken one.

Change-Id: Ia60e21f634d8f307f1cf5a3992cb38de04c5f443

6 years agoBT-HFP: Update Bluetooth headset state handler to Multi-HFP
Jack He [Wed, 17 Jan 2018 23:45:12 +0000 (15:45 -0800)]
BT-HFP: Update Bluetooth headset state handler to Multi-HFP

* When multiple headset devices are connected at the same time, at most one
  device can be used for SCO audio at any time. This device is called
  Active Device and is indicated by either
  BluetoothHeadset.getActiveDevice() or
  BluetoothHeadset.ACTIVE_DEVICE_CHANGED intent. It can also be set
  through BluetoothHeadset.setActiveDevice(BluetoothDevice) internal API.
* This change let AudioService to listen to ACTIVE_DEVICE_CHANGED intent
  instead of CONNECTION_STATE_CHANGED intent since it is the active
  device that AudioService cares about, not the list of connected
  devices.
* Everytime a new active device is set, AudioService will treat the old
  one (if not null) as disconnected and call disconnection methods in
  audio framework and the new active device is regarded as newly
  connected and connection methods will be called by AudioService.
* When disconnectHeadset() is called, active device will be set to null

Bug: 71875419
Test: compile, connect multiple HFP devices and switch active device
      among them
Change-Id: I148cca079d36a2dfc6a46b8d42ba69821c9c6de3

6 years agoMerge "Add PhysicalChannelConfig."
Eric Schwarzenbach [Wed, 24 Jan 2018 16:17:53 +0000 (16:17 +0000)]
Merge "Add PhysicalChannelConfig."

6 years agoAdd dalvik.vm.minidebuginfo property for ART
David Srbecky [Tue, 23 Jan 2018 17:57:24 +0000 (17:57 +0000)]
Add dalvik.vm.minidebuginfo property for ART

The property enables generation of mini-debug-info for JIT.

Change-Id: I1cfce8b1b463d9e45bbe823c285c1639653bb1b5

6 years agoSet DEXOPT_DISABLE_HIDDEN_API_CHECKS for system apps
David Brazdil [Thu, 18 Jan 2018 15:25:18 +0000 (15:25 +0000)]
Set DEXOPT_DISABLE_HIDDEN_API_CHECKS for system apps

For now, system apps will be exempt from hidden API access checks.
Pass the appropriate flag to dexopt.

Test: manual
Bug: 64382372
Bug: 72305689
Merged-In: I5676ffa3a5ba680bf5f6bab0b62f0acf4a933097
Change-Id: Idc3067d2c6040f15fe0f051090ba45efe591ebae

6 years agoMerge "Revert "Add getUiccSlots() and switchSlots() in TelephonyManager.""
Nicolas Geoffray [Wed, 24 Jan 2018 10:44:10 +0000 (10:44 +0000)]
Merge "Revert "Add getUiccSlots() and switchSlots() in TelephonyManager.""

6 years agoMerge "Fail when there is an ASM error"
Benoit Lamarche [Wed, 24 Jan 2018 09:59:28 +0000 (09:59 +0000)]
Merge "Fail when there is an ASM error"

6 years agoRevert "Add getUiccSlots() and switchSlots() in TelephonyManager."
Nicolas Geoffray [Wed, 24 Jan 2018 09:11:40 +0000 (09:11 +0000)]
Revert "Add getUiccSlots() and switchSlots() in TelephonyManager."

AOSP build broken.

Bug: 71914112

This reverts commit 2f87d7b2ee5097eae4e2a62858fbe221dac857f6.

Change-Id: I53537a6da7616fe6dbbb79927b32720bbeaf1f69

6 years agoAdd tunnel-mode calls to netd in IpSecService
Benedict Wong [Sat, 20 Jan 2018 01:36:02 +0000 (17:36 -0800)]
Add tunnel-mode calls to netd in IpSecService

Adds calls to relevant netd methods in IpSecService, enabling Tunnel
mode functionality.

Bug: 63588681
Test: Compiles, passing CTS + unit tests
Change-Id: I6deb68584cddb03f21bd76370d4ef69cadc1bf16

6 years agoMerge "Add TunnelInterface API and KernelResourceRecords"
Benedict Wong [Wed, 24 Jan 2018 07:25:04 +0000 (07:25 +0000)]
Merge "Add TunnelInterface API and KernelResourceRecords"

6 years agoAdd TunnelInterface API and KernelResourceRecords
Benedict Wong [Fri, 19 Jan 2018 02:31:45 +0000 (18:31 -0800)]
Add TunnelInterface API and KernelResourceRecords

This change adds one KernelResourceRecord type (TunnelInterfaceRecord),
and adds methods for the creation of TunnelInterfaces, as well as the
application of Transforms to the given TunnelInterfaces

As part of the generation of ikeys/okeys, a ReserveKeyTracker manages a
java bitset to avoid collisions and reserve/release keys.

Bug: 63588681
Test: Compiles, CTS, unit tests all pass on AOSP_marlin
Change-Id: I9e9b6455e27073acd4491eae666aa966b3b10e0f

6 years agoAdd PhysicalChannelConfig.
Eric Schwarzenbach [Fri, 19 Jan 2018 01:15:51 +0000 (17:15 -0800)]
Add PhysicalChannelConfig.

Adds a field to PhoneStateListener to listen for changes to the
PhysicalChannelConfig list.

Bug: 72117533
Test: make
Change-Id: I353a4b90354d54948bce75968fb5fe1803efd093

6 years agoMerge "Add xfrm mark in IpSecConfig"
Benedict Wong [Wed, 24 Jan 2018 05:53:29 +0000 (05:53 +0000)]
Merge "Add xfrm mark in IpSecConfig"

6 years agoMerge "Add getUiccSlots() and switchSlots() in TelephonyManager."
Holly Jiuyu Sun [Wed, 24 Jan 2018 05:08:19 +0000 (05:08 +0000)]
Merge "Add getUiccSlots() and switchSlots() in TelephonyManager."

6 years agoMerge "Move android.provider.Telephony.SECRET_CODE to Telephony.Intents."
Cassie Han [Wed, 24 Jan 2018 04:55:32 +0000 (04:55 +0000)]
Merge "Move android.provider.Telephony.SECRET_CODE to Telephony.Intents."

6 years agoMerge changes I3b16caad,Iaf5ea7ab,I09a94042,I69a39039,I35300309, ...
Chalard Jean [Wed, 24 Jan 2018 04:09:44 +0000 (04:09 +0000)]
Merge changes I3b16caad,Iaf5ea7ab,I09a94042,I69a39039,I35300309, ...

* changes:
  Let network requests see VPNs.
  Move constants into a new file.
  Make sure listen requests from VPN apps see their own networks
  Add a test for new UID checking code.
  Remove UID_RANGES_ADDED and REMOVED.
  Move VPN allowed UIDs into NetworkCapabilities.
  Pre-import to remove a conflict.

6 years agoMerge changes from topic "bpfStats"
Treehugger Robot [Wed, 24 Jan 2018 04:08:29 +0000 (04:08 +0000)]
Merge changes from topic "bpfStats"

* changes:
  Use /proc/net/dev to get stats summary
  Add bpf support for NetworkStatsFactory
  Add BPF support for NetworkStatsService

6 years agoMerge "Add cardId in EuiccCardManager API."
Holly Jiuyu Sun [Wed, 24 Jan 2018 04:06:40 +0000 (04:06 +0000)]
Merge "Add cardId in EuiccCardManager API."

6 years agoMerge "Expose applyTunnelModeTransform as a system API"
Benedict Wong [Wed, 24 Jan 2018 01:42:30 +0000 (01:42 +0000)]
Merge "Expose applyTunnelModeTransform as a system API"

6 years agoAdd cardId in EuiccCardManager API.
Holly Jiuyu Sun [Wed, 24 Jan 2018 00:49:22 +0000 (16:49 -0800)]
Add cardId in EuiccCardManager API.

Removed getEid() API.

Bug: 38206971
Test: test on phone
Change-Id: I7e484f889a780900acd3a05a96fbbc632e1ec682

6 years agoMerge "Make getIEuiccContronller() protected and non-static for CTS."
Holly Jiuyu Sun [Wed, 24 Jan 2018 01:09:44 +0000 (01:09 +0000)]
Merge "Make getIEuiccContronller() protected and non-static for CTS."

6 years agoAdd scan interval and window lengths to Settings.Global.
Jeremy Klein [Thu, 11 Jan 2018 02:01:46 +0000 (18:01 -0800)]
Add scan interval and window lengths to Settings.Global.

This will enable running experiments to determine the
effects on battery life of changing these values.

Bug: 71765044
Test: Just adding a key value here. This is basically a no-op.
Change-Id: I33a0b2da6e793ef508d020a3c2d321d5553c3fb1

6 years agoMerge "Add TransportType in AccessNetworkConstants.java"
Xiangyu/Malcolm Chen [Tue, 23 Jan 2018 23:39:10 +0000 (23:39 +0000)]
Merge "Add TransportType in AccessNetworkConstants.java"

6 years agoAdd getUiccSlots() and switchSlots() in TelephonyManager.
Holly Jiuyu Sun [Fri, 12 Jan 2018 02:47:04 +0000 (18:47 -0800)]
Add getUiccSlots() and switchSlots() in TelephonyManager.

Bug: 71914112
Test: test on phone
Change-Id: Ib7e9e40e5ecda48bdcd1f332dc7d6c422c08d942

6 years agoExpose applyTunnelModeTransform as a system API
Benedict Wong [Tue, 23 Jan 2018 19:01:28 +0000 (11:01 -0800)]
Expose applyTunnelModeTransform as a system API

Simple change to expose systemAPI for applyTunnelModeTransform

Bug: 36033193
Test: All CTS, unit tests passing
Change-Id: I2d857c048bc0dc80c3949387f946b1f5adf0527e

6 years agoMerge changes from topic "signal-strength-cleanup"
nharold [Tue, 23 Jan 2018 23:23:48 +0000 (23:23 +0000)]
Merge changes from topic "signal-strength-cleanup"

* changes:
  Fix getAsuLevel returns "99" in Lte and TdScdma.
  Cleanup SignalStrength Parcel

6 years agoMove android.provider.Telephony.SECRET_CODE to Telephony.Intents.
Cassie [Sat, 20 Jan 2018 01:23:36 +0000 (17:23 -0800)]
Move android.provider.Telephony.SECRET_CODE to Telephony.Intents.

Bug: 69616728
Test: Basic telephony sanity
Change-Id: Ia053f9be082ceb139a284598ee2398a25daa7e08

6 years agoMerge "Combined flags of data service requests into one reason param"
Treehugger Robot [Tue, 23 Jan 2018 19:43:25 +0000 (19:43 +0000)]
Merge "Combined flags of data service requests into one reason param"

6 years agoMake getIEuiccContronller() protected and non-static for CTS.
Holly Jiuyu Sun [Fri, 19 Jan 2018 18:27:56 +0000 (10:27 -0800)]
Make getIEuiccContronller() protected and non-static for CTS.

Test: test on phone
Change-Id: I706a0a9e064a0f2f91674cb2ff38a5929eaaf627

6 years agoFix getAsuLevel returns "99" in Lte and TdScdma.
yifan.bai [Fri, 20 Oct 2017 02:25:11 +0000 (10:25 +0800)]
Fix getAsuLevel returns "99" in Lte and TdScdma.

GetAsuLevel method judges valid signal by
getLteLevel/getTdScdmaLevel. However, level is
SIGNAL_STRENGTH_NONE_OR_UNKNOWN does not mean not in
Lte/TdScdma.
For example, if mLteRsrp is in (threshRsrp[1],
threshRsrp[0]], getLteLevel would return
SIGNAL_STRENGTH_NONE_OR_UNKNOWN. But this only
means Lte signal is very weak, and ASU should be
(mLteRsrp + 140) not "99" (3GPP 27.007 Sec 8.69).

Bug: 72116430
Test: Build
Change-Id: If930c3e3d23a9af7b2e51e3560cc28607a6328c0

6 years agoCleanup SignalStrength Parcel
Nathan Harold [Fri, 19 Jan 2018 00:45:40 +0000 (16:45 -0800)]
Cleanup SignalStrength Parcel

Clean up the SignalStrength parcel. This CL
removes redundant constructors, simplifies the
overall initialization process, and stratifies
the components of the parcel into 2 separate
parts: the strength values from RIL, and the
config values provided by the platform.

Bug: 72116430
Test: runtest frameworks-telephony
Change-Id: Id7d2339362270b3911e96094275e1e545d6b581c

6 years agoAdd TransportType in AccessNetworkConstants.java
Malcolm Chen [Tue, 23 Jan 2018 00:00:29 +0000 (16:00 -0800)]
Add TransportType in AccessNetworkConstants.java

Bug: 64132030
Test: build
Change-Id: I916a0b889110195d23b2a531308171cf4ea74f0c

6 years agoMerge "Use the correct value for Process.WEBVIEW_ZYGOTE_UID."
Treehugger Robot [Tue, 23 Jan 2018 18:14:00 +0000 (18:14 +0000)]
Merge "Use the correct value for Process.WEBVIEW_ZYGOTE_UID."

6 years agoMerge "Add checks to ensure SPIs are not reused"
Benedict Wong [Tue, 23 Jan 2018 18:00:06 +0000 (18:00 +0000)]
Merge "Add checks to ensure SPIs are not reused"

6 years agoMerge "Added new slot status related broadcast."
Treehugger Robot [Tue, 23 Jan 2018 18:00:00 +0000 (18:00 +0000)]
Merge "Added new slot status related broadcast."

6 years agoMerge changes from topic "multipath-datausage-backport"
Lorenzo Colitti [Tue, 23 Jan 2018 15:22:18 +0000 (15:22 +0000)]
Merge changes from topic "multipath-datausage-backport"

* changes:
  Support passing a template to NetworkStatsManager queries.
  Add metered, roaming, and defaultNetwork info to NetworkTemplate.
  Unbreak frameworks-net tests broken by missing libutilscallstack.
  Disable IpConnectivityMetricsTest.
  Add the defaultNetwork element to the netstats.proto.
  Add getDefaultNetwork to the NetworkStats public API.

6 years agoLet network requests see VPNs.
Chalard Jean [Wed, 10 Jan 2018 12:19:32 +0000 (21:19 +0900)]
Let network requests see VPNs.

Test: runtest frameworks-net
Test: also tested with VPN app
Test: also cts passing
Change-Id: I3b16caad7787c3c1f2921ca1583815c89efbadc5

6 years agoMove constants into a new file.
Chalard Jean [Fri, 19 Jan 2018 08:00:47 +0000 (17:00 +0900)]
Move constants into a new file.

Also audit all constants, make some private, annotate some
with @VisibleForTesting.

Test: runtest framework && cts
Change-Id: Iaf5ea7abd36fd8d544dcc84654f6cb529196d654

6 years agoMake sure listen requests from VPN apps see their own networks
Chalard Jean [Wed, 17 Jan 2018 06:10:05 +0000 (15:10 +0900)]
Make sure listen requests from VPN apps see their own networks

Test: runtest frameworks-net
Test: CTS pass, including with the next patch which is what this
      actually matters for

Change-Id: I09a94042acbefa24ab884f95326e30d6ab280b82

6 years agoAdd a test for new UID checking code.
Chalard Jean [Fri, 12 Jan 2018 08:22:49 +0000 (17:22 +0900)]
Add a test for new UID checking code.

Test: manual, this is a new test and it passes
Change-Id: I69a39039647ec05f970700e36c5f1e1e6e110f4a

6 years agoRemove UID_RANGES_ADDED and REMOVED.
Chalard Jean [Tue, 16 Jan 2018 09:43:05 +0000 (18:43 +0900)]
Remove UID_RANGES_ADDED and REMOVED.

Test: runtest frameworks-net
Test: also tested with VPN app
Test: also cts passing
Change-Id: I3530030996daeba05a8f2fffc5c6e21ed62e3f40

6 years agoMove VPN allowed UIDs into NetworkCapabilities.
Chalard Jean [Wed, 27 Dec 2017 05:23:31 +0000 (14:23 +0900)]
Move VPN allowed UIDs into NetworkCapabilities.

Test: runtest frameworks-net
Test: also new specific tests for this new code
Test: also tested with VPN app
Test: also cts passing
Change-Id: If0311bae2bf99dedac959febadecf4f92f3064b8

6 years agoPre-import to remove a conflict.
Chalard Jean [Tue, 23 Jan 2018 12:25:37 +0000 (21:25 +0900)]
Pre-import to remove a conflict.

Test: compiles and passes checkstyle
Change-Id: I1ffdd88e6268fee0cf88992420ab21eb42928957

6 years agoSupport passing a template to NetworkStatsManager queries.
Lorenzo Colitti [Mon, 22 Jan 2018 12:00:49 +0000 (21:00 +0900)]
Support passing a template to NetworkStatsManager queries.

Currently, NetworkStatsManager queries and callbacks only allow
selecting network traffic based on network identifiers:
networkType, subscriptionId and networkId.  The code ends up
converting these into a template under the hood.

Now that templates can express more fine-grained queries (e.g.,
select only roaming traffic, or select only traffic that's not
on the default network) add a hidden method to pass in a
template. This should have no security implications, as all the
access controls are performed in NetworkStatsService.

Bug: 35142602
Test: android.app.usage.cts.NetworkUsageStatsTest passes
Change-Id: Iab4afa26b34544299d2a9c501c1b0feb470e90a9
Merged-In: Iab4afa26b34544299d2a9c501c1b0feb470e90a9

6 years agoAdd metered, roaming, and defaultNetwork info to NetworkTemplate.
Lorenzo Colitti [Mon, 22 Jan 2018 02:54:46 +0000 (11:54 +0900)]
Add metered, roaming, and defaultNetwork info to NetworkTemplate.

This will allow data usage clients to query for and receive
callbacks on data usage matching these conditions.

Bug: 35142602
Test: atest FrameworksNetTests
Change-Id: I4d985a2734eeab7ee454c09cc2098b6b3c671c23
Merged-In: I4d985a2734eeab7ee454c09cc2098b6b3c671c23

6 years agoUnbreak frameworks-net tests broken by missing libutilscallstack.
Lorenzo Colitti [Mon, 22 Jan 2018 03:53:18 +0000 (12:53 +0900)]
Unbreak frameworks-net tests broken by missing libutilscallstack.

Test: atest FrameworksNetTest shows fewer failures
Change-Id: Ic6f2bc18e80d91226d8d49e047e3997ffc45e45a
Merged-In: Ic6f2bc18e80d91226d8d49e047e3997ffc45e45a