277400 Commits

Author SHA1 Message Date
Hugo Benichi
ad4db4ed58 ConnectivityServiceTest: remove flaky waitForIdle test.
This patch removes testNotWaitingForIdleCausesRaceConditions() from
ConnectivityServiceTest because it is in nature flaky and prevents using
ConnectivityServiceTest as a patch presubmit check. Estimated failure
rate is 1/15 on Nexus 6p.

This patch also simplifies how ConnectivityServiceTest waits for
handlers to become idle by removing IdleableHandlerThread and turning it
into a signle static method.

Test: $ runtest frameworks-net
Bug: 31479480
Change-Id: I2d78709cbb61d5d01cd59cff326469417f73f1ab
2017-01-24 15:22:48 +09:00
Hugo Benichi
dfb559a363 ConnectivityServiceTest: fix flaky tests
This patch adjusts timeouts in ConnectivityServiceTest to fix tests
known to fail spruriously.

Test: ran the following tests 500 times without observing any failure
 - testBackgroundNetworks()
 - testMultipleLingering()
 - testPacketKeepalives()
 - testSatisfiedNetworkRequestDoesNotTriggerOnUnavailable()
 - testSatisfiedThenLostNetworkRequestDoesNotTriggerOnUnavailable()
Bug: 32561414
Change-Id: I184fe7189aac768a65b927cc42eefaf8b1b3f930
2017-01-24 15:21:18 +09:00
Erik Kline
5645af4e2a All upstream mobile connection management is now in UpstreamNetworkMonitor
Test: as follows
    - built (bullhead)
    - flashed
    - booted
    - runtest frameworks-net passes
Bug: 32163131

Change-Id: Ifbd430d5bf2d2191469c9810ad8f073506abde46
2017-01-24 14:11:51 +09:00
Chen Xu
9fc8d99c76 Merge "support suw and post-suw cases for default app" 2017-01-24 02:30:58 +00:00
fionaxu
72ee500527 support suw and post-suw cases for default app
- our default carrier actions might not compatible with suw since data might be disabled
without surfacing users with an option to activate inside SuW.
- instead, skip carrier actions during setupwizard and schedule a job to resume carrier actions if needed when exit suw.
- use jobscheduler to monitor provision bit instead of keep the app running and listen for content change asynchronously.

Bug: 30958215
Test: Manual

Change-Id: Ie4004b46405b914158f585059d332f4e694053f3
2017-01-23 16:28:39 -08:00
Treehugger Robot
edadb3efc3 Merge "Mark the INetworkScoreCache as oneway." 2017-01-23 21:22:10 +00:00
Brad Ebinger
d1ab15a1af Merge "Deprecate old TelecomManager actions" 2017-01-23 19:09:12 +00:00
Jeremy Joslin
84fae83f8c Mark the INetworkScoreCache as oneway.
Test: built & run
Bug: 34522097
Change-Id: I7d2075febe6c3cdc24b56df255f8ba59e13322bf
2017-01-23 10:51:41 -08:00
Treehugger Robot
24218db904 Merge "LocalDisplayAdapter: don't crash when no color modes available" 2017-01-23 17:25:11 +00:00
Treehugger Robot
6d064d8780 Merge "Make TelephonyManager#get/setAllowedCarriers system api" 2017-01-23 17:01:25 +00:00
Robin Lee
63c14e0ab6 Merge "Disable always-on VPN in factoryReset" 2017-01-23 16:40:07 +00:00
thecrazyskull
b34c8104cb LocalDisplayAdapter: don't crash when no color modes available
Test: none

Change-Id: Ic11b5b66864fdd97b290722cba534b2aa38ac054
2017-01-23 09:52:22 -06:00
Erik Kline
5a45170f95 Merge "Move TetheringConfiguration out to its own file" 2017-01-23 10:56:36 +00:00
Erik Kline
79868f8c57 Move TetheringConfiguration out to its own file
Test: as follows
    - built (bullhead)
    - flashed
    - booted
    - runtest frameworks-net
    - vanilla tethering works
        - changing from no dun requirement to dun shows dun required
Bug: 32163131

Change-Id: I488449570dff057311b37335923ce6a199b363b7
2017-01-23 19:54:00 +09:00
Treehugger Robot
7f018500dc Merge "Add test for updateMobileRequiresDun()" 2017-01-23 10:44:20 +00:00
Erik Kline
973c7df054 Add test for updateMobileRequiresDun()
This test validates that when a mobile upstream has been requested
changing the "DUN required" state results in updating the requested
network appropriately.

Test: as follows
    - built
    - flashed
    - booted
    - runtest frameworks-test passes
Bug: 32163131

Change-Id: Ia3a1f6493ea348eb75e334344468a980206f618f
2017-01-23 17:47:22 +09:00
Treehugger Robot
1b2a1b911d Merge "More concisely export whether we have a "tetherable configuration"" 2017-01-23 07:04:22 +00:00
Erik Kline
d781fbad3f More concisely export whether we have a "tetherable configuration"
Test: as follows
    - built (bullhead)
    - flashed
    - booted
    - runtest frameworks-net passes
    - vanilla WiFi-to-mobile tethering works
Bug: 32163131
Change-Id: I20dd36b5bf7fc55a639c76ea4bdb55b650654881
2017-01-23 13:04:28 +09:00
Treehugger Robot
b3b665de22 Merge "Add Setting for curating saved open networks." 2017-01-21 05:17:41 +00:00
Erik Kline
8d35276910 Merge "Move several config elements into TetheringConfiguration class" 2017-01-21 04:49:11 +00:00
Erik Kline
9c3a298748 Merge "Address a few unittest comments." 2017-01-21 04:36:28 +00:00
Sanket Agarwal
a3ae5c4e24 Change HFP Client API to support multi device
- Adds BluetoothDevice as a parameter where required
- Gets rid of device management APIs that can be done via
  BluetoothProfiles instead

Test: Manual sanity tests
Bug: b/33554547
Bug: b/30984220
Change-Id: I3485ac5bfe1fcb29c774ad040fdd608e1cacb8df
(cherry picked from commit 039eeb81b5ceb5a7141ae852346e054348ac2a06)
2017-01-20 19:30:35 -08:00
Amin Shaikh
8533622ae7 Add Setting for curating saved open networks.
Bug: 34392914
Test: make
Change-Id: Icd17753af6b0efdb35d1060b16029a53fdf4e605
Merged-In: Icd17753af6b0efdb35d1060b16029a53fdf4e605
2017-01-20 18:31:56 -08:00
Treehugger Robot
b8f0e69ef0 Merge "Add additional fields to RecommendationRequest." 2017-01-20 23:04:55 +00:00
Rebecca Silberstein
10c514d9de Merge "SystemServer: reorder wifi services start" 2017-01-20 22:51:36 +00:00
Jeff Sharkey
a2ef6b5741 Merge "Add Binder support for Parcelable exceptions." 2017-01-20 22:45:04 +00:00
Amin Shaikh
b50ade8bb0 Add additional fields to RecommendationRequest.
- Add networkId and timestamp for the last user selected network

Bug: 34467596
Test: runtest --path core/tests/coretests/src/android/net/RecommendationRequestTest.java
Change-Id: Ic81c1beede1a643cd428b6e5c57ed430a6b1ccc0
Merged-In: Ic81c1beede1a643cd428b6e5c57ed430a6b1ccc0
2017-01-20 09:37:59 -08:00
Joachim Sauer
c67148da85 Expose more ICU4J APIs.
Expose more classes/methods, mostly those added in ICU4J 57.

Additionally EthiopicCalendar is now un-hidden which was hidden
accidentally and should have been in N.

Bug: 30825380
Test: m checkapi
Change-Id: Ib3bea26a9b246401d33cc0ccc0f91768d1fe1286
2017-01-20 14:06:09 +00:00
Erik Kline
35eee13df4 Address a few unittest comments.
Test: as follows
    - built (bullhead)
    - flashed
    - booted
    - runtest frameworks-net passes
Bug: 32163131
Change-Id: I8f6002243031dceff60b3d6d377b9e25f239eb23
2017-01-20 19:13:20 +09:00
Erik Kline
3e7566572e Move several config elements into TetheringConfiguration class
Encapsulate the following config elements:
    - all interface name regular expressions
    - specification of preferred upstreams
    - downstream DHCPv4 ranges
    - default IPv4 (and IPv6) DNS servers

Test: as follows
    - builds
    - flashed (bullhead)
    - runtest frameworks-net passes
Bug: 32163131
Change-Id: Ife4871c0b89d2d52e2cc9238e0606b428287521c
2017-01-20 19:12:38 +09:00
Treehugger Robot
a12217012e Merge "Refactor to SimChangeListener class" 2017-01-20 10:05:51 +00:00
Treehugger Robot
e7cb6c3761 Merge "Address comments from previous change (320592)" 2017-01-20 09:57:27 +00:00
Treehugger Robot
e7128b10a8 Merge "Don't loop forever on zero-length ICMPv6 ND options." 2017-01-20 08:47:17 +00:00
Erik Kline
54cb4c5800 Refactor to SimChangeListener class
Test: as follows
    - built (bullhead)
    - flashed
    - booted
    - runtest frameswork-net passes
    - tested wifi-to-mobile tethering, including SIM remove/insert
Bug: 32163131
Change-Id: I6aac9a8f34cfd0079a4433471ec08b9b1ec0d754
2017-01-20 17:10:00 +09:00
Hugo Benichi
216a4e7655 Merge "DO NOT MERGE Unit tests for NetworkNotificationManager" 2017-01-20 07:44:30 +00:00
Erik Kline
efdd3f4ce0 Address comments from previous change (320592)
Test: as follows
    - built (bullhead)
    - flashed
    - booted
    - runtest frameworks-net passes
    - vanilla wifi-to-mobile tethering works
Bug: 32163131

Change-Id: I8788cb0d93606a2893c3dbc4f22e72f450f319b8
2017-01-20 16:31:29 +09:00
Lorenzo Colitti
1eda5b25ce Don't loop forever on zero-length ICMPv6 ND options.
Bug: 33828433

(cherry picked from commit 2f157c421a9fa15660b8f1bc0c64b1ebb45fa64a)

Change-Id: Icc03f0fcbf40d87e0b9c69e1172802ffcc85531b
2017-01-20 15:48:21 +09:00
Erik Kline
73a57bb9da Merge "BroadcastReceiver refactoring" 2017-01-20 06:23:36 +00:00
Hugo Benichi
55b5f0f9eb DO NOT MERGE Unit tests for NetworkNotificationManager
Test: new unit test, no functional changes.
Bug: 32198726

(cherry picked from commit 74264329da5c52fbbafc1d20457056fdeabe19dc)

Change-Id: I123de68de9ae353b95edce89eb570cfbb5f8d9a3
2017-01-20 15:08:38 +09:00
Erik Kline
2e88b5e674 BroadcastReceiver refactoring
All registerReceiver() calls now specify to be run on the tethering
master state machine's handler. Eventually, some of the locking might
be removed (requires careful review, later).

Also: slightly refactor StateReceiver for readability

Test: as follows
    - built (bullhead)
    - flashed
    - booted
    - runtest frameworks-net passes
    - vanilla tethering from WiFi to mobile works
Bug: 32163131
Change-Id: I39844f6e1608179ebeb41668a6db8a4e44d30ecf
2017-01-20 13:06:03 +09:00
Chen Xu
bfdce89f36 Merge "Initial change on carrier signal filtering" 2017-01-20 03:16:52 +00:00
wonyoung.lee
17e1d9844d unbindBackupAgent and initialize inFullBackup
the package has full backup failed (transport rejected) and broadcast discarded by app.inFullBackup

Test: example package : com.lge.clock
      1) push txt file over 25Mb size to data/data/com.lge.clock/shared_prefs/
      2) adb shell bmgr fullbackup com.lge.clock
      3) fullbackup failed by quota_exceeded and not happened alarm receive.

Change-Id: Ic475abb0fe779757dc3d7949cf52977ab8760a04
2017-01-20 02:18:27 +00:00
Treehugger Robot
b5b00857eb Merge "Check for REQUEST_NETWORK_SCORES instead of BROADCAST_NETWORK_PRIVILEGED." 2017-01-20 02:00:42 +00:00
Treehugger Robot
00514f1dc0 Merge "Pass more data through the recommendation request." 2017-01-20 01:44:20 +00:00
Jeremy Joslin
c4982553b9 Check for REQUEST_NETWORK_SCORES instead of BROADCAST_NETWORK_PRIVILEGED.
Test: runtest frameworks-services -c com.android.server.NetworkScoreServiceTest
BUG: 33752149
Change-Id: I559e8f47c5edb491ea7cd0d03010736c81fcee9b
Merged-In: If261cf25c227eeeb4155e43afd9354e6ff8df3b4
2017-01-19 16:21:25 -08:00
Jeremy Joslin
122957b0b0 Pass more data through the recommendation request.
Expanding the API so it can accept the WiFi config of the currently
connected network (if any) and the set of connectable WiFi
configurations. Also renamed currentRecommendedWifiConfig to
defaultWifiConfig so the name was more representative of the
parameter's purpose and added more documentation throughout.

Test: adb shell am instrument -e class android.net.RecommendationRequestTest -w com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner
Test: adb shell am instrument -w com.android.networkrecommendation.tests/android.support.test.runner.AndroidJUnitRunner
Test: runtest frameworks-services -c com.android.server.NetworkScoreServiceTest
Bug: 34387385
Change-Id: Ib8c3cab8f92b5c9da806070d32412f688690f82f
Merged-In: I1089b70303b0396def7e6bf3737fdc67e40c9dcd
2017-01-19 16:14:21 -08:00
Treehugger Robot
f48d0bb2dc Merge "Have requestRecommendation return a CompletableFuture." 2017-01-19 23:25:51 +00:00
Treehugger Robot
f604580a58 Merge "Replace the RequestRecommendationCaller if the timeout changes." 2017-01-19 23:02:53 +00:00
Treehugger Robot
5d942c1352 Merge changes I6ff80178,I03875cf1,I8d210b68
* changes:
  New setting for recommendation request timeout.
  Implemented the async recommendation request call.
  Async network recommendation requests.
2017-01-19 22:55:16 +00:00
Treehugger Robot
a5f968806e Merge "Fix clipping for date and time on QS" 2017-01-19 22:17:35 +00:00