EthernetDataTracker: Set network available on connected

This change fixes state mismatch found in the bugs below,
and makes the code look consistent with disconnect().

In startMonitoring(), reconnect() is called before mNMService.registerObserver().
Then dhcpThread.run() could finish without getting interfaceLinkStateChanged() callback.
In such a case, mNetworkInfo has connected but not-available state - which is contradictory.

Bug: 8113933, 8291000, 8291039
Change-Id: I29d74f8d09dcffb97d6c9f8198811bca046fef0c
Avoid NullPointerException in getHandler()

mAttachInfo may be set to null by other threads while running
getHandler().

This fix assigns mAttachInfo to a local variable. Checking null pointer
and getting a member variable are executed through the local variable.
This local variable is constant. So NullPointerException doesn't occur
even if mAttachInfo is set to null while running getHandler().

Change-Id: I4013dfb7951bd864628868ed58f8c4f5b7cbd1d3
frameworks/base:Fix for P2P GO beaconing when 4-way Handshake fails.

Fix for P2P GO beaconing when 4-way Handshake fails by setting
p2p_group_idle timeout of 10 sec when group is started as a GO
and clear it when AP_STA_CONNECTED event is received.

Change-Id: I40189efc31eeb55e01a95a2a8e9c1a95d929952d
bug: 8871100
Signed-off-by: Deepthi Gowri <deepthi@codeaurora.org>
framework/base: Handle ASSOC-REJECT events

Disable current network and enable other saved networks(if any)
once number of ASSOC-REJECTs on an attempt to connect to a corresponding
network exceeds the threshold.

Change-Id: Iac3c1596aa800d93c55b0ac5d8070a058c3842bd
Enable Opportunistic Key Caching on WPA2-Enterprise Networks

Add a "proactive_key_caching=1" line to every network segment config that represents a
WPA2-Enterprise network. This enables Opportunistic Key Caching for all eligible
WLANs.

Replaced TABs with spaces.

Change-Id: Ia529dcd1dee7a21a68c80de05a9f590ddd944d4c
Signed-off-by: Partha N <parthan@gmail.com>
Merge "Avoid NullPointerException in getHandler()"
Expose AutoCloseable.

Bug: 3484927
Change-Id: I769c19ffbefb29ce11b828589f3533c24d134242
Merge "Expose AutoCloseable."
Merge "frameworks/base:Fix for P2P GO beaconing when 4-way Handshake fails."
Merge "framework/base: Handle ASSOC-REJECT events"
Merge "Enable Opportunistic Key Caching on WPA2-Enterprise Networks"
Expose @SafeVarargs.

Bug: 3484927
Change-Id: I8ac70b6a102ebf87c51c76935bd87a21f6c17506
Tracking libnativehelper dependencies

Change-Id: I05ec62c43fbe5f8ba23256abac7271ca0b1a7242
Merge "Tracking libnativehelper dependencies"
Merge "Expose @SafeVarargs."
Track libcore cleanup.

Change-Id: If9065fd48017af5490d0467a46eacd4ad14e4d96
Merge "Track libcore cleanup."
Track libcore changes.

Bug: 3484927
Change-Id: Ifbbde9c7cbba1bccd5e1902ad5a2890bff2b2627
Merge "Track libcore changes."
Track libcore API changes.

Change-Id: Ieb4436a5e3162a114b044bd7561bdaa4931afa0f