4084 Commits

Author SHA1 Message Date
Jeremy Joslin
97e711139d Defining a new REQUEST_NETWORK_SCORES permission.
This is intended to be a drop-in replacement for the existing
BROADCAST_NETWORK_PRIVILEGED with a more appropriate name.

Test: Built, ran.
BUG: 33752149
Change-Id: Iebe9d1c12f159bd91953ef094d9866eba9ff925a
Merged-In: I12bdba9694fdf2a2e39990736265919edafd865e
2017-01-04 13:30:07 -08:00
Treehugger Robot
944b017031 Merge "Expose RecommendationRequest.Builder as SystemApi." 2017-01-04 19:42:17 +00:00
Joe LaPenna
010e8b0dc8 Expose RecommendationRequest.Builder as SystemApi.
In order to test our recommender, we need to be able to create
network recommendation requests.

Test: make update-api
Change-Id: I68df0d3e684bcdb90709a34478d2aa669ee23547
Merged-In: I68df0d3e684bcdb90709a34478d2aa669ee23547
2017-01-04 10:15:52 -08:00
Jeremy Joslin
b9a61979cc New permission - BIND_NETWORK_RECOMMENDATION_SERVICE.
Used to protect exported network recommendation services.

Test: Built & ran
BUG:33897544
Change-Id: Icfc566275a8d832449f6358e576784199ab0f7b2
Merged-In: I4f163fb965be6a25201bc3ba5e0032e7652c8f20
2017-01-03 14:19:51 -08:00
Joe LaPenna
5e0164e16c Add simplified_network_settings_bool to CarrierConfig.
Some carriers want to further simplify network settings based on a
variety of wifi or cellular related bundles. Expose a config a
carrier might set to allow SysUi, Settings and platform to adjust.

BUG: 33111931
Test: runtest carrierconfig-unit
Change-Id: I35a7ef15bbba23cf9e0380432fc001804c7e1804
Merged-In: I35a7ef15bbba23cf9e0380432fc001804c7e1804
2016-12-22 11:53:10 -08:00
Treehugger Robot
425af45d02 Merge "Cherrypick: Define the calculateRankingScore method and Key." 2016-12-22 00:03:57 +00:00
Sundeep Ghuman
0d79bdef27 Cherrypick: Define the calculateRankingScore method and Key.
Define the key to be used to store the rankingScoreOffset inside the
ScoredNetwork bundle. Implement a platform API method to calculate the
ranking score for a given rssi.

OCL: ag/1688711

Bug: 33049302
Test: Unit tests
Change-Id: Ia3fea2197d7c211a2313fced8713d79d8d5f4f6e
Merged-In: Ia3fea2197d7c211a2313fced8713d79d8d5f4f6e
Topic: ScoredNetworkRankingScore
2016-12-21 13:57:24 -08:00
Amin Shaikh
3d18c621cb Expose ScanResult#untrusted as a @SystemApi.
- Expose ScanResult#untrusted to inform NetworkRecommendationProviders
  that a ScanResult does not correspond to a saved network.
- Add static construction methods and assertions to RecommendationResult

Test: runtest frameworks-services

Bug: 33490132
Change-Id: If7006040f63843c1c468c9d95c5c017383c5c5dd
Merged-In: If7006040f63843c1c468c9d95c5c017383c5c5dd
2016-12-21 11:46:22 -08:00
Amin Shaikh
d3dfd3b8e9 Make WifiConfiguration#meteredHint a @SystemApi
This allows NetworkRecommendationProviders to set this field on
returned WifiConfigurations.

Test: make
Bug: 33760009
Change-Id: I4d34272a1fb8d88bcc56cf4f00d8beadd06ac603
Merged-In: I4d34272a1fb8d88bcc56cf4f00d8beadd06ac603
2016-12-20 12:46:50 -08:00
Joe LaPenna
68685240f5 Remove "final" from ResultCallback.
Removing final makes providers easier to test using mocks.

Test: Build system image.

Change-Id: Iaaa30f73226e1d0cb0e9e68faa349e86986be72d
Merged-In: Iaaa30f73226e1d0cb0e9e68faa349e86986be72d
2016-12-19 11:25:45 -08:00
Treehugger Robot
441bfc6718 Merge "Make TelephonyManager APIs public:" 2016-12-16 10:29:04 +00:00
Joachim Sauer
9e3b160fc3 Merge "API updated for ICU4J 58.1" 2016-12-15 11:16:41 +00:00
Jeremy Joslin
e7f273d508 Add an IPC for requesting network scores.
Migrating the NetworkScoreManager.requestScores() method to use an
IPC rather than a broadcast.

Defined the new IPC in the AIDL files for NetworkScoreService and
NetworkRecommendationProvider. Added a no-op implementation in
NetworkScoreService and a full implementation in
NetworkRecommendationProvider (plus tests).

Test: adb shell am instrument -e class android.net.NetworkRecommendationProviderTest -w com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner
BUG: 33593157
Change-Id: Iacf7b6d424ec3c57e8b89e5abc6bc3e8414097b9
Merged-In: I951f6186aa11ddbe5a94e374173a1fd40b2a4cce
2016-12-14 09:11:29 -08:00
Polina Bondarenko
a6dba0ab35 Make TelephonyManager APIs public:
TelephonyManager.getSimState(slotIdx) and
TelephonyManager.SIM_STATE_CARD_RESTRICTED.

It is needed for OobConfig app unbundling.

Bug: 33479833
Test: run cts -m CtsTelephonyTestCases
Change-Id: I375f436bc4e1dcedc0656866a0838c7bf5948422
2016-12-13 21:37:01 +01:00
Treehugger Robot
fbeacb02c0 Merge "Make the onRequestRecommendation() method async." 2016-12-13 16:04:36 +00:00
Tobias Thierer
c35137ce36 Merge "API changes for updating Locale to OpenJDK8u60, part 2" 2016-12-13 13:36:08 +00:00
Jeremy Joslin
280f82c312 Make the onRequestRecommendation() method async.
Converted the NetworkRecommendationProvider.onRequestRecommendation()
method into an async call to give implementors more flexibility.

Added unit tests for NetworkRecommendationProvider.

Test: Added NetworkRecommendationProviderTest.
BUG: 32909424
Change-Id: I8c1d2e11baa539744d77a012e85351f750523e3b
Merged-In: Iebe72f260133e9ad1946b0b75e2f69635e154ef3
2016-12-12 17:48:41 -08:00
Przemyslaw Szczepaniak
4ee94a6a9b Merge "Track libcore change 547177ca5c312f84fb22e6e7bf12f54129034e5d" 2016-12-09 10:46:19 +00:00
Stephen Chen
dadf6caf9f DO NOT MERGE: Define API for metering network stats buckets.
This is a continuation of b/26545374, since now we can also set the
metered bit with NetworkScorer. The tracking of metered state changes
will be implemented in a seperate CL.

Bug: 31015360
Bug: 26545374
Test: N/A

(cherry picked from commit 9ac251d1169639c7b955d63b21e80cbc5c394090)

Change-Id: I6a2fcc8577d62daa8823dff9e0128a5cf39ede7b
2016-12-09 13:59:17 +09:00
Tobias Thierer
9fa05c25c9 API changes for updating Locale to OpenJDK8u60, part 2
This adds APIs for RFC 4647 Matching of Language Tags

Bug: 29935305

Test: make update-api

Change-Id: I58fc9481578a63ecd9528a62377fa9414cc836d4
2016-12-08 15:43:37 +00:00
Fredrik Roubert
c7bc38c5e5 API updated for ICU4J 58.1
Bug: 31328818
Test: make
Change-Id: Ifef308acd346704a9d6364fac70967fff08eb599
2016-12-07 20:42:07 +01:00
Przemyslaw Szczepaniak
120e0375e9 Track libcore change 547177ca5c312f84fb22e6e7bf12f54129034e5d
Bug: 29935305
Test: CtsLibcoreTestCases
Change-Id: I8ee39da7d7e0a4e94e3772b6e52068b53755693f
2016-12-07 17:43:43 +00:00
Bill Yi
82834baa35 Merge remote-tracking branch 'goog/stage-aosp-master' into HEAD 2016-12-06 15:17:16 -08:00
Treehugger Robot
800a4e753e Merge "API for requesting network recommendations." 2016-12-06 23:08:03 +00:00
Jeremy Joslin
d1daf6d22a API for requesting network recommendations.
Defining a new system API that will allow the system to request
network recommendations from a NetworkScoreService implementation.

Test: Coming in a future CL.
BUG: 32909424
Merged-In: I2d5c0a843b928b04e87c1862a78702a02fd54c31
Change-Id: Idd33095c6cd2f5b391796c900399f18a2c40fcc3
2016-12-06 12:48:30 -08:00
Stephen Chen
45fdf32038 Merge "Add Settings.Global.NETWORK_RECOMMENDATIONS_ENABLED flag."
am: 70ae1bf4db

Change-Id: If3d13f94a131188ddbebc7a35c82ea357b37e022
2016-12-06 19:20:24 +00:00
Stephen Chen
6a0c879de3 Add Settings.Global.NETWORK_RECOMMENDATIONS_ENABLED flag.
This flag enables the NetworkScoreService.requestRecommendations API,
defined in b/32909424.

Bug: 32913919
Bug: 32909424
Test: runtest --path
frameworks/base/packages/SettingsProvider/test/src/com/android/providers/settings/SettingsProviderTest.java

Change-Id: If592e4a2ec574929aa0c829c39ad4ce9b0317805
2016-12-05 17:01:57 -08:00
Lenka Trochtova
13a0519394 Introduce a new user restriction for disallowing Bluetooth.
Only the device owner will be able to set the restriction
and the restriction will prevent usage of Bluetooth on the
entire device - i.e. in all the users.

Test: cts-tradefed run cts -m CtsDevicePolicyManagerTestCases --test com.android.cts.devicepolicy.UserRestrictionsTest
Test: cts-tradefed run cts -m CtsDevicePolicyManagerTestCases --test com.android.cts.devicepolicy.DeviceOwnerTest#testBluetoothRestriction

Bug: 32895300

Merged-In: I2875cf178cb16eca1965d0ba965d1cd3d8db2ad5

Change-Id: I2875cf178cb16eca1965d0ba965d1cd3d8db2ad5
2016-12-05 11:53:34 +01:00
Lenka Trochtova
f15cf38311 Introduce a new user restriction for disallowing Bluetooth.
Only the device owner will be able to set the restriction
and the restriction will prevent usage of Bluetooth on the
entire device - i.e. in all the users.

Test: cts-tradefed run cts -m CtsDevicePolicyManagerTestCases --test com.android.cts.devicepolicy.UserRestrictionsTest
Test: cts-tradefed run cts -m CtsDevicePolicyManagerTestCases --test com.android.cts.devicepolicy.DeviceOwnerTest#testBluetoothRestriction

Bug: 32895300

Merged-In: I2875cf178cb16eca1965d0ba965d1cd3d8db2ad5

Change-Id: I2875cf178cb16eca1965d0ba965d1cd3d8db2ad5
2016-12-05 10:46:58 +01:00
Stephen Chen
d738140b8d Merge "Add Settings.Global.WIFI_WAKEUP_ENABLED flag."
am: d758ce1586

Change-Id: I1bf1effbb635d57980728555587e8056f630edb9
2016-12-03 04:16:06 +00:00
Stephen Chen
8ca96c1f3c Add Settings.Global.WIFI_WAKEUP_ENABLED flag.
Set the flag default to false. This addition is for the
Android Wi-Fi Snooze project:
https://docs.google.com/document/d/1zewDZ6Ne-qH7zKFDtcSx55f9jPauZwT5VvOs1uVNXf8/edit#

Bug: 32920000
Bug: 32913119
Test: runtest --path
frameworks/base/packages/SettingsProvider/test/src/com/android/providers/settings/SettingsProviderTest.java

Change-Id: I597d5dd643e8044315cc6d7553ae5740485a0552
2016-11-30 18:31:44 -08:00
Stephen Chen
6ef2ec0d80 Merge "Add ACTION_WIFI_SAVED_NETWORK_SETTINGS to Settings."
am: 6e54c31f0a

Change-Id: Ie3b4a3ed5e2858ce2b3446c300c984875201205c
2016-12-01 00:02:58 +00:00
nharold
8fabfd639e Merge "Expose GSM Timing Advance, Update LTE TA docstring"
am: 4134ccb214

Change-Id: Ic60953cebd3209b1320ed4b6723809d0421ebc27
2016-12-01 00:00:09 +00:00
Jordan Liu
cee0c941ed resolve merge conflicts of a578ae2 to stage-aosp-master
Change-Id: I344ce44711edee385c64de4e6c52c64e6901820d
2016-11-30 15:08:13 -08:00
Treehugger Robot
6e54c31f0a Merge "Add ACTION_WIFI_SAVED_NETWORK_SETTINGS to Settings." 2016-11-30 20:25:13 +00:00
nharold
4134ccb214 Merge "Expose GSM Timing Advance, Update LTE TA docstring" 2016-11-30 18:00:35 +00:00
Jordan Liu
a578ae2aa1 Merge "Add KEY_ONLY_SINGLE_DC_ALLOWED_INT_ARRAY" 2016-11-30 17:42:31 +00:00
Stephen Chen
767e453cdf Add ACTION_WIFI_SAVED_NETWORK_SETTINGS to Settings.
Exposes an activity that deep links into saved network Settings.

Bug: 32738882
Test: gts test
Change-Id: Ic639b7543439bbe52941fa58a74a767a4a0f8a76
2016-11-28 16:26:16 -08:00
Przemyslaw Szczepaniak
d771b36951 Merge "Track libcore change Ib691c81b158ec37419a903bfa4261a12139fbff7"
am: caa816451c

Change-Id: I43c66260714bb312e270bfbae1c74047e6ef01e4
2016-11-17 15:41:57 +00:00
Przemyslaw Szczepaniak
caa816451c Merge "Track libcore change Ib691c81b158ec37419a903bfa4261a12139fbff7" 2016-11-17 15:28:53 +00:00
Tyler Gunn
8b58e73c48 Merge "Add CAPABILITY_SUPPORTS_VIDEO_CALLING to PhoneAccount."
am: 8223dc1ae9

Change-Id: Id8c6077d099f9ef943c09242acb22173b6628c1a
2016-11-14 18:08:11 +00:00
Tyler Gunn
8223dc1ae9 Merge "Add CAPABILITY_SUPPORTS_VIDEO_CALLING to PhoneAccount." 2016-11-14 16:23:43 +00:00
Jack Yu
3cfa510779 Merge "Expose getters for RSRP, RSRQ, RSSNR, and CQI in CellSignalStrengthLte. Regenerate api accordingly. BUG: 32609966 Test: CTS Testing new API"
am: 4469e48d5c

Change-Id: Id92b8eaeec12885af3748d1e839da1a5560e2619
2016-11-11 19:51:23 +00:00
Tyler Gunn
58cbd7a9c7 Add CAPABILITY_SUPPORTS_VIDEO_CALLING to PhoneAccount.
Adding companion PhoneAccount capability which is used to indicate when a
PhoneAccount supports video calling.  That is, whether it can potentially
make video calls, but not necessarily at the current time.

This is an often requested OEM enhancement which is used to drive UX (e.g.
imagine a video calling icon showing up if the device supports video, but
only being enabled when the device is in range of a VT capable tower).

See bug for reference to design doc.

Merged-Id: I38379a3a1cf1be04c6136b89b93ee95193ee7b6f
Bug: 27328615
Test: Manual
Change-Id: I08fc18950e6d35a8a7df47ce37aa2326624b9fd3
2016-11-11 19:43:57 +00:00
Jack Yu
4469e48d5c Merge "Expose getters for RSRP, RSRQ, RSSNR, and CQI in CellSignalStrengthLte. Regenerate api accordingly. BUG: 32609966 Test: CTS Testing new API" 2016-11-11 19:41:46 +00:00
Ta-wei Yen
969a6eb2b8 Merge "Add createForPhoneAccountHandle() and getServicetate() Respect TelephonyManager's subId when listening to phone state"
am: 0a3b6b70dd

Change-Id: I512e68bccda115ad7c58ec1f1fbfbb2c69c86578
2016-11-10 22:02:17 +00:00
Nathan Harold
90bc8e30ad Expose GSM Timing Advance, Update LTE TA docstring
-Expose the GSM timing advance
-Add a spec reference to the LTE Timing Advance

Bug: 28910982
Test: None
Change-Id: I7573dbb1316a2ab52051072ebad2532601f4299c
2016-11-10 13:00:21 -08:00
Ta-wei Yen
05f9112d15 Add createForPhoneAccountHandle() and getServicetate()
Respect TelephonyManager's subId when listening to phone state

TelecomManager perfers to use a PhoneAccountHandle to represent a
account but TelephonyManager prefers subscription IDs.

This CL added createForPhoneAccountHandle() in TelephonyManager so
telephony values can be queried from it.

Currently the ServiceState can be retrieved through registering a
PhoneStatelistener, but it is a callback which the handler cannot be
specified.

getServiceState() is added to allow the ServiceState to be polled.

While TelphonyManager has createForSubscriptionId(), listen() does not
respect the subId on the manager created from it, and will always use
the hidden subId on the listener, which is always the default subId
through public API.

After this CL, the default subId on the listener will null.
TelephonyManager use its' own subId if the listener does not set the
subId to something else.

Bug: 32637799
Bug: 32414216
Test: cts-tradefed run cts-dev --module CtsTelephonyTestCases
Change-Id: I9995e4da1573cf1f6b6e4acf2daf7a538fb60d5f
2016-11-10 12:11:56 -08:00
Kevin Su
211c1c2ca8 Expose getters for RSRP, RSRQ, RSSNR, and CQI in CellSignalStrengthLte.
Regenerate api accordingly.
BUG: 32609966
Test: CTS Testing new API

Change-Id: I2603fc0001f31ff23f02f4fdf2a72b33f2750a4c
2016-11-09 13:27:20 -08:00
Jordan Liu
d109a6b2cd Add KEY_ONLY_SINGLE_DC_ALLOWED_INT_ARRAY
Add the key to CarrierConfigManager and remove the old configs which are
no longer needed.

Bug: 29873049
Change-Id: I2197cabca2addbbbe15f0f13985a6f5d8794d64a
Merged-In: I2197cabca2addbbbe15f0f13985a6f5d8794d64a
2016-11-08 11:15:20 -08:00