From 55ecf8cb8314900e3ff4c7f69328f94c03f03d29 Mon Sep 17 00:00:00 2001 From: Rich Gowman Date: Thu, 20 Jun 2019 15:04:36 -0400 Subject: [PATCH] Backporting documentation changes --- .../firebase/firestore/FirebaseFirestore.java | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/firebase-firestore/src/main/java/com/google/firebase/firestore/FirebaseFirestore.java b/firebase-firestore/src/main/java/com/google/firebase/firestore/FirebaseFirestore.java index 303e2f27d45..61a448e6d88 100644 --- a/firebase-firestore/src/main/java/com/google/firebase/firestore/FirebaseFirestore.java +++ b/firebase-firestore/src/main/java/com/google/firebase/firestore/FirebaseFirestore.java @@ -376,21 +376,22 @@ public static void setLoggingEnabled(boolean loggingEnabled) { } /** - * Clears the persistent storage. This includes pending writes and cached documents. + * Clears the persistent storage, including pending writes and cached documents. * - *

Must be called while the firestore instance is not started (after the app is shutdown or - * when the app is first initialized). On startup, this method must be called before other methods - * (other than setFirestoreSettings()). If the firestore instance is still running, the Task will - * fail with an error code of FAILED_PRECONDITION. + *

Must be called while the FirebaseFirestore instance is not started (after the app is + * shutdown or when the app is first initialized). On startup, this method must be called before + * other methods (other than setFirestoreSettings()). If the FirebaseFirestore + * instance is still running, the Task will fail with an error code of + * FAILED_PRECONDITION. * - *

Note: clearPersistence() is primarily intended to help write reliable tests that use - * Firestore. It uses the most efficient mechanism possible for dropping existing data but does + *

Note: clearPersistence() is primarily intended to help write reliable tests + * that use Cloud Firestore. It uses an efficient mechanism for dropping existing data but does * not attempt to securely overwrite or otherwise make cached data unrecoverable. For applications - * that are sensitive to the disclosure of cache data in between user sessions we strongly - * recommend not to enable persistence in the first place. + * that are sensitive to the disclosure of cached data in between user sessions, we strongly + * recommend not enabling persistence at all. * - * @return A Task that is resolved once the persistent storage has been cleared. Otherwise, the - * Task is rejected with an error. + * @return A Task that is resolved when the persistent storage is cleared. Otherwise, + * the Task is rejected with an error. */ @PublicApi public Task clearPersistence() {