343875 Commits

Author SHA1 Message Date
Badhri Jagan Sridharan
bf996dd479 Merge "Add support for UsbDeviceManager to talk to USB GADGET HAL" 2018-01-23 03:09:27 +00:00
Amit Mahajan
c0a2e5f05d Added new slot status related broadcast.
Test: none
Bug: 64131518
Merged-in: I0a5825a1d121dc22f042fd71598f58e064e9e2a2
Change-Id: I0a5825a1d121dc22f042fd71598f58e064e9e2a2
2018-01-22 18:31:01 -08:00
Jeremy Klein
d50fc05186 Add FLAG_ACTIVITY_NEW_TASK when starting UI-based tether provisioning.
Bug: 72223006
Bug: 72219677
Test: manual
Change-Id: Iba7a58729903207b2ec75524fc1ef4c404f0b6a3
2018-01-22 17:58:43 -08:00
Badhri Jagan Sridharan
5eb97dcf50 Add support for UsbDeviceManager to talk to USB GADGET HAL
Till now, Init scripts(property tiggers) are used define the
operation that needs to be performed when a certain gadget
composition needs to be enabled. Based on the user preference,
usb service sets the sys.usb.config which triggers the
corresponding property triggers in init scripts and usbservice
polls on sys.usb.state to infer whether the property triggers
have completed executing.

This CL makes UsbHandler class abstract to make init scripts
based legacy implementation and HAL based implementation to
share the common logic. The legacy init script based logic is
implemented by UsbHandlerLegacy and HAL based logic is implemented
by UsbHandlerHal. The decision on which one to initialize is
made depending on whether the device has Gadget HAL impelemented.

Since HIDL supports asynch calbacks, usb state management is moved
to the message queue to avoid polling incase of HAL based
implementation.

To switch to a new configuration:
1. UsbService calls setCurrentUsbFunctions and queues
   MSG_SET_FUNCTIONS_TIMEOUT
2. If the  setCurrentUsbFunctionsCb arrives on time,
   then  MSG_SET_FUNCTIONS_TIMEOUT is cancelled and
   default functions are retried by queueing
   MSG_SET_DEFAULT_FUNCTIONS if SUCCESS is not signalled.
3. If MSG_SET_FUNCTIONS_TIMEOUT gets executed, then,
   default functions are retried by calling
   setEnabledFunctions(null, false, mUsbDataUnlocked);

Also, for HAL based implementation config_oemUsbModeOverride is no
longer needed as hal can take of enabling oem specific functions.

Bug: 63669128
Test: Tested usb gadget configuration for both cases:
1. When gadget hal is present
2. When gadget hal is not present
Change-Id: Ifcef464a0b97b265872696346a76162f8e84d6c0
2018-01-22 17:02:25 -08:00
Treehugger Robot
174df238ac Merge "Camera: remove NOT_PRESENT cameras" 2018-01-23 00:52:00 +00:00
Lorenzo Colitti
1683b6968d Merge "Remove obsolete NetworkStats.Entry constructor." 2018-01-23 00:15:15 +00:00
Treehugger Robot
b60e42becd Merge "Add broadcast action for carrier setup" 2018-01-22 23:55:49 +00:00
Jack Yu
2a4d0c8d50 Combined flags of data service requests into one reason param
Made the API flexible for future expansion. The two boolean flag
'reasonShutdown' and 'isHandover' are merged into the 'reason'
params.

Test: Manual
bug: 64132030
Change-Id: I29a0ca6a7c3b897910f3bb6076f44315adc91893
2018-01-22 15:04:33 -08:00
Treehugger Robot
278dd4ab90 Merge "Add NetworkTypeBitmask into public ApnSetting." 2018-01-22 22:53:38 +00:00
Chen Xu
2f6b2726e6 Merge "address carrier id api review feedback" 2018-01-22 22:44:02 +00:00
Qingxi Li
a5dcdb4dc4 Add broadcast action for carrier setup
This broadcast action is sent by eSIM Manager to let the carrier app
know that the carrier setup is not completed.

Bug: 62639823
Test: TreeHugger
Merged-In: I88ac90cf679d5ec98aa7c0cf7bd9c96010597a1c
Change-Id: I88ac90cf679d5ec98aa7c0cf7bd9c96010597a1c
2018-01-22 14:03:40 -08:00
fionaxu
ac1defabc8 address carrier id api review feedback
1. improve comments
2. change returned carrier name from String to CharSequence
3. change to AndroidCarrierId

Bug: 64131637
Bug: 71584605
Test: Manual
Change-Id: I412d53bb9d4955e1267300692e90ebfffd6818df
Merged-in: I412d53bb9d4955e1267300692e90ebfffd6818df
2018-01-22 21:05:55 +00:00
Benedict Wong
222529d95c Merge "Address comments and final cleanup from refcounting integration" 2018-01-22 20:32:18 +00:00
Treehugger Robot
940c0341f0 Merge "Debug: Add attachJvmtiAgent with classloader" 2018-01-22 18:22:07 +00:00
Benedict Wong
7ee26e72cf Merge "Rename create/delete transform methods" 2018-01-22 17:57:15 +00:00
yuemingw
84323c0dce Add NetworkTypeBitmask into public ApnSetting.
Sync with aosp/556766.
Moved from ag/3477310.

Bug: 68208293
Test: manual
Change-Id: I04b901c46b7bbce4ed7d52895fcc904fb713fb69
2018-01-22 17:35:26 +00:00
Robert Sesek
bceb382572 Use the correct value for Process.WEBVIEW_ZYGOTE_UID.
When the libcutils constant was added there a merge conflict, which
caused the AID_WEBVIEW_ZYGOTE value to land with a different value than
the Java-side Process value. Nothing yet uses the Process constant, so
there were no ill effects.

Test: m
Change-Id: I8cc87bce1ddbdcdaf79d85c828d86837e96cce21
2018-01-22 12:29:21 -05:00
Benoit Lamarche
9f17dfcba6 Fail when there is an ASM error
Otherwise during a build, Locked Region Code Injection may encounter an
ASM Analyzer exception, and the build will not fail, even though
injection won't have succeeded.

Test: make
Change-Id: Iee69f1a78fde735db62c7f73405b8cec4e410793
2018-01-22 17:42:21 +01:00
Lorenzo Colitti
1e507e6178 Remove obsolete NetworkStats.Entry constructor.
The only caller is telephony code, and it's being fixed in this
topic.

Bug: 35142602
Test: builds, boots
Change-Id: Ia77a1c2c297037f311c2355610c206cd8e3192c4
2018-01-21 23:01:35 +09:00
Treehugger Robot
7e3b1832c4 Merge "Multi-A2DP support - add a new internal API to suppress Audio Noisy intent" 2018-01-20 23:30:34 +00:00
Pavlin Radoslavov
be4fb893a0 Multi-A2DP support - add a new internal API to suppress Audio Noisy intent
The new API setBluetoothA2dpDeviceConnectionStateSuppressNoisyIntent()
is similar to the existing setBluetoothA2dpDeviceConnectionState()
except that it takes one extra argument that indicates whether the
AudioManager.ACTION_AUDIO_BECOMING_NOISY intent will be sent:

  setBluetoothA2dpDeviceConnectionStateSuppressNoisyIntent(
      ..., boolean suppressNoisyIntent)

This API is needed so the Active A2DP Sink device can be changed
while audio is streaming, and the audio continues playing on the new
Active Device.

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

Change-Id: I75766a58d9e6b42b3ce68bd9ad3a7a72ca5a1023
(cherry picked from commit 82e06463f2571a06286f9da0bf3ad5a0e58461a2)
2018-01-20 11:50:37 -08:00
David Brazdil
fa208b4226 Merge "Generate new API signatures from doclava" 2018-01-20 10:06:22 +00:00
Treehugger Robot
6745e15d17 Merge "Add CARD_ID in SubscriptionInfo database" 2018-01-20 08:28:24 +00:00
Yin-Chia Yeh
0c961165c2 Camera: remove NOT_PRESENT cameras
So hot plug cameras won't stay forever in
device status map.

Change-Id: I0290ff2eccb3d48a0f72c48f32a97909d20623ad
2018-01-20 00:55:45 +00:00
Jordan Liu
8fb3bdc36f Merge "Make LTE signal bar thresholds customizable with carrier configuration" 2018-01-19 20:39:43 +00:00
nharold
08d07aec50 Merge "Add Tunnel Interface APIs to IpSecManager" 2018-01-19 19:43:17 +00:00
Kitta Koutarou
dad385ae29 Make LTE signal bar thresholds customizable with carrier configuration
Move config_lteDbmThresholds to KEY_LTE_RSRP_THRESHOLDS_INT_ARRAY
to control the LTE signal bar thresholds by carrier configuration.

Test: manual - Checked that the LTE signal bar thresholds can be
controlled by carrier config.
Test: auto - Confirmed that run
ServiceStateTrackerTest#testSignalStrength and it has no problem.
Bug: 70698348
Change-Id: Ia613663956ff00fbf299dcf69113733eae5a3458
Merged-In: Ia613663956ff00fbf299dcf69113733eae5a3458
2018-01-19 10:55:24 -08:00
Benedict Wong
f33f031344 Rename create/delete transform methods
CreateTransportModeTransform and DeleteTransportModeTransform are both
agnostic as far as which mode of transform it creates/deletes. As such,
to facilitate the implementation of tunnel mode, this patch renames them
to CreateTransform and DeleteTransform, along with all test names.

Bug: 63588681
Test: frameworks/base unit tests and CTS tests run, passed
Change-Id: I1f015eb7ad0e85fca966658a9402485ca2b44091
2018-01-19 10:43:01 -08:00
Treehugger Robot
c48f4cb7f1 Merge changes Id8776d14,Ifa291c62,I5ea9d200
* changes:
  Track and persist in stats whether traffic is on the default network.
  Add the default network to NetworkStats and NetworkStatsCollection.
  Pass all default networks to NetworkStatsService
2018-01-19 14:48:52 +00:00
Lorenzo Colitti
d3e4a1e250 Track and persist in stats whether traffic is on the default network.
This change adds the defaultNetwork to the ident based on current
system networking state, and persists that value to flash.

Bug: 35142602
Test: runtest frameworks-net
Test: downloaded files using default/non-default networks while watching dumpsys netstats
Change-Id: Id8776d149b2977548a9eb455ad4926af55e25aba
2018-01-19 19:49:16 +09:00
Lorenzo Colitti
ada23ed56a Add the default network to NetworkStats and NetworkStatsCollection.
This allows us to maintain NetworkStats entries that track
whether the traffic was on the default network.

At the moment, the stats collection code always passes in
DEFAULT_NETWORK_NO. However, this value is a no-op, since it is
not persisted to disk. Only the ident, the uid/set/tag, and the
packet/byte/operation counters are persisted.

A future change will add defaultNetwork to the ident and start
persisting it.

Bug: 35142602
Test: runtest frameworks-net
Change-Id: Ifa291c62c0fa389b88e5561086a29dcd7cee2253
2018-01-19 19:49:16 +09:00
Lorenzo Colitti
c78da2937c Pass all default networks to NetworkStatsService
This will allow NetworkStatsService to treat traffic on these
networks differently from traffic where the app selects a network
that is not the default.

Bug: 35142602
Test: runtest frameworks-net
Change-Id: I5ea9d200d9fb153490c6108bb9390bf152f297da
2018-01-19 16:40:10 +09:00
Andreas Gampe
571b700fb6 Debug: Add attachJvmtiAgent with classloader
Add classloader support to android.os.Debug.attachJvmtiAgent. For
the original version without a given classloader, look up the
application's main classloader.

Bug: 65016018
Bug: 70901841
Test: m
Test: cts-tradefed run commandAndExit cts-dev
Change-Id: I649b6883e05dc2f75073fe1f978423f6a7b880df
2018-01-18 22:02:53 -08:00
Hans Boehm
242b93b760 Add reachabilityFence, remove ExemptionMechanism.finalize
ReachabilityFence is taken from Java 9.

ExemptionMechanism.finalize was never useful, and is also being removed
upstream. It is unsafe in the presence of dead reference elimination.

Bug: 63934467
Bug: 28342794
Test: Build and boot AOSP
Change-Id: I91dc4d33b91175248f44783e3c868a4f1b1d2d0d
2018-01-18 20:34:44 -08:00
Treehugger Robot
0fc9900802 Merge "Added new SIM state related broadcasts." 2018-01-19 04:25:12 +00:00
Treehugger Robot
8353a39ecc Merge "Fixing app compat issue b/72143978" 2018-01-19 02:38:33 +00:00
Treehugger Robot
898137f817 Merge "HIDL: Check error value." 2018-01-19 01:41:08 +00:00
Ian Pedowitz
0c3c4d1c7d Fixing app compat issue b/72143978
Revert "Remove obsolete workaround."

This reverts commit 5e48241a95b843c10f96c57d8544af9d04807218.

Bug: 72143978
Bug: 24465209
Test: Tested failing case on sailfish, reverted back all CL's since
Test: 3471433 for b/24465209 and apps open
2018-01-18 16:24:11 -08:00
Jeff Sharkey
d6cd4b241a Merge "Add ability to override subscriber capabilities." 2018-01-18 23:58:30 +00:00
Di Lu
0b611f496e Add xfrm mark in IpSecConfig
Bug: 63589600
Test: runtest frameworks-net
Change-Id: I2d38d781b8b31d8bf39fd4e9a7e31509f15a9e16
2018-01-18 15:23:56 -08:00
Amit Mahajan
5d70fc9ae3 Added new SIM state related broadcasts.
Test: Basic telephony sanity and unit tests
Bug: 64131518
Merged-in: Ie3d157e79a7040c161b9038c875a4a4f49d535ff
Change-Id: Ie3d157e79a7040c161b9038c875a4a4f49d535ff
2018-01-18 14:44:07 -08:00
Dan Zhang
1d5e2c3c37 Merge "Fix <Report Audio Status> update" 2018-01-18 22:16:39 +00:00
Dan Zhang
6ecaac4c9f Merge "Fix OTP performance with no Vendor ID device" 2018-01-18 22:16:23 +00:00
Dan Zhang
fca5ee0bb8 Merge "Fix NPE by pressing Volume Up/Down" 2018-01-18 22:15:39 +00:00
Dan Zhang
20443a8dbb Merge "Fix illegal volume value issue" 2018-01-18 21:50:10 +00:00
Jeff Sharkey
75d3189444 Add ability to override subscriber capabilities.
In a future set of CLs, NPMS will offer to override a handful of
capabilities on a per-subId basis.  Define a no-op version of the
interface to make it easier to add new methods in the future.

Test: bit FrameworksNetTests:android.net.,com.android.server.net.
Test: bit FrameworksTelephonyTests:com.android.internal.telephony.dataconnection.DataConnectionTest
Bug: 64133169
Change-Id: I03dfd98463861f0338c4174e8d8a88c300ea5b55
2018-01-18 14:46:13 -07:00
Arthur Hsu
524fe66549 Merge "Add config_supportBluetoothPersistedState." 2018-01-18 19:38:32 +00:00
Arthur Hsu
2433baf251 Add config_supportBluetoothPersistedState.
Add a config to indicate whether a device supports Bluetooth persisted
state and defaulted to true. In ARC++, Bluetooth adapter state can be
out-of-sync from its container if the user changes it before the
container being available.

When set to false, this config prevents Android to auto start the
Bluetooth. ARC++ will set this to false and sync Bluetooth state later
with Android.

Related CL is ag/931281

Bug: 62413625, 69965109
Test: On sailfish, Bluetooth on/off correctly and state persisted across reboot
Change-Id: Ie298929eb6b882108a12e8b95f61e3c9f8eb63ea
2018-01-18 19:36:00 +00:00
Treehugger Robot
e1992384e0 Merge "Added APIs for Connection-oriented channels" 2018-01-18 16:42:33 +00:00
David Brazdil
a793f3ff52 Generate new API signatures from doclava
Doclava now generates API signatures of classes and their members
which are not part of the public SDK. Adjust the arguments passed
to Doclava to enable that feature.

Bug: 64382372
Test: m
Change-Id: I47de683dd2b00fce73b82581a13fbe1013ef625f
2018-01-18 10:40:11 +00:00