Commit graph

13,045 commits

Message SHA1
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
am 0f9d3152: am 06ac707d: am c6767354: Merge "Add setting to disable assist data (1/2)" into mnc-dev
* commit '0f9d315217ebeb933f5f6b79d22e03b2c0c889ae': (30 commits)
  Add setting to disable assist data (1/2)
  Make all icon fields & extras sent to listeners backward-compatible.
  Revert "Fix IMMS#mInputShown state inconsistency."
  Fix bug with jobservice context giving wrong value
  camera2: Fix work-profile eviction handling.
  Fix missing break in Icon class
  Fix post dial for remote connections
  Fix build: udpate parser factory method
  Don't keep LayoutlibCallback reference.
  Adjust lockscreen style to spec
  [RenderScript] Add dummy getMinorID to maintain compatible with old RS compat lib.
  Change the location of Brandmaster statement file.
  Revert "Update IME focus when the active view is losing the focus."
  Revert "Icon support comes to Notification."
  Fix icon-related crash.
  Don't display the "no Internet access" prompt on captive portals.
  Rewriting should fail when any paths are null.
  Ignore abandon after install relinquished.
  Fix build - Revert "Revert "Use default constructor to get anti-aliasing""
  Fix crash in setup wizard
  ...

Jorim Jaggi   authored and   Android Git Automerger   commited 2015-05-19 05:14:06 +00:00
9c78610b9c
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
merge in mnc-release history after reset to mnc-dev
The Android Automerger   commited 2015-05-16 01:02:14 -07:00
4d5dd9a7dd
am ed9fa1cc: am 4eb901b6: am bdc8b6d2: Merge "Statically import NetworkCapabilities constants for brevity." into mnc-dev
* commit 'ed9fa1ccd8f655a5c7520511ff354443ad9444fe':
  Statically import NetworkCapabilities constants for brevity.

Lorenzo Colitti   authored and   Android Git Automerger   commited 2015-05-15 16:57:19 +00:00
7f880a9434
am 4f1c9e37: am e0efd004: am 9e2d14be: Merge "Don\'t display the "no Internet access" prompt on captive portals." into mnc-dev
* commit '4f1c9e37a988b026d452580e7e3bdf0ca7f7ee87':
  Don't display the "no Internet access" prompt on captive portals.

Lorenzo Colitti   authored and   Android Git Automerger   commited 2015-05-14 21:23:52 +00:00
b78c70d3ed
Don't display the "no Internet access" prompt on captive portals.
Bug: 20081183
Bug: 21066461
Change-Id: Idc71844a604f9ca655411c6916de256780ea4586

Lorenzo Colitti   authored and   The Android Automerger   commited 2015-05-14 09:54:33 -07:00
4957bb7d59
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
am 402b57fe: am ee15118b: am ae75d3c2: Merge "Fix a race when removing from LegacyTypeTracker." into mnc-dev
* commit '402b57fec8b3909cc261fecb10cc1acb09a32464':
  Fix a race when removing from LegacyTypeTracker.

Lorenzo Colitti   authored and   Android Git Automerger   commited 2015-05-13 07:02:05 +00:00
c9806ceffe
Merge "Fix a race when removing from LegacyTypeTracker." into mnc-dev
Lorenzo Colitti   authored and   Android (Google) Code Review   commited 2015-05-13 06:31:38 +00:00
ae75d3c22e
am 49979a37: am 3ce689a4: am 227afb8a: Merge "Deprecate ConnectivityManager.isNetworkTypeValid as it\'s unneeded." into mnc-dev
* commit '49979a37216a001d30bc618d20583dccbf481ec9':
  Deprecate ConnectivityManager.isNetworkTypeValid as it's unneeded.

Paul Jensen   authored and   Android Git Automerger   commited 2015-05-12 17:08:34 +00:00
8eefc53216
Merge "Deprecate ConnectivityManager.isNetworkTypeValid as it's unneeded." into mnc-dev
Paul Jensen   authored and   Android (Google) Code Review   commited 2015-05-12 16:32:29 +00:00
227afb8aff
Deprecate ConnectivityManager.isNetworkTypeValid as it's unneeded.
All ConnectivityManager APIs taking a network type have been
deprecated so there should be no need to validate a network type.

bug:20647016
Change-Id: I2dcf24f58016e94aa814dda38cfc848366cc461c

Paul Jensen   commited 2015-05-12 10:36:56 -04:00
1c9f2e42b8
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
am 3d85fcbf: am 15748d35: am a0698b61: Merge "Optionally add a default MOBILE request." into mnc-dev
* commit '3d85fcbfb01cc611697d79a18b91107ede563767':
  Optionally add a default MOBILE request.

Erik Kline   authored and   Android Git Automerger   commited 2015-05-08 16:58:21 +00:00
867cf94d07
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
am 2599c660: (-s ours) am cff23c2f: Merge commit \'9649b30d\' into manualmerge
* commit '2599c660bebc08d50b35f0b2bb46481610b8ebe0':
  DO NOT MERGE - Make sure to return network type after conversion
  DO NOT MERGE - Radio Access Family related fixes
  DO NOT MERGE - Multi-sim device would show 2 PLMN in status bar even if they are same.
  Add plumbing for merge failures and renable button. (3/4)
  Changed logging tag.
  Fixing issue where conference calls enable speaker phone.
  Add videoStateToString on videoProvider Class.
  Update the SmsMessage.createFromPdu() API call
  No Permission check for WiFi RTT
  add a parameter to carrier messaging calls to request delivery status
  Added parameter to avoid having a stream opened, and with that, file truncated on no-op.
  Make onlost/onfound APIs public
  IMS-VT: Enable video calls
  add injectSmsPdu with subId to ISms.aidl
  Fail SmsManager requests if SubId is not active.

Prerepa Viswanadham   authored and   Android Git Automerger   commited 2015-05-05 19:21:52 +00:00
a01869c505
am 0a5af5a2: am 7a80f122: am 784a3f4b: Merge "Adding "Connected, no Internet" string in Wifi nw summary." into mnc-dev
* commit '0a5af5a2a1d90ae773b26fc8350eee63362dc74b':
  Adding "Connected, no Internet" string in Wifi nw summary.

Sanket Padawe   authored and   Android Git Automerger   commited 2015-05-05 01:36:33 +00:00
490a036036
Merge changes from topic 'mwd-merge-050415' into mnc-dev
* changes:
  Merge commit 'b6f59f4' into master_merge
  Merge commit 'f6db0ce' into master_merge
  Merge commit '17455a3' into master_merge
  Merge commit 'b4d5b32' into master_merge
  Merge commit 'a1a2fa7' into master_merge
  Merge commit '8dfdb98' into master_merge
  Merge commit 'eba66c3' into master_merge

Prerepa Viswanadham   authored and   Android (Google) Code Review   commited 2015-05-05 01:06:38 +00:00
9649b30d09
Merge "Adding "Connected, no Internet" string in Wifi nw summary." into mnc-dev
Sanket Padawe   authored and   Android (Google) Code Review   commited 2015-05-04 20:44:52 +00:00
784a3f4b68
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
am ad44d814: am 3dc08220: am b57f236e: Merge changes Icf7d67e2,Ia914ec88,I2490ad75,Ie79f2d28 into mnc-dev
* commit 'ad44d81457971085a0b20fb42388010d76c79132':
  Add a hidden method to clear NetworkCapabilities.
  Fix javadoc error for requestNetwork.
  Simplify network callback handling code.
  Document and unhide CALLBACK_PRECHECK.

Lorenzo Colitti   authored and   Android Git Automerger   commited 2015-05-01 04:19:07 +00:00
9e3be4c550
Add a hidden method to clear NetworkCapabilities.
Change-Id: Icf7d67e24a09113340e9bff2c72526760914ef48

Lorenzo Colitti   commited 2015-05-01 12:36:29 +09:00
c0644de5ef
Fix javadoc error for requestNetwork.
The ConnectivityManager documentation uses {@link requestNetwork}
without specifying which version of that method it refers to.
This results in javadoc incorrectly linking to the version of the
method that takes a PendingIntent instead of the version that
takes a callback.

Change-Id: Ia914ec88005a6401b6391c5b4fc92f988baa3922

Lorenzo Colitti   commited 2015-05-01 12:36:29 +09:00
efd396e312
Simplify network callback handling code.
Change-Id: I2490ad754bf2a1282f27302c8556fb19983cc6b1

Lorenzo Colitti   commited 2015-05-01 12:36:28 +09:00
8db5f9a91d
Document and unhide CALLBACK_PRECHECK.
Bug: 20038463
Change-Id: Ie79f2d28c06cf611289504e49c471b55ffb9890f

Lorenzo Colitti   commited 2015-05-01 12:36:28 +09:00
ccf8210b9d
am 278886d5: am 3184b286: am fa4eda44: Merge "Remove network access for idle apps" into mnc-dev
* commit '278886d50a66689529320f9bd735177c068e210d':
  Remove network access for idle apps

Amith Yamasani   authored and   Android Git Automerger   commited 2015-04-29 23:04:50 +00:00
c486ae5e47
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
Fix the javadoc for requestBandwidthUpdate(...)
Change-Id: I6673dd219ef832acb15ce9b6398caa1c8503320b

fenglu   commited 2015-04-27 14:28:04 -07:00
41808e8a6f
Merge "API review for requestBandwidthUpdate()"
fenglu   authored and   Android (Google) Code Review   commited 2015-04-27 20:34:01 +00:00
32390bf3fc
Merge commit '052a0da' into merge2
Etan Cohen   commited 2015-04-24 14:06:22 -07:00
522b053e2d
Merge commit '83cda00' into merge2
Etan Cohen   commited 2015-04-24 14:03:06 -07:00
9bc33ac655
Merge commit 'ed4d55c' into merge2
Change-Id: I116a9dbf19e95651a7c50393e4dcd7fb59ca3f3f

Etan Cohen   commited 2015-04-24 13:58:45 -07:00
54c82a8c6b
Merge commit '26a1e5a' into merge2
Etan Cohen   commited 2015-04-24 13:54:24 -07:00
bfa89b207e
Merge commit '6ddbb5e' into merge2
Etan Cohen   commited 2015-04-24 13:44:05 -07:00
9f844e66d0
Merge commit '9561e74' into merge2
Etan Cohen   commited 2015-04-24 13:43:36 -07:00
5fc034a2df
Merge "@removed requestRouteToHost and {start,stop}UsingNetworkFeature"
Lorenzo Colitti   authored and   Android (Google) Code Review   commited 2015-04-23 10:21:28 +00:00
4a7449cf4e
@removed requestRouteToHost and {start,stop}UsingNetworkFeature
Bug: 20482461
Change-Id: Ic59fc1271e664d85102dc7945c0c2ea82c0d6f6b

Lorenzo Colitti   commited 2015-04-23 17:44:05 +09:00
7cc32c5ab1
am 2a0c4a3a: (-s ours) am 6cf2d35d: (-s ours) Merge "DO NOT MERGE Revert "Add android.net.IpPrefix#contains()"" into lmp-mr1-ub-docs
* commit '2a0c4a3ae091c4a922a1dec040a56c2edcc5e588':
  DO NOT MERGE Revert "Add android.net.IpPrefix#contains()"

Kris Giesing   authored and   Android Git Automerger   commited 2015-04-22 17:51:12 +00:00
27b0fafceb
Don't require ACCESS_NETWORK_STATE in setProcessDefaultNetwork
The documentation for setProcessDefaultNetwork does not
mention that it requires ACCESS_NETWORK_STATE, but a process
without ACCESS_NETWORK_STATE that calls it will crash because
we can't fetch the proxy properties.

Because ACCESS_NETWORK_STATE is not required to obtain a Network
object (Network objects can come from broadcasts too), it may not
be reasonable to require the permission. We did not do so in L.

For now, ignore the failure and don't crash the app. I've filed
http://b/20470604 to track a longer term fix.

Bug: 20081183
Bug: 20423580
Bug: 20470604
Change-Id: I158016130b4afb1d300357fe703804d2e7bc609b

Lorenzo Colitti   commited 2015-04-22 12:27:33 +09:00
4089825e44
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
API review for requestBandwidthUpdate()
Change-Id: I53dc3b95b1f989541e06d9b2c2ef8871bac81344

fenglu   commited 2015-04-21 18:57:15 -07:00
d491067a6b
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
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-22 08:56:43 +09:00
dee1e4c9b8
Merge "requestBwUpdate() public API review"
Robert Greenwalt   authored and   Android (Google) Code Review   commited 2015-04-21 23:55:48 +00:00
b797ee450e