277427 Commits

Author SHA1 Message Date
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
Jeremy Joslin
88f50a5a08 Have requestRecommendation return a CompletableFuture.
Reworked the new requestRecommendation call to return a
CompletableFuture instead of using a custom callback.

Test: runtest frameworks-services -c com.android.server.NetworkScoreServiceTest
Bug: 33784158
Change-Id: Ib12f0674d45ad6e2e21449bc3665467b3c20f49d
Merged-In: If24a94eb6289cb1952052b2cc3bc7856ce2192a5
2017-01-19 13:31:16 -08:00
Jeremy Joslin
8b9226b487 Replace the RequestRecommendationCaller if the timeout changes.
The timeout associated with a TimedRemoteCaller can't be changed
after creation so we have to create a new instance anytime the
timeout changes (which shouldn't be too often). The instance is
stored and retrieved from an AtomicReference to avoid concurrency
issues.

Test: runtest frameworks-services -c com.android.server.NetworkScoreServiceTest
Bug: 34060959
Change-Id: I52f5d617feb9b3536ff3474b5d032113e3caea5c
Merged-In: I1662ac27f7442a16d2ffd7257469f1983b7f0e5c
2017-01-19 13:25:50 -08:00
Rebecca Silberstein
4c937464eb Merge "SystemServer: cherry-pick p2p service start" 2017-01-19 21:21:23 +00:00
Jeremy Joslin
44e2b84b27 New setting for recommendation request timeout.
Added a new global setting, NETWORK_RECOMMENDATION_REQUEST_TIMEOUT_MS,
to control the maximum amount of time a recommendation request can
take.

Updated the NetworkScoreService to monitor the value and to update
its cached copy on observed changes.

Test: runtest frameworks-services -c com.android.server.NetworkScoreServiceTest
Bug: 34060959
Change-Id: I6ff80178440794e4a5da39ee7b5164621316e7bd
Merged-In: I7650ee024e53dbc856cf20d7520a6eb252c73bdf
2017-01-19 13:18:22 -08:00
Jeremy Joslin
bc1308a3be Implemented the async recommendation request call.
Implemented requestAsyncRecommendation() by introducing a Handler
implementation to handle requests that time out and a OneTimeCallback
class to prevent multiple callbacks from being sent back for the same
request.

Change-Id: I03875cf1d789cbc92aa4c6b500c6b519bff8e165
Merged-In: Ida2ff860d78d86185ab9ab22232b5b6dc1e4b310
Test: runtest frameworks-services -c com.android.server.NetworkScoreServiceTest
BUG:33784158
2017-01-19 13:18:21 -08:00
Jeremy Joslin
cb925074d3 Async network recommendation requests.
Exposing a new hidden API method that allows network recommendations
to be requested asynchronously.

Test: Built & run.
BUG:33784158
Change-Id: I8d210b686138cb42bf69185f0b2f2d25dfcb9dd1
Merged-In: I8f84b09f43a6c5fae5d8f03ec01e75c25b4b62d6
2017-01-19 13:18:21 -08:00
Torbjorn Eklund
3ff6c5659d Vodafone SIMs should treat Spain as roaming
Since there are unnecessary "config_operatorConsideredNonRoaming" values
in the following file, UE mistakenly recognizes all Spain network as
non-roaming when Vodafone sim from Spain is inserted. Fix the issue by
removing the values.
 - core/res/res/values-mcc214-mnc01/config.xml

Bug: 30147413
Change-Id: I75b3f4a112a625a80824516bb6ea06a43a4567da
2017-01-20 06:06:28 +09:00
Treehugger Robot
a83222e4fb Merge "Fixed NPE in canAddMoreManagedProfiles" 2017-01-19 18:53:25 +00:00
Treehugger Robot
3a7253a09d Merge "Adding self-managed connection service APIs." 2017-01-19 18:23:34 +00:00
Jeff Sharkey
915f279556 Merge "Follow installd API changes." 2017-01-19 16:16:03 +00:00
Polina Bondarenko
d5cfe6cdf1 Make TelephonyManager#get/setAllowedCarriers system api
Make TelephonyManager#get/setAllowedCarriers system api under
PackageManager#FEATURE_TELEPHONY_CARRIERLOCK feature flag.

Bug: 33480084
Test: cts

Merged-In: I1ce77a9e3801bd4003b52887d0a36866e5a5b81a

Change-Id: I1ce77a9e3801bd4003b52887d0a36866e5a5b81a
2017-01-19 16:43:29 +01:00
Przemyslaw Szczepaniak
76edc3b8a5 Merge "Track libcore java.util.logging update to ojdk8u60" 2017-01-19 14:11:13 +00:00
Orion Hodson
e5c3aed8dc Merge "API: Unhide dalvik.system.InMemoryDexClassLoader" 2017-01-19 13:35:52 +00:00
Treehugger Robot
c74ccf1588 Merge "Prepare for removal of legacy-test from default targets" 2017-01-19 11:32:11 +00:00
Treehugger Robot
c8223d0874 Merge "Try to deduplicate observer iteration code" 2017-01-19 11:10:21 +00:00
Paul Duffin
ccb0445027 Prepare for removal of legacy-test from default targets
In preparation for removing junit classes from the Android API
the legacy-test target will be removed from the
TARGET_DEFAULT_JAVA_LIBRARIES. This change adds explicit
dependencies on junit and/or legacy-android-test to ensure that
modules will compile properly once it is removed.

(cherry picked from 6387604f9e672ece85e07c4bcbd7be396867f06f)

Bug: 30188076
Test: make checkbuild
Merged-In: I13e88297731253420e4e5f5291d503f13a39a156
Change-Id: I58446eb8c45d8ac2bcdbc9fa40d1321e811bdd4b
2017-01-19 09:43:05 +00:00
Treehugger Robot
0ac7232b7c Merge "Eschew unspecified IP addresses for DNS servers" 2017-01-19 09:38:27 +00:00
Erik Kline
b2cfdfbbb0 Try to deduplicate observer iteration code
Later on, registerObserver() can take a handler argument and
invokeForAllObservers() can be updated to post to it when
provided.

Test: as follows
    - built (bullhead)
    - flashed
    - booted
    - runtest frameworks-net passes
Bug: 32163131
Change-Id: Ibc32079e1084e2e43f7826fe6b2bdbb83c482e26
2017-01-19 18:05:27 +09:00
fionaxu
3e713e090c Initial change on carrier signal filtering
- add new carrier config
- configure defaultcarrierapp as the default receiver for redirection
  signal

Bug: 30958215
Test: runtest --path
frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony

Change-Id: I094c39fe21e6883d2acef8f7479b948fc77ce14e
Merged-In: CHANGE-ID I14bb1a885d1eaca9a144eb1e1caca72339d67d2e
2017-01-19 00:36:16 -08:00
Erik Kline
fed4194af0 Eschew unspecified IP addresses for DNS servers
Test: as follows
    - built
    - flashed
    - booted
    - runtest frameworks-wifi passes (though no test covers this code yet)
Bug: 34210527
Change-Id: I2d44445982dfb3221f7b6394daf0479c1fa8a6e1
2017-01-19 17:01:46 +09:00
yuanhao
47f9f7cbcb Fixed NPE in canAddMoreManagedProfiles
We can use the command 'adb shell pm create-user --profileOf -10000
--managed TestProfile_12345678' to reproduce the problem.

Signed-off-by: yuanhao <yuanhao@xiaomi.com>
2017-01-19 06:56:22 +00:00
Tao Bao
9311dbf9e4 Merge "Revert "RecoverySystem: Fix the issue in installPackage()."" 2017-01-19 01:47:10 +00:00
Tao Bao
cc76991f37 Revert "RecoverySystem: Fix the issue in installPackage()."
This reverts commit 9f7a0acd2d383b825bcdcbef25d6b42f9875acfe.

Bug: 34350643
Bug: 34396955
Test: installPackage() doesn't cause deadlock if it doesn't call
      processPackage() prior to that.
Change-Id: I1da055c86a3326ae341da1b4d5dc79ab4be256fb
2017-01-19 01:31:57 +00:00
Peng Xu
cec2ebf676 Merge "TYPE_DYNAMIC_SENSOR_META should be wake up sensor" 2017-01-19 01:11:49 +00:00