1 /* 2 * Copyright (C) 2021 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package com.android.server.wifi; 18 19 import android.annotation.NonNull; 20 import android.net.wifi.WifiSsid; 21 22 /** Data class to hold information for a {@link WifiMonitor#NETWORK_CONNECTION_EVENT}. */ 23 public class NetworkConnectionEventInfo { 24 public final int networkId; 25 @NonNull 26 public final WifiSsid wifiSsid; 27 @NonNull 28 public final String bssid; 29 public final boolean isFilsConnection; 30 NetworkConnectionEventInfo(int networkId, WifiSsid wifiSsid, String bssid, boolean isFilsConnection)31 public NetworkConnectionEventInfo(int networkId, WifiSsid wifiSsid, String bssid, 32 boolean isFilsConnection) { 33 this.networkId = networkId; 34 this.wifiSsid = wifiSsid; 35 this.bssid = bssid; 36 this.isFilsConnection = isFilsConnection; 37 } 38 39 @Override toString()40 public String toString() { 41 return "NetworkConnectionEventInfo{" 42 + "networkId=" + networkId 43 + ", wifiSsid=" + wifiSsid 44 + ", bssid='" + bssid + '\'' 45 + ", isFilsConnection=" + isFilsConnection 46 + '}'; 47 } 48 } 49