summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorXiao Ma <xiaom@google.com>2020-05-07 12:26:24 +0000
committerXiao Ma <xiaom@google.com>2020-05-07 13:28:00 +0000
commit1eb4c9d55b8e15badb58d0531c1b20c54a54d0f8 (patch)
treea50dc869bd64955803682b6b71dd074272b75b59 /common
parentb12790b92269c9810122c414d77a592f9f17cc35 (diff)
Fix the potential NPE when starting provisioning with FILS.
Starting provisioning with enabled FILS is unlike the normal case that always happens after L2 connection has been established, at this point we already know the current bssid. However, for FILS connection, the current bssid is still null when starting prov. Bug: 155696520 Test: atest NetworkStackTests NetworkStackIntegrationTests Merged-In: I3c29c6ad95c23cea2b3f374fb9dc35a8f54a6427 Change-Id: I3c29c6ad95c23cea2b3f374fb9dc35a8f54a6427
Diffstat (limited to 'common')
-rw-r--r--common/moduleutils/src/android/net/shared/Layer2Information.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/common/moduleutils/src/android/net/shared/Layer2Information.java b/common/moduleutils/src/android/net/shared/Layer2Information.java
index 6825a93..fa4f102 100644
--- a/common/moduleutils/src/android/net/shared/Layer2Information.java
+++ b/common/moduleutils/src/android/net/shared/Layer2Information.java
@@ -16,6 +16,7 @@
package android.net.shared;
+import android.annotation.Nullable;
import android.net.Layer2InformationParcelable;
import android.net.MacAddress;
@@ -23,14 +24,18 @@ import java.util.Objects;
/** @hide */
public class Layer2Information {
+ @Nullable
public final String mL2Key;
+ @Nullable
public final String mGroupHint;
+ @Nullable
public final MacAddress mBssid;
/**
* Create a Layer2Information with the specified configuration.
*/
- public Layer2Information(String l2Key, String groupHint, MacAddress bssid) {
+ public Layer2Information(@Nullable final String l2Key, @Nullable final String groupHint,
+ @Nullable final MacAddress bssid) {
mL2Key = l2Key;
mGroupHint = groupHint;
mBssid = bssid;
@@ -41,7 +46,7 @@ public class Layer2Information {
StringBuffer str = new StringBuffer();
str.append("L2Key: ").append(mL2Key);
str.append(", GroupHint: ").append(mGroupHint);
- str.append(", bssid: ").append(mBssid.toString());
+ str.append(", bssid: ").append(mBssid);
return str.toString();
}