Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 048839c0 authored by Xiao Ma's avatar Xiao Ma
Browse files

Add new method to update Layer2 information when L2 roaming happens.

Bug: 131797393
Test: atest FrameworksNetTests

Merged-In: I171bd5e22b5afd5c62029392af627d7bdfe32161
(cherry picked from commit 1083b27f)

Change-Id: I23019658acfec18d342d38e8c189dcfaeb7b6f4a
parent bd24ca3d
Loading
Loading
Loading
Loading
+17 −0
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ import android.annotation.NonNull;
import android.net.NattKeepalivePacketData;
import android.net.ProxyInfo;
import android.net.TcpKeepalivePacketData;
import android.net.shared.Layer2Information;
import android.net.shared.ProvisioningConfiguration;
import android.net.util.KeepalivePacketDataUtil;
import android.os.Binder;
@@ -292,4 +293,20 @@ public class IpClientManager {
            Binder.restoreCallingIdentity(token);
        }
    }

    /**
     * Update the bssid, L2 key and group hint layer2 information.
     */
    public boolean updateLayer2Information(Layer2Information info) {
        final long token = Binder.clearCallingIdentity();
        try {
            mIpClient.updateLayer2Information(info.toStableParcelable());
            return true;
        } catch (RemoteException e) {
            log("Error updating layer2 information", e);
            return false;
        } finally {
            Binder.restoreCallingIdentity(token);
        }
    }
}