Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Verified Commit e42f6849 authored by Marvin W.'s avatar Marvin W. 🐿️
Browse files

EN: Add undocumented feature flag. Required for latest CWA to register test.

Fixes #1469
parent ab36b32d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;
+6 −0
Original line number Diff line number Diff line
@@ -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);
        }
+2 −1
Original line number Diff line number Diff line
@@ -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)
            )
        })
    }
+1 −1
Original line number Diff line number Diff line
@@ -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))
        }
    }