Skip to content

Commit aa631d4

Browse files
committed
Fix JDK java8 issue
1 parent 8f529e4 commit aa631d4

File tree

2 files changed

+22
-34
lines changed

2 files changed

+22
-34
lines changed

firebase-abt/src/main/java/com/google/firebase/abt/FirebaseABTesting.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
package com.google.firebase.abt;
1616

1717
import static com.google.firebase.abt.AbtExperimentInfo.validateAbtExperimentInfo;
18-
import static com.google.firebase.abt.FirebaseABTesting.OriginService.INAPP_MESSAGING;
19-
import static com.google.firebase.abt.FirebaseABTesting.OriginService.REMOTE_CONFIG;
2018

2119
import android.content.Context;
2220
import androidx.annotation.Nullable;
@@ -67,7 +65,7 @@ public class FirebaseABTesting {
6765
* Select keys of fields in the experiment descriptions returned from the Firebase Remote Config
6866
* server.
6967
*/
70-
@StringDef({REMOTE_CONFIG, INAPP_MESSAGING})
68+
@StringDef({OriginService.REMOTE_CONFIG, OriginService.INAPP_MESSAGING})
7169
@Retention(RetentionPolicy.SOURCE)
7270
public @interface OriginService {
7371

firebase-config/src/main/java/com/google/firebase/remoteconfig/RemoteConfigConstants.java

Lines changed: 21 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,6 @@
1414

1515
package com.google.firebase.remoteconfig;
1616

17-
import static com.google.firebase.remoteconfig.RemoteConfigConstants.ExperimentDescriptionFieldKey.EXPERIMENT_ID;
18-
import static com.google.firebase.remoteconfig.RemoteConfigConstants.ExperimentDescriptionFieldKey.VARIANT_ID;
19-
import static com.google.firebase.remoteconfig.RemoteConfigConstants.RequestFieldKey.ANALYTICS_USER_PROPERTIES;
20-
import static com.google.firebase.remoteconfig.RemoteConfigConstants.RequestFieldKey.APP_ID;
21-
import static com.google.firebase.remoteconfig.RemoteConfigConstants.RequestFieldKey.APP_VERSION;
22-
import static com.google.firebase.remoteconfig.RemoteConfigConstants.RequestFieldKey.COUNTRY_CODE;
23-
import static com.google.firebase.remoteconfig.RemoteConfigConstants.RequestFieldKey.INSTANCE_ID;
24-
import static com.google.firebase.remoteconfig.RemoteConfigConstants.RequestFieldKey.INSTANCE_ID_TOKEN;
25-
import static com.google.firebase.remoteconfig.RemoteConfigConstants.RequestFieldKey.LANGUAGE_CODE;
26-
import static com.google.firebase.remoteconfig.RemoteConfigConstants.RequestFieldKey.PACKAGE_NAME;
27-
import static com.google.firebase.remoteconfig.RemoteConfigConstants.RequestFieldKey.PLATFORM_VERSION;
28-
import static com.google.firebase.remoteconfig.RemoteConfigConstants.RequestFieldKey.SDK_VERSION;
29-
import static com.google.firebase.remoteconfig.RemoteConfigConstants.RequestFieldKey.TIME_ZONE;
30-
import static com.google.firebase.remoteconfig.RemoteConfigConstants.ResponseFieldKey.ENTRIES;
31-
import static com.google.firebase.remoteconfig.RemoteConfigConstants.ResponseFieldKey.EXPERIMENT_DESCRIPTIONS;
32-
import static com.google.firebase.remoteconfig.RemoteConfigConstants.ResponseFieldKey.STATE;
33-
3417
import androidx.annotation.StringDef;
3518
import java.lang.annotation.Retention;
3619
import java.lang.annotation.RetentionPolicy;
@@ -41,7 +24,7 @@
4124
* @author Lucas Png
4225
* @hide
4326
*/
44-
public class RemoteConfigConstants {
27+
public final class RemoteConfigConstants {
4528
public static final String FETCH_REGEX_URL =
4629
"https://firebaseremoteconfig.googleapis.com/v1/projects/%s/namespaces/%s:fetch";
4730

@@ -50,17 +33,17 @@ public class RemoteConfigConstants {
5033
* server.
5134
*/
5235
@StringDef({
53-
INSTANCE_ID,
54-
INSTANCE_ID_TOKEN,
55-
APP_ID,
56-
COUNTRY_CODE,
57-
LANGUAGE_CODE,
58-
PLATFORM_VERSION,
59-
TIME_ZONE,
60-
APP_VERSION,
61-
PACKAGE_NAME,
62-
SDK_VERSION,
63-
ANALYTICS_USER_PROPERTIES
36+
RequestFieldKey.INSTANCE_ID,
37+
RequestFieldKey.INSTANCE_ID_TOKEN,
38+
RequestFieldKey.APP_ID,
39+
RequestFieldKey.COUNTRY_CODE,
40+
RequestFieldKey.LANGUAGE_CODE,
41+
RequestFieldKey.PLATFORM_VERSION,
42+
RequestFieldKey.TIME_ZONE,
43+
RequestFieldKey.APP_VERSION,
44+
RequestFieldKey.PACKAGE_NAME,
45+
RequestFieldKey.SDK_VERSION,
46+
RequestFieldKey.ANALYTICS_USER_PROPERTIES
6447
})
6548
@Retention(RetentionPolicy.SOURCE)
6649
public @interface RequestFieldKey {
@@ -78,7 +61,11 @@ public class RemoteConfigConstants {
7861
}
7962

8063
/** Keys of fields in the Fetch response body from the Firebase Remote Config server. */
81-
@StringDef({ENTRIES, EXPERIMENT_DESCRIPTIONS, STATE})
64+
@StringDef({
65+
ResponseFieldKey.ENTRIES,
66+
ResponseFieldKey.EXPERIMENT_DESCRIPTIONS,
67+
ResponseFieldKey.STATE
68+
})
8269
@Retention(RetentionPolicy.SOURCE)
8370
public @interface ResponseFieldKey {
8471
String ENTRIES = "entries";
@@ -90,7 +77,10 @@ public class RemoteConfigConstants {
9077
* Select keys of fields in the experiment descriptions returned from the Firebase Remote Config
9178
* server.
9279
*/
93-
@StringDef({EXPERIMENT_ID, VARIANT_ID})
80+
@StringDef({
81+
ExperimentDescriptionFieldKey.EXPERIMENT_ID,
82+
ExperimentDescriptionFieldKey.VARIANT_ID
83+
})
9484
@Retention(RetentionPolicy.SOURCE)
9585
public @interface ExperimentDescriptionFieldKey {
9686
String EXPERIMENT_ID = "experimentId";

0 commit comments

Comments
 (0)