Skip to content

Commit

Permalink
Cosmetics (more or less)
Browse files Browse the repository at this point in the history
  • Loading branch information
rovo89 committed May 10, 2014
1 parent 1bc88a7 commit 2577ba5
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/android/app/AndroidAppHelper.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package android.app;

import static de.robv.android.xposed.XposedHelpers.findClass;
import static de.robv.android.xposed.XposedHelpers.findField;
import static de.robv.android.xposed.XposedHelpers.getObjectField;
import static de.robv.android.xposed.XposedHelpers.newInstance;
Expand All @@ -9,7 +10,6 @@

import android.content.SharedPreferences;
import android.content.pm.ApplicationInfo;
import android.content.res.CompatibilityInfo;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.os.Build;
Expand All @@ -26,13 +26,13 @@ public class AndroidAppHelper {
private static boolean HAS_IS_THEMEABLE = false;

static {
try {
CLASS_RESOURCES_KEY = (Build.VERSION.SDK_INT < 19) ?
Class.forName("android.app.ActivityThread$ResourcesKey")
: Class.forName("android.content.res.ResourcesKey");
CLASS_RESOURCES_KEY = (Build.VERSION.SDK_INT < 19) ?
findClass("android.app.ActivityThread$ResourcesKey", null)
: findClass("android.content.res.ResourcesKey", null);

// check if the field exists
findField(CompatibilityInfo.class, "isThemeable");
try {
// T-Mobile theming engine (CyanogenMod etc.)
findField(CLASS_RESOURCES_KEY, "mIsThemeable");
HAS_IS_THEMEABLE = true;
} catch (NoSuchFieldError ignored) {
} catch (Throwable t) { XposedBridge.log(t); }
Expand Down

0 comments on commit 2577ba5

Please sign in to comment.