Commit graph

1,992 commits

Message SHA1
Merge "Revert "requestBwUpdate() public API review""
Robert Greenwalt   authored and   Android (Google) Code Review   commited 2015-04-21 23:59:35 +00:00
f780ac8cd6
Revert "requestBwUpdate() public API review"
This reverts commit 85d7af1f8b.

Change-Id: I8c22d285ff1f56f1bd31a0fa9f2e6a79959347b1

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

fenglu   commited 2015-04-21 15:33:19 -07:00
85d7af1f8b
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
934122fbbb
Move factoryReset to service and protect.
bug:16161518
Change-Id: I02d1bbae1887c62ee426e6f03e8bc1f18c6666bf

Stuart Scott   commited 2015-04-20 10:52:35 -07:00
d546364a81
CONNECTIVITY_ACTION is the new _IMMEDIATE
Bug: 20013379
Change-Id: I3e904dc0a0ddb30c7bb8cdb24d0762052ddc59eb

Erik Kline   commited 2015-04-20 16:11:58 +09:00
d06906840a
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
87a81fd19f
LCE service implementation - connectivity side
Change-Id: If11bd99c44c7dc8d2aa2bc05a10e04421739baa6

fenglu   commited 2015-04-16 02:53:39 -07:00
3f35740bd8
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
0f6d6bdb0e
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
e80d3096ad
Merge changes from topic 'no_internet'
* changes:
  Add a noInternetAccessExpected boolean to WifiConfiguration.
  Prompt if a network without an Internet connection is selected
  Give SystemUI the OVERRIDE_WIFI_CONFIG permission.
  Add an UNKNOWN_UID constant to WifiConfiguration.

Lorenzo Colitti   authored and   Android (Google) Code Review   commited 2015-04-15 11:48:22 +00:00
9b8639edbc
multinetwork API: native implementation
Bug: 19537384
Change-Id: I04f4a7de2b1e583989b67a853df6ab50289c2185

Erik Kline   commited 2015-04-15 15:32:08 +09:00
7b139a856b
Prompt if a network without an Internet connection is selected
When a network is explicitlySelected, keep it connected but do
not automatically switch to it. Instead, attempt to validate it,
and if 8 seconds have passed and the network is not yet
validated, prompt the user asking whether to switch to it anyway.

Bug: 20081183
Change-Id: I03a8459eb39979e3dc8e94662b85a44605dd7e69

Lorenzo Colitti   commited 2015-04-15 13:38:22 +09:00
6947c067bd
am b5e0cfb..557d2f5 from mirror-m-wireless-internal-release
557d2f5 Merge "Add ConnectivityManager.reportNetworkConnectivity() API" into m-wireless-dev
ab5267a Fix onLost/onFound logic in isSettingsAndFilterComboAllowed
b95d795 Add ConnectivityManager.reportNetworkConnectivity() API
238e0f9 OBEX Over L2CAP + SDP search API for BT profiles
1f56738 Add ConnectivityManager.getActiveNetwork(). Rework NetID allocation in ConnectivityService so registerNetworkAgent() can return the allocated NetID.
bf18bed Merge "Non-functional code cleanup of ConnectivityService." into m-wireless-dev
db8784e Merge "Cleanup of Video Call pause functionality." into m-wireless-dev
c7a1d23 Non-functional code cleanup of ConnectivityService.
e593d0a Onfound onlost feature.
0326f58 Merge "API for config app." into m-wireless-dev
e9b056f API for config app.
d5351e7 RTT framework interface update
224ab3d Unhide Network.openConnection(URL, Proxy).
bd2d378 Fix typos in ConnectivityManager documentation.

Change-Id: Ib4c88f6d7ad1b24227b032555c62a5804194384b

Vinit Deshpande   commited 2015-04-14 16:15:02 -07:00
fda5739846
am 73e056d3: am 402f2501: am 3312c6b9: Merge "Add android.net.IpPrefix#contains()"
* commit '73e056d3931b419c2653eb7365fb72b50a9a36c3':
  Add android.net.IpPrefix#contains()

Erik Kline   authored and   Android Git Automerger   commited 2015-04-14 09:58:38 +00:00
1fee823879
Add android.net.IpPrefix#contains()
This was originally to avoid RuntimeException in RouteInfo#matches():
    When an IPv6 prefix with a length greater than the max permitted
    for IPv4 is matched against an Inet4Address, the call to
    NetworkUtils throws RuntimeException.

Change-Id: I92e2bd19a4e7d656cf682fd27678da07e211850d

Erik Kline   commited 2015-04-14 16:19:11 +09:00
b98afb001c
Add ConnectivityManager.reportNetworkConnectivity() API
This new API allows reporting networks that are perceived to provide Internet
connectivity and networks that are not.  This allows the framework to avoid
needlessly reevaluating networks where the apps perception matches the
framework's perception.  This was not possible with the prior API,
reportBadNetwork.

Bug: 16214361
Change-Id: Id4409bd7538854bd837231fb50e693c10a62b4f2

Paul Jensen   commited 2015-04-13 18:48:54 +00:00
b95d7950f5
Merge commit 'e593d0a' into merge_work
Change-Id: I4f8ae40fc446cd9cda4d5c6ec99469a98dda595b

Prerepa Viswanadham   commited 2015-04-10 15:58:10 -07:00
9dd7ce3ca2
Add ConnectivityManager.getActiveNetwork().
Rework NetID allocation in ConnectivityService so registerNetworkAgent() can
return the allocated NetID.

Bug: 19416463
Change-Id: I68e395552cf27422c80b4dfae5db5d56a0d68f5d

Paul Jensen   commited 2015-04-10 14:03:13 +00:00
1f567385ff
More work on device idle mode and other power stuff.
Add idle mode support to the alarm manager.  Introduce
a new concept of flags associated with alarms to tell
the alarm manager how to treat the alarm -- they allow
everything from the alarm that will bring us out of idle
mode, to alarms that are allowed when idle or should
also bring us out of idle.  The standalone boolean is
now also a flag.

(Note there is currently no protection from user space
setting the flags however it wants; I will be working
on that in a follow-up change.)

When in idle mode, the alarm manager pushes all alarms
that shouldn't execute during that time over to a
separate list that is not executed until out of idle.
To help with this, I reworked a bit how Alarm objects
are managed, so that when rebatching or moving between
lists we don't have to allocated new objects but can
just use the same existing instance.

Also tweaked the sync manager to deal with idle mode,
which currently just means doing the same thing as when
low on storage -- turning off sync.

Add new ACTION_CHARGING and ACTION_DISCHARGING broadcasts
that apps can listen for to know when the device is actively
charging and discharging.  These are better than the old
POWER_CONNECTED and POWER_DISCONNECTED ones because we only
report charging when we actually see that there is enough
power being provided to charge the battery (and will report
discharging if there is not enough power).

The job controller uses these new actions for scheduling
jobs that want to run while plugged in.  Removed the
"stable charging" stuff while doing so, since the new
charging state serves as an even better signal for that.

Introduced two new process states: FOREGROUND_SERVICE and
TOP_SLEEPING.  This will allow us to treat foreground services
specially (such as still allowing network access to them for
background music playback) while not mixing them together with
whatever happens to be the top activity while the device is
asleep.

Also some other small cleanup here and there.

Change-Id: I7a9808b578bad6f50deb8e1baf919298512a0d3a

Dianne Hackborn   commited 2015-04-09 14:05:17 -07:00
522f038eec
Merge KDataBinder/ from platform/vendor/google/prototypes/data-binding to tools/data-binding/
Qiwen Zhao   commited 2015-04-08 15:58:36 -07:00
9f11a94d24
Non-functional code cleanup of ConnectivityService.
1. Remove ConnectivityService.findConnectionTypeForIface() as this can be done
   just as easily with supported APIs now.
2. Avoid making copies of Network objects as this precludes reuse of Network
   internals (e.g. socket factory, connection pool).

Change-Id: I52f92e35d769d8350471f485e408169608630082

Paul Jensen   commited 2015-04-08 07:46:49 -04:00
c7a1d23cdf
Adding per UID WiFi power distribution.
Change-Id: I88c539074607d7261f6c5cf1dbae47c3cf53f253

Adam Lesinski   commited 2015-04-07 11:37:10 -07:00
ff3fc4c97d
Merge "Revert "Adding per UID WiFi power distribution.""
Bart Sears   authored and   Android (Google) Code Review   commited 2015-04-07 06:19:55 +00:00
ac46e19cc6
Revert "Adding per UID WiFi power distribution."
This CL is breaking the clockwork settings app in master.  Reverting
until Adam has a chance to investigate.

This reverts commit 5ab174bac0.

Change-Id: Ieb11423c11cf9874a6175dce49843d0e1080c590

Bart Sears   commited 2015-04-07 06:14:04 +00:00
0e40aa8377
Unhide Network.openConnection(URL, Proxy).
Spun off from
https://partner-android-review.googlesource.com/#/c/205463/ for
ease of review.

Bug: 19416463
Change-Id: Ia37a53a350d55b5514b949242368dfe396f6b9a0

Lorenzo Colitti   commited 2015-04-07 13:13:20 +09:00
224ab3d3a3
Fix typos in ConnectivityManager documentation.
Spun off from
https://partner-android-review.googlesource.com/#/c/205463/ for
ease of review.

Bug: 19416463
Change-Id: I2f88ac415177ecd96c9191df5e390830869f52e1

Paul Jensen   authored and   Lorenzo Colitti   commited 2015-04-07 13:13:13 +09:00
bd2d378b7f
Merge "Adding per UID WiFi power distribution."
Adam Lesinski   authored and   Android (Google) Code Review   commited 2015-04-07 01:53:00 +00:00
5b0e313699
Adding per UID WiFi power distribution.
Change-Id: Ia3d97e0a1c3352127185c18626d8ba8221c9ab40

Adam Lesinski   commited 2015-04-06 18:36:06 -07:00
5ab174bac0
Merge "fix the flash caused by missing setMatrix() when surface size changes"
Chong Zhang   authored and   Android (Google) Code Review   commited 2015-04-06 21:35:15 +00:00
db4bbfecdd
am 0270d86a: am 778f47e5: am 069f4cbc: Merge "Fix memory leak in Connectivity Service when phone app crashes"
* commit '0270d86ab755dabb7d20013dcb591d3facbe1a08':
  Fix memory leak in Connectivity Service when phone app crashes

Robert Greenwalt   authored and   Android Git Automerger   commited 2015-04-06 18:17:28 +00:00
6ee271c0b3
Fix memory leak in Connectivity Service when phone app crashes
Upon crash of com.android.phone process, NetworkFactoryInfo is
not getting removed from HashMap and will get accumulated on
every start of the process.

Change-Id: Iafde28daddfc82728c03208522682b1efc85a121

Maunik Shah   commited 2015-04-04 21:48:24 +05:30
d1027f5338
Deprecate EXTRA_PROXY_INFO and unhide ConnectivityManager.getDefaultProxy().
1. Unhide ConnectivityManager.getDefaultProxy() and update it to
   take into account process-bound-Networks.
2. Deprecate EXTRA_PROXY_INFO and instead encourage querying via
   getDefaultProxy().

Bug: 17905627
Bug: 17420465
Bug: 18144582

Change-Id: I45358ee82fe705d048022c8238b2452f52c37b88

Paul Jensen   commited 2015-04-03 07:25:55 -04:00
6fabfa0e32
Deprecate static ConnectivityManager.get/setProcessDefaultNetwork() functions.
These functions risk hitting an unchecked Exception due to ConnectivityManager
not being instantiated yet.  Also, change Network.openConnection() to throw a
checked Exception rather than an unchecked Exception when ConnectivityManager
is not yet instantiated.

bug:19416463
Change-Id: Ie1e2b3238aec0343d267c76b64927073f2f05f85

Paul Jensen   commited 2015-04-02 14:03:43 +00:00
ee2f45d85f
Move reset network settings into framework.
bug: 16161518
Change-Id: Ic3b537ebd09d1b9723feff9dcc96e20fda05a94f

Stuart Scott   commited 2015-03-30 18:02:55 -07:00
0f835acb91
merge in master-release history after reset to master
The Android Automerger   commited 2015-03-28 01:05:55 -07:00
b254d603ad
Keep debug information in NetworkStats files
Create two special SETs.

SET_DBG_VPN_IN is used by individual applications to know
how much traffic of the NetworkIdentity was actually moved
from a VPN app.
SET_DBG_VPN_OUT is used by the VPN app to know how much
traffic of the NetworkIdentity was deducted.

A debug application can restore the raw stats by these
entries.
  raw_traffic = recorded_entry (TAG_NONE, SET_ALL)
              + recorded_entry (TAG_NONE, SET_DBF_VPN_OUT)
              - recorded_entry (TAG_NONE, SET_DBF_VPN_IN)

The two debug SETs are not returned by
NetworkStatsService.openSession(). These debug entries are
retrieved by NetworkStatsCollection.dump().

Bug: 19536273
Change-Id: I03ef9f7667f5f2f48cbe3f6b11447fe7ead8ad3b

Wenchao Tong   commited 2015-03-27 13:49:13 -07:00
fdf2267b50
merge in master-release history after reset to master
The Android Automerger   commited 2015-03-26 01:03:50 -07:00
feba983610
Merge remote-tracking branch 'goog/mirror-m-wireless-internal-release' into master_merge
Change-Id: I49aab437af220f1139cfd2d0a9c362acce31074e

Prerepa Viswanadham   commited 2015-03-24 13:46:08 -07:00
5d4c045bcf
merge in master-release history after reset to master
The Android Automerger   commited 2015-03-21 01:03:05 -07:00
97966560e1
Merge "Make NetworkCapabilities.NOT_VPN javadoc visible." into m-wireless-dev
Paul Jensen   authored and   Android Partner Code Review   commited 2015-03-20 11:27:18 +00:00
703642c635
Add a protectFromVpn method that takes a FileDescriptor
Bug: 19704592
Change-Id: I9aeb29c2f6cf55fa010bc606c99b21a797ac5a19

Lorenzo Colitti   commited 2015-03-20 16:32:40 +09:00
ddf811b950
DHCP: Add a native method for making a DHCP socket.
Bug: 19704592
Change-Id: Iadd60d39c93aaabd2917e76791101a7d313b34be

Lorenzo Colitti   commited 2015-03-20 16:32:35 +09:00
06b991f444
Add two utility methods for IPv4 netmasks.
1. Add a validating method to convert a netmask to a prefix length.
2. Add a function to get the implicit netmask of an IPv4 address.
3. Add a unit test.

Bug: 19704592
Change-Id: Icb9f58d3903ea01df9e3720383c9bd5db6dd8f26

Lorenzo Colitti   commited 2015-03-20 16:32:34 +09:00
2af6f557df
merge in master-release history after reset to master
The Android Automerger   commited 2015-03-19 01:04:31 -07:00
8a0989c3da
Replace usages of deprecated Resources.getColor() and getColorStateList()
Change-Id: I8f64fe6c4c44a92ff6d07250223ba590a1d691b0

Alan Viverette   commited 2015-03-18 18:37:18 -07:00
501ecd6dac
Remove dead code, mostly DataStateTracker.
(cherry picked from AOSP commit 9edb1fc511)

Change-Id: I18c44cd08dfb51e02a96d0b726e9af1db21e3058

Paul Jensen   commited 2015-03-18 12:29:13 -04:00
8357dfd520
Make NetworkCapabilities.NOT_VPN javadoc visible.
Also adjust wording to be more suitable for NetworkRequests and NetworkAgents.

Change-Id: I1cc93cb20779cf02d6ffa0fa11ad2916c199b365

Paul Jensen   commited 2015-03-18 09:33:07 -04:00
ba9c42f661
merge in master-release history after reset to master
The Android Automerger   commited 2015-03-18 01:02:56 -07:00
96c6021c19