Commit 99ccbc06 authored by Shimi Zhang's avatar Shimi Zhang Committed by Commit Bot

aw: Cleanup AwResources.java

The usage of sResourceCache had been removed in
https://codereview.chromium.org/1270793002 long time ago, but the member
variable is still there, it should be removed as well.

Since now there is only one ID in this class, modify the comments
accordingly.

Bug: None
Change-Id: I58443bb6d9200ce8970d0745a110cb80a707a12a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2036810Reviewed-by: default avatarRichard Coles <torne@chromium.org>
Commit-Queue: Shimi Zhang <ctzsm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#738237}
parent 722e1201
......@@ -5,34 +5,26 @@
package org.chromium.android_webview.common;
import android.content.res.Resources;
import android.util.SparseArray;
import org.chromium.base.annotations.CalledByNative;
import org.chromium.base.annotations.JNINamespace;
import java.lang.ref.SoftReference;
/**
* A class that defines a set of resource IDs and functionality to resolve
* those IDs to concrete resources.
*/
@JNINamespace("android_webview::AwResource")
public class AwResource {
// The following resource ID's must be initialized by the embedder.
// Array resource ID for the configuration of platform specific key-systems.
// Array resource ID for the configuration of platform specific key-systems, must be initialized
// by the embedder.
private static int sStringArrayConfigKeySystemUUIDMapping;
// The embedder should inject a Resources object that will be used
// to resolve Resource IDs into the actual resources.
private static Resources sResources;
// Loading some resources is expensive, so cache the results.
private static SparseArray<SoftReference<String>> sResourceCache;
public static void setResources(Resources resources) {
sResources = resources;
sResourceCache = new SparseArray<SoftReference<String>>();
}
public static void setConfigKeySystemUuidMapping(int config) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment