use of de.robv.android.xposed.XposedHelpers.ClassNotFoundError in project Xposed-Tinted-Status-Bar by MohammadAG.
the class LGHooks method doImeHook.
public static void doImeHook() {
if (!isLGKitKatDevice())
return;
try {
Class<?> inputMethodMgrClss = findClass("com.android.server.InputMethodManagerService", null);
findAndHookMethod(inputMethodMgrClss, "setImeWindowStatus", IBinder.class, int.class, int.class, new XC_MethodHook() {
@Override
protected void afterHookedMethod(MethodHookParam param) throws Throwable {
int vis = (Integer) param.args[1];
Context mContext = (Context) getObjectField(param.thisObject, "mContext");
boolean isKeyboardUp = (vis & IME_ACTIVE) != 0;
if (isKeyboardUp != mWasKeyboardUp && mContext != null) {
Intent intent = new Intent(Common.INTENT_KEYBOARD_VISIBLITY_CHANGED);
intent.putExtra(Common.EXTRA_KEY_KEYBOARD_UP, isKeyboardUp);
mContext.sendBroadcast(intent);
mWasKeyboardUp = isKeyboardUp;
}
}
});
} catch (ClassNotFoundError e) {
//DO NOTHING
}
}
use of de.robv.android.xposed.XposedHelpers.ClassNotFoundError in project Xposed-Tinted-Status-Bar by MohammadAG.
the class LGHooks method hookStatusBar.
private static void hookStatusBar(ClassLoader classLoader) {
// REMOVE THE BACKGROUND ONLY
try {
Class<?> StatusBarBackGroundClss = findClass("com.lge.systemui.StatusBarBackground", classLoader);
findAndHookMethod(StatusBarBackGroundClss, "applyMode", int.class, boolean.class, new XC_MethodHook() {
@SuppressLint("NewApi")
@Override
protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
int i = (Integer) param.args[0];
if (i != 1 && i != 2) {
XposedHelpers.setIntField(param.thisObject, "mMode", i);
ImageView imageView = (ImageView) param.thisObject;
imageView.setBackground(null);
imageView.setVisibility(View.VISIBLE);
param.setResult(null);
}
}
});
} catch (ClassNotFoundError e) {
XposedBridge.log("TintedStatusBar: LG StatusBarBackground has not been found...skipping");
}
}
use of de.robv.android.xposed.XposedHelpers.ClassNotFoundError in project Xposed-Tinted-Status-Bar by MohammadAG.
the class SamsungHook method doHook.
public static void doHook(ColourChangerMod instance, ClassLoader loader) {
if (!android.os.Build.MANUFACTURER.toLowerCase(Locale.getDefault()).contains("samsung"))
return;
Class<?> PhoneStatusBar = null;
try {
PhoneStatusBar = findClass("com.android.systemui.statusbar.phone.PhoneStatusBar", loader);
} catch (ClassNotFoundError e) {
// Bigger problems to worry about if this isn't found.
}
try {
if (PhoneStatusBar != null) {
Method m = XposedHelpers.findMethodExact(PhoneStatusBar, "transparentizeStatusBar", int.class);
XposedBridge.hookMethod(m, new SamsungHook(instance));
}
} catch (NoSuchMethodError e) {
// Not an S4
}
}
Aggregations