277361 Commits

Author SHA1 Message Date
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
Josh Gao
cfb19e3ac8 Merge changes from topic 'kill_debuggerd'
* changes:
  Switch android.os.Debug to libdebuggerd_client.
  app_process: don't use PR_SET_NO_NEW_PRIVS.
  Remove peercred check from NativeCrashListener.
2017-01-18 23:04:09 +00:00
Tyler Gunn
f50354363c Adding self-managed connection service APIs.
1. Adding new APIs for self-managed connection services.
2. Adding Telecom package-level documentation.

Test: Manual (unit, cts pending; this is just scaffolding for now)
Bug: 34159263
Change-Id: Ic226ec8bfcb2fbcc02fe802b47499e47aab17d0a
2017-01-18 14:44:43 -08:00
Torbjorn Eklund
ecb8183894 SFR 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 SFR sim is inserted. Fix the issue by removing the
values.
 - core/res/res/values-mcc208-mnc10/config.xml

Bug: 34369673
Change-Id: I7353e260ec7d3d298346a48c74b7b71bb75b14de
2017-01-19 07:25:32 +09:00
Treehugger Robot
5fd543ec34 Merge "Update/cleanup Bluetooth Codec strings in Developer Settings" 2017-01-18 20:20:48 +00:00
Jeff Sharkey
36ba022316 Follow installd API changes.
Test: builds, boots, clearing strategy looks sane
Bug: 33965858
Change-Id: Ie5bbb71fb7a464999215c22e5a1fef0c07a620a4
2017-01-18 12:18:21 -07:00
Pavlin Radoslavov
0e038dec6f Update/cleanup Bluetooth Codec strings in Developer Settings
Misc. fixes and cleanup related to the Bluetooth Codec strings
in Developer Settings:

 * Update the codec name "aptX-HD" -> "aptX HD" to reflect the vendor
   defined writing:
   https://www.aptx.com/aptx-hd
 * Increase some of the "CHAR LIMIT" values for the purpose
   of translation to other languages
 * Update some of the text in the UI (for clarity)
 * Added new string: "Streaming: " that is used in the UI summary

Test: UI visual observation
Bug: b/34188102 b/34206536 b/34209576 b/34210861 b/34207126 b/34211204
Bug: b/34206992 b/34210910 b/34210162 b/34205434 b/34198432 b/34186749
Bug: b/34188141 b/34188657 b/34192932 b/34188655
Change-Id: I9dc609594864b5d29394c49e0bce64416706c81c
2017-01-18 19:03:44 +00:00
Rebecca Silberstein
aa9821bf32 SystemServer: reorder wifi services start
Start WifiService before other wifi-related services.
This is now possible since service dependencies were
removed from the WifiStateMachine constructor.

Bug: 34137732
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: frameworks/base/wifi/tests/runtests.sh
Test: manually tested wifi connection
Test: manually checked for Wifi Direct peers
Merged-In: Iad4eb7053e60542d0be72208db53cf0f83004ae2
Change-Id: I1e57bfac83708644df6f016808c5972d2d6136c6
2017-01-18 11:01:11 -08:00
Wei Liu
5f506939fa SystemServer: cherry-pick p2p service start
Cherry-pick change that only starts P2P service if p2p is supported for
the device.

Disable WiFi p2p service if it's not supported.

b/26877020

Bug:34193861
Test: frameworks/base/wifi/tests/runtests.sh
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: manually verified wifi connection
Test: manually checked for p2p peers

Change-Id: I84b822fa57423711de75d2147effe73a1fc40eb4
Merged-In: I84b822fa57423711de75d2147effe73a1fc40eb4
2017-01-18 11:01:10 -08:00
Glen Kuhne
c82d1ddaf4 Merge "Unhide WifiConfiguration proxy accessors" 2017-01-18 18:08:36 +00:00
Treehugger Robot
1aa24246cf Merge "Notify user switch event to NetworkController" 2017-01-18 15:32:28 +00:00
Orion Hodson
ac85c0f5c9 API: Unhide dalvik.system.InMemoryDexClassLoader
Bug: 26878838
Test: make docs
Change-Id: Ica969089dd82d1b610d6a307bb414690e736a1c7
2017-01-18 15:31:32 +00:00
Jason Monk
943a52862e Merge "SystemUI: Add NFC tile" 2017-01-18 14:07:53 +00:00
Anas Karbila
f7648f4483 SystemUI: Add NFC tile
This patch adds a tile for QuickSettings
which controls the setting of NFC.

The drawable is from material.io.

Test: Enable and disable NFC using tile

Change-Id: I7dfaf3a4dca0c01d24be397e43ab131eb9885f62
Signed-off-by: Anas Karbila <anaskarbila@aospa.co>
Signed-off-by: Alex Naidis <alex.naidis@linux.com>
2017-01-18 12:12:03 +00:00
Przemyslaw Szczepaniak
d71203f1a0 Track libcore java.util.logging update to ojdk8u60
Test: CtsLibcoreTestCases
Bug: 28666126
Change-Id: I3d8a7046e339a4a327e04574a4479fe2a1291d4c
2017-01-18 11:40:22 +00:00