Commit graph android_packages_modules_Co.../services/core/java
Message SHA1
Remove dead hidden ConnectivityManager and NetworkInfo APIs.
- There are no callers of
  NetworkInfo.setIsConnectedToProvisioningNetwork(), so remove all the
  code that deals with mIsConnectedToProvisioningNetwork being true,
  including the two ConnectiviyManager APIs.
- There are no callers of
  ConnectivityManager.getMobileRedirectedProvisioningUrl(), so remove
  the code that reads this URL.
- There are no callers of
  ConnectivityManager.captivePortalCheckCompleted(), so remove this
  API which is currently a no-op.

Change-Id: Ifa44c7553c7c45ebe261a2a124d9bf8d6f96c690

Paul Jensen   commited 2015-06-16 02:07:36 +00:00
a34bbb4087
remove usage of deprecated method setLatestEventInfo
Bug: 18510449
Change-Id: I56a77991c729990e501f402e007dfa79ee57621e

Chris Wren   commited 2015-06-12 10:16:04 -04:00
250d51bdf7
Merge "Avoid overlapping NetIDs in ConnectivityServiceTest with real NetIDs" into mnc-dev
Paul Jensen   authored and   Android (Google) Code Review   commited 2015-06-10 17:59:54 +00:00
5ab230b6ce
Avoid overlapping NetIDs in ConnectivityServiceTest with real NetIDs
Overlapping the NetIDs can cause the ConnectivityService instance under test
to inadvertently use real networks, for example when NetworkMonitor attempts
to validate a network.  This fixes test hangs when run on devices with
active internet connections.

Change-Id: I5e1898953f0117b9f75beccac4a52ae2db173567

Paul Jensen   commited 2015-06-10 11:30:26 -04:00
a02ec16011
Merge "When no Internet access is detected, display a notification first." into mnc-dev
Lorenzo Colitti   authored and   Android (Google) Code Review   commited 2015-06-10 15:25:31 +00:00
8e22a868af
When no Internet access is detected, display a notification first.
Previously, we displayed a dialog on top of whatever the user was
doing. Instead, display a notification that can take the user to
the dialog.

Because the notification is less intrusive, also enable it even
if the network without Internet access is already the system
default network. Previously we did not do this because in that
case the user might not have other useful options, and thus a
dialog would have been too intrusive.

Bug: 20081183
Bug: 20538448
Change-Id: I677be238d675c13a13dc0bae2dbb37cbe4f52cb6

Lorenzo Colitti   commited 2015-06-10 23:37:00 +09:00
37a4d553dd
Merge "initial revision of NetworkDiagnostics" into mnc-dev
Erik Kline   authored and   Android (Google) Code Review   commited 2015-06-09 23:23:03 +00:00
be74d7ce4f
Merge "Switch over to updated VPN warning strings" into mnc-dev
Robin Lee   authored and   Android (Google) Code Review   commited 2015-06-09 23:13:38 +00:00
87a4c8693d
Switch over to updated VPN warning strings
These are more consistent and have placeholders for the description of
whatever VPN apps are actually active.

Bug: 20516964
Bug: 17474682
Change-Id: I37ff287b795f10bbbb192540f09f8100bb27b1a0

Robin Lee   commited 2015-06-09 12:04:23 -07:00
e2dea8e9c6
initial revision of NetworkDiagnostics
Bug: 21449922
Change-Id: I6a66cfa98601d6ccfe38ff840b0dd49ed1538a41

Erik Kline   commited 2015-06-09 23:37:58 +09:00
445cad129e
Merge "Remove "returning Blocked NetworkInfo" logspam." into mnc-dev
Lorenzo Colitti   authored and   Android (Google) Code Review   commited 2015-06-05 07:50:44 +00:00
223ab40466
Remove "returning Blocked NetworkInfo" logspam.
Bug: 20006730
Change-Id: I2061127e3c7283c0a4899940d3fc224ca114f754

Lorenzo Colitti   commited 2015-06-05 10:58:17 +09:00
28ad516437
Merge "Fix the empty reason field in connectivity change intent." into mnc-dev
Feixiong Zhang   authored and   Android (Google) Code Review   commited 2015-06-04 18:54:49 +00:00
bf546dc592
Fix the empty reason field in connectivity change intent.
The code set it to null instead of info.getReason.

Change-Id: I1b26ad040c23da7080dbfaeb5376181998115805

Feixiong Zhang   commited 2015-06-04 11:38:41 -07:00
ac21bfa9c7
Merge "Revive ConnectivityServiceTest and add some tests." into mnc-dev
Paul Jensen   authored and   Android (Google) Code Review   commited 2015-06-04 13:11:34 +00:00
4371d961b1
Revive ConnectivityServiceTest and add some tests.
Change-Id: I44740a7b21cff18ac2a67d09c4d0e597add19ee0

Paul Jensen   commited 2015-06-04 09:09:36 -04:00
a871d06625
Merge "Disable mDefaultDns to see if we can remove it." into mnc-dev
Lorenzo Colitti   authored and   Android (Google) Code Review   commited 2015-06-04 05:31:59 +00:00
33464fb66c
Delete unsed mDnsLock.
Bug: 21449922
Change-Id: I0c9f95c30eaa170d809e86f6505379f34a0a7603

Erik Kline   commited 2015-06-03 16:10:08 +09:00
783cc254e3
Make the dumpsys connectivity shorter and easier to read.
- Print NetworkFactories on one line.
- Only print LegacyTypeTracker networks if they are connected,
  and record supported network types on a separate summary line.
- Print all tethering upstreams on one line.
- Summarize the state of the transition wakelock on one line.
- Don't print Inet condition reports if there are none.
  (Currently there can never be any.)

Bug: 21449922
Change-Id: Ib4b29a7fd882e6c105839a255fffecf4f346cf7e

Lorenzo Colitti   commited 2015-06-03 11:29:41 +09:00
417c25c8cb
Network Reset should have a lockdown like Factory Reset.
bug:20332322
Change-Id: I7c61a011d11e89513757f112abf320bb2a785edb
(cherry picked from commit 94b038bbb291431a7b39611d72f206b07e839891)

Stuart Scott   commited 2015-06-01 16:31:00 +00:00
493cca03f8
Null-check argument to ConnectivityManager.releaseNetworkRequest(PendingIntent)
Do this in ConnectivityService to prevent crashing framework.

Bug:21329396
Change-Id: Ifd9c970cd0da392d0bd5da9a9ae845fdf0b559b3

Paul Jensen   commited 2015-05-21 08:15:08 -04:00
cdc9384d58
Merge "Query HTTP proxy for network via a new API to avoid permissions exceptions" into mnc-dev
Paul Jensen   authored and   Android (Google) Code Review   commited 2015-05-19 17:58:11 +00:00
71c05810c2
Disable mDefaultDns to see if we can remove it.
Bug: 21146610
Change-Id: I385f1c8780acc97d955002f469a6c8ad65db1578

Lorenzo Colitti   commited 2015-05-20 00:35:25 +09:00
2c57c17908
Merge "Make NET_CAPABILITY_VALIDATED (almost) a first-class citizen." into mnc-dev
Lorenzo Colitti   authored and   Android (Google) Code Review   commited 2015-05-19 10:29:48 +00:00
afe4a812a9
Merge "Support cross-user VPN calls (with permission)" into mnc-dev
Robin Lee   authored and   Android (Google) Code Review   commited 2015-05-19 10:14:59 +00:00
c5bd6cc964
Make NET_CAPABILITY_VALIDATED (almost) a first-class citizen.
1. Always keep ConnectivityService's validated bits current:
   - Apply the validated bit whenever a NetworkAgent updates its
     NetworkCapabilities.
   - Set or clear the validated bit whenever lastValidated changes.
2. Send callbacks when the validation state of a network changes.
3. Delete getNetworkCapabilitiesAndValidation, removing code
   duplication with getNetworkCapabilities.
4. Add the validated bit to NetworkCapabilities#toString.

Bug: 18591282
Bug: 20081183
Change-Id: I6aa53b61c15cc137f203f9fc6bbd4c16894be750

Lorenzo Colitti   commited 2015-05-19 18:29:02 +09:00
9809729e2f
Support cross-user VPN calls (with permission)
Settings and SystemUI need to act on other users than USER_OWNER.

This is gated by INTERACT_ACROSS_USERS_FULL in addition to the existing
CONTROL_VPN checks, so the number of processes able to interfere with
other profiles' VPNs should be quite small.

Bug: 20692490
Bug: 20747154
Bug: 20872408
Change-Id: I6e5d7220f73435bec350719e7b4715935caf4e19

Robin Lee   commited 2015-05-18 23:35:31 +01:00
5ff73b7b91
Query HTTP proxy for network via a new API to avoid permissions exceptions
Add @hidden ConnectivityManager.getProxyForNetwork() API.

Bug:20470604
Change-Id: I6a9bc4afc8273bc43b14cdeccfedbbf3ff66be40

Paul Jensen   commited 2015-05-18 17:05:51 +00:00
fdec88b48d
Statically import NetworkCapabilities constants for brevity.
Bug: 18591282
Change-Id: I41c148951724136f31bc663fd81ca9f5de72818a

Lorenzo Colitti   commited 2015-05-14 23:46:17 +09:00
d21a526ac9
Don't display the "no Internet access" prompt on captive portals.
Bug: 20081183
Bug: 21066461
Change-Id: Idc71844a604f9ca655411c6916de256780ea4586

Lorenzo Colitti   commited 2015-05-14 23:46:16 +09:00
9bf1c31e6a
Fix a race when removing from LegacyTypeTracker.
Because LegacyTypeTracker#remove can send broadcasts that cause
apps to refresh their view of network state, it needs to be
called only after network state has been updated. This requires
that callers determine whether the network was the default, and
updating state, before calling remove().

While I'm at it, fix maybeLogBroadcast's concept of whether the
network it's logging about is/was the default. This has never
been correct.

Bug: 20613953
Change-Id: Ia175ac454aa4e0a4c4f0151866314ebada681438

Lorenzo Colitti   commited 2015-05-12 16:48:30 +09:00
2e3a9705cf
Optionally add a default MOBILE request.
This enables persisting the mobile internet data connection, even
when Wi-Fi is enabled and serving as the default network (for faster
network switching).

Change-Id: I9d1512b3a8413c4f163c63d57e66bded017101e4

Erik Kline   commited 2015-05-08 15:22:37 +09:00
74d68efe72
Adding "Connected, no Internet" string in Wifi nw summary.
Bug: 17380953
Change-Id: I9664bcbf33832fe722e7d2b3125939287ee98098

Sanket Padawe   commited 2015-05-01 16:55:00 -07:00
e453b72d39
Remove network access for idle apps
Track apps going in and out of idle in the NetworkPolicyManagerService.
Apply DROP rules in firewall controller if app is to be blacklisted
for network access.

Firewall can now be in whitelist (old) or blacklist mode. When in
blacklist, it allows all by default and we can selectively DENY
some uids.

Track app idle in UsageStats and update periodically.
Track charging/discharging states.

TODO: Check for appidle temporary parole state

Bug: 20066058
Change-Id: Ia65d7544204b3bcb78a517310ef4adcc05aac6fb

Amith Yamasani   commited 2015-04-29 14:21:53 -07:00
68c4363056
Merge commit 'ed4d55c' into merge2
Change-Id: I116a9dbf19e95651a7c50393e4dcd7fb59ca3f3f

Etan Cohen   commited 2015-04-24 13:58:45 -07:00
54c82a8c6b
Allow apps with ACCESS_WIFI_STATE to listen for wifi networks
The compatibility measure introduced in bug 20081183 for apps
that connect to a Wi-Fi network without Internet access and then
expect to be able to use that network requires that such apps
register a NetworkCallback so that their WifiManager can pin them
to whatever wifi Network connects.

Currently, registering the callback requires ACCESS_NETWORK_STATE
and the app may not have that permission. Allow registering wifi
(only) callbacks if the app has ACCESS_WIFI_STATE.

If the app does not have ACCESS_WIFI_STATE (unlikely, since
CHANGE_WIFI_STATE is not very useful without ACCESS_WIFI_STATE),
then don't enable the compatibility measure.

Bug: 20081183
Bug: 20423580
Change-Id: Iad328d30c2d170dead883868fece3d922da68f6f

Lorenzo Colitti   commited 2015-04-22 12:01:35 +09:00
15ff2fc68d
Merge "update API name to requestBandwidthUpdate()"
fenglu   authored and   Android (Google) Code Review   commited 2015-04-22 01:32:19 +00:00
a50d169c9c
update API name to requestBandwidthUpdate()
Change-Id: If26942978ffcc43f06f17dfad5da790f34758395

fenglu   commited 2015-04-21 17:12:05 -07:00
73169332e1
Merge "Revert "requestBwUpdate() public API review""
Robert Greenwalt   authored and   Android (Google) Code Review   commited 2015-04-21 23:59:35 +00:00
29f8180532
Revert "requestBwUpdate() public API review"
This reverts commit c6e97f1417.

Change-Id: I8c22d285ff1f56f1bd31a0fa9f2e6a79959347b1

Robert Greenwalt   commited 2015-04-21 23:59:14 +00:00
d7bce3df4a
Merge "requestBwUpdate() public API review"
Robert Greenwalt   authored and   Android (Google) Code Review   commited 2015-04-21 23:55:48 +00:00
b797ee450e
requestBwUpdate() public API review
Change-Id: I1e780b2705d13bfc85a0a8712ac1dbd623b474a1

fenglu   commited 2015-04-21 15:33:19 -07:00
c6e97f1417
Final removal of CONNECTIVITY_ACTION_IMMEDIATE.
Since the demise of the connectivity change delay,
CONNECTIVITY_ACTION_IMMEDIATE has been sent out back to back with
CONNECTIVITY_ACTION.

Interested parties should watch for CONNECTIVITY_ACTION.

Bug: 20013379
Change-Id: I072dddf95adb3bbd17fa1f7159d4ea848ade8f19

Erik Kline   commited 2015-04-21 17:02:34 +09:00
0ac7926838
Move factoryReset to service and protect.
bug:16161518
Change-Id: I02d1bbae1887c62ee426e6f03e8bc1f18c6666bf

Stuart Scott   commited 2015-04-20 10:52:35 -07:00
ca888bf2fe
Add captive portal API.
This API allows apps other than the system's CaptivePortalLogin
to handle signing in to captive portals.

bug:19416463
Change-Id: I27fce5856b635233e6ff66396d50ccabedd76cf5

Paul Jensen   commited 2015-04-16 16:53:10 +00:00
ed4d55c9fc
Merge changes from topic 'wifi-alternate-reality'
* changes:
  Pin a process to wifi when it calls enableNetwork(..., true)
  Make CALLBACK_PRECHECK actually work.

Lorenzo Colitti   authored and   Android (Google) Code Review   commited 2015-04-16 16:11:22 +00:00
b67d02e437
LCE service implementation - connectivity side
Change-Id: If11bd99c44c7dc8d2aa2bc05a10e04421739baa6

fenglu   commited 2015-04-16 02:53:39 -07:00
7656433e44
Make CALLBACK_PRECHECK actually work.
Currently, CALLBACK_PRECHECK is never fired, because we attempt
to send it just after a network has connected, before matching
requests to that network. So notifyNetworkCallbacks scans the
list of requests for the network, finds none, and does nothing.

Bug: 20038463
Change-Id: Ib0c6377c45990e358f926217d7c7defa74c1d59b

Lorenzo Colitti   commited 2015-04-16 17:11:09 +09:00
97399aed2e
LCE service implementation - connectivity side
Change-Id: If11bd99c44c7dc8d2aa2bc05a10e04421739baa6

fenglu   commited 2015-04-15 23:13:52 -07:00
26a1e5a5ae
Merge "am b5e0cfb..557d2f5 from mirror-m-wireless-internal-release"
Vinit Deshpande   authored and   Android (Google) Code Review   commited 2015-04-16 02:36:30 +00:00
3153bb0792