EN: Implement new versioning scheme of API 1.8

This commit is contained in:
Marvin W 2021-02-21 16:39:12 -06:00
parent 83a150b128
commit 412e513afe
No known key found for this signature in database
GPG Key ID: 072E9235DB996F2A
2 changed files with 5 additions and 2 deletions

View File

@ -5,6 +5,8 @@
package org.microg.gms.nearby.exposurenotification;
import static org.microg.gms.common.Constants.GMS_VERSION_CODE;
public class Constants {
public static final String ACTION_EXPOSURE_NOTIFICATION_SETTINGS = "com.google.android.gms.settings.EXPOSURE_NOTIFICATION_SETTINGS";
public static final String ACTION_EXPOSURE_NOT_FOUND = "com.google.android.gms.exposurenotification.ACTION_EXPOSURE_NOT_FOUND";
@ -17,4 +19,6 @@ public class Constants {
public static final String EXTRA_TOKEN = "com.google.android.gms.exposurenotification.EXTRA_TOKEN";
public static final String TOKEN_A = "TYZWQ32170AXEUVCDW7A";
public static final int DAYS_SINCE_ONSET_OF_SYMPTOMS_UNKNOWN = Integer.MAX_VALUE;
public static final int VERSION = 18;
public static final long VERSION_FULL = ((long)VERSION) * 1000000000L + GMS_VERSION_CODE;
}

View File

@ -22,7 +22,6 @@ import com.google.android.gms.nearby.exposurenotification.internal.*
import kotlinx.coroutines.*
import org.json.JSONArray
import org.json.JSONObject
import org.microg.gms.common.Constants
import org.microg.gms.common.PackageUtils
import org.microg.gms.nearby.exposurenotification.Constants.*
import org.microg.gms.nearby.exposurenotification.proto.TemporaryExposureKeyExport
@ -96,7 +95,7 @@ class ExposureNotificationServiceImpl(private val context: Context, private val
}
override fun getVersion(params: GetVersionParams) {
params.callback.onResult(Status.SUCCESS, Constants.GMS_VERSION_CODE.toLong())
params.callback.onResult(Status.SUCCESS, VERSION_FULL)
}
override fun getCalibrationConfidence(params: GetCalibrationConfidenceParams) {