344344 Commits

Author SHA1 Message Date
Treehugger Robot
4b0172bcb6 Merge "Obtain cellular related battery statistics" 2018-03-06 18:19:20 +00:00
Treehugger Robot
b06de7892a Merge "Accounts: Fix TokenCache maps access" 2018-03-06 17:45:25 +00:00
Treehugger Robot
c18b175d87 Merge "Update the RTT features constant." 2018-03-06 16:07:16 +00:00
Treehugger Robot
8796d95475 Merge "Camera: Fix map access" 2018-03-06 16:04:24 +00:00
Tobias Thierer
97bb6cf371 Remove com.android.internal{.util} from generated documentation.
com.android.internal.* is meant to be hidden from documentation,
but most of it is erroneously not hidden via @hide or -hidePackage
directives; why documentation is currently generated for Predicate
but not other classes from com.android.internal.util, and why some
but not all classes from that package show up in package-level
documentation (package-summary.html), is not currently understood.

There appears to be a behavior difference between OpenJDK 8 and
OpenJDK 9's javadoc that results in additional classes showing up
in package-summary.html. This CL fixes this by adding -hidePackage
directives for com.android.internal{.util}; other sub-packages of
com.android.internal do not currently show up in documentation and
are not touched by this CL.

Test: Patched this CL into the internal-master branch and ran:
      USE_R8=true EXPERIMENTAL_USE_OPENJDK9=true make offline-sdk-docs
      Checked that this removes all documentation for com.*
      (com.android.internal.util was the only com.* package for which
      documentation was previously generated).
      In other words: Before this CL, [1] existed, but after
      this CL, the entire directory subtree [2] does not exist.
Test: Checked that Predicate was already missing from stubs before this
      CL. In other words, [3] already did not exist before this CL.

[1] out/target/common/docs/offline-sdk/reference/com/android/internal/util/Predicate.html
[2] out/target/common/docs/offline-sdk/reference/com
[3] out/target/common/obj/JAVA_LIBRARIES/android_system_stubs_current_intermediates/classes/com

Bug: 69736344
Bug: 69736236

Change-Id: I3243e2820348c338a54e42c72d29bed71389a6c4
2018-03-06 12:05:28 +00:00
Pete Gillin
cc5885f92b Add new 'explicit GC' policy to StrictMode.
This change adds the policy but offers no public way to enable it. A
follow-up change will expose the detect/permit methods in the API and
change detectAll to enable it.

This new policy can only be triggered through the libcore BlockGuard API.

Bug: 3400644
Test: cts-tradefed run cts-dev -m CtsLibcoreTestCases
Test: cts-tradefed run cts-dev -m CtsOsTestCases
Change-Id: I2e7f34ce010c78d6a5a7ac85512c045bfb13d204
Merged-In: Ieebe4db747902246968d6382bbc9cee0e539af85
2018-03-06 11:17:07 +00:00
Remi NGUYEN VAN
6bd13af46a Merge "Allow null subscriberId in NetworkStatsManager." 2018-03-06 06:52:35 +00:00
Andreas Gampe
b59365c3db Camera: Fix map access
Found by Errorprone.

Bug: 73288226
Test: m javac-check-SmartCamera RUN_ERROR_PRONE
Change-Id: I6f6105f5d4a6ed5d28262bcdcd83764e6e8d5544
2018-03-05 21:52:27 -08:00
Treehugger Robot
be04ebd707 Merge "Connectivity: Fix map access" 2018-03-06 05:39:39 +00:00
Remi NGUYEN VAN
489e8b02f8 Allow null subscriberId in NetworkStatsManager.
Use a MATCH_MOBILE_WILDCARD template to avoid filtering by
subscriberId when querying statistics from NetworkStatsService.

Bug: 74038898
Change-Id: I4b39e7031416cb33b23d89aa36ff0f774eaa942f
Fixes: 74038898
Test: runtest frameworks-net, CTS tests pass
2018-03-06 13:28:19 +09:00
Andreas Gampe
cbac1e489a Accounts: Fix TokenCache maps access
Found by Errorprone.

Bug: 73288226
Test: mmma frameworks/base/services
Change-Id: I203745415cbad6fad6f72008fc5632086d2a4505
2018-03-05 18:25:18 -08:00
Treehugger Robot
6455e31b76 Merge "Minor cleanups to NetworkStats interface tracking." 2018-03-06 02:18:39 +00:00
Hall Liu
b376f02260 Merge "Add an app-ops check when registering for location" 2018-03-06 02:14:45 +00:00
Andreas Gampe
3ba8106c23 Connectivity: Fix map access
Found by Errorprone.

Bug: 73288226
Test: mmma frameworks/base/services
Change-Id: I63edad58dbc909c1e772bde85a1b9dd98c551fb1
2018-03-05 17:23:07 -08:00
Nan Zhang
172875bdd2 Convert api-stubs, system-api-stubs, and test-api-stubs target
The output generate a .srcsjar instead of a directory of java files.

Bug: b/70351683
Test: compare source-file-list, and ninja rule.

Change-Id: I987601c4baa6f94b5208d3d4106cf60323329af8
2018-03-05 16:23:50 -08:00
Holly Jiuyu Sun
af50f16944 Remove toString() for CarrierIdentifier.
We may get NPE if mCarrierIdentifier is null. + should convert it to
string by itself.

Test: test on phone
Change-Id: Ibd352d6d2a9b0cb33a494d108eb0d3a7c1dbc61b
2018-03-05 16:07:37 -08:00
Treehugger Robot
95372e873e Merge "Bluetooth: Use enums for adapter connection states" 2018-03-05 23:16:21 +00:00
Treehugger Robot
84bda3a709 Merge "DO NOT MERGE Dummy StatsLog class" 2018-03-05 23:14:48 +00:00
Chen Xu
f01600d5f9 Merge "API review: rename CarrierIdentification to Carrier id" 2018-03-05 22:59:21 +00:00
Treehugger Robot
6ec103c746 Merge "Bluetooth: Enable Multi-A2DP/HFP support for up to 5 devices" 2018-03-05 20:32:37 +00:00
Treehugger Robot
2fa0f7964f Merge "Move SignalDrawable to SettingsLib so every can enjoy it" 2018-03-05 20:10:37 +00:00
Hall Liu
a11503509e Add an app-ops check when registering for location
In TelephonyRegistry, check to make sure that the user hasn't turned off
the app-ops bit when an app tries to register for location-based updates

Change-Id: I51360fe772d9c3f8c2c9628dba28acc009ee6173
Fixes: 73558651
Test: manual, using testapp
2018-03-05 11:37:25 -08:00
Jack He
ee81f99150 Bluetooth: Use enums for adapter connection states
Bug: 69478930
Test: make, no user visible change
Change-Id: I999d0c445fe3b24aca72961c40c3428901542bc1
2018-03-05 11:23:31 -08:00
Cassie
08941a5f3e Cherrypick "Add device config to decide which Auto Selection Network UI to use."
This change added the config because the HAL V_1_2 only supports Pixel 3, and the new Auto
Selection Network UI is based on HAL V_1_2. So we set the flag to decide which Auto Selection
Network UI should be used based in the device type.

Bug: 63718613
Test: Basic telephony sanity
Merged-In: I6b54db63b318564983ae11cffaf7fc27df71b060
2018-03-05 19:21:13 +00:00
Sandeep Gutta
9dc1a9c07a Telephony(MSIM): Default NW mode property for each slot
For dual SIM devices, add provision to configure different default
Network modes for each slot, using the existing system property to
configure this default network modes.

Bug: 28384694
Test: manual - Checked different default NW mode can be set
for each slot.
Change-Id: I72b11522cb51a425e28ddc407014387a20cb2cd7
2018-03-05 13:19:29 +00:00
Erik Kline
b331b02da9 Merge "Fail if the interface is not available when starting" 2018-03-05 12:39:28 +00:00
Erik Kline
b152cd0aa4 Fail if the interface is not available when starting
Addresses a long-standing TODO.  Now, when calling IpClient's
startProvisioning(), the interface has to be available (i.e.
InterfaceParams#getByName() must return non-null).

Also:
    - add a test
    - refactor for testability
    - delete some constructors no longer used
    - properly handle passed-in null IpClient.Callback
    - some more IpManager -> IpClient renaming
    - permit recording metrics before starting a provisioning
      attempt (logging immediate errors) without Log.wtf().

Test: as follows
    - built
    - flashed
    - booted
    - runtest frameworks/opt/net/wifi/tests/wifitests/runtests.sh passes
    - runtest frameworks-net passes
    - basic WiFi IpClient connections works fine
Bug: 62476366
Bug: 73487570
Change-Id: Ic83ad2a65637277dcb273feb27b2d1bb7a11eb2b
2018-03-05 19:29:26 +09:00
Treehugger Robot
0b8d55e633 Merge "Add DNS_TETHER to the list of UIDs in the framework." 2018-03-05 07:40:36 +00:00
Lorenzo Colitti
2df4c7d722 Minor cleanups to NetworkStats interface tracking.
Currently, when a network goes into CONNECTED state, we call
updateLinkProperties and then notifyIfacesChangedForNetworkStats.
The latter is unnecessary, as there are exactly two cases:

1. networkAgent.linkProperties != null: updateLinkProperties will
   call notifyIfacesChangedForNetworkStats, because oldLp is null
   and networkAgent.linkProperties is not null.
2. networkAgent.linkProperties is null: there is no need to call
   notifyIfacesChangedForNetworkStats, because no interfaces were
   added or removed. When they are, updateLinkProperties will be
   called again.

Removing the call to notifyIfacesChangedForNetworkStats avoids
a stats poll, which is a minor performance improvement.

Also, remove the NetworkStatsService code to do asynchronous
interface updates, since it has no callers.

Bug: 72107146
Test: builds, boots
Test: runtest frameworks-net
Change-Id: I9337ea26c0505a1c66ceda01254b68e25cd7972c
2018-03-05 15:48:23 +09:00
Jack He
48574ae233 Bluetooth: Enable Multi-A2DP/HFP support for up to 5 devices
* Set config_bluetooth_max_connected_audio_devices to 5

Bug: 64767509
Test: runtest -j32 bluetooth
      connect and disconnect to multiple headsets and car kits
      TestTracker/146725

Change-Id: I211c5683490fd4be00d3379e11e843081c6fb3a6
2018-03-03 22:36:18 +00:00
Treehugger Robot
1451124f86 Merge "Add config to show an alert dialog for video charges" 2018-03-03 03:30:19 +00:00
nharold
d5ba391425 Merge changes from topics "cdma-null-island", "cdma-signal-strength"
* changes:
  Set CDMA Location to Invalid if on Null Island
  Fix Range-Checking in CellSignalStrengthCdma
  Fix CDMA Range Checks for SignalStrength
2018-03-03 03:14:22 +00:00
yinxu
1abe9b187c Address the API review comments.
Bug:73750871
Test: Unit Test
Change-Id: I8ebb617c819c7604957b3c086098ef5074d70f78
2018-03-02 17:21:36 -08:00
nharold
a60e42cc2d Merge "Expose Carrier Name Override CarrierConfig Values" 2018-03-03 00:11:29 +00:00
Tyler Gunn
9d12773b51 API Documentation and Constant cleanup.
1. Update handover API docs for clarity.
2. Added an unknown value per API review comments.
3. Renamed HANDOVER_FAILURE_DEST_USER_REJECTED to
HANDOVER_FAILURE_USER_REJECTED
3. Removed the HANDOVER_FAILURE_DEST_INVALID_PERM constant since it isn't
used (methods which deal with permissions throw security exceptions).

Test: Make doc and verify documentation.
Change-Id: Id21d6b4c83d5c773ab38d78eb6b1886a1ac4dadf
Fixes: 73751004
Fixes: 73750515
Fixes: 73750817
2018-03-02 15:45:51 -08:00
Tomita, Ryounosuke X
f99e1c8e76 Customize the WCDMA signal strength based on RSCP
Determines the the display level of WCDMA signal bar based on RSCP
according to carrier config.

Test: manual - Checked that the WCDMA signal bar thresholds can be
controlled by carrier config.
Test: auto - Passed SignalStrengthTest and ServiceStateTrackerTest
Bug: 71329173
Change-Id: Ib9e1c29fbe3553d1cc6695953be1c33daf260627
2018-03-02 15:35:08 -08:00
fionaxu
4281d0ff57 API review: rename CarrierIdentification to Carrier id
Bug: 73953797
Test: unit test
Change-Id: Id89c9100e8963a3cb890ebec347e4aabcd5fd4b8
2018-03-02 15:24:49 -08:00
Cassie Han
d622eacb9e Merge "Expand use of 'Str' suffix in CellIdentity to 'String'" 2018-03-02 22:15:56 +00:00
Tej Singh
f800220ac8 DO NOT MERGE Dummy StatsLog class
This is a dummy class that provides StatsLog.write methods and
appropriate constants to log atoms in aosp.

Test: build success on Marlin
Change-Id: I606bc8a96337ced842eb7a2bcba8c4969c9d4748
2018-03-02 13:34:37 -08:00
Siddharth Ray
073f5de149 Obtain cellular related battery statistics
API to obtain cellular battery stats for power
drain diagnostics.

Test: Manual

BUG:67647477
Merged-In: Iffdb1471cd55847b6454313c94497ab2cd6533cc
Change-Id: Iffdb1471cd55847b6454313c94497ab2cd6533cc
2018-03-02 20:06:18 +00:00
Treehugger Robot
d846adac83 Merge "Extend network request to query networks w/o capabilites" 2018-03-02 19:04:31 +00:00
Holly Jiuyu Sun
45277c7aca Merge "Add result code for eUICC card not found." 2018-03-02 19:01:41 +00:00
Chalard Jean
6001f72478 Merge "Give apps with NETWORK_SETTINGS right to see any VPN." 2018-03-02 11:52:15 +00:00
Chalard Jean
20013384dc Merge "Give VPNs the INTERNET capability when they route most of the IP space" 2018-03-02 11:18:10 +00:00
Chalard Jean
b552c4655f Give apps with NETWORK_SETTINGS right to see any VPN.
...not only the ones that apply to them.

Bug: 73217368
Test: runtest frameworks-net and CTS
Change-Id: I436972a3e51e98bdd815771b451bcedadf684763
2018-03-02 17:10:11 +09:00
Chalard Jean
adbf1d029b Give VPNs the INTERNET capability when they route most of the IP space
Test: manual, plus wrote some new tests for this
Bug: 72765718
Change-Id: I9759da72b752fd8eeb1d0647db9ab341f04c0528
2018-03-02 16:20:22 +09:00
Nathan Harold
8366bcb8b8 Expose Carrier Name Override CarrierConfig Values
These CarrierConfig values are needed for a
CC app to override the SPN dynamically. Since
Carrier names are very complicated, it's extra
important that these values be exposed so that we
can properly enforce correct behavior through CTS.

Bug: 73734601
Test: compilation (no functional change)
Change-Id: I26dab1bd32d1d5273f707a37026cffca7fd639a3
2018-03-01 19:10:28 -08:00
Pavel Maltsev
86ec08d820 Minor clean-up in NetworkCapabilities
Follow up clean up for aosp/606338

Bug: 72828388
Test: frameworks/base/tests/net/ -c android.net.NetworkCapabilitiesTest
Change-Id: I2d2cfeb51caaa339602f7d97ffffed6e4cfad432
2018-03-01 18:06:25 -08:00
Pavel Maltsev
1cd48dae22 Extend network request to query networks w/o capabilites
Add another bit mask into NetworkCapabilities class that represents
unwanted capabilities and corresponding methods to add and remove them.

Bug: 72828388
Bug: 68762530

Test: runtest -x frameworks/base/tests/net/
Change-Id: Ie291167eb74fdb696c7ee145c8cc46ea8115d6ba
2018-03-01 17:52:02 -08:00
Hall Liu
6b0e7370e2 Merge "Remove cell info from legacy apps without location on" 2018-03-02 00:49:33 +00:00