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

Commit 09314832 authored by Xiao Ma's avatar Xiao Ma Committed by Automerger Merge Worker
Browse files

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

Merge "Add new method to update Layer2 information when L2 roaming happens." am: cb40a565 am: 7d1a09e0

Change-Id: Icd082b845aab15f1294fadff5c273d6a6359537c
parents b913c790 7d1a09e0
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);
        }
    }
}