Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5fb698fa authored by Kevin Hufnagle's avatar Kevin Hufnagle Committed by android-build-merger
Browse files

docs: Added note in getCacheDir() that developers can use directory obtained...

docs: Added note in getCacheDir() that developers can use directory obtained from getExternalCacheDir() to store app caches larger than 1 MB. am: e9681e19 am: 2e8026ac
am: e83639f6

Change-Id: Iccc0b748b9b41e3cb61b2a9852767e9196fcba76
parents 2deb88da e83639f6
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -1130,7 +1130,9 @@ public abstract class Context {
     * <strong>Note: you should not <em>rely</em> on the system deleting these
     * files for you; you should always have a reasonable maximum, such as 1 MB,
     * for the amount of space you consume with cache files, and prune those
     * files when exceeding that space.</strong>
     * files when exceeding that space.</strong> If your app requires a larger
     * cache (larger than 1 MB), you should use {@link #getExternalCacheDir()}
     * instead.
     * <p>
     * The returned path may change over time if the calling app is moved to an
     * adopted storage device, so only relative paths should be persisted.
@@ -1142,6 +1144,7 @@ public abstract class Context {
     * @see #openFileOutput
     * @see #getFileStreamPath
     * @see #getDir
     * @see #getExternalCacheDir
     */
    public abstract File getCacheDir();

@@ -1190,7 +1193,7 @@ public abstract class Context {
     * </ul>
     * <p>
     * If a shared storage device is emulated (as determined by
     * {@link Environment#isExternalStorageEmulated(File)}), it's contents are
     * {@link Environment#isExternalStorageEmulated(File)}), its contents are
     * backed by a private user data partition, which means there is little
     * benefit to storing data here instead of the private directory returned by
     * {@link #getCacheDir()}.