Loading core/java/android/net/MacAddress.aidl 0 → 100644 +20 −0 Original line number Diff line number Diff line /** * * Copyright (C) 2019 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package android.net; @JavaOnlyStableParcelable parcelable MacAddress; services/net/java/android/net/ip/IpClientCallbacks.java +8 −0 Original line number Diff line number Diff line Loading @@ -17,8 +17,11 @@ package android.net.ip; import android.net.DhcpResults; import android.net.Layer2PacketParcelable; import android.net.LinkProperties; import java.util.List; /** * Callbacks for handling IpClient events. * Loading Loading @@ -116,4 +119,9 @@ public class IpClientCallbacks { * whenever 464xlat is being started or stopped. */ public void setNeighborDiscoveryOffload(boolean enable) {} /** * Invoked on starting preconnection process. */ public void onPreconnectionStart(List<Layer2PacketParcelable> packets) {} } services/net/java/android/net/ip/IpClientManager.java +19 −1 Original line number Diff line number Diff line Loading @@ -234,7 +234,7 @@ public class IpClientManager { slot, KeepalivePacketDataUtil.toStableParcelable(pkt)); return true; } catch (RemoteException e) { log("Error adding Keepalive Packet Filter ", e); log("Error adding NAT-T Keepalive Packet Filter ", e); return false; } finally { Binder.restoreCallingIdentity(token); Loading Loading @@ -272,4 +272,22 @@ public class IpClientManager { Binder.restoreCallingIdentity(token); } } /** * Notify IpClient that preconnection is complete and that the link is ready for use. * The success parameter indicates whether the packets passed in by 'onPreconnectionStart' * were successfully sent to the network or not. */ public boolean notifyPreconnectionComplete(boolean success) { final long token = Binder.clearCallingIdentity(); try { mIpClient.notifyPreconnectionComplete(success); return true; } catch (RemoteException e) { log("Error notifying IpClient Preconnection completed", e); return false; } finally { Binder.restoreCallingIdentity(token); } } } services/net/java/android/net/ip/IpClientUtil.java +8 −0 Original line number Diff line number Diff line Loading @@ -20,12 +20,14 @@ import static android.net.shared.IpConfigurationParcelableUtil.fromStableParcela import android.content.Context; import android.net.DhcpResultsParcelable; import android.net.Layer2PacketParcelable; import android.net.LinkProperties; import android.net.NetworkStackClient; import android.os.ConditionVariable; import java.io.FileDescriptor; import java.io.PrintWriter; import java.util.List; /** Loading Loading @@ -176,6 +178,12 @@ public class IpClientUtil { mCb.setNeighborDiscoveryOffload(enable); } // Invoked on starting preconnection process. @Override public void onPreconnectionStart(List<Layer2PacketParcelable> packets) { mCb.onPreconnectionStart(packets); } @Override public int getInterfaceVersion() { return this.VERSION; Loading Loading
core/java/android/net/MacAddress.aidl 0 → 100644 +20 −0 Original line number Diff line number Diff line /** * * Copyright (C) 2019 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package android.net; @JavaOnlyStableParcelable parcelable MacAddress;
services/net/java/android/net/ip/IpClientCallbacks.java +8 −0 Original line number Diff line number Diff line Loading @@ -17,8 +17,11 @@ package android.net.ip; import android.net.DhcpResults; import android.net.Layer2PacketParcelable; import android.net.LinkProperties; import java.util.List; /** * Callbacks for handling IpClient events. * Loading Loading @@ -116,4 +119,9 @@ public class IpClientCallbacks { * whenever 464xlat is being started or stopped. */ public void setNeighborDiscoveryOffload(boolean enable) {} /** * Invoked on starting preconnection process. */ public void onPreconnectionStart(List<Layer2PacketParcelable> packets) {} }
services/net/java/android/net/ip/IpClientManager.java +19 −1 Original line number Diff line number Diff line Loading @@ -234,7 +234,7 @@ public class IpClientManager { slot, KeepalivePacketDataUtil.toStableParcelable(pkt)); return true; } catch (RemoteException e) { log("Error adding Keepalive Packet Filter ", e); log("Error adding NAT-T Keepalive Packet Filter ", e); return false; } finally { Binder.restoreCallingIdentity(token); Loading Loading @@ -272,4 +272,22 @@ public class IpClientManager { Binder.restoreCallingIdentity(token); } } /** * Notify IpClient that preconnection is complete and that the link is ready for use. * The success parameter indicates whether the packets passed in by 'onPreconnectionStart' * were successfully sent to the network or not. */ public boolean notifyPreconnectionComplete(boolean success) { final long token = Binder.clearCallingIdentity(); try { mIpClient.notifyPreconnectionComplete(success); return true; } catch (RemoteException e) { log("Error notifying IpClient Preconnection completed", e); return false; } finally { Binder.restoreCallingIdentity(token); } } }
services/net/java/android/net/ip/IpClientUtil.java +8 −0 Original line number Diff line number Diff line Loading @@ -20,12 +20,14 @@ import static android.net.shared.IpConfigurationParcelableUtil.fromStableParcela import android.content.Context; import android.net.DhcpResultsParcelable; import android.net.Layer2PacketParcelable; import android.net.LinkProperties; import android.net.NetworkStackClient; import android.os.ConditionVariable; import java.io.FileDescriptor; import java.io.PrintWriter; import java.util.List; /** Loading Loading @@ -176,6 +178,12 @@ public class IpClientUtil { mCb.setNeighborDiscoveryOffload(enable); } // Invoked on starting preconnection process. @Override public void onPreconnectionStart(List<Layer2PacketParcelable> packets) { mCb.onPreconnectionStart(packets); } @Override public int getInterfaceVersion() { return this.VERSION; Loading