Skip to content

Commit 14f26b8

Browse files
authored
Add user agents for fdl, appcheck debug, safetynet and play integrity (#3669)
* add user agents * nit * gJF * nit
1 parent bd7b2df commit 14f26b8

File tree

7 files changed

+139
-1
lines changed

7 files changed

+139
-1
lines changed

appcheck/firebase-appcheck-debug/src/main/AndroidManifest.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,11 @@
1717
package="com.google.firebase.appcheck.debug">
1818
<!--Although the *SdkVersion is captured in gradle build files, this is required for non gradle builds-->
1919
<!--<uses-sdk android:minSdkVersion="16"/>-->
20+
<application>
21+
<service android:name="com.google.firebase.components.ComponentDiscoveryService"
22+
android:exported="false">
23+
<meta-data android:name="com.google.firebase.components:com.google.firebase.appcheck.debug.FirebaseAppCheckDebugRegistrar"
24+
android:value="com.google.firebase.components.ComponentRegistrar" />
25+
</service>
26+
</application>
2027
</manifest>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
// Copyright 2022 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
package com.google.firebase.appcheck.debug;
16+
17+
import com.google.android.gms.common.annotation.KeepForSdk;
18+
import com.google.firebase.components.Component;
19+
import com.google.firebase.components.ComponentRegistrar;
20+
import com.google.firebase.platforminfo.LibraryVersionComponent;
21+
import java.util.Arrays;
22+
import java.util.List;
23+
24+
/**
25+
* {@link ComponentRegistrar} for setting up FirebaseAppCheck debug's dependency injections in
26+
* Firebase Android Components.
27+
*
28+
* @hide
29+
*/
30+
@KeepForSdk
31+
public class FirebaseAppCheckDebugRegistrar implements ComponentRegistrar {
32+
33+
@Override
34+
public List<Component<?>> getComponents() {
35+
return Arrays.asList(
36+
LibraryVersionComponent.create("fire-app-check-debug", BuildConfig.VERSION_NAME));
37+
}
38+
}

appcheck/firebase-appcheck-playintegrity/src/main/AndroidManifest.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,11 @@
1717
package="com.google.firebase.appcheck.playintegrity">
1818
<!--Although the *SdkVersion is captured in gradle build files, this is required for non gradle builds-->
1919
<!--<uses-sdk android:minSdkVersion="16"/>-->
20+
<application>
21+
<service android:name="com.google.firebase.components.ComponentDiscoveryService"
22+
android:exported="false">
23+
<meta-data android:name="com.google.firebase.components:com.google.firebase.appcheck.playintegrity.FirebaseAppCheckPlayIntegrityRegistrar"
24+
android:value="com.google.firebase.components.ComponentRegistrar" />
25+
</service>
26+
</application>
2027
</manifest>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
// Copyright 2022 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
package com.google.firebase.appcheck.playintegrity;
16+
17+
import com.google.android.gms.common.annotation.KeepForSdk;
18+
import com.google.firebase.components.Component;
19+
import com.google.firebase.components.ComponentRegistrar;
20+
import com.google.firebase.platforminfo.LibraryVersionComponent;
21+
import java.util.Arrays;
22+
import java.util.List;
23+
24+
/**
25+
* {@link ComponentRegistrar} for setting up FirebaseAppCheck play integrity's dependency injections
26+
* in Firebase Android Components.
27+
*
28+
* @hide
29+
*/
30+
@KeepForSdk
31+
public class FirebaseAppCheckPlayIntegrityRegistrar implements ComponentRegistrar {
32+
33+
@Override
34+
public List<Component<?>> getComponents() {
35+
return Arrays.asList(
36+
LibraryVersionComponent.create("fire-app-check-play-integrity", BuildConfig.VERSION_NAME));
37+
}
38+
}

appcheck/firebase-appcheck-safetynet/src/main/AndroidManifest.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,11 @@
1717
package="com.google.firebase.appcheck.safetynet">
1818
<!--Although the *SdkVersion is captured in gradle build files, this is required for non gradle builds-->
1919
<!--<uses-sdk android:minSdkVersion="16"/>-->
20+
<application>
21+
<service android:name="com.google.firebase.components.ComponentDiscoveryService"
22+
android:exported="false">
23+
<meta-data android:name="com.google.firebase.components:com.google.firebase.appcheck.safetynet.FirebaseAppCheckSafetyNetRegistrar"
24+
android:value="com.google.firebase.components.ComponentRegistrar" />
25+
</service>
26+
</application>
2027
</manifest>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
// Copyright 2022 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
package com.google.firebase.appcheck.safetynet;
16+
17+
import com.google.android.gms.common.annotation.KeepForSdk;
18+
import com.google.firebase.components.Component;
19+
import com.google.firebase.components.ComponentRegistrar;
20+
import com.google.firebase.platforminfo.LibraryVersionComponent;
21+
import java.util.Arrays;
22+
import java.util.List;
23+
24+
/**
25+
* {@link ComponentRegistrar} for setting up FirebaseAppCheck safety net's dependency injections in
26+
* Firebase Android Components.
27+
*
28+
* @hide
29+
*/
30+
@KeepForSdk
31+
public class FirebaseAppCheckSafetyNetRegistrar implements ComponentRegistrar {
32+
33+
@Override
34+
public List<Component<?>> getComponents() {
35+
return Arrays.asList(
36+
LibraryVersionComponent.create("fire-app-check-safety-net", BuildConfig.VERSION_NAME));
37+
}
38+
}

firebase-dynamic-links/src/main/java/com/google/firebase/dynamiclinks/internal/FirebaseDynamicLinkRegistrar.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@
2121
import com.google.firebase.components.Component;
2222
import com.google.firebase.components.ComponentRegistrar;
2323
import com.google.firebase.components.Dependency;
24+
import com.google.firebase.dynamiclinks.BuildConfig;
2425
import com.google.firebase.dynamiclinks.FirebaseDynamicLinks;
26+
import com.google.firebase.platforminfo.LibraryVersionComponent;
2527
import java.util.Arrays;
2628
import java.util.List;
2729

@@ -50,6 +52,7 @@ public List<Component<?>> getComponents() {
5052
container.getProvider(AnalyticsConnector.class)))
5153
.build(); // no need for eager init for the Internal component.
5254

53-
return Arrays.asList(firebaseDynamicLinks);
55+
return Arrays.asList(
56+
firebaseDynamicLinks, LibraryVersionComponent.create("fire-dl", BuildConfig.VERSION_NAME));
5457
}
5558
}

0 commit comments

Comments
 (0)