diff --git a/play-services-basement/src/main/java/com/google/android/gms/common/api/CommonStatusCodes.java b/play-services-basement/src/main/java/com/google/android/gms/common/api/CommonStatusCodes.java index 6a2cbb51..708a1e29 100644 --- a/play-services-basement/src/main/java/com/google/android/gms/common/api/CommonStatusCodes.java +++ b/play-services-basement/src/main/java/com/google/android/gms/common/api/CommonStatusCodes.java @@ -20,6 +20,7 @@ import androidx.annotation.NonNull; import org.microg.gms.common.PublicApi; +@SuppressWarnings({"deprecation", "DeprecatedIsStillUsed"}) @PublicApi public class CommonStatusCodes { public static final int SUCCESS_CACHE = -1; diff --git a/play-services-nearby-api/src/main/java/com/google/android/gms/nearby/exposurenotification/ExposureNotificationStatusCodes.java b/play-services-nearby-api/src/main/java/com/google/android/gms/nearby/exposurenotification/ExposureNotificationStatusCodes.java index 35e98886..dddea503 100644 --- a/play-services-nearby-api/src/main/java/com/google/android/gms/nearby/exposurenotification/ExposureNotificationStatusCodes.java +++ b/play-services-nearby-api/src/main/java/com/google/android/gms/nearby/exposurenotification/ExposureNotificationStatusCodes.java @@ -21,6 +21,8 @@ public class ExposureNotificationStatusCodes extends CommonStatusCodes { public static final int FAILED_DISK_IO = 39506; public static final int FAILED_UNAUTHORIZED = 39507; public static final int FAILED_RATE_LIMITED = 39508; + public static final int FAILED_NOT_IN_FOREGROUND = 39509; + public static final int FAILED_KEY_RELEASE_NOT_PREAUTHORIZED = 39510; public static String getStatusCodeString(final int statusCode) { switch (statusCode) { @@ -42,6 +44,10 @@ public class ExposureNotificationStatusCodes extends CommonStatusCodes { return "FAILED_UNAUTHORIZED"; case FAILED_RATE_LIMITED: return "FAILED_RATE_LIMITED"; + case FAILED_NOT_IN_FOREGROUND: + return "FAILED_NOT_IN_FOREGROUND"; + case FAILED_KEY_RELEASE_NOT_PREAUTHORIZED: + return "FAILED_KEY_RELEASE_NOT_PREAUTHORIZED"; default: return CommonStatusCodes.getStatusCodeString(statusCode); } diff --git a/play-services-nearby-core/src/main/kotlin/org/microg/gms/nearby/exposurenotification/ExposureNotificationService.kt b/play-services-nearby-core/src/main/kotlin/org/microg/gms/nearby/exposurenotification/ExposureNotificationService.kt index 064e2019..d8623408 100644 --- a/play-services-nearby-core/src/main/kotlin/org/microg/gms/nearby/exposurenotification/ExposureNotificationService.kt +++ b/play-services-nearby-core/src/main/kotlin/org/microg/gms/nearby/exposurenotification/ExposureNotificationService.kt @@ -50,7 +50,8 @@ class ExposureNotificationService : BaseService(TAG, GmsService.NEARBY_EXPOSURE) Feature("nearby_exposure_notification_get_status", 1), Feature("nearby_exposure_notification_diagnosis_keys_data_mapping", 1), Feature("nearby_exposure_notification_diagnosis_key_file_supplier", 1), - Feature("nearby_exposure_notification_package_configuration", 1) + Feature("nearby_exposure_notification_package_configuration", 1), + Feature("nearby_exposure_notification_preauthorize_key_release", 1) ) }) } diff --git a/play-services-nearby-core/src/main/kotlin/org/microg/gms/nearby/exposurenotification/ExposureNotificationServiceImpl.kt b/play-services-nearby-core/src/main/kotlin/org/microg/gms/nearby/exposurenotification/ExposureNotificationServiceImpl.kt index ade3a232..09f8e2d7 100644 --- a/play-services-nearby-core/src/main/kotlin/org/microg/gms/nearby/exposurenotification/ExposureNotificationServiceImpl.kt +++ b/play-services-nearby-core/src/main/kotlin/org/microg/gms/nearby/exposurenotification/ExposureNotificationServiceImpl.kt @@ -667,7 +667,7 @@ class ExposureNotificationServiceImpl(private val context: Context, private val override fun requestPreAuthorizedTemporaryExposureKeyRelease(params: RequestPreAuthorizedTemporaryExposureKeyReleaseParams) { // TODO: Proper implementation lifecycleScope.launchSafely { - params.callback.onResult(Status.CANCELED) + params.callback.onResult(Status(FAILED_KEY_RELEASE_NOT_PREAUTHORIZED)) } }