Skip to content

Commit d36d4c3

Browse files
authored
Merge branch 'master' into rl.rel.generator.ignore
2 parents e1107c7 + fc5cde4 commit d36d4c3

File tree

11 files changed

+247
-23
lines changed

11 files changed

+247
-23
lines changed

.github/workflows/check-head-dependencies.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
- 'releases/**'
88

99
jobs:
10-
build-artifacts:
10+
check-head-dependencies:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- uses: actions/checkout@v3

.github/workflows/ci_tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
- id: changed-modules
3232
run: |
3333
git diff --name-only HEAD~1 | xargs printf -- '--changed-git-paths %s\n' | xargs ./gradlew writeChangedProjects --output-file-path=modules.json
34-
echo ::set-output name=modules::$(cat modules.json)
34+
echo modules=$(cat modules.json) >> $GITHUB_OUTPUT
3535
3636
unit_tests:
3737
name: "Unit Tests"

.github/workflows/semver-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
- 'releases/**'
88

99
jobs:
10-
build-artifacts:
10+
semver-check:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- uses: actions/checkout@v3

.github/workflows/update-cpp-sdk-on-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
# Query the git history for all gradle.properties files changed by this push.
3636
# Then, check the diff to see if any "latestReleasedVersion=" lines changed.
3737
if (git diff '${{ github.event.before }}' -- '**/gradle.properties' | grep -q '^[-+]latestReleasedVersion='); then
38-
echo "::set-output name=released_version_changed::1"
38+
echo "released_version_changed=1" >> $GITHUB_OUTPUT
3939
else
4040
echo "No change to latestReleasedVersion detected since ${{ github.event.before }}"
4141
fi

firebase-firestore/src/androidTest/java/com/google/firebase/firestore/QueryTest.java

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1077,17 +1077,18 @@ public void resumingAQueryShouldUseBloomFilterToAvoidFullRequery() throws Except
10771077
}
10781078
assertWithMessage("createdDocuments").that(createdDocuments).hasSize(100);
10791079

1080-
// Delete 50 of the 100 documents. Use a WriteBatch, rather than DocumentReference.delete(),
1081-
// to avoid affecting the local cache.
1080+
// Delete 50 of the 100 documents. Use a different Firestore instance to avoid affecting the
1081+
// local cache.
10821082
HashSet<String> deletedDocumentIds = new HashSet<>();
10831083
{
1084-
WriteBatch writeBatchForDocumentDeletes = collection.getFirestore().batch();
1084+
FirebaseFirestore db2 = testFirestore();
1085+
WriteBatch batch = db2.batch();
10851086
for (int i = 0; i < createdDocuments.size(); i += 2) {
1086-
DocumentReference documentToDelete = createdDocuments.get(i);
1087-
writeBatchForDocumentDeletes.delete(documentToDelete);
1087+
DocumentReference documentToDelete = db2.document(createdDocuments.get(i).getPath());
1088+
batch.delete(documentToDelete);
10881089
deletedDocumentIds.add(documentToDelete.getId());
10891090
}
1090-
waitFor(writeBatchForDocumentDeletes.commit());
1091+
waitFor(batch.commit());
10911092
}
10921093
assertWithMessage("deletedDocumentIds").that(deletedDocumentIds).hasSize(50);
10931094

@@ -1236,14 +1237,10 @@ public void bloomFilterShouldCorrectlyEncodeComplexUnicodeCharacters() throws Ex
12361237
}
12371238

12381239
// Delete one of the documents so that the next call to collection.get() will experience an
1239-
// existence filter mismatch. Use a WriteBatch, rather than DocumentReference.delete(), to avoid
1240-
// affecting the local cache.
1240+
// existence filter mismatch. Use a different Firestore instance to avoid affecting the local
1241+
// cache.
12411242
DocumentReference documentToDelete = collection.document("DocumentToDelete");
1242-
{
1243-
WriteBatch writeBatchForDocumentDeletes = collection.getFirestore().batch();
1244-
writeBatchForDocumentDeletes.delete(documentToDelete);
1245-
waitFor(writeBatchForDocumentDeletes.commit());
1246-
}
1243+
waitFor(testFirestore().document(documentToDelete.getPath()).delete());
12471244

12481245
// Wait for 10 seconds, during which Watch will stop tracking the query and will send an
12491246
// existence filter rather than "delete" events when the query is resumed.

firebase-inappmessaging-display/firebase-inappmessaging-display.gradle

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ android {
4242
disable "GradleCompatible"
4343
}
4444

45+
lint {
46+
baseline = file("lint-baseline.xml")
47+
}
48+
4549
compileOptions {
4650
sourceCompatibility JavaVersion.VERSION_1_8
4751
targetCompatibility JavaVersion.VERSION_1_8
Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<issues format="6" by="lint 7.4.2" type="baseline" client="gradle" dependencies="false" name="AGP (7.4.2)" variant="all" version="7.4.2">
3+
4+
<issue
5+
id="CheckResult"
6+
message="The result of `placeholder` is not used"
7+
errorLine1=" requestBuilder.placeholder(placeholderResId);"
8+
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
9+
<location
10+
file="src/main/java/com/google/firebase/inappmessaging/display/internal/FiamImageLoader.java"
11+
line="95"
12+
column="7"/>
13+
</issue>
14+
15+
<issue
16+
id="WrongConstant"
17+
message="Must be one or more of: Gravity.FILL, Gravity.FILL_HORIZONTAL, Gravity.FILL_VERTICAL, Gravity.START, Gravity.END, Gravity.LEFT, Gravity.RIGHT, Gravity.TOP, Gravity.BOTTOM, Gravity.CENTER, Gravity.CENTER_HORIZONTAL, Gravity.CENTER_VERTICAL, Gravity.DISPLAY_CLIP_HORIZONTAL, Gravity.DISPLAY_CLIP_VERTICAL, Gravity.CLIP_HORIZONTAL, Gravity.CLIP_VERTICAL, Gravity.NO_GRAVITY"
18+
errorLine1=" layoutParams.gravity = layoutConfig.viewWindowGravity();"
19+
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
20+
<location
21+
file="src/main/java/com/google/firebase/inappmessaging/display/internal/FiamWindowManager.java"
22+
line="120"
23+
column="28"/>
24+
</issue>
25+
26+
<issue
27+
id="InflateParams"
28+
message="Avoid passing `null` as the view root (needed to resolve layout parameters on the inflated layout&apos;s root element)"
29+
errorLine1=" View root = inflater.inflate(R.layout.banner, null);"
30+
errorLine2=" ~~~~">
31+
<location
32+
file="src/main/java/com/google/firebase/inappmessaging/display/internal/bindingwrappers/BannerBindingWrapper.java"
33+
line="67"
34+
column="51"/>
35+
</issue>
36+
37+
<issue
38+
id="InflateParams"
39+
message="Avoid passing `null` as the view root (needed to resolve layout parameters on the inflated layout&apos;s root element)"
40+
errorLine1=" View root = inflater.inflate(R.layout.card, null);"
41+
errorLine2=" ~~~~">
42+
<location
43+
file="src/main/java/com/google/firebase/inappmessaging/display/internal/bindingwrappers/CardBindingWrapper.java"
44+
line="72"
45+
column="49"/>
46+
</issue>
47+
48+
<issue
49+
id="InflateParams"
50+
message="Avoid passing `null` as the view root (needed to resolve layout parameters on the inflated layout&apos;s root element)"
51+
errorLine1=" View v = inflater.inflate(R.layout.image, null);"
52+
errorLine2=" ~~~~">
53+
<location
54+
file="src/main/java/com/google/firebase/inappmessaging/display/internal/bindingwrappers/ImageBindingWrapper.java"
55+
line="65"
56+
column="47"/>
57+
</issue>
58+
59+
<issue
60+
id="InflateParams"
61+
message="Avoid passing `null` as the view root (needed to resolve layout parameters on the inflated layout&apos;s root element)"
62+
errorLine1=" View root = inflater.inflate(R.layout.modal, null);"
63+
errorLine2=" ~~~~">
64+
<location
65+
file="src/main/java/com/google/firebase/inappmessaging/display/internal/bindingwrappers/ModalBindingWrapper.java"
66+
line="72"
67+
column="50"/>
68+
</issue>
69+
70+
<issue
71+
id="DisableBaselineAlignment"
72+
message="Set `android:baselineAligned=&quot;false&quot;` on this element for better performance"
73+
errorLine1=" &lt;LinearLayout"
74+
errorLine2=" ~~~~~~~~~~~~">
75+
<location
76+
file="src/main/res/layout/banner.xml"
77+
line="12"
78+
column="6"/>
79+
</issue>
80+
81+
<issue
82+
id="UnusedResources"
83+
message="The resource `R.drawable.placeholder_50_50` appears to be unused">
84+
<location
85+
file="src/debug/res/drawable-mdpi/placeholder_50_50.png"/>
86+
</issue>
87+
88+
<issue
89+
id="UnusedResources"
90+
message="The resource `R.string.card_content_descriptor` appears to be unused"
91+
errorLine1=" &lt;string name=&quot;card_content_descriptor&quot;>card&lt;/string>"
92+
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
93+
<location
94+
file="src/main/res/values/strings.xml"
95+
line="3"
96+
column="11"/>
97+
</issue>
98+
99+
<issue
100+
id="ContentDescription"
101+
message="Missing `contentDescription` attribute on image"
102+
errorLine1=" &lt;ImageView"
103+
errorLine2=" ~~~~~~~~~">
104+
<location
105+
file="src/main/res/layout-land/card_landscape_inner.xml"
106+
line="16"
107+
column="6"/>
108+
</issue>
109+
110+
<issue
111+
id="ContentDescription"
112+
message="Missing `contentDescription` attribute on image"
113+
errorLine1=" &lt;ImageView"
114+
errorLine2=" ~~~~~~~~~">
115+
<location
116+
file="src/main/res/layout/card_portrait_inner.xml"
117+
line="14"
118+
column="6"/>
119+
</issue>
120+
121+
<issue
122+
id="RtlEnabled"
123+
message="The project references RTL attributes, but does not explicitly enable or disable RTL support with `android:supportsRtl` in the manifest">
124+
<location
125+
file="src/main/AndroidManifest.xml"/>
126+
</issue>
127+
128+
<issue
129+
id="IgnoreWithoutReason"
130+
message="Test is ignored without giving any explanation"
131+
errorLine1=" @Ignore"
132+
errorLine2=" ~~~~~~~">
133+
<location
134+
file="src/test/java/com/google/firebase/inappmessaging/display/FirebaseInAppMessagingDisplayTest.java"
135+
line="366"
136+
column="3"/>
137+
</issue>
138+
139+
</issues>

firebase-inappmessaging-display/src/androidTest/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
<application>
55
<uses-library android:name="android.test.runner"/>
6-
<activity android:name=".TestActivity">
6+
<activity android:name=".TestActivity" android:exported="true">
77
<intent-filter>
88
<action android:name="android.intent.action.MAIN"/>
99
<category android:name="android.intent.category.LAUNCHER"/>

firebase-ml-modeldownloader/firebase-ml-modeldownloader.gradle

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ android {
5959
includeAndroidResources = true
6060
}
6161
}
62+
lint {
63+
baseline = file("lint-baseline.xml")
64+
}
6265
}
6366

6467
thirdPartyLicenses {
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<issues format="6" by="lint 7.3.1" type="baseline" client="gradle" dependencies="false" name="AGP (7.3.1)" variant="all" version="7.3.1">
3+
4+
<issue
5+
id="ApplySharedPref"
6+
message="Consider using `apply()` instead; `commit` writes its data to persistent storage immediately, whereas `apply` will handle it in the background"
7+
errorLine1=" .commit();"
8+
errorLine2=" ~~~~~~~~">
9+
<location
10+
file="src/main/java/com/google/firebase/ml/modeldownloader/internal/SharedPreferencesUtil.java"
11+
line="164"
12+
column="10"/>
13+
</issue>
14+
15+
<issue
16+
id="ApplySharedPref"
17+
message="Consider using `apply()` instead; `commit` writes its data to persistent storage immediately, whereas `apply` will handle it in the background"
18+
errorLine1=" .commit();"
19+
errorLine2=" ~~~~~~~~">
20+
<location
21+
file="src/main/java/com/google/firebase/ml/modeldownloader/internal/SharedPreferencesUtil.java"
22+
line="192"
23+
column="10"/>
24+
</issue>
25+
26+
<issue
27+
id="ApplySharedPref"
28+
message="Consider using `apply()` instead; `commit` writes its data to persistent storage immediately, whereas `apply` will handle it in the background"
29+
errorLine1=" .commit();"
30+
errorLine2=" ~~~~~~~~">
31+
<location
32+
file="src/main/java/com/google/firebase/ml/modeldownloader/internal/SharedPreferencesUtil.java"
33+
line="226"
34+
column="10"/>
35+
</issue>
36+
37+
<issue
38+
id="ApplySharedPref"
39+
message="Consider using `apply()` instead; `commit` writes its data to persistent storage immediately, whereas `apply` will handle it in the background"
40+
errorLine1=" .commit();"
41+
errorLine2=" ~~~~~~~~">
42+
<location
43+
file="src/main/java/com/google/firebase/ml/modeldownloader/internal/SharedPreferencesUtil.java"
44+
line="317"
45+
column="12"/>
46+
</issue>
47+
48+
<issue
49+
id="ApplySharedPref"
50+
message="Consider using `apply()` instead; `commit` writes its data to persistent storage immediately, whereas `apply` will handle it in the background"
51+
errorLine1=" .commit();"
52+
errorLine2=" ~~~~~~~~">
53+
<location
54+
file="src/main/java/com/google/firebase/ml/modeldownloader/internal/SharedPreferencesUtil.java"
55+
line="324"
56+
column="12"/>
57+
</issue>
58+
59+
<issue
60+
id="Range"
61+
message="Value must be ≥ 0 but `getColumnIndex` can be -1"
62+
errorLine1=" statusCode = cursor.getInt(cursor.getColumnIndex(DownloadManager.COLUMN_STATUS));"
63+
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
64+
<location
65+
file="src/main/java/com/google/firebase/ml/modeldownloader/internal/ModelFileDownloadService.java"
66+
line="318"
67+
column="36"/>
68+
</issue>
69+
70+
<issue
71+
id="Range"
72+
message="Value must be ≥ 0 but `getColumnIndex` can be -1"
73+
errorLine1=" int reason = cursor.getInt(cursor.getColumnIndex(DownloadManager.COLUMN_REASON));"
74+
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
75+
<location
76+
file="src/main/java/com/google/firebase/ml/modeldownloader/internal/ModelFileDownloadService.java"
77+
line="476"
78+
column="34"/>
79+
</issue>
80+
81+
</issues>

firebase-sessions/src/main/kotlin/com/google/firebase/sessions/settings/RemoteSettingsFetcher.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@ internal class RemoteSettingsFetcher(
4646
onFailure: suspend (String) -> Unit
4747
) =
4848
withContext(blockingDispatcher) {
49-
val connection = settingsUrl().openConnection() as HttpsURLConnection
50-
connection.requestMethod = "GET"
51-
connection.setRequestProperty("Accept", "application/json")
52-
headerOptions.forEach { connection.setRequestProperty(it.key, it.value) }
53-
5449
try {
50+
val connection = settingsUrl().openConnection() as HttpsURLConnection
51+
connection.requestMethod = "GET"
52+
connection.setRequestProperty("Accept", "application/json")
53+
headerOptions.forEach { connection.setRequestProperty(it.key, it.value) }
54+
5555
val responseCode = connection.responseCode
5656
if (responseCode == HttpsURLConnection.HTTP_OK) {
5757
val inputStream = connection.inputStream

0 commit comments

Comments
 (0)