Loading play-services-nearby-api/src/main/java/com/google/android/gms/nearby/exposurenotification/ExposureNotificationStatus.java +7 −2 Original line number Diff line number Diff line Loading @@ -41,7 +41,7 @@ public enum ExposureNotificationStatus { /** * The client is not in approved client list. */ NOT_IN_WHITELIST, NOT_IN_ALLOWLIST, /** * Can't detected the BLE supporting of this device due to bluetooth is not enabled. */ Loading Loading @@ -69,10 +69,13 @@ public enum ExposureNotificationStatus { /** * Exposure notification is not supported for current user profile. */ USER_PROFILE_NOT_SUPPORT USER_PROFILE_NOT_SUPPORT, @Deprecated NOT_IN_WHITELIST ; private long flag() { if (this == NOT_IN_WHITELIST) return NOT_IN_ALLOWLIST.flag(); return 1 << ordinal(); } Loading @@ -89,8 +92,10 @@ public enum ExposureNotificationStatus { public static Set<ExposureNotificationStatus> flagsToSet(long flags) { Set<ExposureNotificationStatus> set = new HashSet<>(); for (ExposureNotificationStatus status : values()) { if (status == NOT_IN_WHITELIST) continue; if ((flags & status.flag()) > 0) { set.add(status); if (status == NOT_IN_ALLOWLIST) set.add(NOT_IN_WHITELIST); } } return set; Loading Loading
play-services-nearby-api/src/main/java/com/google/android/gms/nearby/exposurenotification/ExposureNotificationStatus.java +7 −2 Original line number Diff line number Diff line Loading @@ -41,7 +41,7 @@ public enum ExposureNotificationStatus { /** * The client is not in approved client list. */ NOT_IN_WHITELIST, NOT_IN_ALLOWLIST, /** * Can't detected the BLE supporting of this device due to bluetooth is not enabled. */ Loading Loading @@ -69,10 +69,13 @@ public enum ExposureNotificationStatus { /** * Exposure notification is not supported for current user profile. */ USER_PROFILE_NOT_SUPPORT USER_PROFILE_NOT_SUPPORT, @Deprecated NOT_IN_WHITELIST ; private long flag() { if (this == NOT_IN_WHITELIST) return NOT_IN_ALLOWLIST.flag(); return 1 << ordinal(); } Loading @@ -89,8 +92,10 @@ public enum ExposureNotificationStatus { public static Set<ExposureNotificationStatus> flagsToSet(long flags) { Set<ExposureNotificationStatus> set = new HashSet<>(); for (ExposureNotificationStatus status : values()) { if (status == NOT_IN_WHITELIST) continue; if ((flags & status.flag()) > 0) { set.add(status); if (status == NOT_IN_ALLOWLIST) set.add(NOT_IN_WHITELIST); } } return set; Loading