Search in sources :

Example 6 with NoSuchMethodException

use of java.lang.NoSuchMethodException in project Resurrection_packages_apps_Settings by ResurrectionRemix.

the class DimmableIZatIconPreference method load.

private static void load(Context context) {
    if (mLoader == null) {
        try {
            if (mXtProxyClz == null || mNotifierClz == null) {
                mLoader = new DexClassLoader("/system/framework/izat.xt.srv.jar", context.getFilesDir().getAbsolutePath(), null, ClassLoader.getSystemClassLoader());
                mXtProxyClz = Class.forName("com.qti.izat.XTProxy", true, mLoader);
                mNotifierClz = Class.forName("com.qti.izat.XTProxy$Notifier", true, mLoader);
                mIzatPackage = (String) mXtProxyClz.getField("IZAT_XT_PACKAGE").get(null);
                mGetXtProxyMethod = mXtProxyClz.getMethod("getXTProxy", Context.class, mNotifierClz);
                mGetConsentMethod = mXtProxyClz.getMethod("getUserConsent");
                mShowIzatMethod = mXtProxyClz.getMethod("showIzat", Context.class, String.class);
            }
        } catch (NoSuchMethodException | NullPointerException | SecurityException | NoSuchFieldException | LinkageError | IllegalAccessException | ClassNotFoundException e) {
            mXtProxyClz = null;
            mNotifierClz = null;
            mIzatPackage = null;
            mGetXtProxyMethod = null;
            mGetConsentMethod = null;
            mShowIzatMethod = null;
            e.printStackTrace();
        }
    }
}
Also used : Context(android.content.Context) LinkageError(java.lang.LinkageError) NullPointerException(java.lang.NullPointerException) DexClassLoader(dalvik.system.DexClassLoader) SecurityException(java.lang.SecurityException) NoSuchFieldException(java.lang.NoSuchFieldException) ClassNotFoundException(java.lang.ClassNotFoundException) NoSuchMethodException(java.lang.NoSuchMethodException) IllegalAccessException(java.lang.IllegalAccessException)

Aggregations

NoSuchMethodException (java.lang.NoSuchMethodException)6 Method (java.lang.reflect.Method)5 BitmapDrawable (android.graphics.drawable.BitmapDrawable)4 Parcel (android.os.Parcel)4 SpannableStringBuilder (android.text.SpannableStringBuilder)4 ArrayList (java.util.ArrayList)4 Context (android.content.Context)2 NullPointerException (java.lang.NullPointerException)2 Intent (android.content.Intent)1 Uri (android.net.Uri)1 Bundle (android.os.Bundle)1 TaskStackBuilder (android.support.v4.app.TaskStackBuilder)1 DeepLinkEntry (com.airbnb.deeplinkdispatch.DeepLinkEntry)1 DeepLinkUri (com.airbnb.deeplinkdispatch.DeepLinkUri)1 DexClassLoader (dalvik.system.DexClassLoader)1 ClassNotFoundException (java.lang.ClassNotFoundException)1 IllegalAccessException (java.lang.IllegalAccessException)1 LinkageError (java.lang.LinkageError)1 NoSuchFieldException (java.lang.NoSuchFieldException)1 SecurityException (java.lang.SecurityException)1