Search in sources :

Example 1 with GlobalHelper

use of com.farmerbb.taskbar.helper.GlobalHelper in project Taskbar by farmerbb.

the class U method allowReflection.

@TargetApi(Build.VERSION_CODES.P)
public static void allowReflection() {
    GlobalHelper helper = GlobalHelper.getInstance();
    if (helper.isReflectionAllowed())
        return;
    // Workaround since HiddenApiBypass can't be mocked
    try {
        Class.forName("org.junit.Test");
    } catch (ClassNotFoundException e) {
        HiddenApiBypass.addHiddenApiExemptions("");
    }
    helper.setReflectionAllowed(true);
}
Also used : GlobalHelper(com.farmerbb.taskbar.helper.GlobalHelper) TargetApi(android.annotation.TargetApi)

Aggregations

TargetApi (android.annotation.TargetApi)1 GlobalHelper (com.farmerbb.taskbar.helper.GlobalHelper)1