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

Commit c96235de authored by Iain Merrick's avatar Iain Merrick
Browse files

Deprecate CacheManager.

This class gives fairly low-level access to the HTTP cache, which
as far as we can tell was only exposed for the benefit of Gears.

BUG=3270236

Change-Id: Ibce10ecf8b524d3f472affa2a37fe4de15efd2ed
parent 1c602b3e
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -223249,7 +223249,7 @@
 synchronized="false"
 static="true"
 final="false"
 deprecated="not deprecated"
 deprecated="deprecated"
 visibility="public"
>
</method>
@@ -223271,7 +223271,7 @@
 synchronized="false"
 static="true"
 final="false"
 deprecated="not deprecated"
 deprecated="deprecated"
 visibility="public"
>
<parameter name="url" type="java.lang.String">
@@ -223286,7 +223286,7 @@
 synchronized="false"
 static="true"
 final="false"
 deprecated="not deprecated"
 deprecated="deprecated"
 visibility="public"
>
</method>
@@ -223297,7 +223297,7 @@
 synchronized="false"
 static="true"
 final="false"
 deprecated="not deprecated"
 deprecated="deprecated"
 visibility="public"
>
<parameter name="url" type="java.lang.String">
+24 −3
Original line number Diff line number Diff line
@@ -44,7 +44,10 @@ import org.bouncycastle.crypto.digests.SHA1Digest;
 * this component and if they can not be resolved by the cache, the HTTP headers
 * are attached, as appropriate, to the request for revalidation of content. The
 * class also manages the cache size.
 *
 * @deprecated Access to the HTTP cache will be removed in a future release.
 */
@Deprecated
public final class CacheManager {

    private static final String LOGTAG = "cache";
@@ -85,7 +88,10 @@ public final class CacheManager {
     * This class represents a resource retrieved from the HTTP cache.
     * Instances of this class can be obtained by invoking the
     * CacheManager.getCacheFile() method.
     *
     * @deprecated Access to the HTTP cache will be removed in a future release.
     */
    @Deprecated
    public static class CacheResult {
        // these fields are saved to the database
        int httpStatusCode;
@@ -222,7 +228,10 @@ public final class CacheManager {
     * it identifies the cache file.
     *
     * @return File The base directory of the cache.
     *
     * @deprecated Access to the HTTP cache will be removed in a future release.
     */
    @Deprecated
    public static File getCacheFileBaseDir() {
        return mBaseDir;
    }
@@ -246,7 +255,10 @@ public final class CacheManager {
     * get the state of the current cache, enabled or disabled
     *
     * @return return if it is disabled
     *
     * @deprecated Access to the HTTP cache will be removed in a future release.
     */
    @Deprecated
    public static boolean cacheDisabled() {
        return mDisabled;
    }
@@ -314,8 +326,11 @@ public final class CacheManager {
     * HEADER_KEY_IFNONEMATCH or HEADER_KEY_IFMODIFIEDSINCE will be set in the
     * cached headers.
     * 
     * @return the CacheResult for a given url
     * @return the CacheResult for a given url.
     *
     * @deprecated Access to the HTTP cache will be removed in a future release.
     */
    @Deprecated
    public static CacheResult getCacheFile(String url,
            Map<String, String> headers) {
        return getCacheFile(url, 0, headers);
@@ -390,7 +405,10 @@ public final class CacheManager {
     * @return CacheResult for a given url
     * @hide - hide createCacheFile since it has a parameter of type headers, which is
     * in a hidden package.
     *
     * @deprecated Access to the HTTP cache will be removed in a future release.
     */
    @Deprecated
    public static CacheResult createCacheFile(String url, int statusCode,
            Headers headers, String mimeType, boolean forceCache) {
        return createCacheFile(url, statusCode, headers, mimeType, 0,
@@ -455,7 +473,10 @@ public final class CacheManager {
    /**
     * Save the info of a cache file for a given url to the CacheMap so that it
     * can be reused later
     *
     * @deprecated Access to the HTTP cache will be removed in a future release.
     */
    @Deprecated
    public static void saveCacheFile(String url, CacheResult cacheRet) {
        saveCacheFile(url, 0, cacheRet);
    }