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

Commit 6c57fc30 authored by Deepanshu Gupta's avatar Deepanshu Gupta
Browse files

DO NOT MERGE - Fix LayoutLib.

This fixes a bad merge and contains partial cherrypicks of the following
commits to make LayoutLib working again:
103d4096
803d77d8904a8fd66f0370cca6ed7f8b7cf68907
6a08225c

Bug: 15987446
Change-Id: I41563305206d30ecdbc7f609c4b90d53edb42689
parent c8fcb3bc
Loading
Loading
Loading
Loading
+8 −17
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ package libcore.icu;

import com.android.tools.layoutlib.annotations.LayoutlibDelegate;
import com.ibm.icu.text.DateTimePatternGenerator;
import com.ibm.icu.util.Currency;
import com.ibm.icu.util.ULocale;

import java.util.Locale;
@@ -116,6 +117,11 @@ public class ICU_Delegate {
        return 0;
    }

    @LayoutlibDelegate
    /*package*/ static int getCurrencyNumericCode(String currencyCode) {
        return Currency.getInstance(currencyCode).getNumericCode();
    }

    @LayoutlibDelegate
    /*package*/ static String getCurrencySymbol(String locale, String currencyCode) {
        return "";
@@ -142,12 +148,12 @@ public class ICU_Delegate {
    }

    @LayoutlibDelegate
    /*package*/ static String getISO3CountryNative(String locale) {
    /*package*/ static String getISO3Country(String locale) {
        return "";
    }

    @LayoutlibDelegate
    /*package*/ static String getISO3LanguageNative(String locale) {
    /*package*/ static String getISO3Language(String locale) {
        return "";
    }

@@ -177,21 +183,6 @@ public class ICU_Delegate {
        return "";
    }

    @LayoutlibDelegate
    /*package*/ static String languageTagForLocale(String locale) {
        return "";
    }

    @LayoutlibDelegate
    /*package*/ static String localeForLanguageTag(String languageTag, boolean strict) {
        return "";
    }

    @LayoutlibDelegate
    /*package*/ static String languageTagForLocale(String locale) {
        return "";
    }

    @LayoutlibDelegate
    /*package*/ static boolean initLocaleDataNative(String locale, LocaleData result) {

+10 −0
Original line number Diff line number Diff line
@@ -176,6 +176,16 @@ public abstract class AbstractClassAdapter extends ClassVisitor {
                interfaces[i] = renameInternalType(interfaces[i]);
            }
        }
        /* Java 7 verifies the StackMapTable of a class if its version number is greater than 50.0.
         * However, the check is disabled if the class version number is 50.0 or less. Generation
         * of the StackMapTable requires a rewrite using the tree API of ASM. As a workaround,
         * we rewrite the version number of the class to be 50.0
         *
         * http://bugs.java.com/bugdatabase/view_bug.do?bug_id=6693236
         */
        if (version > 50) {
            version = 50;
        }

        super.visit(version, access, name, signature, superName, interfaces);
    }