mirror of
https://github.com/YTVanced/VancedMicroG
synced 2024-12-03 08:17:26 +00:00
EN: Add undocumented feature flag. Required for latest CWA to register test.
Fixes #1469
This commit is contained in:
parent
ab36b32d47
commit
e42f68497f
4 changed files with 10 additions and 2 deletions
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
)
|
||||
})
|
||||
}
|
||||
|
|
|
@ -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))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue