Search in sources :

Example 1 with DecimalFormatSymbols

use of android.icu.text.DecimalFormatSymbols in project android_frameworks_base by DirtyUnicorns.

the class ZygoteInit method beginIcuCachePinning.

private static void beginIcuCachePinning() {
    // Pin ICU data in memory from this point that would normally be held by soft references.
    // Without this, any references created immediately below or during class preloading
    // would be collected when the Zygote GC runs in gcAndFinalize().
    Log.i(TAG, "Installing ICU cache reference pinning...");
    CacheValue.setStrength(CacheValue.Strength.STRONG);
    Log.i(TAG, "Preloading ICU data...");
    // Explicitly exercise code to cache data apps are likely to need.
    ULocale[] localesToPin = { ULocale.ROOT, ULocale.US, ULocale.getDefault() };
    for (ULocale uLocale : localesToPin) {
        new DecimalFormatSymbols(uLocale);
    }
}
Also used : ULocale(android.icu.util.ULocale) DecimalFormatSymbols(android.icu.text.DecimalFormatSymbols)

Example 2 with DecimalFormatSymbols

use of android.icu.text.DecimalFormatSymbols in project platform_frameworks_base by android.

the class ZygoteInit method beginIcuCachePinning.

private static void beginIcuCachePinning() {
    // Pin ICU data in memory from this point that would normally be held by soft references.
    // Without this, any references created immediately below or during class preloading
    // would be collected when the Zygote GC runs in gcAndFinalize().
    Log.i(TAG, "Installing ICU cache reference pinning...");
    CacheValue.setStrength(CacheValue.Strength.STRONG);
    Log.i(TAG, "Preloading ICU data...");
    // Explicitly exercise code to cache data apps are likely to need.
    ULocale[] localesToPin = { ULocale.ROOT, ULocale.US, ULocale.getDefault() };
    for (ULocale uLocale : localesToPin) {
        new DecimalFormatSymbols(uLocale);
    }
}
Also used : ULocale(android.icu.util.ULocale) DecimalFormatSymbols(android.icu.text.DecimalFormatSymbols)

Example 3 with DecimalFormatSymbols

use of android.icu.text.DecimalFormatSymbols in project android_frameworks_base by AOSPA.

the class ZygoteInit method beginIcuCachePinning.

private static void beginIcuCachePinning() {
    // Pin ICU data in memory from this point that would normally be held by soft references.
    // Without this, any references created immediately below or during class preloading
    // would be collected when the Zygote GC runs in gcAndFinalize().
    Log.i(TAG, "Installing ICU cache reference pinning...");
    CacheValue.setStrength(CacheValue.Strength.STRONG);
    Log.i(TAG, "Preloading ICU data...");
    // Explicitly exercise code to cache data apps are likely to need.
    ULocale[] localesToPin = { ULocale.ROOT, ULocale.US, ULocale.getDefault() };
    for (ULocale uLocale : localesToPin) {
        new DecimalFormatSymbols(uLocale);
    }
}
Also used : ULocale(android.icu.util.ULocale) DecimalFormatSymbols(android.icu.text.DecimalFormatSymbols)

Example 4 with DecimalFormatSymbols

use of android.icu.text.DecimalFormatSymbols in project android_frameworks_base by ResurrectionRemix.

the class ZygoteInit method beginIcuCachePinning.

private static void beginIcuCachePinning() {
    // Pin ICU data in memory from this point that would normally be held by soft references.
    // Without this, any references created immediately below or during class preloading
    // would be collected when the Zygote GC runs in gcAndFinalize().
    Log.i(TAG, "Installing ICU cache reference pinning...");
    CacheValue.setStrength(CacheValue.Strength.STRONG);
    Log.i(TAG, "Preloading ICU data...");
    // Explicitly exercise code to cache data apps are likely to need.
    ULocale[] localesToPin = { ULocale.ROOT, ULocale.US, ULocale.getDefault() };
    for (ULocale uLocale : localesToPin) {
        new DecimalFormatSymbols(uLocale);
    }
}
Also used : ULocale(android.icu.util.ULocale) DecimalFormatSymbols(android.icu.text.DecimalFormatSymbols)

Example 5 with DecimalFormatSymbols

use of android.icu.text.DecimalFormatSymbols in project android_frameworks_base by crdroidandroid.

the class ZygoteInit method beginIcuCachePinning.

private static void beginIcuCachePinning() {
    // Pin ICU data in memory from this point that would normally be held by soft references.
    // Without this, any references created immediately below or during class preloading
    // would be collected when the Zygote GC runs in gcAndFinalize().
    Log.i(TAG, "Installing ICU cache reference pinning...");
    CacheValue.setStrength(CacheValue.Strength.STRONG);
    Log.i(TAG, "Preloading ICU data...");
    // Explicitly exercise code to cache data apps are likely to need.
    ULocale[] localesToPin = { ULocale.ROOT, ULocale.US, ULocale.getDefault() };
    for (ULocale uLocale : localesToPin) {
        new DecimalFormatSymbols(uLocale);
    }
}
Also used : ULocale(android.icu.util.ULocale) DecimalFormatSymbols(android.icu.text.DecimalFormatSymbols)

Aggregations

DecimalFormatSymbols (android.icu.text.DecimalFormatSymbols)5 ULocale (android.icu.util.ULocale)5