Skip to content

Commit 882d4bd

Browse files
authored
Merge branch 'main' into dependabot/gradle/org.eclipse.jgit-org.eclipse.jgit-7.1.0.202411261347-r
2 parents b18c793 + 92632af commit 882d4bd

File tree

24 files changed

+627
-75
lines changed

24 files changed

+627
-75
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Metalava SemVer Check
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
semver-check:
8+
runs-on: ubuntu-latest
9+
permissions:
10+
pull-requests: write
11+
steps:
12+
- name: Checkout main
13+
uses: actions/[email protected]
14+
with:
15+
ref: ${{ github.base_ref }}
16+
17+
- name: Set up JDK 17
18+
uses: actions/[email protected]
19+
with:
20+
java-version: 17
21+
distribution: temurin
22+
cache: gradle
23+
24+
- name: Copy previous api.txt files
25+
run: ./gradlew copyApiTxtFile
26+
27+
- name: Checkout PR
28+
uses: actions/[email protected]
29+
with:
30+
ref: ${{ github.head_ref }}
31+
clean: false
32+
33+
- name: Run Metalava SemVer check
34+
run: ./gradlew metalavaSemver

firebase-crashlytics/CHANGELOG.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
# Unreleased
2+
* [fixed] Fixed NoSuchMethodError when getting process info on Android 13 [#6720]
3+
4+
# 19.4.1
25
* [changed] Updated `firebase-sessions` dependency to v2.0.9
36

7+
8+
## Kotlin
9+
The Kotlin extensions library transitively includes the updated
10+
`firebase-crashlytics` library. The Kotlin extensions library has no additional
11+
updates.
12+
413
# 19.4.0
514
* [feature] Added an overload for `recordException` that allows logging additional custom
615
keys to the non fatal event [#3551]
@@ -324,10 +333,10 @@ updates.
324333

325334
# 18.2.10
326335
* [fixed] Fixed a bug that could prevent unhandled exceptions from being
327-
propogated to the default handler when the network is unavailable.
336+
propagated to the default handler when the network is unavailable.
328337
* [changed] Internal changes to support on-demand fatal crash reporting for
329338
Flutter apps.
330-
* [fixed] Fixed a bug that prevented [crashlytics] from initalizing on some
339+
* [fixed] Fixed a bug that prevented [crashlytics] from initializing on some
331340
devices in some cases. (#3269)
332341

333342

firebase-crashlytics/src/main/java/com/google/firebase/crashlytics/internal/ProcessDetailsProvider.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ import com.google.firebase.crashlytics.internal.model.CrashlyticsReport.Session.
2929
* @hide
3030
*/
3131
internal object ProcessDetailsProvider {
32+
// TODO(mrober): Merge this with [com.google.firebase.sessions.ProcessDetailsProvider].
33+
3234
/** Gets the details for all of this app's running processes. */
3335
fun getAppProcessDetails(context: Context): List<ProcessDetails> {
3436
val appUid = context.applicationInfo.uid
@@ -70,7 +72,7 @@ internal object ProcessDetailsProvider {
7072
processName: String,
7173
pid: Int = 0,
7274
importance: Int = 0,
73-
isDefaultProcess: Boolean = false
75+
isDefaultProcess: Boolean = false,
7476
) =
7577
ProcessDetails.builder()
7678
.setProcessName(processName)
@@ -81,7 +83,7 @@ internal object ProcessDetailsProvider {
8183

8284
/** Gets the app's current process name. If the API is not available, returns an empty string. */
8385
private fun getProcessName(): String =
84-
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
86+
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.TIRAMISU) {
8587
Process.myProcessName()
8688
} else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
8789
Application.getProcessName() ?: ""

firebase-dataconnect/CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Unreleased
2-
2+
* [changed] Changed gRPC proto package to v1 (was v1beta).
3+
([#6729](https://github.com/firebase/firebase-android-sdk/pull/6729))
34

45
# 16.0.0-beta04
56
* [changed] `FirebaseDataConnect.logLevel` type changed from `LogLevel` to

firebase-dataconnect/demo/firebase/dataconnect/dataconnect.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
specVersion: v1beta
1+
specVersion: v1
22
serviceId: srv3ar8skbsza
33
location: us-central1
44
schema:

firebase-dataconnect/emulator/dataconnect/dataconnect.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
specVersion: "v1beta"
1+
specVersion: "v1"
22
serviceId: "sid2ehn9ct8te"
33
location: "us-central1"
44
schema:

firebase-dataconnect/src/main/proto/google/firebase/dataconnect/proto/connector_service.proto

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

1919
syntax = "proto3";
2020

21-
package google.firebase.dataconnect.v1beta;
21+
package google.firebase.dataconnect.v1;
2222

2323
import "google/firebase/dataconnect/proto/graphql_error.proto";
2424
import "google/protobuf/struct.proto";

firebase-dataconnect/src/main/proto/google/firebase/dataconnect/proto/graphql_error.proto

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

1919
syntax = "proto3";
2020

21-
package google.firebase.dataconnect.v1beta;
21+
package google.firebase.dataconnect.v1;
2222

2323
import "google/protobuf/struct.proto";
2424

firebase-firestore/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Unreleased
2+
* [fixed] Use lazy encoding in UTF-8 encoded byte comparison for strings to solve performance issues. [#6706](//github.com/firebase/firebase-android-sdk/pull/6706)
23
* [changed] Updated `protolite-well-known-types` dependency to `18.0.1`. [#6716]
34

45

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

Lines changed: 169 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1658,17 +1658,33 @@ public void sdkOrdersQueryByDocumentIdTheSameWayOnlineAndOffline() {
16581658
public void snapshotListenerSortsUnicodeStringsAsServer() {
16591659
Map<String, Map<String, Object>> testDocs =
16601660
map(
1661-
"a", map("value", "Łukasiewicz"),
1662-
"b", map("value", "Sierpiński"),
1663-
"c", map("value", "岩澤"),
1664-
"d", map("value", "🄟"),
1665-
"e", map("value", "P"),
1666-
"f", map("value", "︒"),
1667-
"g", map("value", "🐵"));
1661+
"a",
1662+
map("value", "Łukasiewicz"),
1663+
"b",
1664+
map("value", "Sierpiński"),
1665+
"c",
1666+
map("value", "岩澤"),
1667+
"d",
1668+
map("value", "🄟"),
1669+
"e",
1670+
map("value", "P"),
1671+
"f",
1672+
map("value", "︒"),
1673+
"g",
1674+
map("value", "🐵"),
1675+
"h",
1676+
map("value", "你好"),
1677+
"i",
1678+
map("value", "你顥"),
1679+
"j",
1680+
map("value", "😁"),
1681+
"k",
1682+
map("value", "😀"));
16681683

16691684
CollectionReference colRef = testCollectionWithDocs(testDocs);
16701685
Query orderedQuery = colRef.orderBy("value");
1671-
List<String> expectedDocIds = Arrays.asList("b", "a", "c", "f", "e", "d", "g");
1686+
List<String> expectedDocIds =
1687+
Arrays.asList("b", "a", "h", "i", "c", "f", "e", "d", "g", "k", "j");
16721688

16731689
QuerySnapshot getSnapshot = waitFor(orderedQuery.get());
16741690
List<String> getSnapshotDocIds =
@@ -1699,17 +1715,33 @@ public void snapshotListenerSortsUnicodeStringsAsServer() {
16991715
public void snapshotListenerSortsUnicodeStringsInArrayAsServer() {
17001716
Map<String, Map<String, Object>> testDocs =
17011717
map(
1702-
"a", map("value", Arrays.asList("Łukasiewicz")),
1703-
"b", map("value", Arrays.asList("Sierpiński")),
1704-
"c", map("value", Arrays.asList("岩澤")),
1705-
"d", map("value", Arrays.asList("🄟")),
1706-
"e", map("value", Arrays.asList("P")),
1707-
"f", map("value", Arrays.asList("︒")),
1708-
"g", map("value", Arrays.asList("🐵")));
1718+
"a",
1719+
map("value", Arrays.asList("Łukasiewicz")),
1720+
"b",
1721+
map("value", Arrays.asList("Sierpiński")),
1722+
"c",
1723+
map("value", Arrays.asList("岩澤")),
1724+
"d",
1725+
map("value", Arrays.asList("🄟")),
1726+
"e",
1727+
map("value", Arrays.asList("P")),
1728+
"f",
1729+
map("value", Arrays.asList("︒")),
1730+
"g",
1731+
map("value", Arrays.asList("🐵")),
1732+
"h",
1733+
map("value", Arrays.asList("你好")),
1734+
"i",
1735+
map("value", Arrays.asList("你顥")),
1736+
"j",
1737+
map("value", Arrays.asList("😁")),
1738+
"k",
1739+
map("value", Arrays.asList("😀")));
17091740

17101741
CollectionReference colRef = testCollectionWithDocs(testDocs);
17111742
Query orderedQuery = colRef.orderBy("value");
1712-
List<String> expectedDocIds = Arrays.asList("b", "a", "c", "f", "e", "d", "g");
1743+
List<String> expectedDocIds =
1744+
Arrays.asList("b", "a", "h", "i", "c", "f", "e", "d", "g", "k", "j");
17131745

17141746
QuerySnapshot getSnapshot = waitFor(orderedQuery.get());
17151747
List<String> getSnapshotDocIds =
@@ -1740,17 +1772,33 @@ public void snapshotListenerSortsUnicodeStringsInArrayAsServer() {
17401772
public void snapshotListenerSortsUnicodeStringsInMapAsServer() {
17411773
Map<String, Map<String, Object>> testDocs =
17421774
map(
1743-
"a", map("value", map("foo", "Łukasiewicz")),
1744-
"b", map("value", map("foo", "Sierpiński")),
1745-
"c", map("value", map("foo", "岩澤")),
1746-
"d", map("value", map("foo", "🄟")),
1747-
"e", map("value", map("foo", "P")),
1748-
"f", map("value", map("foo", "︒")),
1749-
"g", map("value", map("foo", "🐵")));
1775+
"a",
1776+
map("value", map("foo", "Łukasiewicz")),
1777+
"b",
1778+
map("value", map("foo", "Sierpiński")),
1779+
"c",
1780+
map("value", map("foo", "岩澤")),
1781+
"d",
1782+
map("value", map("foo", "🄟")),
1783+
"e",
1784+
map("value", map("foo", "P")),
1785+
"f",
1786+
map("value", map("foo", "︒")),
1787+
"g",
1788+
map("value", map("foo", "🐵")),
1789+
"h",
1790+
map("value", map("foo", "你好")),
1791+
"i",
1792+
map("value", map("foo", "你顥")),
1793+
"j",
1794+
map("value", map("foo", "😁")),
1795+
"k",
1796+
map("value", map("foo", "😀")));
17501797

17511798
CollectionReference colRef = testCollectionWithDocs(testDocs);
17521799
Query orderedQuery = colRef.orderBy("value");
1753-
List<String> expectedDocIds = Arrays.asList("b", "a", "c", "f", "e", "d", "g");
1800+
List<String> expectedDocIds =
1801+
Arrays.asList("b", "a", "h", "i", "c", "f", "e", "d", "g", "k", "j");
17541802

17551803
QuerySnapshot getSnapshot = waitFor(orderedQuery.get());
17561804
List<String> getSnapshotDocIds =
@@ -1781,17 +1829,33 @@ public void snapshotListenerSortsUnicodeStringsInMapAsServer() {
17811829
public void snapshotListenerSortsUnicodeStringsInMapKeyAsServer() {
17821830
Map<String, Map<String, Object>> testDocs =
17831831
map(
1784-
"a", map("value", map("Łukasiewicz", "foo")),
1785-
"b", map("value", map("Sierpiński", "foo")),
1786-
"c", map("value", map("岩澤", "foo")),
1787-
"d", map("value", map("🄟", "foo")),
1788-
"e", map("value", map("P", "foo")),
1789-
"f", map("value", map("︒", "foo")),
1790-
"g", map("value", map("🐵", "foo")));
1832+
"a",
1833+
map("value", map("Łukasiewicz", "foo")),
1834+
"b",
1835+
map("value", map("Sierpiński", "foo")),
1836+
"c",
1837+
map("value", map("岩澤", "foo")),
1838+
"d",
1839+
map("value", map("🄟", "foo")),
1840+
"e",
1841+
map("value", map("P", "foo")),
1842+
"f",
1843+
map("value", map("︒", "foo")),
1844+
"g",
1845+
map("value", map("🐵", "foo")),
1846+
"h",
1847+
map("value", map("你好", "foo")),
1848+
"i",
1849+
map("value", map("你顥", "foo")),
1850+
"j",
1851+
map("value", map("😁", "foo")),
1852+
"k",
1853+
map("value", map("😀", "foo")));
17911854

17921855
CollectionReference colRef = testCollectionWithDocs(testDocs);
17931856
Query orderedQuery = colRef.orderBy("value");
1794-
List<String> expectedDocIds = Arrays.asList("b", "a", "c", "f", "e", "d", "g");
1857+
List<String> expectedDocIds =
1858+
Arrays.asList("b", "a", "h", "i", "c", "f", "e", "d", "g", "k", "j");
17951859

17961860
QuerySnapshot getSnapshot = waitFor(orderedQuery.get());
17971861
List<String> getSnapshotDocIds =
@@ -1822,18 +1886,83 @@ public void snapshotListenerSortsUnicodeStringsInMapKeyAsServer() {
18221886
public void snapshotListenerSortsUnicodeStringsInDocumentKeyAsServer() {
18231887
Map<String, Map<String, Object>> testDocs =
18241888
map(
1825-
"Łukasiewicz", map("value", "foo"),
1826-
"Sierpiński", map("value", "foo"),
1827-
"岩澤", map("value", "foo"),
1828-
"🄟", map("value", "foo"),
1829-
"P", map("value", "foo"),
1830-
"︒", map("value", "foo"),
1831-
"🐵", map("value", "foo"));
1889+
"Łukasiewicz",
1890+
map("value", "foo"),
1891+
"Sierpiński",
1892+
map("value", "foo"),
1893+
"岩澤",
1894+
map("value", "foo"),
1895+
"🄟",
1896+
map("value", "foo"),
1897+
"P",
1898+
map("value", "foo"),
1899+
"︒",
1900+
map("value", "foo"),
1901+
"🐵",
1902+
map("value", "foo"),
1903+
"你好",
1904+
map("value", "foo"),
1905+
"你顥",
1906+
map("value", "foo"),
1907+
"😁",
1908+
map("value", "foo"),
1909+
"😀",
1910+
map("value", "foo"));
18321911

18331912
CollectionReference colRef = testCollectionWithDocs(testDocs);
18341913
Query orderedQuery = colRef.orderBy(FieldPath.documentId());
18351914
List<String> expectedDocIds =
1836-
Arrays.asList("Sierpiński", "Łukasiewicz", "岩澤", "︒", "P", "🄟", "🐵");
1915+
Arrays.asList(
1916+
"Sierpiński", "Łukasiewicz", "你好", "你顥", "岩澤", "︒", "P", "🄟", "🐵", "😀", "😁");
1917+
1918+
QuerySnapshot getSnapshot = waitFor(orderedQuery.get());
1919+
List<String> getSnapshotDocIds =
1920+
getSnapshot.getDocuments().stream().map(ds -> ds.getId()).collect(Collectors.toList());
1921+
1922+
EventAccumulator<QuerySnapshot> eventAccumulator = new EventAccumulator<QuerySnapshot>();
1923+
ListenerRegistration registration =
1924+
orderedQuery.addSnapshotListener(eventAccumulator.listener());
1925+
1926+
List<String> watchSnapshotDocIds = new ArrayList<>();
1927+
try {
1928+
QuerySnapshot watchSnapshot = eventAccumulator.await();
1929+
watchSnapshotDocIds =
1930+
watchSnapshot.getDocuments().stream()
1931+
.map(documentSnapshot -> documentSnapshot.getId())
1932+
.collect(Collectors.toList());
1933+
} finally {
1934+
registration.remove();
1935+
}
1936+
1937+
assertTrue(getSnapshotDocIds.equals(expectedDocIds));
1938+
assertTrue(watchSnapshotDocIds.equals(expectedDocIds));
1939+
1940+
checkOnlineAndOfflineResultsMatch(orderedQuery, expectedDocIds.toArray(new String[0]));
1941+
}
1942+
1943+
@Test
1944+
public void snapshotListenerSortsInvalidUnicodeStringsAsServer() {
1945+
// Note: Protocol Buffer converts any invalid surrogates to "?".
1946+
Map<String, Map<String, Object>> testDocs =
1947+
map(
1948+
"a",
1949+
map("value", "Z"),
1950+
"b",
1951+
map("value", "你好"),
1952+
"c",
1953+
map("value", "😀"),
1954+
"d",
1955+
map("value", "ab\uD800"), // Lone high surrogate
1956+
"e",
1957+
map("value", "ab\uDC00"), // Lone low surrogate
1958+
"f",
1959+
map("value", "ab\uD800\uD800"), // Unpaired high surrogate
1960+
"g",
1961+
map("value", "ab\uDC00\uDC00")); // Unpaired low surrogate
1962+
1963+
CollectionReference colRef = testCollectionWithDocs(testDocs);
1964+
Query orderedQuery = colRef.orderBy("value");
1965+
List<String> expectedDocIds = Arrays.asList("a", "d", "e", "f", "g", "b", "c");
18371966

18381967
QuerySnapshot getSnapshot = waitFor(orderedQuery.get());
18391968
List<String> getSnapshotDocIds =

0 commit comments

Comments
 (0)