@Override
protected void afterHookedMethod(MethodHookParam param) throws Throwable {
/
/
TODO Auto
-
generated method stub
super
.afterHookedMethod(param);
DisplayMetrics dm
=
(DisplayMetrics)param.args[
0
];
dm.widthPixels
=
999
;
}
});
} catch (Exception e) {
XposedBridge.log(
"Fake DPI ERROR: "
+
e.getMessage());
}
try
{
XposedHelpers.findAndHookMethod(
"android.util.DisplayMetrics"
, loadPkgParam.classLoader,
"heightPixels"
, new XC_MethodHook() {
@Override
protected void afterHookedMethod(MethodHookParam param)
throws Throwable {
/
/
TODO Auto
-
generated method stub
super
.afterHookedMethod(param);
DisplayMetrics dm
=
(DisplayMetrics)param.args[
0
];
dm.heightPixels
=
888
;
}
});
} catch (Exception e) {
XposedBridge.log(
"Fake DPI ERROR: "
+
e.getMessage());
}
try
{
XposedHelpers.findAndHookMethod(
"android.view.Display"
, loadPkgParam.classLoader,
"getMetrics"
, new XC_MethodHook() {
@Override
protected void afterHookedMethod(MethodHookParam param)
throws Throwable {
/
/
TODO Auto
-
generated method stub
super
.afterHookedMethod(param);
final
int
dpi
=
111
;
DisplayMetrics metrics
=
(DisplayMetrics) param.args[
0
];
metrics.densityDpi
=
dpi;
}
});
} catch (Exception e) {
XposedBridge.log(
"Fake DPI ERROR: "
+
e.getMessage());
}