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

Commit 0d02bd84 authored by Roozbeh Pournader's avatar Roozbeh Pournader
Browse files

Removed unused setLocale() method.

The setLocale() method in android.content.res.AssetManager was not
used. Removing it to reduce maintenance cost.

Change-Id: I1b168fe84c2465d1ebc2b62bb965eda885e1220a
parent 6b92c6e5
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -685,13 +685,6 @@ public final class AssetManager implements AutoCloseable {
     */
    public native final boolean isUpToDate();

    /**
     * Change the locale being used by this asset manager.  Not for use by
     * applications.
     * {@hide}
     */
    public native final void setLocale(String locale);

    /**
     * Get the locales that this asset manager contains data for.
     *
+0 −18
Original line number Diff line number Diff line
@@ -578,22 +578,6 @@ static jboolean android_content_AssetManager_isUpToDate(JNIEnv* env, jobject cla
    return am->isUpToDate() ? JNI_TRUE : JNI_FALSE;
}

static void android_content_AssetManager_setLocale(JNIEnv* env, jobject clazz,
                                                jstring locale)
{
    ScopedUtfChars locale8(env, locale);
    if (locale8.c_str() == NULL) {
        return;
    }

    AssetManager* am = assetManagerForJavaObject(env, clazz);
    if (am == NULL) {
        return;
    }

    am->setLocale(locale8.c_str());
}

static jobjectArray android_content_AssetManager_getLocales(JNIEnv* env, jobject clazz)
{
    Vector<String8> locales;
@@ -2168,8 +2152,6 @@ static const JNINativeMethod gAssetManagerMethods[] = {
        (void*) android_content_AssetManager_isUpToDate },

    // Resources.
    { "setLocale",      "(Ljava/lang/String;)V",
        (void*) android_content_AssetManager_setLocale },
    { "getLocales",      "()[Ljava/lang/String;",
        (void*) android_content_AssetManager_getLocales },
    { "getSizeConfigurations", "()[Landroid/content/res/Configuration;",