Skip to content

Commit 16521a1

Browse files
committed
Merge branch 'master' of github.com:firebase/firebase-android-sdk into fis_sdk
2 parents 46c6614 + 0b13b10 commit 16521a1

File tree

6 files changed

+11
-39
lines changed

6 files changed

+11
-39
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public class RemoteConfigComponent {
6060
/** Name of the file where defaults configs are stored. */
6161
public static final String DEFAULTS_FILE_NAME = "defaults";
6262
/** Timeout for the call to the Firebase Remote Config servers in second. */
63-
public static final long NETWORK_CONNECTION_TIMEOUT_IN_SECONDS = 5;
63+
public static final long NETWORK_CONNECTION_TIMEOUT_IN_SECONDS = 60;
6464

6565
private static final String FIREBASE_REMOTE_CONFIG_FILE_NAME_PREFIX = "frc";
6666
private static final String PREFERENCES_FILE_NAME = "settings";

firebase-firestore/src/main/java/com/google/firebase/firestore/DocumentSnapshot.java

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

3939
/**
4040
* A {@code DocumentSnapshot} contains data read from a document in your Cloud Firestore database.
41-
* The data can be extracted with the {@link #getData()} or {@link #get()} methods.
41+
* The data can be extracted with the {@link #getData()} or {@link #get(String)} methods.
4242
*
4343
* <p>If the {@code DocumentSnapshot} points to a non-existing document, {@link #getData()} and its
4444
* corresponding methods will return {@code null}. You can always explicitly check for a document's

firebase-firestore/src/main/java/com/google/firebase/firestore/QuerySnapshot.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public Query getQuery() {
8282
return originalQuery;
8383
}
8484

85-
/** @return The metadata for this document snapshot. */
85+
/** @return The metadata for this query snapshot. */
8686
@NonNull
8787
public SnapshotMetadata getMetadata() {
8888
return metadata;

firebase-firestore/src/main/java/com/google/firebase/firestore/SetOptions.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ public static SetOptions merge() {
6767
}
6868

6969
/**
70-
* Changes the behavior of {@code set()} calls to only replace the fields under fieldPaths. Any
71-
* field that is not specified in fieldPaths is ignored and remains untouched.
70+
* Changes the behavior of {@code set()} calls to only replace the given fields. Any field that is
71+
* not specified in {@code fields} is ignored and remains untouched.
7272
*
7373
* <p>It is an error to pass a {@code SetOptions} object to a {@code set()} call that is missing a
7474
* value for any of the fields specified here.
@@ -88,8 +88,8 @@ public static SetOptions mergeFields(@NonNull List<String> fields) {
8888
}
8989

9090
/**
91-
* Changes the behavior of {@code set()} calls to only replace the fields under fieldPaths. Any
92-
* field that is not specified in fieldPaths is ignored and remains untouched.
91+
* Changes the behavior of {@code set()} calls to only replace the given fields. Any field that is
92+
* not specified in {@code fields} is ignored and remains untouched.
9393
*
9494
* <p>It is an error to pass a {@code SetOptions} object to a {@code set()} call that is missing a
9595
* value for any of the fields specified here.
@@ -109,8 +109,8 @@ public static SetOptions mergeFields(String... fields) {
109109
}
110110

111111
/**
112-
* Changes the behavior of {@code set()} calls to only replace the fields under fieldPaths. Any
113-
* field that is not specified in fieldPaths is ignored and remains untouched.
112+
* Changes the behavior of {@code set()} calls to only replace the given fields. Any field that is
113+
* not specified in {@code fields} is ignored and remains untouched.
114114
*
115115
* <p>It is an error to pass a {@code SetOptions} object to a {@code set()} call that is missing a
116116
* value for any of the fields specified here in its to data argument.

firebase-firestore/src/main/java/com/google/firebase/firestore/local/SQLiteRemoteDocumentCache.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
import static com.google.firebase.firestore.util.Assert.hardAssert;
1919

2020
import androidx.annotation.Nullable;
21-
import com.google.firebase.Timestamp;
2221
import com.google.firebase.database.collection.ImmutableSortedMap;
2322
import com.google.firebase.firestore.core.Query;
2423
import com.google.firebase.firestore.model.Document;
@@ -52,18 +51,13 @@ final class SQLiteRemoteDocumentCache implements RemoteDocumentCache {
5251
@Override
5352
public void add(MaybeDocument maybeDocument) {
5453
String path = pathForKey(maybeDocument.getKey());
55-
Timestamp timestamp = maybeDocument.getVersion().getTimestamp();
5654
MessageLite message = serializer.encodeMaybeDocument(maybeDocument);
5755

5856
statsCollector.recordRowsWritten(STATS_TAG, 1);
5957

6058
db.execute(
61-
"INSERT OR REPLACE INTO remote_documents "
62-
+ "(path, update_time_seconds, update_time_nanos, contents) "
63-
+ "VALUES (?, ?, ?, ?)",
59+
"INSERT OR REPLACE INTO remote_documents (path, contents) VALUES (?, ?)",
6460
path,
65-
timestamp.getSeconds(),
66-
timestamp.getNanoseconds(),
6761
message.toByteArray());
6862

6963
db.getIndexManager().addToCollectionParentIndex(maybeDocument.getKey().getPath().popLast());

firebase-firestore/src/main/java/com/google/firebase/firestore/local/SQLiteSchema.java

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,8 @@ class SQLiteSchema {
4545
/**
4646
* The version of the schema. Increase this by one for each migration added to runMigrations
4747
* below.
48-
*
49-
* <p>TODO(index-free): The migration to schema version 9 doesn't backfill `update_time` as this
50-
* requires rewriting the RemoteDocumentCache. For index-free queries to efficiently handle
51-
* existing documents, we still need to populate update_time for all existing entries, drop the
52-
* RemoteDocumentCache or ask users to invoke `clearPersistence()` manually. If we decide to
53-
* backfill or drop the contents of the RemoteDocumentCache, we need to perform an additional
54-
* schema migration.
5548
*/
56-
static final int VERSION = 9;
57-
49+
static final int VERSION = 8;
5850
// Remove this constant and increment VERSION to enable indexing support
5951
static final int INDEXING_SUPPORT_VERSION = VERSION + 1;
6052

@@ -135,10 +127,6 @@ void runMigrations(int fromVersion, int toVersion) {
135127
createV8CollectionParentsIndex();
136128
}
137129

138-
if (fromVersion < 9 && toVersion >= 9) {
139-
addUpdateTime();
140-
}
141-
142130
/*
143131
* Adding a new migration? READ THIS FIRST!
144132
*
@@ -363,16 +351,6 @@ private void addSequenceNumber() {
363351
}
364352
}
365353

366-
private void addUpdateTime() {
367-
if (!tableContainsColumn("remote_documents", "update_time_seconds")) {
368-
hardAssert(
369-
!tableContainsColumn("remote_documents", "update_time_nanos"),
370-
"Table contained update_time_seconds, but is missing update_time_nanos");
371-
db.execSQL("ALTER TABLE remote_documents ADD COLUMN update_time_seconds INTEGER");
372-
db.execSQL("ALTER TABLE remote_documents ADD COLUMN update_time_nanos INTEGER");
373-
}
374-
}
375-
376354
/**
377355
* Ensures that each entry in the remote document cache has a corresponding sentinel row. Any
378356
* entries that lack a sentinel row are given one with the sequence number set to the highest

0 commit comments

Comments
 (0)