diff options
| author | Christopher Wiley <wiley@google.com> | 2016-09-13 12:07:58 -0700 |
|---|---|---|
| committer | Christopher Wiley <wiley@google.com> | 2016-09-19 14:12:38 -0700 |
| commit | ce5d913387c7fa4792ccb0dd13d79b6636c300a7 (patch) | |
| tree | 81ebde200c8c24d3920f86c7d71dd3ddf1630051 /core/java/android/net/InterfaceConfiguration.java | |
| parent | 16e1007481f508e292505bc348cec2320cbe9d08 (diff) | |
Allow WiFi components to manage interface up state
Setting the WiFi network interface up or down is racy because it
is not synchronized with the WiFi components managing the interface.
This causes a problem for hostapd when the interface is marked down
before hostapd starts because it causes the driver to enter the
de-initialization process. hostapd does not know how to react to this
change of events.
Bug: 31205821
Test: bug no longer reproduces on upcoming devices, unit tests pass
Change-Id: I96938e2aef89b400593d42ce1b0a6ccc2d2e5754
Diffstat (limited to 'core/java/android/net/InterfaceConfiguration.java')
| -rw-r--r-- | core/java/android/net/InterfaceConfiguration.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/core/java/android/net/InterfaceConfiguration.java b/core/java/android/net/InterfaceConfiguration.java index 8cdd15305018..ea53a71245a5 100644 --- a/core/java/android/net/InterfaceConfiguration.java +++ b/core/java/android/net/InterfaceConfiguration.java @@ -80,6 +80,14 @@ public class InterfaceConfiguration implements Parcelable { mFlags.add(FLAG_DOWN); } + /** + * Set flags so that no changes will be made to the up/down status. + */ + public void ignoreInterfaceUpDownStatus() { + mFlags.remove(FLAG_UP); + mFlags.remove(FLAG_DOWN); + } + public LinkAddress getLinkAddress() { return mAddr; } |
