Commit Graph

2835 Commits

Author SHA1 Message Date
Felipe Leme
863b80d607 Merge "Added onRestrictBackgroundWhitelistChanged callback." into nyc-dev
am: 9724fba

* commit '9724fba83545fd075cbda62bb13cdc7820c7291a':
  Added onRestrictBackgroundWhitelistChanged callback.

Change-Id: I1ee90168f1cf29a117961ba1e269fbc89c7f443b
2016-04-20 21:10:41 +00:00
Paul Jensen
7b87065990 Cap number of NetworkRequests a UID can make to 100
This prevents DoSing ConnectivityService with too many requests.

Fixes: 27253080
Change-Id: Id0480d220b2f01b9ef1146bef8ead2fc8287e28d
2016-04-20 10:52:47 -04:00
Felipe Leme
987d8ef741 Added onRestrictBackgroundWhitelistChanged callback.
When users add or remove an app to the Data Saver Mode whitelist, the
app is notified through a
ConnectivityManager.ACTION_RESTRICT_BACKGROUND_CHANGED. But besides this
broadcast, it's also necessary to notify internal apps such Settings,
hence a new method is being added to INetworkPolicyListener.

BUG: 27481520
Change-Id: I1537a77becf6b7da1535ed5faabdc894fd9f7084
2016-04-19 12:06:00 -07:00
Narayan Kamath
f3c2b112b2 Merge "Remove unnecessary allocation+unboxing of objects. am: 46f0dd6 am: 93aa6a7" into nyc-mr1-dev-plus-aosp
am: ee87054

* commit 'ee8705494d54ddb031d72fc47695f5784387d06b':

Change-Id: I74383face9cb4a1a205799f226e2133050db5660
2016-04-18 10:42:33 +00:00
Narayan Kamath
c0465659b9 Remove unnecessary allocation+unboxing of objects. am: 46f0dd6 am: 4c89ae0
am: 1e222ff

* commit '1e222ff323abdf061a46bfb4d297780eadd0968d':
  Remove unnecessary allocation+unboxing of objects.

Change-Id: Ic48935549f7f9b13d5f0a2d98fc0979fbfc5a38b
2016-04-18 10:42:28 +00:00
Android Build Merger (Role)
ee8705494d Merge "Remove unnecessary allocation+unboxing of objects. am: 46f0dd6 am: 93aa6a7" into nyc-mr1-dev-plus-aosp 2016-04-18 10:38:02 +00:00
Lorenzo Colitti
2b7db0cba5 resolve merge conflicts of 72fa0d4 to nyc-dev-plus-aosp am: 57f1e32
am: 0928b62

* commit '0928b620d2f0b78d49b13059eba475da4801ad70':
  When the applicantion is removed, reset network permission of this uid.

Change-Id: I3750e3f805bfc71558025fe078f1ad25e5af7cff
2016-04-18 10:36:38 +00:00
Narayan Kamath
1e222ff323 Remove unnecessary allocation+unboxing of objects. am: 46f0dd6
am: 4c89ae0

* commit '4c89ae0ee4f3d73d84843bf05cdc328b5e821da3':
  Remove unnecessary allocation+unboxing of objects.

Change-Id: I46f5ec0b9b8bc14073bcf7dc643bc909072d53ff
2016-04-18 10:36:37 +00:00
Narayan Kamath
93aa6a7f96 Remove unnecessary allocation+unboxing of objects.
am: 46f0dd6

* commit '46f0dd69cdbc4fd8bac8330425f79dca3be4d4a1':
  Remove unnecessary allocation+unboxing of objects.

Change-Id: Idfffa8fad0f6bcffa954752910524bdc879d65b7
2016-04-18 10:31:37 +00:00
Lorenzo Colitti
57f1e32f15 resolve merge conflicts of 72fa0d4 to nyc-dev-plus-aosp
Change-Id: Id7f317a20e422b215efff89a5c71c9b445d18cf4
2016-04-18 17:58:31 +09:00
Narayan Kamath
46f0dd69cd Remove unnecessary allocation+unboxing of objects.
Transforming String->int can be done with 0 allocations
using Integer.parseInt.

bug: 28078871
Change-Id: I8d9f322d7154728849dde61ef282046032858d60
2016-04-18 09:55:59 +01:00
Lorenzo Colitti
b10b854bd3 Disambiguate NetworkCallback JavaDoc. am: 15874cd
am: c8a0754

* commit 'c8a0754b3d98e90a869acb9dcc8ca8ae40bcbde1':
  Disambiguate NetworkCallback JavaDoc.

Change-Id: Ibf47574237ea8467d8e536395d580bac9f8fea36
2016-04-15 09:54:58 +00:00
Lorenzo Colitti
15874cd028 Disambiguate NetworkCallback JavaDoc.
The JavaDoc for many of the requestNetwork and
[un]registerNetworkCallback APIs incorrectly mentions the
PendingIntent version of the APIs instead of the NetworkCallback
version.

Also fix a minor issue in the registerDefaultNetworkCallback
JavaDoc: the default network request is an implementation detail,
so don't mention it. Instead, talk about the "system default
network".

Change-Id: Id94d98261daa2bd768c10e033cb8092729b21c91
2016-04-15 16:24:13 +09:00
TreeHugger Robot
8756817fb4 Merge "Also log IPv4 and IPv6 connectivity of any previous default network" into nyc-dev am: 0628d32
am: 886d17c

* commit '886d17c035805cef3bce3d2d96e53ba48bf5b62b':
  Also log IPv4 and IPv6 connectivity of any previous default network

Change-Id: I8c82f1058531d1f5a0cdb73314b8fd742dae7860
2016-04-14 19:26:50 +00:00
Pierre Imai
a6b1155d31 Merge changes Ia71865a9,I40b6de54 into nyc-dev am: 1feca76
am: f8ef3c3

* commit 'f8ef3c36a97b68b5e27127681973244f481cca09':
  Log an event whenever we lose the default network.
  Record the transport types for connectivity events.

Change-Id: If019f2c448ed3411a0b23dfdd6038e1b9fe2099d
2016-04-14 18:51:38 +00:00
Erik Kline
abdd3f8a9f Also log IPv4 and IPv6 connectivity of any previous default network
Change-Id: I07595c0a131fea21914f524949cd64af87403b88
2016-04-14 17:54:46 +09:00
Pierre Imai
5aeed109f7 Log an event whenever we lose the default network.
Change-Id: Ia71865a90b2db5dc0d3ad627563a6b1f99686f04
2016-04-14 15:38:29 +09:00
Pierre Imai
96ad7c5550 Record the transport types for connectivity events.
BUG: 25691077
Change-Id: I40b6de5446325e717c0356603fd66cd395db9acb
2016-04-14 15:38:17 +09:00
Pierre Imai
06669fb25e Merge "Fix a memory leak in ConnectivityManager." into nyc-dev am: a5ccd54
am: e235da5

* commit 'e235da5d5cb1db440db228ee23314617e7dd9aa4':
  Fix a memory leak in ConnectivityManager.

Change-Id: I713b4d68033aaac4ef2ada50a486538459814e77
2016-04-13 06:44:29 +00:00
Pierre Imai
a5ccd54500 Merge "Fix a memory leak in ConnectivityManager." into nyc-dev 2016-04-13 06:37:33 +00:00
Paul Jensen
f2f05c4e50 Merge "If Internet probe is redirected, pass redirect destination to NetworkAgent." into nyc-dev am: 45e879c
am: 2c1f03a

* commit '2c1f03ade023a61428b7d9101bc10e4c88ae941a':
  If Internet probe is redirected, pass redirect destination to NetworkAgent.

Change-Id: I4c5f5cb8591d8729de9036a6c2aabacd4aba0f39
2016-04-13 02:02:13 +00:00
Paul Jensen
45e879c303 Merge "If Internet probe is redirected, pass redirect destination to NetworkAgent." into nyc-dev 2016-04-13 01:33:37 +00:00
Trevor Johns
38207ed939 Merge "Merge branch \'mnc-mr-docs\' into mnc-ub-dev am: 3e5055b -s ours am: e5ff66d" into nyc-dev-plus-aosp
am: ce2e35a

* commit 'ce2e35a1e1b63a1c45c0f249bf5d8586e1f9efc3': (546 commits)
  Update studio landing page and add all-new install flow docs. bug: 27850063 (update system reqs for 2.0) bug: 27725026 (update download page for 2.0) bug: 23908299 (clean up download and get started)
  docs: April 2016 Dashboard update
  docs: Added  new  partner logos to the car brands section of auto index page.
  Revert "Updates for Play" April Fool's joke.
  Updates for Play.
  docs: "Result is:" paragraph now in correct position on page.
  docs: Fixed namespace shown in a line of style XML
  docs: Add note about missing recording functionality in Live Channels
  docs: NDK r11c - release notes and downloads
  docs: Removed dead link in "create project" TOC.
  docs: Corrected reference link for NotificationManager.notify().
  docs: Added link to "preparing for multiwindow" blog post
  docs: Clarified how multi-window applies to activities in task stack
  [RenderScript] Update documentation about API level and RS Support Lib.
  cherrypick from mnc-docs docs: Updated API changes for Dinar wearable support.
  simplification and clarification to the Studio Overview
  Substitute for placeholder text.
  docs: Added missing semicolon within code sample.
  docs: Fixed Marshmallow links in API level table.
  docs: Update Nexus 9, 9G OTA images for N Preview
  ...

Change-Id: Id24c2a67c740bf8a4526473bfe1defdbb599c3f1
2016-04-12 22:37:15 +00:00
Dirk Dougherty
e5ff66d8bc Merge branch \'mnc-mr-docs\' into mnc-ub-dev
am: 3e5055b  -s ours

* commit '3e5055bec9570280638d5da0ef209765bba9dfaf': (546 commits)
  Update studio landing page and add all-new install flow docs. bug: 27850063 (update system reqs for 2.0) bug: 27725026 (update download page for 2.0) bug: 23908299 (clean up download and get started)
  docs: April 2016 Dashboard update
  docs: Added  new  partner logos to the car brands section of auto index page.
  Revert "Updates for Play" April Fool's joke.
  Updates for Play.
  docs: "Result is:" paragraph now in correct position on page.
  docs: Fixed namespace shown in a line of style XML
  docs: Add note about missing recording functionality in Live Channels
  docs: NDK r11c - release notes and downloads
  docs: Removed dead link in "create project" TOC.
  docs: Corrected reference link for NotificationManager.notify().
  docs: Added link to "preparing for multiwindow" blog post
  docs: Clarified how multi-window applies to activities in task stack
  [RenderScript] Update documentation about API level and RS Support Lib.
  cherrypick from mnc-docs docs: Updated API changes for Dinar wearable support.
  simplification and clarification to the Studio Overview
  Substitute for placeholder text.
  docs: Added missing semicolon within code sample.
  docs: Fixed Marshmallow links in API level table.
  docs: Update Nexus 9, 9G OTA images for N Preview
  ...

Change-Id: I2a64872d24ff2780503766f94e6d693edbdd47b8
2016-04-12 19:23:52 +00:00
Paul Jensen
9c9e48fbd1 If Internet probe is redirected, pass redirect destination to NetworkAgent.
Transport may use the redirect to make additional determination about network
state.

Bug: 25203607
Change-Id: I07d8918f13fdcbe0b6fd757536bfc1850a2a244f
2016-04-12 08:54:36 -04:00
Pierre Imai
66d9bd8806 Fix a memory leak in ConnectivityManager.
Remove callbacks from the internal storage when they are being unregistered.

Change-Id: Ia42ed7aefaebd8caf3eada8e42b6cb7a940d7647
2016-04-12 15:00:28 +09:00
Lorenzo Colitti
0ff1c591c3 Merge "Reinstate much-reduced ConnectivityService logging." into nyc-dev am: facc09d
am: fb1a323

* commit 'fb1a323da6f07a90355efa8de9f3b84842c0ad2f':
  Reinstate much-reduced ConnectivityService logging.

Change-Id: I948e337c16115e27177700af0f9ddc4ac7a77e0a
2016-04-11 16:21:50 +00:00
Lorenzo Colitti
facc09db55 Merge "Reinstate much-reduced ConnectivityService logging." into nyc-dev 2016-04-11 16:08:52 +00:00
Lorenzo Colitti
cf5320fd42 Merge changes Ic2c84de7,I379aef92 into nyc-dev am: cbb62db
am: 73ab8fd

* commit '73ab8fd683a5c2d363952cf6d30be04c85537530':
  Remove duplicated code in NetworkStateTrackerHandler.
  Improve Tethering and NativeDaemonConnector logging.

Change-Id: Iddd137e805233fb5026493fb57b32dcff4159092
2016-04-11 14:41:39 +00:00
Lorenzo Colitti
cbb62db80e Merge changes Ic2c84de7,I379aef92 into nyc-dev
* changes:
  Remove duplicated code in NetworkStateTrackerHandler.
  Improve Tethering and NativeDaemonConnector logging.
2016-04-11 14:27:31 +00:00
Lorenzo Colitti
ebf757df41 Reinstate much-reduced ConnectivityService logging.
Change-Id: I9d1292f8c036be2a854fdb537f4ccb957d211966
2016-04-11 23:19:06 +09:00
Lorenzo Colitti
b54bea91bc Remove duplicated code in NetworkStateTrackerHandler.
Also use MessageUtils to decode message names.

Change-Id: Ic2c84de73fbf3eb10cc9634a083e5d3b3ffb807a
2016-04-11 17:40:22 +09:00
Jack Yu
62f081298d Merge "Excluded certain APNs (e.g. IMS) from mobile data usage." into nyc-dev am: 18c98fe
am: 6754d23

* commit '6754d237bb8c6e1fba779f90417b4a2fe07d2b3e':
  Excluded certain APNs (e.g. IMS) from mobile data usage.

Change-Id: I0f37f4d296de88763019f469a0356e753b9f3636
2016-04-09 06:25:54 +00:00
Jack Yu
18c98fed4d Merge "Excluded certain APNs (e.g. IMS) from mobile data usage." into nyc-dev 2016-04-09 03:30:31 +00:00
Jack Yu
e1e361a669 Excluded certain APNs (e.g. IMS) from mobile data usage.
Added not_metered capability to a mobile network if none
of its associated APN types are metered. Also used not_metered
capability to determine if a network should be accounted for
data usage or not instead of using network type, which is
always MOBILE after refactoring. Will add VT usage support
in next phase.

bug: 20888836
Change-Id: Id692cb856be9a47d0e918371112630128965b1bb
2016-04-07 10:07:31 -07:00
Robin Lee
908a75e480 Merge "Internal API for system apps to determine default network for other apps" into nyc-dev am: 80f2000
am: a948f88

* commit 'a948f8872aa045ab22f42285f195fdb413c5ff66':
  Internal API for system apps to determine default network for other apps

Change-Id: Ib719f0cebb41afe4aa52241f3797598a7e468d2d
2016-04-07 16:51:53 +00:00
Robin Lee
80f2000491 Merge "Internal API for system apps to determine default network for other apps" into nyc-dev 2016-04-07 16:43:15 +00:00
Robin Lee
5b52bef8d8 Internal API for system apps to determine default network for other apps
Callers with CONNECTIVITY_INTERNAL permission can read off the netId
that an application is assigned to by default.

Necessary for making connections as the default network for a client
app eg. when downloading stuff on its behalf.

Bug: 27074270
Change-Id: I8d35e8e99126875f55f3c545090326f3e9be43fb
2016-04-07 14:55:59 +00:00
Erik Kline
e9c091ba5a Merge "Make public the registerDefaultNetworkCallback API" into nyc-dev am: df78e84
am: a577a3a

* commit 'a577a3a29f601fd2b71ad89eedcc52bdd8efbccb':
  Make public the registerDefaultNetworkCallback API

Change-Id: Ic749ede5b84e443fed04701ecdd0f6521a77158f
2016-04-06 08:58:22 +00:00
Erik Kline
df78e84ef7 Merge "Make public the registerDefaultNetworkCallback API" into nyc-dev 2016-04-06 08:51:08 +00:00
Erik Kline
1fb9333459 Don\'t flush DNS cache on route changes. am: b988890
am: 09a5fbd

* commit '09a5fbd6ec86000f95423a47e9266ee124609cb3':
  Don't flush DNS cache on route changes.

Change-Id: I0e019a46548bbc81628939989fad39f96bc83ebe
2016-04-06 04:00:25 +00:00
Trevor Johns
3e5055bec9 Merge branch 'mnc-mr-docs' into mnc-ub-dev
Large merge to reconnect automerger for docs branch to mainline.

 Conflicts:
	docs/html-intl/intl/es/index.jd
	docs/html-intl/intl/es/preview/download.jd
	docs/html-intl/intl/es/preview/index.jd
	docs/html-intl/intl/ja/index.jd
	docs/html-intl/intl/ja/preview/download.jd
	docs/html-intl/intl/ja/preview/index.jd
	docs/html-intl/intl/ko/index.jd
	docs/html-intl/intl/ko/preview/download.jd
	docs/html-intl/intl/ko/preview/index.jd
	docs/html-intl/intl/pt-br/index.jd
	docs/html-intl/intl/pt-br/preview/download.jd
	docs/html-intl/intl/pt-br/preview/index.jd
	docs/html-intl/intl/ru/index.jd
	docs/html-intl/intl/ru/preview/download.jd
	docs/html-intl/intl/ru/preview/index.jd
	docs/html-intl/intl/zh-cn/index.jd
	docs/html-intl/intl/zh-cn/preview/download.jd
	docs/html-intl/intl/zh-cn/preview/index.jd
	docs/html-intl/intl/zh-tw/index.jd
	docs/html-intl/intl/zh-tw/preview/download.jd
	docs/html-intl/intl/zh-tw/preview/index.jd
	docs/html/guide/topics/manifest/compatible-screens-element.jd
	docs/html/guide/topics/manifest/uses-feature-element.jd
	docs/html/preview/download.jd
	docs/html/preview/features/runtime-permissions.jd
	docs/html/sdk/index.jd
	docs/html/tools/revisions/studio.jd
	docs/html/tools/sdk/eclipse-adt.jd
	docs/html/tools/support-library/features.jd
	telephony/java/android/telephony/TelephonyManager.java

Bug: 28000173
Change-Id: Iacab0481175f1b32e0ac3bab98cde9e994100e94
2016-04-05 20:32:07 -07:00
Erik Kline
7c912a4025 Make public the registerDefaultNetworkCallback API
Change-Id: I89d7a6f49f5d6a0da3402a07407b0f8d93181b4f
2016-04-06 12:22:47 +09:00
Erik Kline
b988890b21 Don't flush DNS cache on route changes.
Since Lollipop, routes are isolated within Networks.  Flushing a
Network's DNS cache whenever that same Network's routes are updated
doesn't provide any benefit.  Any system components depending on this
behaviour need to uncovered and fixed.

Additionally, clean up no-longer-used flushNetworkDnsCache().  This
should be replaced, when needed, by a proper binder interface to netd.

Change-Id: I34bf79e4839da014d466058a876d754209d0c007
2016-04-06 11:30:51 +09:00
Erik Kline
62ba687155 Merge "Delete unused default DNS setting code" into nyc-dev am: 39ca5c2
am: 2e6eeed

* commit '2e6eeed7d321f468f9434927f0ca433926044bec':
  Delete unused default DNS setting code

Change-Id: I28efdd6bd2b1cbaf0936fcd7d0104b8bf3f27647
2016-04-05 04:09:44 +00:00
Erik Kline
85fc29e714 Delete unused default DNS setting code
Change-Id: I601a647714171f205d179d6fef6c112949fc5a94
2016-04-05 11:48:01 +09:00
Lorenzo Colitti
62d97981db Merge "Add a toString method to ApfCapabilities." into nyc-dev am: 36e480c
am: 366ce8a

* commit '366ce8a8d92b3368c51b7d7f1408eadcddcaf96c':
  Add a toString method to ApfCapabilities.

Change-Id: Iee5554cdabab4fe8a274faed22e0d56c48c64317
2016-03-29 08:17:35 +00:00
Lorenzo Colitti
bd0c0af47f Add a toString method to ApfCapabilities.
Change-Id: I505b90b7cd818cb3477990ec6b41b16db46d1c08
2016-03-28 17:33:30 +09:00
Paul Jensen
7e35dac240 Merge "Move ApfFilter from ConnectivityService to IpManager" into nyc-dev am: 732340c
am: ebdf3f0

* commit 'ebdf3f006854b04de2508314be7ac0788b6faa99':
  Move ApfFilter from ConnectivityService to IpManager
2016-03-25 13:01:09 +00:00
Paul Jensen
6b7f7a0852 Move ApfFilter from ConnectivityService to IpManager
There's a few advantages to having ApfFilter in IpManager:
1. If things go wrong, crashing a particular transport is less bad then
   crashing ConnectivityService.  We also don't want to use
   ConnectivityService as a dumping ground for transport-specific logic.
2. This makes implementing WifiManager.MulticastLock a lot simpler and
   safer because enabling/disabling it doesn't have to go through the
   NetworkAgent, which could risk various races (e.g. installing a filter
   into the wrong WiFi network).
3. IpManager is the ultimate source for LinkProperties for a particular
   transport and since ApfFilter uses the LinkProperties it's better to
   have it closely paired with the IpManager. Likewise, ApfFilter needs
   to know the APF capabilities of the transport, so having it in
   the transport avoids having to parcel this information through the
   NetworkAgent.

Bug: 26238573
Change-Id: I99b85f2b64972f0e7572170ec5d1926081aa3429
2016-03-25 07:46:07 -04:00